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

Fastinit runlevel 2: add kernel modules for camera

parent c19eb677
No related branches found
No related tags found
No related merge requests found
......@@ -5,4 +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"
CMDLINE:append = " init=/usr/sbin/fastinit.sh 2"
......@@ -19,20 +19,48 @@ level_zero() {
exec /sbin/poweroff -f
}
level_one() {
mountfs() {
log_to_kernel "mounting filesystems"
mount -t proc proc /proc
mount -t sysfs sysfs /sys
mount -o ro /dev/mmcblk0p1 /boot
}
gp23hi() {
log_to_kernel "setting gpio 23 to high"
/usr/bin/gpioset -c 0 23=1 &
}
level_one() {
mountfs
gp23hi
crit_to_kernel "host is up and ready"
log_to_kernel "getting teletypes on ttyS0"
/sbin/getty -L 115200 ttyS0 vt100
}
level_two() {
mountfs
gp23hi
log_to_kernel "adding modules to linux kernel"
log_to_kernel "to be added: bcm2835-codec, bcm2835-isp, bcm2835-v4l2, bcm2835-unicam, ov5647, i2c-mux-pinctrl, i2c-bcm2835, uio, fixed"
modprobe bcm2835-codec # minors 0-4
modprobe bcm2835-isp # minors 5-12
modprobe bcm2835-v4l2
modprobe bcm2835-unicam # cause red led flash
modprobe ov5647
modprobe i2c-mux-pinctrl
modprobe i2c-bcm2835
modprobe uio
modprobe fixed
crit_to_kernel "host is up and ready"
log_to_kernel "getting teletypes on ttyS0"
/sbin/getty -L 115200 ttyS0 vt100
}
level_five() {
exec /sbin/init 5
}
......@@ -58,6 +86,11 @@ else
log_to_kernel "runlevel 1: tty, serial, gpio"
level_one
;;
2)
log_to_kernel "entering runlevel 2 (camera)"
log_to_kernel "runlevel 2: tty, serial, gpio, camera"
level_two
;;
5)
log_to_kernel "entering runlevel 5 (sysvinit)"
level_five
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment