diff --git a/.gitignore b/.gitignore index 063ce59a6..ed5f9e8ef 100755 --- a/.gitignore +++ b/.gitignore @@ -97,3 +97,4 @@ device/config/chips/v851s3/bin/* device/config/chips/v851s3/configs/default/riscv.fex device/config/chips/v851s/bin/* device/config/chips/v851s/configs/default/riscv.fex +target/allwinner/v851s3-fastboot_sl100_front/temp_usr/* diff --git a/build/aw-upgrade.mk b/build/aw-upgrade.mk index 30fd86d5d..46222ec4f 100755 --- a/build/aw-upgrade.mk +++ b/build/aw-upgrade.mk @@ -103,8 +103,8 @@ endef define Aw/BuildUpgradeImage/resume #$(1): target_dir #$(2): temp_usr - rm -rf $(1)/usr - mv $(2) $(1)/usr + # rm -rf $(1)/usr + # mv $(2) $(1)/usr endef define Aw/BuildUpgradeImage/normal-prepare diff --git a/build/envsetup.sh b/build/envsetup.sh index f80fb6927..ddddb30ff 100755 --- a/build/envsetup.sh +++ b/build/envsetup.sh @@ -2058,6 +2058,20 @@ function mkrootfs_jffs2() fi } +function mkrootfs_erofs() +{ + kernelfs_formate=`grep CONFIG_EROFS_FS=y $(gettop)/lichee/*/.config | cut -d ":" -f 2` + echo -e "\033[31m $kernelfs_formate\033[0m" + if [ -z $kernelfs_formate ];then + echo -e "\033[31m run -make kernel_menuconfig- choice "erofs" first!\033[0m" + else + $(gettop)/out/host/bin/mkfs.erofs -zlz4 $(gettop)/out/${TARGET_BOARD}/root.erofs $(gettop)/out/${TARGET_BOARD}/compile_dir/target/rootfs + rm $(gettop)/out/${TARGET_BOARD}/rootfs.img + dd if=$(gettop)/out/${TARGET_BOARD}/root.erofs of=$(gettop)/out/${TARGET_BOARD}/rootfs.img bs=128k conv=sync + fi +} + + function recomp_rootfs() { T=$(gettop) @@ -2074,6 +2088,7 @@ function recomp_rootfs() [ x$file_formate = x"SQUASHFS" ] && mkrootfs_squashfs4 [ x$file_formate = x"EXT4FS" ] && mkrootfs_ext4 [ x$file_formate = x"JFFS2" ] && mkrootfs_jffs2 + [ x$file_formate = x"EROFS" ] && mkrootfs_erofs fi } diff --git a/device/config/chips/v851s3/configs/fastboot_sl100_front/linux/config-4.9 b/device/config/chips/v851s3/configs/fastboot_sl100_front/linux/config-4.9 index 61199b56e..e386d6b66 100755 --- a/device/config/chips/v851s3/configs/fastboot_sl100_front/linux/config-4.9 +++ b/device/config/chips/v851s3/configs/fastboot_sl100_front/linux/config-4.9 @@ -3144,11 +3144,7 @@ CONFIG_NLS_ISO8859_1=y # CONFIG_NLS_MAC_TURKISH is not set # CONFIG_NLS_UTF8 is not set # CONFIG_DLM is not set -CONFIG_EROFS_FS=y -# CONFIG_EROFS_FS_DEBUG is not set -# CONFIG_EROFS_FS_XATTR is not set -CONFIG_EROFS_FS_ZIP=y -CONFIG_EROFS_FS_CLUSTER_PAGE_LIMIT=1 +# CONFIG_EROFS_FS is not set # # Kernel hacking diff --git a/device/config/chips/v851s3/configs/fastboot_sl100_front/linux/config-4.9_recovery b/device/config/chips/v851s3/configs/fastboot_sl100_front/linux/config-4.9_recovery index 1a4b4d648..f664ddd6a 100755 --- a/device/config/chips/v851s3/configs/fastboot_sl100_front/linux/config-4.9_recovery +++ b/device/config/chips/v851s3/configs/fastboot_sl100_front/linux/config-4.9_recovery @@ -2596,11 +2596,7 @@ CONFIG_NLS_ISO8859_1=y # CONFIG_NLS_MAC_TURKISH is not set # CONFIG_NLS_UTF8 is not set # CONFIG_DLM is not set -CONFIG_EROFS_FS=y -# CONFIG_EROFS_FS_DEBUG is not set -# CONFIG_EROFS_FS_XATTR is not set -CONFIG_EROFS_FS_ZIP=y -CONFIG_EROFS_FS_CLUSTER_PAGE_LIMIT=1 +# CONFIG_EROFS_FS is not set # # Kernel hacking diff --git a/device/config/chips/v851s3/configs/fastboot_sl100_front/linux/sys_partition_nor.fex b/device/config/chips/v851s3/configs/fastboot_sl100_front/linux/sys_partition_nor.fex index d7ced1fcd..84818e85f 100755 --- a/device/config/chips/v851s3/configs/fastboot_sl100_front/linux/sys_partition_nor.fex +++ b/device/config/chips/v851s3/configs/fastboot_sl100_front/linux/sys_partition_nor.fex @@ -53,13 +53,13 @@ size = 16 [partition] name = rootfs - size = 20992 + size = 20480 downloadfile = "rootfs.fex" user_type = 0x8000 [partition] name = extend - size = 4352 + size = 4096 downloadfile = "usr.fex" user_type = 0x8000 diff --git a/target/allwinner/v851s3-fastboot_sl100_front/busybox-init-base-files/APP/SL100FRONTPANEL b/target/allwinner/v851s3-fastboot_sl100_front/busybox-init-base-files/APP/SL100FRONTPANEL index 164b05db3..9b85a5156 100755 Binary files a/target/allwinner/v851s3-fastboot_sl100_front/busybox-init-base-files/APP/SL100FRONTPANEL and b/target/allwinner/v851s3-fastboot_sl100_front/busybox-init-base-files/APP/SL100FRONTPANEL differ diff --git a/target/allwinner/v851s3-fastboot_sl100_front/busybox-init-base-files/APP/picture/light.png b/target/allwinner/v851s3-fastboot_sl100_front/busybox-init-base-files/APP/picture/light.png index afa74899f..c1be2b260 100755 Binary files a/target/allwinner/v851s3-fastboot_sl100_front/busybox-init-base-files/APP/picture/light.png and b/target/allwinner/v851s3-fastboot_sl100_front/busybox-init-base-files/APP/picture/light.png differ diff --git a/target/allwinner/v851s3-fastboot_sl100_front/busybox-init-base-files/APP/picture/light1.png b/target/allwinner/v851s3-fastboot_sl100_front/busybox-init-base-files/APP/picture/light1.png new file mode 100755 index 000000000..afa74899f Binary files /dev/null and b/target/allwinner/v851s3-fastboot_sl100_front/busybox-init-base-files/APP/picture/light1.png differ diff --git a/target/allwinner/v851s3-fastboot_sl100_front/busybox-init-base-files/APP/picture/power.png b/target/allwinner/v851s3-fastboot_sl100_front/busybox-init-base-files/APP/picture/power.png new file mode 100755 index 000000000..244ff2a1b Binary files /dev/null and b/target/allwinner/v851s3-fastboot_sl100_front/busybox-init-base-files/APP/picture/power.png differ diff --git a/target/allwinner/v851s3-fastboot_sl100_front/busybox-init-base-files/APP/picture/vol.png b/target/allwinner/v851s3-fastboot_sl100_front/busybox-init-base-files/APP/picture/vol.png index 704516ff5..43a56fc3b 100755 Binary files a/target/allwinner/v851s3-fastboot_sl100_front/busybox-init-base-files/APP/picture/vol.png and b/target/allwinner/v851s3-fastboot_sl100_front/busybox-init-base-files/APP/picture/vol.png differ diff --git a/target/allwinner/v851s3-fastboot_sl100_front/busybox-init-base-files/APP/picture/vol1.png b/target/allwinner/v851s3-fastboot_sl100_front/busybox-init-base-files/APP/picture/vol1.png new file mode 100755 index 000000000..704516ff5 Binary files /dev/null and b/target/allwinner/v851s3-fastboot_sl100_front/busybox-init-base-files/APP/picture/vol1.png differ diff --git a/target/allwinner/v851s3-fastboot_sl100_front/busybox-init-base-files/etc/init.d/rc.final b/target/allwinner/v851s3-fastboot_sl100_front/busybox-init-base-files/etc/init.d/rc.final index fa7ce105c..a6c0f047b 100755 --- a/target/allwinner/v851s3-fastboot_sl100_front/busybox-init-base-files/etc/init.d/rc.final +++ b/target/allwinner/v851s3-fastboot_sl100_front/busybox-init-base-files/etc/init.d/rc.final @@ -106,7 +106,7 @@ echo in > /sys/class/gpio/gpio164/direction echo 0 > /sys/class/pwm/pwmchip0/export echo 100000 > /sys/class/pwm/pwmchip0/pwm0/period -echo 60000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle +echo 70000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle echo 1 > /sys/class/pwm/pwmchip0/pwm0/enable # echo 1 > /sys/class/gpio/gpio160/value diff --git a/target/allwinner/v851s3-fastboot_sl100_front/busybox-init-base-files/files/pseudo_init b/target/allwinner/v851s3-fastboot_sl100_front/busybox-init-base-files/files/pseudo_init index 49cade373..41186996b 100755 --- a/target/allwinner/v851s3-fastboot_sl100_front/busybox-init-base-files/files/pseudo_init +++ b/target/allwinner/v851s3-fastboot_sl100_front/busybox-init-base-files/files/pseudo_init @@ -142,6 +142,64 @@ mount_usr(){ } +rc_mount_filesystem() +{ + local fs_src="$1" + local fs_mntpt="$2" + # mount filesystem + if [ -e "$fs_src" -a -d "$fs_mntpt" ]; then + [ -L "$fs_src" ] && fs_src=$(readlink "$fs_src") + case "$fs_src" in + /dev/mtdblock*) + mount -t jffs2 "$fs_src" "$fs_mntpt" 2>/dev/null + if [ "$?" -ne "0" ]; then + mkfs_jffs2 "$fs_src" + mount -t jffs2 "$fs_src" "$fs_mntpt" 2>/dev/null + fi + ;; + /dev/ubi*) + mount -t ubifs "$fs_src" "$fs_mntpt" 2>/dev/null + if [ "$?" -ne "0" ]; then + mkfs_ubifs "$fs_src" + mount -t ubifs "$fs_src" "$fs_mntpt" 2>/dev/null + fi + ;; + *) + /usr/sbin/fsck.ext4 -y "$fs_src" &>/dev/null + mount -t ext4 "$fs_src" "$fs_mntpt" 2>/dev/null + if [ "$?" -ne "0" ]; then + # linux < 3.18 not support metadata_csum, e2fsprogs version:1.46.4 + grep "Linux version 3.*" /proc/version >> /dev/null + if [ $? -eq 0 ]; then + echo "linux < 3.18, mkfs.ext4 do not use metadata and journal checksum features." + mkfs.ext4 -m 0 -O ^metadata_csum "$fs_src" >/dev/null + else + mkfs.ext4 -m 0 "$fs_src" >/dev/null + fi + mount -t ext4 "$fs_src" "$fs_mntpt" 2>/dev/null + fi + ;; + esac + + # restore /mnt file contexts + if [ -f /sbin/restorecon ]; then + /sbin/restorecon -R /mnt + fi + fi +} + +rc_mount() +{ + rc_mount_filesystem "/dev/by-name/UDISK" "/mnt/UDISK" +# rc_mount_filesystem "/dev/by-name/user-res" "/mnt/user" + + # enable hotplug + [ -x /sbin/mdev ] && { + [ -f /proc/sys/kernel/hotplug ] && echo /sbin/mdev > /proc/sys/kernel/hotplug + /sbin/mdev -s + } +} + mount_overlay() { local root_dev="$(readlink /dev/by-name/rootfs)" @@ -279,6 +337,8 @@ mount_usr [ x"$MOUNT_ETC" = x"1" ] && mount_etc # [ x"$MOUNT_OVERLAY" = x"1" ] && mount_overlay rootfs_data #choose rootfs_data or UDISK +rc_mount + /APP/SL100FRONTPANEL & exec /sbin/init diff --git a/target/allwinner/v851s3-fastboot_sl100_front/defconfig b/target/allwinner/v851s3-fastboot_sl100_front/defconfig index 29a7db7a5..b60c5338c 100755 --- a/target/allwinner/v851s3-fastboot_sl100_front/defconfig +++ b/target/allwinner/v851s3-fastboot_sl100_front/defconfig @@ -52,15 +52,17 @@ CONFIG_EXTERNAL_CPIO="" # # CONFIG_TARGET_ROOTFS_EXT4FS is not set # CONFIG_TARGET_ROOTFS_JFFS2 is not set -CONFIG_TARGET_ROOTFS_EROFS=y -# CONFIG_TARGET_ROOTFS_SQUASHFS is not set +# CONFIG_TARGET_ROOTFS_EROFS is not set +CONFIG_TARGET_ROOTFS_SQUASHFS=y # CONFIG_ROOTFS_SQUASHFS_XZ is not set -# CONFIG_ROOTFS_SQUASHFS_LZ4 is not set +CONFIG_ROOTFS_SQUASHFS_LZ4=y # CONFIG_ROOTFS_SQUASHFS_ZLIB is not set # CONFIG_USR_SQUASHFS_FOLLOW_ROOTFS is not set # CONFIG_USR_SQUASHFS_XZ is not set -# CONFIG_USR_SQUASHFS_LZ4 is not set +CONFIG_USR_SQUASHFS_LZ4=y # CONFIG_USR_SQUASHFS_ZLIB is not set +CONFIG_KERNEL_SQUASHFS_LZ4=y +CONFIG_TARGET_SQUASHFS_BLOCK_SIZE=256 CONFIG_TARGET_UBIFS_FREE_SPACE_FIXUP=y CONFIG_TARGET_UBIFS_JOURNAL_SIZE="" @@ -2728,7 +2730,7 @@ CONFIG_FIRMWARE_PATH="/lib/firmware/" # CONFIG_PACKAGE_libchipmunk is not set # CONFIG_PACKAGE_libdrm is not set # CONFIG_PACKAGE_libepoxy is not set -# CONFIG_PACKAGE_libjpeg is not set +CONFIG_PACKAGE_libjpeg=y # CONFIG_PACKAGE_libpixman is not set CONFIG_PACKAGE_libpng=y # CONFIG_PACKAGE_librsvg is not set diff --git a/target/allwinner/v851s3-fastboot_sl100_front/defconfig_ota b/target/allwinner/v851s3-fastboot_sl100_front/defconfig_ota index 1205352c7..7f7537e21 100755 --- a/target/allwinner/v851s3-fastboot_sl100_front/defconfig_ota +++ b/target/allwinner/v851s3-fastboot_sl100_front/defconfig_ota @@ -59,15 +59,17 @@ CONFIG_EXTERNAL_CPIO="" # # CONFIG_TARGET_ROOTFS_EXT4FS is not set # CONFIG_TARGET_ROOTFS_JFFS2 is not set -CONFIG_TARGET_ROOTFS_EROFS=y -# CONFIG_TARGET_ROOTFS_SQUASHFS is not set +# CONFIG_TARGET_ROOTFS_EROFS is not set +CONFIG_TARGET_ROOTFS_SQUASHFS=y # CONFIG_ROOTFS_SQUASHFS_XZ is not set -# CONFIG_ROOTFS_SQUASHFS_LZ4 is not set +CONFIG_ROOTFS_SQUASHFS_LZ4=y # CONFIG_ROOTFS_SQUASHFS_ZLIB is not set # CONFIG_USR_SQUASHFS_FOLLOW_ROOTFS is not set # CONFIG_USR_SQUASHFS_XZ is not set -# CONFIG_USR_SQUASHFS_LZ4 is not set +CONFIG_USR_SQUASHFS_LZ4=y # CONFIG_USR_SQUASHFS_ZLIB is not set +CONFIG_KERNEL_SQUASHFS_LZ4=y +CONFIG_TARGET_SQUASHFS_BLOCK_SIZE=256 CONFIG_TARGET_UBIFS_FREE_SPACE_FIXUP=y CONFIG_TARGET_UBIFS_JOURNAL_SIZE=""