diff --git a/recipes-bsp/bootfiles/rpi-cmdline.bbappend b/recipes-bsp/bootfiles/rpi-cmdline.bbappend index 5228eea8b3812259b72d5e8f4f168af56f720d01..edd3908868d32237748efe01953b560a74b49e02 100644 --- a/recipes-bsp/bootfiles/rpi-cmdline.bbappend +++ b/recipes-bsp/bootfiles/rpi-cmdline.bbappend @@ -5,3 +5,4 @@ CMDLINE:append = " modules.load=dwc2,g_serial" CMDLINE:append = " earlycon=uart8250,mmio32,0x20215040" #CMDLINE:append = " earlycon=pl011,mmio32,0x20201000" +CMDLINE:append = " init=/usr/sbin/fastinit.sh 1" diff --git a/recipes-core/fastinit/fastinit.bb b/recipes-core/fastinit/fastinit.bb index 1d97a8d00b4d4e88eb2f351e03e5b3a1dcbbd230..035bea39bdccc76521648736e793dcc7996c1d1f 100644 --- a/recipes-core/fastinit/fastinit.bb +++ b/recipes-core/fastinit/fastinit.bb @@ -3,6 +3,8 @@ LICENSE = "CLOSED" SRC_URI = "file://fastinit.sh" +DEPENDS = "libgpiod" + S = "${WORKDIR}" do_install() { diff --git a/recipes-core/fastinit/files/fastinit.sh b/recipes-core/fastinit/files/fastinit.sh index 059a9095cb4550ab2b781acc292ca3fc3ad35ca2..c05cafa089ec19f4e73c4825765d552a0f6866b6 100755 --- a/recipes-core/fastinit/files/fastinit.sh +++ b/recipes-core/fastinit/files/fastinit.sh @@ -25,10 +25,12 @@ level_one() { mount -t sysfs sysfs /sys mount -o ro /dev/mmcblk0p1 /boot + log_to_kernel "setting gpio 23 to high" + /usr/bin/gpioset -c 0 23=1 & + log_to_kernel "getting teletypes on ttyS0" /sbin/getty -L 115200 ttyS0 vt100 } - level_five() { exec /sbin/init 5 } @@ -51,6 +53,7 @@ else ;; 1) log_to_kernel "entering runlevel 1 (minimal)" + log_to_kernel "runlevel 1: tty, serial, gpio" level_one ;; 5) diff --git a/recipes-core/images/mar-image-minimal.bb b/recipes-core/images/mar-image-minimal.bb index 30a27008dfcd9a066c823ad25bce9525237bed14..2582ff4a09d6d95e3e6d0fb64d3920a65ef27dfa 100644 --- a/recipes-core/images/mar-image-minimal.bb +++ b/recipes-core/images/mar-image-minimal.bb @@ -6,6 +6,8 @@ IMAGE_INSTALL = "packagegroup-core-boot \ python3-pyserial \ screen \ usb-modeswitch \ + libgpiod \ + libgpiod-tools \ fastinit \ serial-usb \ ${CORE_IMAGE_EXTRA_INSTALL}"