project:app:rkipc:Disable audio function in rkipc

project:cfg:BoardConfig_IPC:Add pre-processing and post-processing scripts for OEM and userdata images
project:build.sh:Add support for pre-processing and post-processing functionality for SDK OEM and userdata images
sysdrv:Makefile:Remove default Samba4 support from buildroot rootfs while retaining configuration files
sysdrv:tools:board:android-tools:S99usb0config:Add a disconnect and reconnect feature for usb0 in peripheral mode.
sysdrv:tools:board:buildroot:luckfox_pico_defconfig:Remove default Samva4 support from buildroot rootfs

Signed-off-by: luckfox-eng29 <eng29@luckfox.com>
This commit is contained in:
luckfox-eng29
2024-11-01 14:38:30 +08:00
parent ec392d35c5
commit 7a66b04c61
32 changed files with 416 additions and 46 deletions

View File

@@ -1,5 +1,5 @@
[audio.0]
enable = 1
enable = 0
card_name = hw:0,0
encode_type = G711A
format = S16

View File

@@ -1,5 +1,5 @@
[audio.0]
enable = 1
enable = 0
card_name = hw:0,0
encode_type = G711A
format = S16

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -35,7 +35,7 @@ export RK_UBOOT_DEFCONFIG_FRAGMENT=rk-sfc.config
# <partdef> := <size>[@<offset>](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

View File

@@ -35,7 +35,7 @@ export RK_UBOOT_DEFCONFIG_FRAGMENT=rk-sfc.config
# <partdef> := <size>[@<offset>](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

View File

@@ -35,7 +35,7 @@ export RK_UBOOT_DEFCONFIG_FRAGMENT=rk-sfc.config
# <partdef> := <size>[@<offset>](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

View File

@@ -35,7 +35,7 @@ export RK_UBOOT_DEFCONFIG_FRAGMENT=rk-sfc.config
# <partdef> := <size>[@<offset>](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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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