Skip to content
Snippets Groups Projects
Verified Commit 857f2cbd authored by Qiyang Sun's avatar Qiyang Sun :speech_balloon:
Browse files

Update fastinit, add GPIO support

parent 19f592c3
No related branches found
No related tags found
No related merge requests found
...@@ -5,3 +5,4 @@ CMDLINE:append = " modules.load=dwc2,g_serial" ...@@ -5,3 +5,4 @@ CMDLINE:append = " modules.load=dwc2,g_serial"
CMDLINE:append = " earlycon=uart8250,mmio32,0x20215040" CMDLINE:append = " earlycon=uart8250,mmio32,0x20215040"
#CMDLINE:append = " earlycon=pl011,mmio32,0x20201000" #CMDLINE:append = " earlycon=pl011,mmio32,0x20201000"
CMDLINE:append = " init=/usr/sbin/fastinit.sh 1"
...@@ -3,6 +3,8 @@ LICENSE = "CLOSED" ...@@ -3,6 +3,8 @@ LICENSE = "CLOSED"
SRC_URI = "file://fastinit.sh" SRC_URI = "file://fastinit.sh"
DEPENDS = "libgpiod"
S = "${WORKDIR}" S = "${WORKDIR}"
do_install() { do_install() {
......
...@@ -25,10 +25,12 @@ level_one() { ...@@ -25,10 +25,12 @@ level_one() {
mount -t sysfs sysfs /sys mount -t sysfs sysfs /sys
mount -o ro /dev/mmcblk0p1 /boot 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" log_to_kernel "getting teletypes on ttyS0"
/sbin/getty -L 115200 ttyS0 vt100 /sbin/getty -L 115200 ttyS0 vt100
} }
level_five() { level_five() {
exec /sbin/init 5 exec /sbin/init 5
} }
...@@ -51,6 +53,7 @@ else ...@@ -51,6 +53,7 @@ else
;; ;;
1) 1)
log_to_kernel "entering runlevel 1 (minimal)" log_to_kernel "entering runlevel 1 (minimal)"
log_to_kernel "runlevel 1: tty, serial, gpio"
level_one level_one
;; ;;
5) 5)
......
...@@ -6,6 +6,8 @@ IMAGE_INSTALL = "packagegroup-core-boot \ ...@@ -6,6 +6,8 @@ IMAGE_INSTALL = "packagegroup-core-boot \
python3-pyserial \ python3-pyserial \
screen \ screen \
usb-modeswitch \ usb-modeswitch \
libgpiod \
libgpiod-tools \
fastinit \ fastinit \
serial-usb \ serial-usb \
${CORE_IMAGE_EXTRA_INSTALL}" ${CORE_IMAGE_EXTRA_INSTALL}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment