diff --git a/board/orangepi_zero_2w/busybox-1.37.0.config b/board/orangepi_zero_2w/busybox-1.37.0.config index 7de816b..f349e36 100644 --- a/board/orangepi_zero_2w/busybox-1.37.0.config +++ b/board/orangepi_zero_2w/busybox-1.37.0.config @@ -504,9 +504,9 @@ CONFIG_FEATURE_XARGS_SUPPORT_ARGS_FILE=y # CONFIG_BOOTCHARTD is not set # CONFIG_FEATURE_BOOTCHARTD_BLOATED_HEADER is not set # CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE is not set -# CONFIG_HALT is not set -# CONFIG_POWEROFF is not set -# CONFIG_REBOOT is not set +CONFIG_HALT=y +CONFIG_POWEROFF=y +CONFIG_REBOOT=y # CONFIG_FEATURE_WAIT_FOR_INIT is not set # CONFIG_FEATURE_CALL_TELINIT is not set CONFIG_TELINIT_PATH="" diff --git a/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/available/getty.conf b/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/available/getty.conf new file mode 100644 index 0000000..03a06f1 --- /dev/null +++ b/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/available/getty.conf @@ -0,0 +1,7 @@ +# Consoles to start getty on when system is up +tty [12345] /dev/ttyS0 noclear nowait +tty [12345] /dev/tty1 noclear nowait +tty [12345] /dev/tty2 noclear nowait +tty [12345] /dev/tty3 noclear nowait +tty [12345] /dev/tty4 noclear nowait +tty [12345] /dev/ttyGS0 noclear nowait diff --git a/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/available/modprobe.conf b/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/available/modprobe.conf new file mode 100644 index 0000000..9187700 --- /dev/null +++ b/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/available/modprobe.conf @@ -0,0 +1 @@ +task [S] /usr/bin/modprobe g_serial diff --git a/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/available/thermal_zone.conf b/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/available/thermal_zone.conf new file mode 100644 index 0000000..017688a --- /dev/null +++ b/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/available/thermal_zone.conf @@ -0,0 +1 @@ +task [S] /etc/finit.d/available/thermal_zone.sh diff --git a/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/available/thermal_zone.sh b/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/available/thermal_zone.sh new file mode 100755 index 0000000..ce172df --- /dev/null +++ b/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/available/thermal_zone.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +/usr/bin/echo "disabled" > /sys/class/thermal/thermal_zone0/mode +/usr/bin/echo "disabled" > /sys/class/thermal/thermal_zone2/mode diff --git a/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/enabled/getty.conf b/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/enabled/getty.conf new file mode 120000 index 0000000..24b41ba --- /dev/null +++ b/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/enabled/getty.conf @@ -0,0 +1 @@ +../available/getty.conf \ No newline at end of file diff --git a/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/enabled/modprobe.conf b/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/enabled/modprobe.conf new file mode 120000 index 0000000..a39c2bd --- /dev/null +++ b/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/enabled/modprobe.conf @@ -0,0 +1 @@ +../available/modprobe.conf \ No newline at end of file diff --git a/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/enabled/thermal_zone.conf b/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/enabled/thermal_zone.conf new file mode 120000 index 0000000..efe10b4 --- /dev/null +++ b/board/orangepi_zero_2w/rootfs_overlay/etc/finit.d/enabled/thermal_zone.conf @@ -0,0 +1 @@ +../available/thermal_zone.conf \ No newline at end of file diff --git a/configs/orangepi_zero_2w_defconfig b/configs/orangepi_zero_2w_defconfig index ff58f09..7ad1352 100644 --- a/configs/orangepi_zero_2w_defconfig +++ b/configs/orangepi_zero_2w_defconfig @@ -38,6 +38,8 @@ export BUSYBOX_INITRD_CONFIG_FILE=$root/board/${BOARD_NAME}/busybox-initrd-${BUS export BUSYBOX_LIST_FILE=$root/board/${BOARD_NAME}/busybox-list-${BUSYBOX_VERSION}.config export BUSYBOX_INITRD_LIST_FILE=$root/board/${BOARD_NAME}/busybox-initrd-list-${BUSYBOX_VERSION}.config +export ROOTFS_OVERLAY=$root/board/${BOARD_NAME}/rootfs_overlay + export ZLIB_ENABLE=n export DROPBEAR_ENABLE=n export IMAGE_USABLE_ENABLE=n diff --git a/rootfs/overlay/etc/finit.d/available/hostname.conf b/rootfs/overlay/etc/finit.d/available/hostname.conf index 4cdbf3d..7fde3c0 100644 --- a/rootfs/overlay/etc/finit.d/available/hostname.conf +++ b/rootfs/overlay/etc/finit.d/available/hostname.conf @@ -1 +1 @@ -run [123456789] hostname -F /etc/hostname -- Set up hostname \ No newline at end of file +task [S] hostname -F /etc/hostname diff --git a/scripts/rootfs.sh b/scripts/rootfs.sh index 8ebdb63..121ba86 100755 --- a/scripts/rootfs.sh +++ b/scripts/rootfs.sh @@ -55,7 +55,7 @@ BUILD_ID="$distro_build_id" EOF busybox_rootfs - cp -v $build/busybox/busybox-1.36.1/busybox $rootfspath/usr/bin # &>> $fulllogfile + cp -v $build/busybox/busybox-${BUSYBOX_VERSION}/busybox $rootfspath/usr/bin # &>> $fulllogfile cd $rootfspath/usr/bin for i in $(cat $BUSYBOX_LIST_FILE); do ln -sv busybox $i; done cp -v $root/rootfs/init.in $rootfspath/init @@ -94,6 +94,8 @@ EOF EOF fi + [ ! -z "$ROOTFS_OVERLAY" ] && cp -rv $ROOTFS_OVERLAY/* $rootfspath + chmod 640 $rootfspath/etc/shadow $rootfspath/etc/inittab chmod 755 $rootfspath/etc/init.d/* $rootfspath/usr/share/udhcpc/default.script $rootfspath/init chmod 644 $rootfspath/etc/{passwd,group,hostname,hosts,fstab,shells,issue} $rootfspath/etc/network/interfaces