diff --git a/project/app/rkipc/rkipc/src/rv1103_ipc/rkipc-300w.ini b/project/app/rkipc/rkipc/src/rv1103_ipc/rkipc-300w.ini index 8733dff59..aad2682c8 100644 --- a/project/app/rkipc/rkipc/src/rv1103_ipc/rkipc-300w.ini +++ b/project/app/rkipc/rkipc/src/rv1103_ipc/rkipc-300w.ini @@ -1,5 +1,5 @@ [audio.0] -enable = 1 +enable = 0 card_name = hw:0,0 encode_type = G711A format = S16 diff --git a/project/app/rkipc/rkipc/src/rv1106_ipc/rkipc-300w.ini b/project/app/rkipc/rkipc/src/rv1106_ipc/rkipc-300w.ini index 04e52d63f..0e54d1794 100644 --- a/project/app/rkipc/rkipc/src/rv1106_ipc/rkipc-300w.ini +++ b/project/app/rkipc/rkipc/src/rv1106_ipc/rkipc-300w.ini @@ -1,5 +1,5 @@ [audio.0] -enable = 1 +enable = 0 card_name = hw:0,0 encode_type = G711A format = S16 diff --git a/project/build.sh b/project/build.sh index 6c43e0a8a..3979502ce 100755 --- a/project/build.sh +++ b/project/build.sh @@ -730,7 +730,7 @@ function build_env() { local env_cfg_img env_cfg_img=$RK_PROJECT_OUTPUT_IMAGE/env.img - if [ ! -f $RK_PROJECT_PATH_PC_TOOLS/mkenvimage ] || [ $LF_ENABLE_SPI_NAND_FAST_BOOT = "y" ]; then + if [ ! -f "$RK_PROJECT_PATH_PC_TOOLS/mkenvimage" ] || [ "$LF_ENABLE_SPI_NAND_FAST_BOOT" = "y" ]; then build_tool fi @@ -2493,10 +2493,22 @@ function __RUN_PRE_BUILD_OEM_SCRIPT() { local tmp_path tmp_path=$(realpath $BOARD_CONFIG) tmp_path=$(dirname $tmp_path) + + __RUN_POST_CLEAN_FILES + if [ -f "$tmp_path/$RK_PRE_BUILD_OEM_SCRIPT" ]; then bash -x $tmp_path/$RK_PRE_BUILD_OEM_SCRIPT fi - __RUN_POST_CLEAN_FILES + +} + +function __RUN_POST_BUILD_USERDATA_SCRIPT() { + local tmp_path + tmp_path=$(realpath $BOARD_CONFIG) + tmp_path=$(dirname $tmp_path) + if [ -f "$tmp_path/$RK_PRE_BUILD_USERDATA_SCRIPT" ]; then + bash -x $tmp_path/$RK_PRE_BUILD_USERDATA_SCRIPT + fi } function build_firmware() { @@ -2552,6 +2564,7 @@ function build_firmware() { mkdir -p $RK_PROJECT_PACKAGE_USERDATA_DIR if [ "$RK_ENABLE_FASTBOOT" != "y" ]; then __PACKAGE_USERDATA + __RUN_POST_BUILD_USERDATA_SCRIPT fi build_mkimg userdata $RK_PROJECT_PACKAGE_USERDATA_DIR diff --git a/project/cfg/BoardConfig_IPC/BoardConfig-EMMC-Buildroot-RV1106_Luckfox_Pico_Ultra-IPC.mk b/project/cfg/BoardConfig_IPC/BoardConfig-EMMC-Buildroot-RV1106_Luckfox_Pico_Ultra-IPC.mk index 315881cb5..27b2258ee 100755 --- a/project/cfg/BoardConfig_IPC/BoardConfig-EMMC-Buildroot-RV1106_Luckfox_Pico_Ultra-IPC.mk +++ b/project/cfg/BoardConfig_IPC/BoardConfig-EMMC-Buildroot-RV1106_Luckfox_Pico_Ultra-IPC.mk @@ -20,7 +20,7 @@ export RK_KERNEL_DTS=rv1106g-luckfox-pico-ultra.dts # BOOT_MEDIUM ################################################# -# Target boot medium: emmc/spi_nor/spi_nand +# Target boot medium export RK_BOOT_MEDIUM=emmc # Uboot defconfig fragment @@ -58,7 +58,7 @@ export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ext4,userdata@/userdata@ext4,oem@/ # TARGET_ROOTFS ################################################# -# Target rootfs : ubuntu(only emmc)/buildroot/busybox +# Target rootfs export LF_TARGET_ROOTFS=buildroot # Buildroot defconfig @@ -109,3 +109,12 @@ export RK_ENABLE_ROCKCHIP_TEST=y # enable rockchip wifi #export RK_ENABLE_WIFI=y +################################################# +# PRE and POST +################################################# + +# specify pre.sh for delete/overlay files +export RK_PRE_BUILD_OEM_SCRIPT=luckfox-buildroot-oem-pre.sh + +# specify post.sh for delete/overlay files +export RK_PRE_BUILD_USERDATA_SCRIPT=luckfox-userdata-pre.sh \ No newline at end of file diff --git a/project/cfg/BoardConfig_IPC/BoardConfig-EMMC-Buildroot-RV1106_Luckfox_Pico_Ultra_W-IPC.mk b/project/cfg/BoardConfig_IPC/BoardConfig-EMMC-Buildroot-RV1106_Luckfox_Pico_Ultra_W-IPC.mk index b5f95633e..10d6a6156 100755 --- a/project/cfg/BoardConfig_IPC/BoardConfig-EMMC-Buildroot-RV1106_Luckfox_Pico_Ultra_W-IPC.mk +++ b/project/cfg/BoardConfig_IPC/BoardConfig-EMMC-Buildroot-RV1106_Luckfox_Pico_Ultra_W-IPC.mk @@ -20,7 +20,7 @@ export RK_KERNEL_DTS=rv1106g-luckfox-pico-ultra-w.dts # BOOT_MEDIUM ################################################# -# Target boot medium: emmc/spi_nor/spi_nand +# Target boot medium export RK_BOOT_MEDIUM=emmc # Uboot defconfig fragment @@ -58,7 +58,7 @@ export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ext4,userdata@/userdata@ext4,oem@/ # TARGET_ROOTFS ################################################# -# Target rootfs : ubuntu(only emmc)/buildroot/busybox/custom +# Target rootfs export LF_TARGET_ROOTFS=buildroot # Buildroot defconfig @@ -114,3 +114,12 @@ export RK_ENABLE_WIFI_CHIP=AIC8800DC export LF_WIFI_SSID="Your wifi ssid" export LF_WIFI_PSK="Your wifi password" +################################################# +# PRE and POST +################################################# + +# specify pre.sh for delete/overlay files +export RK_PRE_BUILD_OEM_SCRIPT=luckfox-buildroot-oem-pre.sh + +# specify post.sh for delete/overlay files +export RK_PRE_BUILD_USERDATA_SCRIPT=luckfox-userdata-pre.sh diff --git a/project/cfg/BoardConfig_IPC/BoardConfig-EMMC-Busybox-RV1106_Luckfox_Pico_Ultra-IPC_FASTBOOT.mk b/project/cfg/BoardConfig_IPC/BoardConfig-EMMC-Busybox-RV1106_Luckfox_Pico_Ultra-IPC_FASTBOOT.mk index e1d9032c7..05984b882 100755 --- a/project/cfg/BoardConfig_IPC/BoardConfig-EMMC-Busybox-RV1106_Luckfox_Pico_Ultra-IPC_FASTBOOT.mk +++ b/project/cfg/BoardConfig_IPC/BoardConfig-EMMC-Busybox-RV1106_Luckfox_Pico_Ultra-IPC_FASTBOOT.mk @@ -21,7 +21,7 @@ export RK_KERNEL_DTS=rv1106g-luckfox-pico-ultra-fastboot.dts # BOOT_MEDIUM ################################################# -# Target boot medium: emmc/spi_nor/spi_nand +# Target boot medium export RK_BOOT_MEDIUM=emmc # Uboot defconfig fragment @@ -59,7 +59,7 @@ export RK_PARTITION_FS_TYPE_CFG=boot@IGNORE@erofs,userdata@/userdata@ext4 # TARGET_ROOTFS ################################################# -# Target rootfs : ubuntu(only emmc)/buildroot/busybox +# Target rootfs export LF_TARGET_ROOTFS=busybox # Buildroot defconfig diff --git a/project/cfg/BoardConfig_IPC/BoardConfig-EMMC-Ubuntu-RV1106_Luckfox_Pico_Ultra-IPC.mk b/project/cfg/BoardConfig_IPC/BoardConfig-EMMC-Ubuntu-RV1106_Luckfox_Pico_Ultra-IPC.mk index 569deb022..4439cc26b 100755 --- a/project/cfg/BoardConfig_IPC/BoardConfig-EMMC-Ubuntu-RV1106_Luckfox_Pico_Ultra-IPC.mk +++ b/project/cfg/BoardConfig_IPC/BoardConfig-EMMC-Ubuntu-RV1106_Luckfox_Pico_Ultra-IPC.mk @@ -20,7 +20,7 @@ export RK_KERNEL_DTS=rv1106g-luckfox-pico-ultra.dts # BOOT_MEDIUM ################################################# -# Target boot medium: emmc/spi_nor/spi_nand +# Target boot medium export RK_BOOT_MEDIUM=emmc # Uboot defconfig fragment @@ -58,7 +58,7 @@ export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ext4,userdata@/userdata@ext4,oem@/ # TARGET_ROOTFS ################################################# -# Target rootfs : ubuntu(only emmc)/buildroot/busybox +# Target rootfs export LF_TARGET_ROOTFS=ubuntu # SUBMODULES : github/gitee @@ -109,3 +109,12 @@ export RK_ENABLE_ROCKCHIP_TEST=y # enable rockchip wifi #export RK_ENABLE_WIFI=y +################################################# +# PRE and POST +################################################# + +# specify pre.sh for delete/overlay files +export RK_PRE_BUILD_OEM_SCRIPT=luckfox-buildroot-oem-pre.sh + +# specify post.sh for delete/overlay files +export RK_PRE_BUILD_USERDATA_SCRIPT=luckfox-userdata-pre.sh diff --git a/project/cfg/BoardConfig_IPC/BoardConfig-EMMC-Ubuntu-RV1106_Luckfox_Pico_Ultra_W-IPC.mk b/project/cfg/BoardConfig_IPC/BoardConfig-EMMC-Ubuntu-RV1106_Luckfox_Pico_Ultra_W-IPC.mk index 124dda308..6ed43a9bc 100755 --- a/project/cfg/BoardConfig_IPC/BoardConfig-EMMC-Ubuntu-RV1106_Luckfox_Pico_Ultra_W-IPC.mk +++ b/project/cfg/BoardConfig_IPC/BoardConfig-EMMC-Ubuntu-RV1106_Luckfox_Pico_Ultra_W-IPC.mk @@ -20,7 +20,7 @@ export RK_KERNEL_DTS=rv1106g-luckfox-pico-ultra-w.dts # BOOT_MEDIUM ################################################# -# Target boot medium: emmc/spi_nor/spi_nand +# Target boot medium export RK_BOOT_MEDIUM=emmc # Uboot defconfig fragment @@ -58,7 +58,7 @@ export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ext4,userdata@/userdata@ext4,oem@/ # TARGET_ROOTFS ################################################# -# Target rootfs : ubuntu(only emmc)/buildroot/busybox +# Target rootfs export LF_TARGET_ROOTFS=ubuntu # SUBMODULES : github/gitee @@ -117,3 +117,12 @@ export RK_ENABLE_WIFI_CHIP=AIC8800DC export LF_WIFI_SSID="Your wifi ssid" export LF_WIFI_PSK="Your wifi password" +################################################# +# PRE and POST +################################################# + +# specify pre.sh for delete/overlay files +export RK_PRE_BUILD_OEM_SCRIPT=luckfox-buildroot-oem-pre.sh + +# specify post.sh for delete/overlay files +export RK_PRE_BUILD_USERDATA_SCRIPT=luckfox-userdata-pre.sh \ No newline at end of file diff --git a/project/cfg/BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1103_Luckfox_Pico-IPC.mk b/project/cfg/BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1103_Luckfox_Pico-IPC.mk index 30c37de55..1f05df9df 100755 --- a/project/cfg/BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1103_Luckfox_Pico-IPC.mk +++ b/project/cfg/BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1103_Luckfox_Pico-IPC.mk @@ -20,7 +20,7 @@ export RK_KERNEL_DTS=rv1103g-luckfox-pico.dts # BOOT_MEDIUM ################################################# -# Target boot medium: sd_card/spi_nor/spi_nand +# Target boot medium export RK_BOOT_MEDIUM=sd_card # Uboot defconfig fragment @@ -58,7 +58,7 @@ export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ext4,userdata@/userdata@ext4,oem@/ # TARGET_ROOTFS ################################################# -# Target rootfs : ubuntu(only sd_card)/buildroot/busybox +# Target rootfs export LF_TARGET_ROOTFS=buildroot # Buildroot defconfig @@ -102,3 +102,13 @@ export RK_BUILD_APP_TO_OEM_PARTITION=y # enable rockchip test export RK_ENABLE_ROCKCHIP_TEST=y + +################################################# +# PRE and POST +################################################# + +# specify pre.sh for delete/overlay files +export RK_PRE_BUILD_OEM_SCRIPT=luckfox-buildroot-oem-pre.sh + +# specify post.sh for delete/overlay files +export RK_PRE_BUILD_USERDATA_SCRIPT=luckfox-userdata-pre.sh \ No newline at end of file diff --git a/project/cfg/BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1103_Luckfox_Pico_Mini_A-IPC.mk b/project/cfg/BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1103_Luckfox_Pico_Mini_A-IPC.mk index 1b4331989..cd5e3ec42 100755 --- a/project/cfg/BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1103_Luckfox_Pico_Mini_A-IPC.mk +++ b/project/cfg/BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1103_Luckfox_Pico_Mini_A-IPC.mk @@ -20,7 +20,7 @@ export RK_KERNEL_DTS=rv1103g-luckfox-pico-mini.dts # BOOT_MEDIUM ################################################# -# Target boot medium: sd_card/spi_nor/spi_nand +# Target boot medium export RK_BOOT_MEDIUM=sd_card # Uboot defconfig fragment @@ -58,7 +58,7 @@ export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ext4,userdata@/userdata@ext4,oem@/ # TARGET_ROOTFS ################################################# -# Target rootfs : ubuntu(only sd_card)/buildroot/busybox +# Target rootfs export LF_TARGET_ROOTFS=buildroot # Buildroot defconfig @@ -102,3 +102,13 @@ export RK_BUILD_APP_TO_OEM_PARTITION=y # enable rockchip test export RK_ENABLE_ROCKCHIP_TEST=y + +################################################# +# PRE and POST +################################################# + +# specify pre.sh for delete/overlay files +export RK_PRE_BUILD_OEM_SCRIPT=luckfox-buildroot-oem-pre.sh + +# specify post.sh for delete/overlay files +export RK_PRE_BUILD_USERDATA_SCRIPT=luckfox-userdata-pre.sh diff --git a/project/cfg/BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1103_Luckfox_Pico_Mini_B-IPC.mk b/project/cfg/BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1103_Luckfox_Pico_Mini_B-IPC.mk index 2a082942d..c76ab296c 100755 --- a/project/cfg/BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1103_Luckfox_Pico_Mini_B-IPC.mk +++ b/project/cfg/BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1103_Luckfox_Pico_Mini_B-IPC.mk @@ -20,7 +20,7 @@ export RK_KERNEL_DTS=rv1103g-luckfox-pico-mini.dts # BOOT_MEDIUM ################################################# -# Target boot medium: sd_card/spi_nor/spi_nand +# Target boot medium export RK_BOOT_MEDIUM=sd_card # Uboot defconfig fragment @@ -58,7 +58,7 @@ export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ext4,userdata@/userdata@ext4,oem@/ # TARGET_ROOTFS ################################################# -# Target rootfs : ubuntu(only sd_card)/buildroot/busybox +# Target rootfs export LF_TARGET_ROOTFS=buildroot # Buildroot defconfig @@ -102,3 +102,13 @@ export RK_BUILD_APP_TO_OEM_PARTITION=y # enable rockchip test export RK_ENABLE_ROCKCHIP_TEST=y + +################################################# +# PRE and POST +################################################# + +# specify pre.sh for delete/overlay files +export RK_PRE_BUILD_OEM_SCRIPT=luckfox-buildroot-oem-pre.sh + +# specify post.sh for delete/overlay files +export RK_PRE_BUILD_USERDATA_SCRIPT=luckfox-userdata-pre.sh diff --git a/project/cfg/BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1103_Luckfox_Pico_Plus-IPC.mk b/project/cfg/BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1103_Luckfox_Pico_Plus-IPC.mk index 50610fb1f..1ac2fef0e 100755 --- a/project/cfg/BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1103_Luckfox_Pico_Plus-IPC.mk +++ b/project/cfg/BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1103_Luckfox_Pico_Plus-IPC.mk @@ -21,7 +21,7 @@ export RK_KERNEL_DTS=rv1103g-luckfox-pico-plus.dts # BOOT_MEDIUM ################################################# -# Target boot medium: sd_card/spi_nor/spi_nand +# Target boot medium export RK_BOOT_MEDIUM=sd_card # Uboot defconfig fragment @@ -59,7 +59,7 @@ export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ext4,userdata@/userdata@ext4,oem@/ # TARGET_ROOTFS ################################################# -# Target rootfs : ubuntu(only sd_card)/buildroot/busybox +# Target rootfs export LF_TARGET_ROOTFS=buildroot # Buildroot defconfig @@ -103,3 +103,13 @@ export RK_BUILD_APP_TO_OEM_PARTITION=y # enable rockchip test export RK_ENABLE_ROCKCHIP_TEST=y + +################################################# +# PRE and POST +################################################# + +# specify pre.sh for delete/overlay files +export RK_PRE_BUILD_OEM_SCRIPT=luckfox-buildroot-oem-pre.sh + +# specify post.sh for delete/overlay files +export RK_PRE_BUILD_USERDATA_SCRIPT=luckfox-userdata-pre.sh diff --git a/project/cfg/BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1106_Luckfox_Pico_Max-IPC.mk b/project/cfg/BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1106_Luckfox_Pico_Max-IPC.mk index 89b538fc5..443f491d4 100755 --- a/project/cfg/BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1106_Luckfox_Pico_Max-IPC.mk +++ b/project/cfg/BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1106_Luckfox_Pico_Max-IPC.mk @@ -20,7 +20,7 @@ export RK_KERNEL_DTS=rv1106g-luckfox-pico-max.dts # BOOT_MEDIUM ################################################# -# Target boot medium: sd_card/spi_nor/spi_nand +# Target boot medium export RK_BOOT_MEDIUM=sd_card # Uboot defconfig fragment @@ -58,7 +58,7 @@ export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ext4,userdata@/userdata@ext4,oem@/ # TARGET_ROOTFS ################################################# -# Target rootfs : ubuntu(only sd_card)/buildroot/busybox +# Target rootfs export LF_TARGET_ROOTFS=buildroot # Buildroot defconfig @@ -102,3 +102,13 @@ export RK_BUILD_APP_TO_OEM_PARTITION=y # enable rockchip test export RK_ENABLE_ROCKCHIP_TEST=y + +################################################# +# PRE and POST +################################################# + +# specify pre.sh for delete/overlay files +export RK_PRE_BUILD_OEM_SCRIPT=luckfox-buildroot-oem-pre.sh + +# specify post.sh for delete/overlay files +export RK_PRE_BUILD_USERDATA_SCRIPT=luckfox-userdata-pre.sh \ No newline at end of file diff --git a/project/cfg/BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1106_Luckfox_Pico_Pro-IPC.mk b/project/cfg/BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1106_Luckfox_Pico_Pro-IPC.mk index b90620516..29c298011 100755 --- a/project/cfg/BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1106_Luckfox_Pico_Pro-IPC.mk +++ b/project/cfg/BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1106_Luckfox_Pico_Pro-IPC.mk @@ -20,7 +20,7 @@ export RK_KERNEL_DTS=rv1106g-luckfox-pico-pro.dts # BOOT_MEDIUM ################################################# -# Target boot medium: sd_card/spi_nor/spi_nand +# Target boot medium export RK_BOOT_MEDIUM=sd_card # Uboot defconfig fragment @@ -58,7 +58,7 @@ export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ext4,userdata@/userdata@ext4,oem@/ # TARGET_ROOTFS ################################################# -# Target rootfs : ubuntu(only sd_card)/buildroot/busybox +# Target rootfs export LF_TARGET_ROOTFS=buildroot # Buildroot defconfig @@ -102,3 +102,13 @@ export RK_BUILD_APP_TO_OEM_PARTITION=y # enable rockchip test export RK_ENABLE_ROCKCHIP_TEST=y + +################################################# +# PRE and POST +################################################# + +# specify pre.sh for delete/overlay files +export RK_PRE_BUILD_OEM_SCRIPT=luckfox-buildroot-oem-pre.sh + +# specify post.sh for delete/overlay files +export RK_PRE_BUILD_USERDATA_SCRIPT=luckfox-userdata-pre.sh \ No newline at end of file diff --git a/project/cfg/BoardConfig_IPC/BoardConfig-SD_CARD-Ubuntu-RV1103_Luckfox_Pico-IPC.mk b/project/cfg/BoardConfig_IPC/BoardConfig-SD_CARD-Ubuntu-RV1103_Luckfox_Pico-IPC.mk index 9a3eb3e50..e84112530 100755 --- a/project/cfg/BoardConfig_IPC/BoardConfig-SD_CARD-Ubuntu-RV1103_Luckfox_Pico-IPC.mk +++ b/project/cfg/BoardConfig_IPC/BoardConfig-SD_CARD-Ubuntu-RV1103_Luckfox_Pico-IPC.mk @@ -20,7 +20,7 @@ export RK_KERNEL_DTS=rv1103g-luckfox-pico.dts # BOOT_MEDIUM ################################################# -# Target boot medium: sd_card/spi_nor/spi_nand +# Target boot medium export RK_BOOT_MEDIUM=sd_card # Uboot defconfig fragment @@ -58,7 +58,7 @@ export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ext4,userdata@/userdata@ext4,oem@/ # TARGET_ROOTFS ################################################# -# Target rootfs : ubuntu(only sd_card)/buildroot/busybox +# Target rootfs export LF_TARGET_ROOTFS=ubuntu # SUBMODULES : github/gitee @@ -105,3 +105,13 @@ export RK_BUILD_APP_TO_OEM_PARTITION=y # enable rockchip test export RK_ENABLE_ROCKCHIP_TEST=y + +################################################# +# PRE and POST +################################################# + +# specify pre.sh for delete/overlay files +export RK_PRE_BUILD_OEM_SCRIPT=luckfox-ubuntu-oem-pre.sh + +# specify post.sh for delete/overlay files +export RK_PRE_BUILD_USERDATA_SCRIPT=luckfox-userdata-pre.sh diff --git a/project/cfg/BoardConfig_IPC/BoardConfig-SD_CARD-Ubuntu-RV1103_Luckfox_Pico_Mini_A-IPC.mk b/project/cfg/BoardConfig_IPC/BoardConfig-SD_CARD-Ubuntu-RV1103_Luckfox_Pico_Mini_A-IPC.mk index 31f7bad30..9c9384a08 100755 --- a/project/cfg/BoardConfig_IPC/BoardConfig-SD_CARD-Ubuntu-RV1103_Luckfox_Pico_Mini_A-IPC.mk +++ b/project/cfg/BoardConfig_IPC/BoardConfig-SD_CARD-Ubuntu-RV1103_Luckfox_Pico_Mini_A-IPC.mk @@ -20,7 +20,7 @@ export RK_KERNEL_DTS=rv1103g-luckfox-pico-mini.dts # BOOT_MEDIUM ################################################# -# Target boot medium: sd_card/spi_nor/spi_nand +# Target boot medium export RK_BOOT_MEDIUM=sd_card # Uboot defconfig fragment @@ -58,7 +58,7 @@ export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ext4,userdata@/userdata@ext4,oem@/ # TARGET_ROOTFS ################################################# -# Target rootfs : ubuntu(only sd_card)/buildroot/busybox +# Target rootfs export LF_TARGET_ROOTFS=ubuntu # SUBMODULES : github/gitee @@ -105,3 +105,13 @@ export RK_BUILD_APP_TO_OEM_PARTITION=y # enable rockchip test export RK_ENABLE_ROCKCHIP_TEST=y + +################################################# +# PRE and POST +################################################# + +# specify pre.sh for delete/overlay files +export RK_PRE_BUILD_OEM_SCRIPT=luckfox-ubuntu-oem-pre.sh + +# specify post.sh for delete/overlay files +export RK_PRE_BUILD_USERDATA_SCRIPT=luckfox-userdata-pre.sh diff --git a/project/cfg/BoardConfig_IPC/BoardConfig-SD_CARD-Ubuntu-RV1103_Luckfox_Pico_Mini_B-IPC.mk b/project/cfg/BoardConfig_IPC/BoardConfig-SD_CARD-Ubuntu-RV1103_Luckfox_Pico_Mini_B-IPC.mk index 8f787f7f8..c5de252bb 100755 --- a/project/cfg/BoardConfig_IPC/BoardConfig-SD_CARD-Ubuntu-RV1103_Luckfox_Pico_Mini_B-IPC.mk +++ b/project/cfg/BoardConfig_IPC/BoardConfig-SD_CARD-Ubuntu-RV1103_Luckfox_Pico_Mini_B-IPC.mk @@ -20,7 +20,7 @@ export RK_KERNEL_DTS=rv1103g-luckfox-pico-mini.dts # BOOT_MEDIUM ################################################# -# Target boot medium: sd_card/spi_nor/spi_nand +# Target boot medium export RK_BOOT_MEDIUM=sd_card # Uboot defconfig fragment @@ -58,7 +58,7 @@ export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ext4,userdata@/userdata@ext4,oem@/ # TARGET_ROOTFS ################################################# -# Target rootfs : ubuntu(only sd_card)/buildroot/busybox +# Target rootfs export LF_TARGET_ROOTFS=ubuntu # SUBMODULES : github/gitee @@ -105,3 +105,13 @@ export RK_BUILD_APP_TO_OEM_PARTITION=y # enable rockchip test export RK_ENABLE_ROCKCHIP_TEST=y + +################################################# +# PRE and POST +################################################# + +# specify pre.sh for delete/overlay files +export RK_PRE_BUILD_OEM_SCRIPT=luckfox-ubuntu-oem-pre.sh + +# specify post.sh for delete/overlay files +export RK_PRE_BUILD_USERDATA_SCRIPT=luckfox-userdata-pre.sh diff --git a/project/cfg/BoardConfig_IPC/BoardConfig-SD_CARD-Ubuntu-RV1103_Luckfox_Pico_Plus-IPC.mk b/project/cfg/BoardConfig_IPC/BoardConfig-SD_CARD-Ubuntu-RV1103_Luckfox_Pico_Plus-IPC.mk index 2471085b9..d0f191f24 100755 --- a/project/cfg/BoardConfig_IPC/BoardConfig-SD_CARD-Ubuntu-RV1103_Luckfox_Pico_Plus-IPC.mk +++ b/project/cfg/BoardConfig_IPC/BoardConfig-SD_CARD-Ubuntu-RV1103_Luckfox_Pico_Plus-IPC.mk @@ -20,7 +20,7 @@ export RK_KERNEL_DTS=rv1103g-luckfox-pico-plus.dts # BOOT_MEDIUM ################################################# -# Target boot medium: sd_card/spi_nor/spi_nand +# Target boot medium export RK_BOOT_MEDIUM=sd_card # Uboot defconfig fragment @@ -58,7 +58,7 @@ export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ext4,userdata@/userdata@ext4,oem@/ # TARGET_ROOTFS ################################################# -# Target rootfs : ubuntu(only sd_card)/buildroot/busybox +# Target rootfs export LF_TARGET_ROOTFS=ubuntu # SUBMODULES : github/gitee @@ -105,3 +105,13 @@ export RK_BUILD_APP_TO_OEM_PARTITION=y # enable rockchip test export RK_ENABLE_ROCKCHIP_TEST=y + +################################################# +# PRE and POST +################################################# + +# specify pre.sh for delete/overlay files +export RK_PRE_BUILD_OEM_SCRIPT=luckfox-ubuntu-oem-pre.sh + +# specify post.sh for delete/overlay files +export RK_PRE_BUILD_USERDATA_SCRIPT=luckfox-userdata-pre.sh diff --git a/project/cfg/BoardConfig_IPC/BoardConfig-SD_CARD-Ubuntu-RV1106_Luckfox_Pico_Max-IPC.mk b/project/cfg/BoardConfig_IPC/BoardConfig-SD_CARD-Ubuntu-RV1106_Luckfox_Pico_Max-IPC.mk index de6beba5a..b27dce5b0 100755 --- a/project/cfg/BoardConfig_IPC/BoardConfig-SD_CARD-Ubuntu-RV1106_Luckfox_Pico_Max-IPC.mk +++ b/project/cfg/BoardConfig_IPC/BoardConfig-SD_CARD-Ubuntu-RV1106_Luckfox_Pico_Max-IPC.mk @@ -20,7 +20,7 @@ export RK_KERNEL_DTS=rv1106g-luckfox-pico-max.dts # BOOT_MEDIUM ################################################# -# Target boot medium: sd_card/spi_nor/spi_nand +# Target boot medium export RK_BOOT_MEDIUM=sd_card # Uboot defconfig fragment @@ -58,7 +58,7 @@ export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ext4,userdata@/userdata@ext4,oem@/ # TARGET_ROOTFS ################################################# -# Target rootfs : ubuntu(only sd_card)/buildroot/busybox +# Target rootfs export LF_TARGET_ROOTFS=ubuntu # SUBMODULES : github/gitee @@ -105,3 +105,13 @@ export RK_BUILD_APP_TO_OEM_PARTITION=y # enable rockchip test export RK_ENABLE_ROCKCHIP_TEST=y + +################################################# +# PRE and POST +################################################# + +# specify pre.sh for delete/overlay files +export RK_PRE_BUILD_OEM_SCRIPT=luckfox-ubuntu-oem-pre.sh + +# specify post.sh for delete/overlay files +export RK_PRE_BUILD_USERDATA_SCRIPT=luckfox-userdata-pre.sh \ No newline at end of file diff --git a/project/cfg/BoardConfig_IPC/BoardConfig-SD_CARD-Ubuntu-RV1106_Luckfox_Pico_Pro-IPC.mk b/project/cfg/BoardConfig_IPC/BoardConfig-SD_CARD-Ubuntu-RV1106_Luckfox_Pico_Pro-IPC.mk index 05e3f7971..3e705daae 100755 --- a/project/cfg/BoardConfig_IPC/BoardConfig-SD_CARD-Ubuntu-RV1106_Luckfox_Pico_Pro-IPC.mk +++ b/project/cfg/BoardConfig_IPC/BoardConfig-SD_CARD-Ubuntu-RV1106_Luckfox_Pico_Pro-IPC.mk @@ -20,7 +20,7 @@ export RK_KERNEL_DTS=rv1106g-luckfox-pico-pro.dts # BOOT_MEDIUM ################################################# -# Target boot medium: sd_card/spi_nor/spi_nand +# Target boot medium export RK_BOOT_MEDIUM=sd_card # Uboot defconfig fragment @@ -58,7 +58,7 @@ export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ext4,userdata@/userdata@ext4,oem@/ # TARGET_ROOTFS ################################################# -# Target rootfs : ubuntu(only sd_card)/buildroot/busybox +# Target rootfs export LF_TARGET_ROOTFS=ubuntu # SUBMODULES : github/gitee @@ -105,3 +105,13 @@ export RK_BUILD_APP_TO_OEM_PARTITION=y # enable rockchip test export RK_ENABLE_ROCKCHIP_TEST=y + +################################################# +# PRE and POST +################################################# + +# specify pre.sh for delete/overlay files +export RK_PRE_BUILD_OEM_SCRIPT=luckfox-ubuntu-oem-pre.sh + +# specify post.sh for delete/overlay files +export RK_PRE_BUILD_USERDATA_SCRIPT=luckfox-userdata-pre.sh \ No newline at end of file diff --git a/project/cfg/BoardConfig_IPC/BoardConfig-SPI_NAND-Buildroot-RV1103_Luckfox_Pico_Mini_B-IPC.mk b/project/cfg/BoardConfig_IPC/BoardConfig-SPI_NAND-Buildroot-RV1103_Luckfox_Pico_Mini_B-IPC.mk index 5e73ef97d..ab6de6a58 100755 --- a/project/cfg/BoardConfig_IPC/BoardConfig-SPI_NAND-Buildroot-RV1103_Luckfox_Pico_Mini_B-IPC.mk +++ b/project/cfg/BoardConfig_IPC/BoardConfig-SPI_NAND-Buildroot-RV1103_Luckfox_Pico_Mini_B-IPC.mk @@ -35,7 +35,7 @@ export RK_UBOOT_DEFCONFIG_FRAGMENT=rk-sfc.config # := [@](part-name) # Note: # If the first partition offset is not 0x0, it must be added. Otherwise, it needn't adding. -export RK_PARTITION_CMD_IN_ENV="256K(env),256K@256K(idblock),512K(uboot),4M(boot),36M(oem),6M(userdata),78M(rootfs)" +export RK_PARTITION_CMD_IN_ENV="256K(env),256K@256K(idblock),512K(uboot),4M(boot),30M(oem),6M(userdata),85M(rootfs)" # config partition's filesystem type (squashfs is readonly) # emmc: squashfs/ext4 @@ -102,3 +102,13 @@ export RK_BUILD_APP_TO_OEM_PARTITION=y # enable rockchip test export RK_ENABLE_ROCKCHIP_TEST=y + +################################################# +# PRE and POST +################################################# + +# specify pre.sh for delete/overlay files +export RK_PRE_BUILD_OEM_SCRIPT=luckfox-buildroot-oem-pre.sh + +# specify post.sh for delete/overlay files +export RK_PRE_BUILD_USERDATA_SCRIPT=luckfox-userdata-pre.sh diff --git a/project/cfg/BoardConfig_IPC/BoardConfig-SPI_NAND-Buildroot-RV1103_Luckfox_Pico_Plus-IPC.mk b/project/cfg/BoardConfig_IPC/BoardConfig-SPI_NAND-Buildroot-RV1103_Luckfox_Pico_Plus-IPC.mk index 5cc5f2af1..67158aedd 100755 --- a/project/cfg/BoardConfig_IPC/BoardConfig-SPI_NAND-Buildroot-RV1103_Luckfox_Pico_Plus-IPC.mk +++ b/project/cfg/BoardConfig_IPC/BoardConfig-SPI_NAND-Buildroot-RV1103_Luckfox_Pico_Plus-IPC.mk @@ -35,7 +35,7 @@ export RK_UBOOT_DEFCONFIG_FRAGMENT=rk-sfc.config # := [@](part-name) # Note: # If the first partition offset is not 0x0, it must be added. Otherwise, it needn't adding. -export RK_PARTITION_CMD_IN_ENV="256K(env),256K@256K(idblock),512K(uboot),4M(boot),36M(oem),6M(userdata),78M(rootfs)" +export RK_PARTITION_CMD_IN_ENV="256K(env),256K@256K(idblock),512K(uboot),4M(boot),30M(oem),6M(userdata),85M(rootfs)" # config partition's filesystem type (squashfs is readonly) # emmc: squashfs/ext4 @@ -102,3 +102,13 @@ export RK_BUILD_APP_TO_OEM_PARTITION=y # enable rockchip test export RK_ENABLE_ROCKCHIP_TEST=y + +################################################# +# PRE and POST +################################################# + +# specify pre.sh for delete/overlay files +export RK_PRE_BUILD_OEM_SCRIPT=luckfox-buildroot-oem-pre.sh + +# specify post.sh for delete/overlay files +export RK_PRE_BUILD_USERDATA_SCRIPT=luckfox-userdata-pre.sh \ No newline at end of file diff --git a/project/cfg/BoardConfig_IPC/BoardConfig-SPI_NAND-Buildroot-RV1106_Luckfox_Pico_Max-IPC.mk b/project/cfg/BoardConfig_IPC/BoardConfig-SPI_NAND-Buildroot-RV1106_Luckfox_Pico_Max-IPC.mk index 2a26b235d..551f40911 100755 --- a/project/cfg/BoardConfig_IPC/BoardConfig-SPI_NAND-Buildroot-RV1106_Luckfox_Pico_Max-IPC.mk +++ b/project/cfg/BoardConfig_IPC/BoardConfig-SPI_NAND-Buildroot-RV1106_Luckfox_Pico_Max-IPC.mk @@ -35,7 +35,7 @@ export RK_UBOOT_DEFCONFIG_FRAGMENT=rk-sfc.config # := [@](part-name) # Note: # If the first partition offset is not 0x0, it must be added. Otherwise, it needn't adding. -export RK_PARTITION_CMD_IN_ENV="256K(env),256K@256K(idblock),512K(uboot),4M(boot),36M(oem),10M(userdata),204M(rootfs)" +export RK_PARTITION_CMD_IN_ENV="256K(env),256K@256K(idblock),512K(uboot),4M(boot),30M(oem),10M(userdata),210M(rootfs)" # config partition's filesystem type (squashfs is readonly) # emmc: squashfs/ext4 @@ -102,3 +102,13 @@ export RK_BUILD_APP_TO_OEM_PARTITION=y # enable rockchip test export RK_ENABLE_ROCKCHIP_TEST=y + +################################################# +# PRE and POST +################################################# + +# specify pre.sh for delete/overlay files +export RK_PRE_BUILD_OEM_SCRIPT=luckfox-buildroot-oem-pre.sh + +# specify post.sh for delete/overlay files +export RK_PRE_BUILD_USERDATA_SCRIPT=luckfox-userdata-pre.sh diff --git a/project/cfg/BoardConfig_IPC/BoardConfig-SPI_NAND-Buildroot-RV1106_Luckfox_Pico_Pro-IPC.mk b/project/cfg/BoardConfig_IPC/BoardConfig-SPI_NAND-Buildroot-RV1106_Luckfox_Pico_Pro-IPC.mk index 37bcf1453..6541f84db 100755 --- a/project/cfg/BoardConfig_IPC/BoardConfig-SPI_NAND-Buildroot-RV1106_Luckfox_Pico_Pro-IPC.mk +++ b/project/cfg/BoardConfig_IPC/BoardConfig-SPI_NAND-Buildroot-RV1106_Luckfox_Pico_Pro-IPC.mk @@ -35,7 +35,7 @@ export RK_UBOOT_DEFCONFIG_FRAGMENT=rk-sfc.config # := [@](part-name) # Note: # If the first partition offset is not 0x0, it must be added. Otherwise, it needn't adding. -export RK_PARTITION_CMD_IN_ENV="256K(env),256K@256K(idblock),512K(uboot),4M(boot),36M(oem),10M(userdata),204M(rootfs)" +export RK_PARTITION_CMD_IN_ENV="256K(env),256K@256K(idblock),512K(uboot),4M(boot),30M(oem),10M(userdata),210M(rootfs)" # config partition's filesystem type (squashfs is readonly) # emmc: squashfs/ext4 @@ -102,3 +102,13 @@ export RK_BUILD_APP_TO_OEM_PARTITION=y # enable rockchip test export RK_ENABLE_ROCKCHIP_TEST=y + +################################################# +# PRE and POST +################################################# + +# specify pre.sh for delete/overlay files +export RK_PRE_BUILD_OEM_SCRIPT=luckfox-buildroot-oem-pre.sh + +# specify post.sh for delete/overlay files +export RK_PRE_BUILD_USERDATA_SCRIPT=luckfox-userdata-pre.sh \ No newline at end of file diff --git a/project/cfg/BoardConfig_IPC/BoardConfig-SPI_NAND-Busybox-RV1106_Luckfox_Pico_Pro_Max-IPC_FASTBOOT.mk b/project/cfg/BoardConfig_IPC/BoardConfig-SPI_NAND-Busybox-RV1106_Luckfox_Pico_Pro_Max-IPC_FASTBOOT.mk index 25a99e997..a2ba4622f 100755 --- a/project/cfg/BoardConfig_IPC/BoardConfig-SPI_NAND-Busybox-RV1106_Luckfox_Pico_Pro_Max-IPC_FASTBOOT.mk +++ b/project/cfg/BoardConfig_IPC/BoardConfig-SPI_NAND-Busybox-RV1106_Luckfox_Pico_Pro_Max-IPC_FASTBOOT.mk @@ -21,7 +21,7 @@ export RK_KERNEL_DTS=rv1106g-luckfox-pico-pro-max-fastboot.dts # BOOT_MEDIUM ################################################# -# Target boot medium: emmc/spi_nor/spi_nand +# Target boot medium export RK_BOOT_MEDIUM=spi_nand # Uboot defconfig fragment @@ -65,7 +65,7 @@ export RK_PARTITION_FS_TYPE_CFG=boot@IGNORE@erofs,userdata@/userdata@ubifs # TARGET_ROOTFS ################################################# -# Target rootfs : ubuntu(only emmc)/buildroot/busybox +# Target rootfs export LF_TARGET_ROOTFS=busybox # Buildroot defconfig diff --git a/project/cfg/BoardConfig_IPC/luckfox-buildroot-oem-pre.sh b/project/cfg/BoardConfig_IPC/luckfox-buildroot-oem-pre.sh new file mode 100644 index 000000000..eaf54e716 --- /dev/null +++ b/project/cfg/BoardConfig_IPC/luckfox-buildroot-oem-pre.sh @@ -0,0 +1,49 @@ +#!/bin/bash + +function lf_rm() { + for file in "$@"; do + if [ -e "$file" ]; then + echo "Deleting: $file" + rm -rf "$file" + #else + #echo "File not found: $file" + fi + done +} + +# remove unused files +function remove_data() +{ + lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/lib/*.aiisp + lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/lib/*.data + + # drm + lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/lib/libdrm* + lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/lib/libdrm_rockchip* + + # kms + lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/lib/libkms* + + # freetype + lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/lib/libfreetype* + + # iconv + lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/lib/libiconv* + + # rkAVS + lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/lib/librkAVS* + + # jpeg + lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/lib/libjpeg* + + # png + lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/lib/libpng* + + # vqefiles + lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/share/vqefiles/* +} + +#========================= +# run +#========================= +remove_data \ No newline at end of file diff --git a/project/cfg/BoardConfig_IPC/luckfox-ubuntu-oem-pre.sh b/project/cfg/BoardConfig_IPC/luckfox-ubuntu-oem-pre.sh new file mode 100644 index 000000000..084a70658 --- /dev/null +++ b/project/cfg/BoardConfig_IPC/luckfox-ubuntu-oem-pre.sh @@ -0,0 +1,50 @@ +#!/bin/bash + +# remove unused files +function lf_rm() { + for file in "$@"; do + if [ -e "$file" ]; then + echo "Deleting: $file" + rm -rf "$file" + #else + #echo "File not found: $file" + fi + done +} + +# remove unused files +function remove_data() +{ + lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/lib/*.aiisp + lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/lib/*.data + + # drm + lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/lib/libdrm* + lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/lib/libdrm_rockchip* + + # kms + lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/lib/libkms* + + # freetype + lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/lib/libfreetype* + + # iconv + lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/lib/libiconv* + + # rkAVS + lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/lib/librkAVS* + + # jpeg + lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/lib/libjpeg* + + # png + lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/lib/libpng* + + # vqefiles + lf_rm $RK_PROJECT_PACKAGE_OEM_DIR/usr/share/vqefiles/* +} + +#========================= +# run +#========================= +remove_data \ No newline at end of file diff --git a/project/cfg/BoardConfig_IPC/luckfox-userdata-post.sh b/project/cfg/BoardConfig_IPC/luckfox-userdata-post.sh new file mode 100644 index 000000000..b370a0149 --- /dev/null +++ b/project/cfg/BoardConfig_IPC/luckfox-userdata-post.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +function lf_rm() { + for file in "$@"; do + if [ -e "$file" ]; then + echo "Deleting: $file" + rm -rf "$file" + #else + #echo "File not found: $file" + fi + done +} + +# remove unused files +function remove_data() +{ + lf_rm $RK_PROJECT_PACKAGE_USERDATA_DIR/*.sh + lf_rm $RK_PROJECT_PACKAGE_USERDATA_DIR/*.bmp +} + +#========================= +# run +#========================= +remove_data \ No newline at end of file diff --git a/sysdrv/Makefile b/sysdrv/Makefile index 37e865c37..7b5fdfda6 100644 --- a/sysdrv/Makefile +++ b/sysdrv/Makefile @@ -643,6 +643,7 @@ else #cp $(SYSDRV_DIR)/tools/board/buildroot/busybox $(SYSDRV_DIR_OUT_ROOTFS)/bin/busybox cp $(SYSDRV_DIR)/tools/board/buildroot/shadow_defconfig $(SYSDRV_DIR_OUT_ROOTFS)/etc/shadow cp $(SYSDRV_DIR)/tools/board/buildroot/sshd_defconfig $(SYSDRV_DIR_OUT_ROOTFS)/etc/ssh/sshd_config + mkdir -p $(SYSDRV_DIR_OUT_ROOTFS)/etc/samba cp $(SYSDRV_DIR)/tools/board/buildroot/samba_defconfig $(SYSDRV_DIR_OUT_ROOTFS)/etc/samba/smb.conf cp $(SYSDRV_DIR)/tools/board/buildroot/smbpasswd_defconfig $(SYSDRV_DIR_OUT_ROOTFS)/etc/samba/smbpasswd cp $(SYSDRV_DIR)/tools/board/buildroot/profile_defconfig $(SYSDRV_DIR_OUT_ROOTFS)/etc/profile diff --git a/sysdrv/tools/board/android-tools/S99usb0config b/sysdrv/tools/board/android-tools/S99usb0config index d177b9019..37bf52dc7 100755 --- a/sysdrv/tools/board/android-tools/S99usb0config +++ b/sysdrv/tools/board/android-tools/S99usb0config @@ -2,6 +2,9 @@ TARGET_IP="172.32.0.93" +USB_KEYWORD="android_work: sent uevent USB_STATE=" +USB_MODE_PATH="/proc/device-tree/usbdrd/usb@ffb00000/dr_mode" + MAX_RETRIES=10 retries=0 @@ -30,9 +33,32 @@ usb0_config() { fi } +usb_reset() { + while true; do + last_line=$(dmesg | grep "$USB_KEYWORD" | tail -n 1) + + if [[ "$last_line" == *"DISCONNECTED"* ]]; then + echo "Detected USB DISCONNECTED." + /etc/init.d/S50usbdevice restart + usb0_config + #elif [[ "$last_line" == *"CONFIGURED"* ]]; then + # echo "Detected CONFIGURED. No action required." + #else + # echo "No relevant USB_STATE found." + fi + + sleep 5 + done +} + case $1 in start) - usb0_config + # check peripheral + usb_mode="$(cat $USB_MODE_PATH)" + if [ "$usb_mode" = "peripheral" ]; then + usb0_config + usb_reset & + fi ;; stop) ;; *) diff --git a/sysdrv/tools/board/buildroot/luckfox_pico_defconfig b/sysdrv/tools/board/buildroot/luckfox_pico_defconfig index cbbe8d6e0..234c28b9d 100755 --- a/sysdrv/tools/board/buildroot/luckfox_pico_defconfig +++ b/sysdrv/tools/board/buildroot/luckfox_pico_defconfig @@ -15,6 +15,10 @@ BR2_TARGET_GENERIC_HOSTNAME="luckfox pico" BR2_TARGET_GENERIC_ISSUE="Welcome to luckfox pico" BR2_TARGET_GENERIC_ROOT_PASSWD="luckfox" BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y +BR2_PACKAGE_BZIP2=y +BR2_PACKAGE_GZIP=y +BR2_PACKAGE_PIXZ=y +BR2_PACKAGE_E2FSPROGS=y BR2_PACKAGE_E2FSPROGS_RESIZE2FS=y BR2_PACKAGE_PYTHON3=y BR2_PACKAGE_PYTHON3_SSL=y @@ -29,6 +33,8 @@ BR2_PACKAGE_PYTHON_SETUPTOOLS=y BR2_PACKAGE_PYTHON_SMBUS_CFFI=y BR2_PACKAGE_PYTHON_SPIDEV=y BR2_PACKAGE_PYTHON_WERKZEUG=y +BR2_PACKAGE_GNUTLS=y +BR2_PACKAGE_FREETYPE=y BR2_PACKAGE_DTC=y BR2_PACKAGE_DTC_PROGRAMS=y BR2_PACKAGE_LIBV4L=y @@ -36,7 +42,6 @@ BR2_PACKAGE_LIBV4L_UTILS=y BR2_PACKAGE_LRZSZ=y BR2_PACKAGE_NTP=y BR2_PACKAGE_OPENSSH=y -BR2_PACKAGE_SAMBA4=y BR2_PACKAGE_BASH=y BR2_PACKAGE_BASH_LOADABLE_EXAMPLES=y BR2_PACKAGE_DIALOG=y diff --git a/sysdrv/tools/board/buildroot/luckfox_pico_w_defconfig b/sysdrv/tools/board/buildroot/luckfox_pico_w_defconfig index 8fa242bdd..024196fb9 100755 --- a/sysdrv/tools/board/buildroot/luckfox_pico_w_defconfig +++ b/sysdrv/tools/board/buildroot/luckfox_pico_w_defconfig @@ -86,3 +86,9 @@ BR2_PACKAGE_UTIL_LINUX_LIBMOUNT=y BR2_PACKAGE_NANO=y BR2_PACKAGE_HOST_DTC=y BR2_PACKAGE_EVTEST=y +BR2_PACKAGE_GNUTLS=y +BR2_PACKAGE_FREETYPE=y +BR2_PACKAGE_BZIP2=y +BR2_PACKAGE_GZIP=y +BR2_PACKAGE_PIXZ=y +BR2_PACKAGE_E2FSPROGS=y