update(system): update system squashfs.

This commit is contained in:
kangjun 2024-09-27 16:55:39 +08:00
parent 6015482e43
commit 40efb965ea
16 changed files with 96 additions and 24 deletions

1
.gitignore vendored
View File

@ -97,3 +97,4 @@ device/config/chips/v851s3/bin/*
device/config/chips/v851s3/configs/default/riscv.fex device/config/chips/v851s3/configs/default/riscv.fex
device/config/chips/v851s/bin/* device/config/chips/v851s/bin/*
device/config/chips/v851s/configs/default/riscv.fex device/config/chips/v851s/configs/default/riscv.fex
target/allwinner/v851s3-fastboot_sl100_front/temp_usr/*

View File

@ -103,8 +103,8 @@ endef
define Aw/BuildUpgradeImage/resume define Aw/BuildUpgradeImage/resume
#$(1): target_dir #$(2): temp_usr #$(1): target_dir #$(2): temp_usr
rm -rf $(1)/usr # rm -rf $(1)/usr
mv $(2) $(1)/usr # mv $(2) $(1)/usr
endef endef
define Aw/BuildUpgradeImage/normal-prepare define Aw/BuildUpgradeImage/normal-prepare

View File

@ -2058,6 +2058,20 @@ function mkrootfs_jffs2()
fi 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() function recomp_rootfs()
{ {
T=$(gettop) T=$(gettop)
@ -2074,6 +2088,7 @@ function recomp_rootfs()
[ x$file_formate = x"SQUASHFS" ] && mkrootfs_squashfs4 [ x$file_formate = x"SQUASHFS" ] && mkrootfs_squashfs4
[ x$file_formate = x"EXT4FS" ] && mkrootfs_ext4 [ x$file_formate = x"EXT4FS" ] && mkrootfs_ext4
[ x$file_formate = x"JFFS2" ] && mkrootfs_jffs2 [ x$file_formate = x"JFFS2" ] && mkrootfs_jffs2
[ x$file_formate = x"EROFS" ] && mkrootfs_erofs
fi fi
} }

View File

@ -3144,11 +3144,7 @@ CONFIG_NLS_ISO8859_1=y
# CONFIG_NLS_MAC_TURKISH is not set # CONFIG_NLS_MAC_TURKISH is not set
# CONFIG_NLS_UTF8 is not set # CONFIG_NLS_UTF8 is not set
# CONFIG_DLM is not set # CONFIG_DLM is not set
CONFIG_EROFS_FS=y # CONFIG_EROFS_FS is not set
# 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
# #
# Kernel hacking # Kernel hacking

View File

@ -2596,11 +2596,7 @@ CONFIG_NLS_ISO8859_1=y
# CONFIG_NLS_MAC_TURKISH is not set # CONFIG_NLS_MAC_TURKISH is not set
# CONFIG_NLS_UTF8 is not set # CONFIG_NLS_UTF8 is not set
# CONFIG_DLM is not set # CONFIG_DLM is not set
CONFIG_EROFS_FS=y # CONFIG_EROFS_FS is not set
# 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
# #
# Kernel hacking # Kernel hacking

View File

@ -53,13 +53,13 @@ size = 16
[partition] [partition]
name = rootfs name = rootfs
size = 20992 size = 20480
downloadfile = "rootfs.fex" downloadfile = "rootfs.fex"
user_type = 0x8000 user_type = 0x8000
[partition] [partition]
name = extend name = extend
size = 4352 size = 4096
downloadfile = "usr.fex" downloadfile = "usr.fex"
user_type = 0x8000 user_type = 0x8000

Binary file not shown.

Before

Width:  |  Height:  |  Size: 987 B

After

Width:  |  Height:  |  Size: 910 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 987 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 979 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 993 B

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 993 B

View File

@ -106,7 +106,7 @@ echo in > /sys/class/gpio/gpio164/direction
echo 0 > /sys/class/pwm/pwmchip0/export echo 0 > /sys/class/pwm/pwmchip0/export
echo 100000 > /sys/class/pwm/pwmchip0/pwm0/period 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/pwm/pwmchip0/pwm0/enable
# echo 1 > /sys/class/gpio/gpio160/value # echo 1 > /sys/class/gpio/gpio160/value

View File

@ -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() { mount_overlay() {
local root_dev="$(readlink /dev/by-name/rootfs)" local root_dev="$(readlink /dev/by-name/rootfs)"
@ -279,6 +337,8 @@ mount_usr
[ x"$MOUNT_ETC" = x"1" ] && mount_etc [ x"$MOUNT_ETC" = x"1" ] && mount_etc
# [ x"$MOUNT_OVERLAY" = x"1" ] && mount_overlay rootfs_data #choose rootfs_data or UDISK # [ x"$MOUNT_OVERLAY" = x"1" ] && mount_overlay rootfs_data #choose rootfs_data or UDISK
rc_mount
/APP/SL100FRONTPANEL & /APP/SL100FRONTPANEL &
exec /sbin/init exec /sbin/init

View File

@ -52,15 +52,17 @@ CONFIG_EXTERNAL_CPIO=""
# #
# CONFIG_TARGET_ROOTFS_EXT4FS is not set # CONFIG_TARGET_ROOTFS_EXT4FS is not set
# CONFIG_TARGET_ROOTFS_JFFS2 is not set # CONFIG_TARGET_ROOTFS_JFFS2 is not set
CONFIG_TARGET_ROOTFS_EROFS=y # CONFIG_TARGET_ROOTFS_EROFS is not set
# CONFIG_TARGET_ROOTFS_SQUASHFS is not set CONFIG_TARGET_ROOTFS_SQUASHFS=y
# CONFIG_ROOTFS_SQUASHFS_XZ is not set # 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_ROOTFS_SQUASHFS_ZLIB is not set
# CONFIG_USR_SQUASHFS_FOLLOW_ROOTFS is not set # CONFIG_USR_SQUASHFS_FOLLOW_ROOTFS is not set
# CONFIG_USR_SQUASHFS_XZ 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_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_FREE_SPACE_FIXUP=y
CONFIG_TARGET_UBIFS_JOURNAL_SIZE="" CONFIG_TARGET_UBIFS_JOURNAL_SIZE=""
@ -2728,7 +2730,7 @@ CONFIG_FIRMWARE_PATH="/lib/firmware/"
# CONFIG_PACKAGE_libchipmunk is not set # CONFIG_PACKAGE_libchipmunk is not set
# CONFIG_PACKAGE_libdrm is not set # CONFIG_PACKAGE_libdrm is not set
# CONFIG_PACKAGE_libepoxy 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_libpixman is not set
CONFIG_PACKAGE_libpng=y CONFIG_PACKAGE_libpng=y
# CONFIG_PACKAGE_librsvg is not set # CONFIG_PACKAGE_librsvg is not set

View File

@ -59,15 +59,17 @@ CONFIG_EXTERNAL_CPIO=""
# #
# CONFIG_TARGET_ROOTFS_EXT4FS is not set # CONFIG_TARGET_ROOTFS_EXT4FS is not set
# CONFIG_TARGET_ROOTFS_JFFS2 is not set # CONFIG_TARGET_ROOTFS_JFFS2 is not set
CONFIG_TARGET_ROOTFS_EROFS=y # CONFIG_TARGET_ROOTFS_EROFS is not set
# CONFIG_TARGET_ROOTFS_SQUASHFS is not set CONFIG_TARGET_ROOTFS_SQUASHFS=y
# CONFIG_ROOTFS_SQUASHFS_XZ is not set # 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_ROOTFS_SQUASHFS_ZLIB is not set
# CONFIG_USR_SQUASHFS_FOLLOW_ROOTFS is not set # CONFIG_USR_SQUASHFS_FOLLOW_ROOTFS is not set
# CONFIG_USR_SQUASHFS_XZ 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_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_FREE_SPACE_FIXUP=y
CONFIG_TARGET_UBIFS_JOURNAL_SIZE="" CONFIG_TARGET_UBIFS_JOURNAL_SIZE=""