Raspberry Pi: mmcblk

mmcblk

SD/MMC card 는 MMC 서브시스템을 /dev/mmcblk{id} 형식으로 블럭 장치로 사용한다.

dmesg 로 부트 메시지를 보면 SDHCI 인터페이스에 장착한 장치를 확인할 수 있다.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
[    0.789621] sdhci: Secure Digital Host Controller Interface driver
[ 0.789628] sdhci: Copyright(c) Pierre Ossman
[ 0.789999] sdhost-bcm2835 3f202000.sdhost: could not get clk, deferring probe
[ 0.790252] sdhci-pltfm: SDHCI platform and OF driver helper
[ 0.791051] ledtrig-cpu: registered to indicate activity on CPUs
[ 0.791232] hidraw: raw HID events driver (C) Jiri Kosina
[ 0.791461] usbcore: registered new interface driver usbhid
[ 0.791467] usbhid: USB HID core driver
[ 0.792448] vchiq: vchiq_init_state: slot_zero = 0xb6980000, is_master = 0
[ 0.794533] Initializing XFRM netlink socket
[ 0.794566] NET: Registered protocol family 17
[ 0.794724] Key type dns_resolver registered
[ 0.795223] Registering SWP/SWPB emulation handler
[ 0.796192] registered taskstats version 1
[ 0.796681] vc-sm: Videocore shared memory driver
[ 0.796694] [vc_sm_connected_init]: start
[ 0.802967] [vc_sm_connected_init]: end - returning 0
[ 0.809343] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2
[ 0.809410] console [ttyAMA0] enabled
[ 0.811406] sdhost: log_buf @ b6913000 (f6913000)
[ 0.889149] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1)
[ 0.889333] of_cfs_init
[ 0.889478] of_cfs_init: OK
[ 0.890211] Waiting for root device /dev/mmcblk0p2...
[ 0.956566] mmc0: host does not support reading read-only switch, assuming write-enable
[ 0.958563] mmc0: new high speed SDHC card at address 59b4
[ 0.959555] mmcblk0: mmc0:59b4 00000 14.9 GiB
[ 0.961428] mmcblk0: p1 p2

메시지에서 보듯 mmc0 장치에 카드가 삽입되기 전에 인터럽트가 없다.

1
2
$ cat /proc/interrupts |grep mmc
86: 393 0 0 0 ARMCTRL-level 88 Edge mmc0

https://developer.toradex.com/knowledge-base/sd-mmc-card-(linux)

Raspberry Pi : Digital Signage

Digital Signage

라즈베리파이에서 슬라이드쇼 구현해 보자.

py-slideshow

https://github.com/cgoldberg/py-slideshow/

pyglet 으로 이미지를 패닝, 확대 효과를 가진 슬라이드 쇼.

Screenly OSE

Screenly Open Source Edition은 디지털 시그네이지 소프트웨어 이다.

Disk images

The recommended installation method is to grab the latest disk image from here

라즈비안에서 설치

Raspbian Lite 에서 설치를 할 수 있다.

먼저

sudo apt install -y network-manager

1
2
3
4
5
6
7
8
9
10
11
$ bash <(curl -sL https://www.screenly.io/install-ose.sh)
_____ __ ____ _____ ______
/ ___/_____________ ___ ____ / /_ __ / __ \/ ___// ____/
\__ \/ ___/ ___/ _ \/ _ \/ __ \/ / / / / / / / /\__ \/ __/
___/ / /__/ / / __/ __/ / / / / /_/ / / /_/ /___/ / /___
/____/\___/_/ \___/\___/_/ /_/_/\__, / \____//____/_____/
/____/
Screenly OSE requires a dedicated Raspberry Pi / SD card.
You will not be able to use the regular desktop environment once installed.

Do you still want to continue? (y/N)
1
Would you like to use the experimental branch? It contains the last major changes, such as the new browser and migrating to Docker (y/N)

It looks like NetworkManager is not installed. Please install it by running ‘sudo apt install -y network-manager’ and then re-run the installation.

1
Would you like to perform a full system upgrade as well? (y/N)

설치를 시작하면 15분 이상이 소요된다.
This installation will take 15 minutes to several hours, depending on variables such as:

1
2
Installation completed.
You need to reboot the system for the installation to complete. Would you like to reboot now? (y/N)

pipresent

python2 기반이고, 실행이 안됐다.

https://pipresents.wordpress.com

https://github.com/KenT2/pipresents-beep

Requirements
  • must use the latest version of Raspbian Stretch with Desktop (not the Lite version)
  • must be run from the PIXEL desktop.
  • must be installed and run from user Pi

install

required packages

1
2
sudo apt install python-imaging python-pil.imagetk python-pexpect
sudo apt install unclutter mplayer uzbl

optional packages

sudo pip install evdev (if you are using the input device I/O plugin)
sudo apt-get install mpg123 (for .mp3 beeps)

1
wget https://github.com/KenT2/pipresents-beep/tarball/master -O - | tar xz

Dead-simple Digital menu

https://github.com/angryrancor/ezdmb