私はラズベリーとラズベリーWheezyを使用して興味深い組み込みプロジェクトを進めています。このプロジェクトでは、統合タッチスクリーン(tontec mz61561)の電源が入るとすぐにプロジェクトのロゴを表示する必要があります。
私は1)plymouth、2)タッチスクリーンモジュール(spi_bcm2708)、3)HDMI出力から埋め込み画面(fbcp)にディスプレイをコピーするプログラムを実行するように設計されたカスタムinitramfsを使用してこれを行いました。電源を入れると、数秒以内にロゴが誇らしげに表示されます =)
残念ながら、システムを4.0.7から4.4.27-v7+にアップグレードする必要があり、このトリックが機能しなくなりました。 initramfsの後にタッチスクリーンがロードされ、fbcpが終了し、黒い画面が表示されました。
これは実行可能なinit-topセクションにある古いinitramfsスクリプトです。
#!/bin/sh
PREREQ=""
prereqs()
{
echo "$PREREQ"
}
case $1 in
prereqs)
prereqs
exit 0
;;
esac
modprobe spi_bcm2708
cat /etc/image640.raw >/dev/fb0
/etc/fbcp &
exit 0
これは /initramfs-tools/modules の前の内容です:
spi_bcm2708
fbtft
fb_s6d02a1
以下は、config.txtのタッチスクリーンdtoverlayへの呼び出しで、initramfsを起動します。
dtoverlay=mz61581,speed=68000000
initramfs initrd.img-4.0.7-v7+
#Now : initramfs initrd.img-4.4.27-v7+
私はspi_bcm2708
もう利用できないことを知り、lsmodはspi_bcm2835が使用する新しいモジュールのようだというメッセージを表示しました。私のシステムとinitramfsコンテンツのすべてのspi_bcm2708をspi_bcm2835に置き換えても問題は解決しませんでした。
また、関連モジュールがブラックリストに登録されておらず、deviceTreeログにエラーが記録されていないことを確認しました。
タッチスクリーンの読み込み方法は次のとおりです。
[ 4.873550] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 6.176518] udevd[377]: starting version 175
[ 6.631417] bcm2835-wdt 3f100000.watchdog: Broadcom BCM2835 watchdog timer
[ 6.800118] bcm2708_i2c 3f804000.i2c: BSC1 Controller at 0x3f804000 (irq 83) (baudrate 100000)
[ 6.868206] gpiomem-bcm2835 3f200000.gpiomem: Initialised: Registers at 0x3f200000
[ 7.027694] fbtft: module is from the staging directory, the quality is unknown, you have been warned.
[ 7.035284] fb_s6d02a1: module is from the staging directory, the quality is unknown, you have been warned.
[ 7.036436] fbtft_of_value: width = 320
[ 7.036463] fbtft_of_value: height = 480
[ 7.036481] fbtft_of_value: buswidth = 8
[ 7.036496] fbtft_of_value: debug = 3
[ 7.036510] fbtft_of_value: rotate = 270
[ 7.036523] fbtft_of_value: fps = 30
[ 7.036536] fbtft_of_value: txbuflen = 32768
[ 7.037182] fb_s6d02a1 spi0.0: fbtft_request_one_gpio: 'reset-gpios' = GPIO15
[ 7.037273] fb_s6d02a1 spi0.0: fbtft_request_one_gpio: 'dc-gpios' = GPIO25
[ 7.037357] fb_s6d02a1 spi0.0: fbtft_request_one_gpio: 'led-gpios' = GPIO18
[ 7.037577] fb_s6d02a1 spi0.0: fbtft_verify_gpios()
[ 7.037614] fb_s6d02a1 spi0.0: fbtft_reset()
[ 7.157731] fb_s6d02a1 spi0.0: init: write_register:
[ 7.157763] fb_s6d02a1 spi0.0: buf[0] = B0
[ 7.157779] fb_s6d02a1 spi0.0: buf[1] = 00
[ 7.157950] fb_s6d02a1 spi0.0: init: write_register:
[ 7.157974] fb_s6d02a1 spi0.0: buf[0] = 11
[ 7.158014] fb_s6d02a1 spi0.0: init: msleep(255)
[ 7.418607] fb_s6d02a1 spi0.0: init: write_register:
[ 7.418637] fb_s6d02a1 spi0.0: buf[0] = B3
[ 7.418654] fb_s6d02a1 spi0.0: buf[1] = 02
[ 7.418669] fb_s6d02a1 spi0.0: buf[2] = 00
[ 7.418685] fb_s6d02a1 spi0.0: buf[3] = 00
[ 7.418700] fb_s6d02a1 spi0.0: buf[4] = 00
[ 7.418797] fb_s6d02a1 spi0.0: init: write_register:
[ 7.418815] fb_s6d02a1 spi0.0: buf[0] = C0
[ 7.418831] fb_s6d02a1 spi0.0: buf[1] = 13
[ 7.418846] fb_s6d02a1 spi0.0: buf[2] = 3B
[ 7.418861] fb_s6d02a1 spi0.0: buf[3] = 00
[ 7.418876] fb_s6d02a1 spi0.0: buf[4] = 02
[ 7.418891] fb_s6d02a1 spi0.0: buf[5] = 00
[ 7.418906] fb_s6d02a1 spi0.0: buf[6] = 01
[ 7.418921] fb_s6d02a1 spi0.0: buf[7] = 00
[ 7.418936] fb_s6d02a1 spi0.0: buf[8] = 43
[ 7.418993] fb_s6d02a1 spi0.0: init: write_register:
[ 7.419010] fb_s6d02a1 spi0.0: buf[0] = C1
[ 7.419025] fb_s6d02a1 spi0.0: buf[1] = 08
[ 7.419041] fb_s6d02a1 spi0.0: buf[2] = 16
[ 7.419056] fb_s6d02a1 spi0.0: buf[3] = 08
[ 7.419071] fb_s6d02a1 spi0.0: buf[4] = 08
[ 7.419121] fb_s6d02a1 spi0.0: init: write_register:
[ 7.419138] fb_s6d02a1 spi0.0: buf[0] = C4
[ 7.419153] fb_s6d02a1 spi0.0: buf[1] = 11
[ 7.419168] fb_s6d02a1 spi0.0: buf[2] = 07
[ 7.419183] fb_s6d02a1 spi0.0: buf[3] = 03
[ 7.419198] fb_s6d02a1 spi0.0: buf[4] = 03
[ 7.419249] fb_s6d02a1 spi0.0: init: write_register:
[ 7.419265] fb_s6d02a1 spi0.0: buf[0] = C6
[ 7.419281] fb_s6d02a1 spi0.0: buf[1] = 00
[ 7.419329] fb_s6d02a1 spi0.0: init: write_register:
[ 7.419345] fb_s6d02a1 spi0.0: buf[0] = C8
[ 7.419361] fb_s6d02a1 spi0.0: buf[1] = 03
[ 7.419376] fb_s6d02a1 spi0.0: buf[2] = 03
[ 7.419392] fb_s6d02a1 spi0.0: buf[3] = 13
[ 7.419407] fb_s6d02a1 spi0.0: buf[4] = 5C
[ 7.419422] fb_s6d02a1 spi0.0: buf[5] = 03
[ 7.419437] fb_s6d02a1 spi0.0: buf[6] = 07
[ 7.419452] fb_s6d02a1 spi0.0: buf[7] = 14
[ 7.419467] fb_s6d02a1 spi0.0: buf[8] = 08
[ 7.419482] fb_s6d02a1 spi0.0: buf[9] = 00
[ 7.419497] fb_s6d02a1 spi0.0: buf[10] = 21
[ 7.419512] fb_s6d02a1 spi0.0: buf[11] = 08
[ 7.419528] fb_s6d02a1 spi0.0: buf[12] = 14
[ 7.419543] fb_s6d02a1 spi0.0: buf[13] = 07
[ 7.419558] fb_s6d02a1 spi0.0: buf[14] = 53
[ 7.419573] fb_s6d02a1 spi0.0: buf[15] = 0C
[ 7.419588] fb_s6d02a1 spi0.0: buf[16] = 13
[ 7.419603] fb_s6d02a1 spi0.0: buf[17] = 03
[ 7.419618] fb_s6d02a1 spi0.0: buf[18] = 03
[ 7.419633] fb_s6d02a1 spi0.0: buf[19] = 21
[ 7.419648] fb_s6d02a1 spi0.0: buf[20] = 00
[ 7.419709] fb_s6d02a1 spi0.0: init: write_register:
[ 7.419726] fb_s6d02a1 spi0.0: buf[0] = 35
[ 7.419741] fb_s6d02a1 spi0.0: buf[1] = 00
[ 7.419788] fb_s6d02a1 spi0.0: init: write_register:
[ 7.419805] fb_s6d02a1 spi0.0: buf[0] = 36
[ 7.419821] fb_s6d02a1 spi0.0: buf[1] = A0
[ 7.419868] fb_s6d02a1 spi0.0: init: write_register:
[ 7.419885] fb_s6d02a1 spi0.0: buf[0] = 3A
[ 7.419900] fb_s6d02a1 spi0.0: buf[1] = 55
[ 7.419948] fb_s6d02a1 spi0.0: init: write_register:
[ 7.419965] fb_s6d02a1 spi0.0: buf[0] = 44
[ 7.419980] fb_s6d02a1 spi0.0: buf[1] = 00
[ 7.419995] fb_s6d02a1 spi0.0: buf[2] = 01
[ 7.420043] fb_s6d02a1 spi0.0: init: write_register:
[ 7.420060] fb_s6d02a1 spi0.0: buf[0] = D0
[ 7.420076] fb_s6d02a1 spi0.0: buf[1] = 07
[ 7.420091] fb_s6d02a1 spi0.0: buf[2] = 07
[ 7.420106] fb_s6d02a1 spi0.0: buf[3] = 1D
[ 7.420122] fb_s6d02a1 spi0.0: buf[4] = 03
[ 7.420179] fb_s6d02a1 spi0.0: init: write_register:
[ 7.420196] fb_s6d02a1 spi0.0: buf[0] = D1
[ 7.420212] fb_s6d02a1 spi0.0: buf[1] = 03
[ 7.420227] fb_s6d02a1 spi0.0: buf[2] = 30
[ 7.420242] fb_s6d02a1 spi0.0: buf[3] = 10
[ 7.420290] fb_s6d02a1 spi0.0: init: write_register:
[ 7.420307] fb_s6d02a1 spi0.0: buf[0] = D2
[ 7.420322] fb_s6d02a1 spi0.0: buf[1] = 03
[ 7.420337] fb_s6d02a1 spi0.0: buf[2] = 14
[ 7.420353] fb_s6d02a1 spi0.0: buf[3] = 04
[ 7.420401] fb_s6d02a1 spi0.0: init: write_register:
[ 7.420417] fb_s6d02a1 spi0.0: buf[0] = 29
[ 7.420451] fb_s6d02a1 spi0.0: init: write_register:
[ 7.420467] fb_s6d02a1 spi0.0: buf[0] = 2C
[ 7.504691] fb_s6d02a1 spi0.0: Display update: 3565 kB/s, fps=0
[ 7.505815] graphics fb1: fb_s6d02a1 frame buffer, 480x320, 300 KiB video memory, 32 KiB DMA buffer memory, fps=33, spi0.0 at 68 MHz
[ 7.505842] fb_s6d02a1 spi0.0: fbtft_backlight_update_status: polarity=0, power=0, fb_blank=0
[ 7.507039] ads7846 spi0.1: touchscreen, irq 170
[ 7.507764] input: ADS7846 Touchscreen as /devices/platform/soc/3f204000.spi/spi_master/spi0/spi0.1/input/input1
以下は、画面がロードされた後のlsmodの結果です。
uvcvideo 72430 0
videobuf2_vmalloc 5187 1 uvcvideo
videobuf2_memops 1268 1 videobuf2_vmalloc
videobuf2_v4l2 16535 1 uvcvideo
videobuf2_core 20861 2 uvcvideo,videobuf2_v4l2
v4l2_common 3929 1 videobuf2_v4l2
videodev 132913 4 uvcvideo,v4l2_common,videobuf2_core,videobuf2_v4l2
media 11573 2 uvcvideo,videodev
evdev 11396 0
ads7846 11390 0
fb_s6d02a1 3367 0
hwmon 2840 1 ads7846
fbtft 26084 1 fb_s6d02a1
syscopyarea 2945 1 fbtft
sysfillrect 3443 1 fbtft
sysimgblt 2069 1 fbtft
fb_sys_fops 1309 1 fbtft
bcm2835_gpiomem 3040 0
spi_bcm2835 6678 0
i2c_bcm2708 4834 0
bcm2835_wdt 3225 0
uio_pdrv_genirq 3164 0
uio 8000 1 uio_pdrv_genirq
これを行うには、間違いがないか、initramfs/deviceTree/Modulesでエラーを追跡する方法がありませんか?
ありがとうございます:)
コメントに関連する編集:
initramfsが正常に作成されましたupdate-initramfs -c -k 'uname -r' -v
。 initramfsのその他のインクルードフォルダを教えてくれた@Rui F Ribeiroに感謝します。私は/etc/initramfs-toolsを使用しました。