Add Luckfox Pico 86Panel Support (#274)

* project/cfg/BoardConfig_IPC/overlay : Add Luckfox Pico 86Panel overlay files

Signed-off-by: luckfox-eng29 <eng29@luckfox.com>

* sysdrv/source/kernel/arch/arm/boot/dts : Add Luckfox Pico 86Panel device tree files

Signed-off-by: luckfox-eng29 <eng29@luckfox.com>

* project/cfg/BoardConfig_IPC : Add Luckfox Pico 86Panel BoardConfig files

Signed-off-by: luckfox-eng29 <eng29@luckfox.com>

* project/build.sh : Add the lunch menu item of Luckfox Pico 86Panel

Signed-off-by: luckfox-eng29 <eng29@luckfox.com>

* sysdrv/source/kernel/arch/arm/configs : Add Goodix driver module configuration for RV1106

Signed-off-by: luckfox-eng29 <eng29@luckfox.com>

* sysdrv/tools/board/buildroot/luckfox_pico_w_defconfig : Add rsync command for Luckfox Pico Buildroot system

Signed-off-by: luckfox-eng29 <eng29@luckfox.com>

* project/cfg/BoardConfig_IPC/overlay/overlay-luckfox-ubuntu-config : Add rysnc command for Luckfox Pico Ubuntu system

Signed-off-by: luckfox-eng29 <eng29@luckfox.com>

* project/cfg/BoardConfig_IPC/overlay/overlay-luckfox-config/etc/init.d : Add MIC initialization script to improve default recording quality

Signed-off-by: luckfox-eng29 <eng29@luckfox.com>

* sysdrv/tools/board/buildroot/busybox_patch : ​Add patches to enable Chinese display support in the terminal and allow the reboot command to accept parameters

Signed-off-by: luckfox-eng29 <eng29@luckfox.com>

* sysdrv/Makefile : Automatically apply BusyBox patches when building the Buildroot image

Signed-off-by: luckfox-eng29 <eng29@luckfox.com>

* sysdrv/source/kernel/arch/arm/kernel/setup.c : Make the kernel retrieve the unique CPU serial number

Signed-off-by: luckfox-eng29 <eng29@luckfox.com>

* project/cfg/BoardConfig_IPC/overlay/overlay-luckfox-config/usr/bin/luckfox-config : Fix errors and add support for eMMC rootfs backup

Signed-off-by: luckfox-eng29 <eng29@luckfox.com>

* sysdrv/source/kernel/arch/arm/boot/dts : Make Luckfox Pico Ultra and Luckfox Pico Pi default to using i2c4 for CSI cameras

Signed-off-by: luckfox-eng29 <eng29@luckfox.com>

* project/cfg/BoardConfig_IPC/overlay/overlay-luckfox-ubuntu-ultra/usr/bin/wifi_bt_init.sh : Enable wireless module initialization support for Ubuntu on Luckfox Pico 86Panel and Luckfox Pico Pi

Signed-off-by: luckfox-eng29 <eng29@luckfox.com>

* project/cfg/BoardConfig_IPC : Add executable permission to the BoardConfig scripts

Signed-off-by: luckfox-eng29 <eng29@luckfox.com>

* sysdrv/source/uboot : Resolve the issue of fast boot failure on certain eMMC models

Signed-off-by: luckfox-eng29 <eng29@luckfox.com>

* project/cfg/BoardConfig_IPC/luckfox-rv1106-tb-emmc-post.sh : Resolve the issue of file system initialization failure during eMMC fast boot

Signed-off-by: luckfox-eng29 <eng29@luckfox.com>

* project/build.sh : Fix the issue of submodule switch failure

Signed-off-by: luckfox-eng29 <eng29@luckfox.com>

* project/app/rkipc/rkipc/src : Make sure that changes to rkipc.ini can be applied and take effect after modification

Signed-off-by: eng29 <eng29@luckfox.com>

* project/cfg/BoardConfig_IPC : Discontinue support for Ubuntu

Signed-off-by: eng29 <eng29@luckfox.com>

* project/build.sh : Discontinue support for Ubuntu

Signed-off-by: eng29 <eng29@luckfox.com>

* sysdrv/Makefile : Discontinue support for Ubuntu

Signed-off-by: eng29 <eng29@luckfox.com>

* README.md : Update description
README_CN.md : Update description

Signed-off-by: eng29 <eng29@luckfox.com>

* . : Delete the Ubuntu rootfs submodule

Signed-off-by: eng29 <eng29@luckfox.com>

* sysdrv/drv_ko/wifi/aic8800dc : Update the aic8800dc driver

Signed-off-by: eng29 <eng29@luckfox.com>

---------

Signed-off-by: luckfox-eng29 <eng29@luckfox.com>
Signed-off-by: eng29 <eng29@luckfox.com>
This commit is contained in:
luckfox-eng29
2025-05-09 14:23:17 +08:00
committed by GitHub
parent a984090f06
commit d2da6f0f4f
228 changed files with 55827 additions and 37917 deletions

View File

@@ -3,18 +3,18 @@
#################################################
# Board Config
#################################################
export LF_ORIGIN_BOARD_CONFIG=BoardConfig-EMMC-Ubuntu-RV1106_Luckfox_Pico_Pi-IPC.mk
export LF_ORIGIN_BOARD_CONFIG=BoardConfig-EMMC-Buildroot-RV1106_Luckfox_Pico_86Panel-IPC.mk
# Target CHIP
export RK_CHIP=rv1106
# app config
# export RK_APP_TYPE=RKIPC_RV1106
export RK_APP_TYPE=RK_WIFI_APP
# Config CMA size in environment
export RK_BOOTARGS_CMA_SIZE="36M"
export RK_BOOTARGS_CMA_SIZE="1M"
# Kernel dts
export RK_KERNEL_DTS=rv1106g-luckfox-pico-pi.dts
export RK_KERNEL_DTS=rv1106g-luckfox-pico-86panel.dts
#################################################
# BOOT_MEDIUM
@@ -59,10 +59,7 @@ export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ext4,userdata@/userdata@ext4,oem@/
#################################################
# Target rootfs
export LF_TARGET_ROOTFS=ubuntu
# SUBMODULES github/gitee
export LF_SUBMODULES_BY=github
export LF_TARGET_ROOTFS=buildroot
# Buildroot defconfig
export RK_BUILDROOT_DEFCONFIG=luckfox_pico_w_defconfig
@@ -87,21 +84,21 @@ export RK_UBOOT_DEFCONFIG=luckfox_rv1106_uboot_defconfig
export RK_KERNEL_DEFCONFIG=luckfox_rv1106_linux_defconfig
# Kernel defconfig fragment
export RK_KERNEL_DEFCONFIG_FRAGMENT="rv1106-bt.config luckfox_rv1106-wwan-ndis-ppp.config"
export RK_KERNEL_DEFCONFIG_FRAGMENT="rv1106-gt911-module.config"
# Config sensor IQ files
# RK_CAMERA_SENSOR_IQFILES format:
# "iqfile1 iqfile2 iqfile3 ..."
# ./build.sh media and copy <SDK root dir>/output/out/media_out/isp_iqfiles/$RK_CAMERA_SENSOR_IQFILES
export RK_CAMERA_SENSOR_IQFILES="sc4336_OT01_40IRC_F16.json sc3336_CMK-OT2119-PC1_30IRC-F16.json mis5001_CMK-OT2115-PC1_30IRC-F16.json"
#export RK_CAMERA_SENSOR_IQFILES="sc4336_OT01_40IRC_F16.json sc3336_CMK-OT2119-PC1_30IRC-F16.json mis5001_CMK-OT2115-PC1_30IRC-F16.json"
#export RK_CAMERA_SENSOR_IQFILES="sc4336_OT01_40IRC_F16.json sc3336_CMK-OT2119-PC1_30IRC-F16.json sc530ai_CMK-OT2115-PC1_30IRC-F16.json"
# Config sensor lens CAC calibrattion bin files
export RK_CAMERA_SENSOR_CAC_BIN="CAC_sc4336_OT01_40IRC_F16"
#export RK_CAMERA_SENSOR_CAC_BIN="CAC_sc4336_OT01_40IRC_F16"
#export RK_CAMERA_SENSOR_CAC_BIN="CAC_sc4336_OT01_40IRC_F16 CAC_sc530ai_CMK-OT2115-PC1_30IRC-F16"
# build ipc web backend
# export RK_APP_IPCWEB_BACKEND=y
#export RK_APP_IPCWEB_BACKEND=y
# enable install app to oem partition
export RK_BUILD_APP_TO_OEM_PARTITION=y
@@ -111,19 +108,21 @@ export RK_ENABLE_ROCKCHIP_TEST=y
# enable rockchip wifi
#export RK_ENABLE_WIFI=y
#export RK_ENABLE_WIFI_CHIP=AIC8800DC
# config wifi ssid and passwd
#export LF_WIFI_SSID="Your wifi ssid"
#export LF_WIFI_PSK="Your wifi password"
#################################################
# PRE and POST
# 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
# specify post.sh for delete/overlay files
export RK_POST_BUILD_SCRIPT=luckfox-ubuntu-off-modem-post.sh
# declare overlay directory
export RK_POST_OVERLAY="overlay-luckfox-config overlay-luckfox-ubuntu-config overlay-luckfox-ubuntu-ultra overlay-luckfox-ubuntu-rockchip\
overlay-luckfox-ppp overlay-luckfox-ubuntu-sim7600g"
export RK_POST_OVERLAY="overlay-luckfox-buildroot-init overlay-luckfox-buildroot-shadow overlay-luckfox-buildroot-86panel"

View File

@@ -3,18 +3,18 @@
#################################################
# Board Config
#################################################
export LF_ORIGIN_BOARD_CONFIG=BoardConfig-EMMC-Ubuntu-RV1106_Luckfox_Pico_Ultra_W-IPC.mk
export LF_ORIGIN_BOARD_CONFIG=BoardConfig-EMMC-Buildroot-RV1106_Luckfox_Pico_86Panel_W-IPC.mk
# Target CHIP
export RK_CHIP=rv1106
# app config
# export RK_APP_TYPE=RKIPC_RV1106
export RK_APP_TYPE=RK_WIFI_APP
# Config CMA size in environment
export RK_BOOTARGS_CMA_SIZE="36M"
export RK_BOOTARGS_CMA_SIZE="1M"
# Kernel dts
export RK_KERNEL_DTS=rv1106g-luckfox-pico-ultra-w.dts
export RK_KERNEL_DTS=rv1106g-luckfox-pico-86panel-w.dts
#################################################
# BOOT_MEDIUM
@@ -59,10 +59,7 @@ export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ext4,userdata@/userdata@ext4,oem@/
#################################################
# Target rootfs
export LF_TARGET_ROOTFS=ubuntu
# SUBMODULES github/gitee
export LF_SUBMODULES_BY=github
export LF_TARGET_ROOTFS=buildroot
# Buildroot defconfig
export RK_BUILDROOT_DEFCONFIG=luckfox_pico_w_defconfig
@@ -87,21 +84,21 @@ export RK_UBOOT_DEFCONFIG=luckfox_rv1106_uboot_defconfig
export RK_KERNEL_DEFCONFIG=luckfox_rv1106_linux_defconfig
# Kernel defconfig fragment
export RK_KERNEL_DEFCONFIG_FRAGMENT=rv1106-bt.config
export RK_KERNEL_DEFCONFIG_FRAGMENT="rv1106-bt.config rv1106-gt911-module.config"
# Config sensor IQ files
# RK_CAMERA_SENSOR_IQFILES format:
# "iqfile1 iqfile2 iqfile3 ..."
# ./build.sh media and copy <SDK root dir>/output/out/media_out/isp_iqfiles/$RK_CAMERA_SENSOR_IQFILES
export RK_CAMERA_SENSOR_IQFILES="sc4336_OT01_40IRC_F16.json sc3336_CMK-OT2119-PC1_30IRC-F16.json mis5001_CMK-OT2115-PC1_30IRC-F16.json"
#export RK_CAMERA_SENSOR_IQFILES="sc4336_OT01_40IRC_F16.json sc3336_CMK-OT2119-PC1_30IRC-F16.json mis5001_CMK-OT2115-PC1_30IRC-F16.json"
#export RK_CAMERA_SENSOR_IQFILES="sc4336_OT01_40IRC_F16.json sc3336_CMK-OT2119-PC1_30IRC-F16.json sc530ai_CMK-OT2115-PC1_30IRC-F16.json"
# Config sensor lens CAC calibrattion bin files
export RK_CAMERA_SENSOR_CAC_BIN="CAC_sc4336_OT01_40IRC_F16"
#export RK_CAMERA_SENSOR_CAC_BIN="CAC_sc4336_OT01_40IRC_F16"
#export RK_CAMERA_SENSOR_CAC_BIN="CAC_sc4336_OT01_40IRC_F16 CAC_sc530ai_CMK-OT2115-PC1_30IRC-F16"
# build ipc web backend
# export RK_APP_IPCWEB_BACKEND=y
#export RK_APP_IPCWEB_BACKEND=y
# enable install app to oem partition
export RK_BUILD_APP_TO_OEM_PARTITION=y
@@ -118,7 +115,7 @@ export LF_WIFI_SSID="Your wifi ssid"
export LF_WIFI_PSK="Your wifi password"
#################################################
# PRE and POST
# PRE and POST
#################################################
# specify pre.sh for delete/overlay files
@@ -128,4 +125,4 @@ export RK_PRE_BUILD_OEM_SCRIPT=luckfox-buildroot-oem-pre.sh
export RK_PRE_BUILD_USERDATA_SCRIPT=luckfox-userdata-pre.sh
# declare overlay directory
export RK_POST_OVERLAY="overlay-luckfox-config overlay-luckfox-ubuntu-config overlay-luckfox-ubuntu-ultra overlay-luckfox-ubuntu-rockchip"
export RK_POST_OVERLAY="overlay-luckfox-buildroot-init overlay-luckfox-buildroot-shadow overlay-luckfox-buildroot-86panel"

View File

@@ -1,134 +0,0 @@
#!/bin/bash
#################################################
# Board Config
#################################################
export LF_ORIGIN_BOARD_CONFIG=BoardConfig-EMMC-Ubuntu-RV1106_Luckfox_Pico_Pi_W-IPC.mk
# Target CHIP
export RK_CHIP=rv1106
# app config
# export RK_APP_TYPE=RKIPC_RV1106
# Config CMA size in environment
export RK_BOOTARGS_CMA_SIZE="36M"
# Kernel dts
export RK_KERNEL_DTS=rv1106g-luckfox-pico-pi-w.dts
#################################################
# BOOT_MEDIUM
#################################################
# Target boot medium
export RK_BOOT_MEDIUM=emmc
# Uboot defconfig fragment
export RK_UBOOT_DEFCONFIG_FRAGMENT=rk-emmc.config
# specify post.sh for delete/overlay files
# export RK_PRE_BUILD_OEM_SCRIPT=rv1103-spi_nor-post.sh
# config partition in environment
# RK_PARTITION_CMD_IN_ENV format:
# <partdef>[,<partdef>]
# <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="32K(env),512K@32K(idblock),256K(uboot),32M(boot),512M(oem),256M(userdata),6G(rootfs)"
# config partition's filesystem type (squashfs is readonly)
# emmc: squashfs/ext4
# nand: squashfs/ubifs
# spi nor: squashfs/jffs2
# RK_PARTITION_FS_TYPE_CFG format:
# AAAA:/BBBB/CCCC@ext4
# AAAA ----------> partition name
# /BBBB/CCCC ----> partition mount point
# ext4 ----------> partition filesystem type
export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ext4,userdata@/userdata@ext4,oem@/oem@ext4
# config filesystem compress (Just for squashfs or ubifs)
# squashfs: lz4/lzo/lzma/xz/gzip, default xz
# ubifs: lzo/zlib, default lzo
# export RK_SQUASHFS_COMP=xz
# export RK_UBIFS_COMP=lzo
#################################################
# TARGET_ROOTFS
#################################################
# Target rootfs
export LF_TARGET_ROOTFS=ubuntu
# SUBMODULES github/gitee
export LF_SUBMODULES_BY=github
# Buildroot defconfig
export RK_BUILDROOT_DEFCONFIG=luckfox_pico_w_defconfig
#################################################
# Defconfig
#################################################
# Target arch
export RK_ARCH=arm
# Target Toolchain Cross Compile
export RK_TOOLCHAIN_CROSS=arm-rockchip830-linux-uclibcgnueabihf
#misc image
export RK_MISC=wipe_all-misc.img
# Uboot defconfig
export RK_UBOOT_DEFCONFIG=luckfox_rv1106_uboot_defconfig
# Kernel defconfig
export RK_KERNEL_DEFCONFIG=luckfox_rv1106_linux_defconfig
# Kernel defconfig fragment
export RK_KERNEL_DEFCONFIG_FRAGMENT="rv1106-bt.config luckfox_rv1106-wwan-ndis-ppp.config"
# Config sensor IQ files
# RK_CAMERA_SENSOR_IQFILES format:
# "iqfile1 iqfile2 iqfile3 ..."
# ./build.sh media and copy <SDK root dir>/output/out/media_out/isp_iqfiles/$RK_CAMERA_SENSOR_IQFILES
export RK_CAMERA_SENSOR_IQFILES="sc4336_OT01_40IRC_F16.json sc3336_CMK-OT2119-PC1_30IRC-F16.json mis5001_CMK-OT2115-PC1_30IRC-F16.json"
#export RK_CAMERA_SENSOR_IQFILES="sc4336_OT01_40IRC_F16.json sc3336_CMK-OT2119-PC1_30IRC-F16.json sc530ai_CMK-OT2115-PC1_30IRC-F16.json"
# Config sensor lens CAC calibrattion bin files
export RK_CAMERA_SENSOR_CAC_BIN="CAC_sc4336_OT01_40IRC_F16"
#export RK_CAMERA_SENSOR_CAC_BIN="CAC_sc4336_OT01_40IRC_F16 CAC_sc530ai_CMK-OT2115-PC1_30IRC-F16"
# build ipc web backend
# export RK_APP_IPCWEB_BACKEND=y
# enable install app to oem partition
export RK_BUILD_APP_TO_OEM_PARTITION=y
# enable rockchip test
export RK_ENABLE_ROCKCHIP_TEST=y
# enable rockchip wifi
export RK_ENABLE_WIFI=y
export RK_ENABLE_WIFI_CHIP=AIC8800DC
# config wifi ssid and passwd
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
export RK_PRE_BUILD_USERDATA_SCRIPT=luckfox-userdata-pre.sh
# specify post.sh for delete/overlay files
export RK_POST_BUILD_SCRIPT=luckfox-ubuntu-off-modem-post.sh
# declare overlay directory
export RK_POST_OVERLAY="overlay-luckfox-config overlay-luckfox-ubuntu-config overlay-luckfox-ubuntu-ultra overlay-luckfox-ubuntu-rockchip\
overlay-luckfox-ppp overlay-luckfox-ubuntu-sim7600g"

View File

@@ -1,123 +0,0 @@
#!/bin/bash
#################################################
# Board Config
#################################################
export LF_ORIGIN_BOARD_CONFIG=BoardConfig-EMMC-Ubuntu-RV1106_Luckfox_Pico_Ultra-IPC.mk
# Target CHIP
export RK_CHIP=rv1106
# app config
# export RK_APP_TYPE=RKIPC_RV1106
# Config CMA size in environment
export RK_BOOTARGS_CMA_SIZE="36M"
# Kernel dts
export RK_KERNEL_DTS=rv1106g-luckfox-pico-ultra.dts
#################################################
# BOOT_MEDIUM
#################################################
# Target boot medium
export RK_BOOT_MEDIUM=emmc
# Uboot defconfig fragment
export RK_UBOOT_DEFCONFIG_FRAGMENT=rk-emmc.config
# specify post.sh for delete/overlay files
# export RK_PRE_BUILD_OEM_SCRIPT=rv1103-spi_nor-post.sh
# config partition in environment
# RK_PARTITION_CMD_IN_ENV format:
# <partdef>[,<partdef>]
# <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="32K(env),512K@32K(idblock),256K(uboot),32M(boot),512M(oem),256M(userdata),6G(rootfs)"
# config partition's filesystem type (squashfs is readonly)
# emmc: squashfs/ext4
# nand: squashfs/ubifs
# spi nor: squashfs/jffs2
# RK_PARTITION_FS_TYPE_CFG format:
# AAAA:/BBBB/CCCC@ext4
# AAAA ----------> partition name
# /BBBB/CCCC ----> partition mount point
# ext4 ----------> partition filesystem type
export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ext4,userdata@/userdata@ext4,oem@/oem@ext4
# config filesystem compress (Just for squashfs or ubifs)
# squashfs: lz4/lzo/lzma/xz/gzip, default xz
# ubifs: lzo/zlib, default lzo
# export RK_SQUASHFS_COMP=xz
# export RK_UBIFS_COMP=lzo
#################################################
# TARGET_ROOTFS
#################################################
# Target rootfs
export LF_TARGET_ROOTFS=ubuntu
# SUBMODULES github/gitee
export LF_SUBMODULES_BY=github
# Buildroot defconfig
export RK_BUILDROOT_DEFCONFIG=luckfox_pico_defconfig
#################################################
# Defconfig
#################################################
# Target arch
export RK_ARCH=arm
# Target Toolchain Cross Compile
export RK_TOOLCHAIN_CROSS=arm-rockchip830-linux-uclibcgnueabihf
#misc image
export RK_MISC=wipe_all-misc.img
# Uboot defconfig
export RK_UBOOT_DEFCONFIG=luckfox_rv1106_uboot_defconfig
# Kernel defconfig
export RK_KERNEL_DEFCONFIG=luckfox_rv1106_linux_defconfig
# Config sensor IQ files
# RK_CAMERA_SENSOR_IQFILES format:
# "iqfile1 iqfile2 iqfile3 ..."
# ./build.sh media and copy <SDK root dir>/output/out/media_out/isp_iqfiles/$RK_CAMERA_SENSOR_IQFILES
export RK_CAMERA_SENSOR_IQFILES="sc4336_OT01_40IRC_F16.json sc3336_CMK-OT2119-PC1_30IRC-F16.json mis5001_CMK-OT2115-PC1_30IRC-F16.json"
#export RK_CAMERA_SENSOR_IQFILES="sc4336_OT01_40IRC_F16.json sc3336_CMK-OT2119-PC1_30IRC-F16.json sc530ai_CMK-OT2115-PC1_30IRC-F16.json"
# Config sensor lens CAC calibrattion bin files
export RK_CAMERA_SENSOR_CAC_BIN="CAC_sc4336_OT01_40IRC_F16"
#export RK_CAMERA_SENSOR_CAC_BIN="CAC_sc4336_OT01_40IRC_F16 CAC_sc530ai_CMK-OT2115-PC1_30IRC-F16"
# build ipc web backend
# export RK_APP_IPCWEB_BACKEND=y
# enable install app to oem partition
export RK_BUILD_APP_TO_OEM_PARTITION=y
# enable rockchip test
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
# declare overlay directory
export RK_POST_OVERLAY="overlay-luckfox-config overlay-luckfox-ubuntu-config overlay-luckfox-ubuntu-ultra overlay-luckfox-ubuntu-rockchip"

View File

@@ -1,120 +0,0 @@
#!/bin/bash
#################################################
# Board Config
#################################################
export LF_ORIGIN_BOARD_CONFIG=BoardConfig-SD_CARD-Ubuntu-RV1103_Luckfox_Pico-IPC.mk
# Target CHIP
export RK_CHIP=rv1106
# app config
# export RK_APP_TYPE=RKIPC_RV1103
# Config CMA size in environment
export RK_BOOTARGS_CMA_SIZE="1M"
# Kernel dts
export RK_KERNEL_DTS=rv1103g-luckfox-pico.dts
#################################################
# BOOT_MEDIUM
#################################################
# Target boot medium
export RK_BOOT_MEDIUM=sd_card
# Uboot defconfig fragment
export RK_UBOOT_DEFCONFIG_FRAGMENT=rk-emmc.config
# specify post.sh for delete/overlay files
# export RK_PRE_BUILD_OEM_SCRIPT=rv1103-spi_nor-post.sh
# config partition in environment
# RK_PARTITION_CMD_IN_ENV format:
# <partdef>[,<partdef>]
# <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="32K(env),512K@32K(idblock),256K(uboot),32M(boot),512M(oem),256M(userdata),6G(rootfs)"
# config partition's filesystem type (squashfs is readonly)
# emmc: squashfs/ext4
# nand: squashfs/ubifs
# spi nor: squashfs/jffs2
# RK_PARTITION_FS_TYPE_CFG format:
# AAAA:/BBBB/CCCC@ext4
# AAAA ----------> partition name
# /BBBB/CCCC ----> partition mount point
# ext4 ----------> partition filesystem type
export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ext4,userdata@/userdata@ext4,oem@/oem@ext4
# config filesystem compress (Just for squashfs or ubifs)
# squashfs: lz4/lzo/lzma/xz/gzip, default xz
# ubifs: lzo/zlib, default lzo
# export RK_SQUASHFS_COMP=xz
# export RK_UBIFS_COMP=lzo
#################################################
# TARGET_ROOTFS
#################################################
# Target rootfs
export LF_TARGET_ROOTFS=ubuntu
# SUBMODULES : github/gitee
export LF_SUBMODULES_BY=github
# Buildroot defconfig
export RK_BUILDROOT_DEFCONFIG=luckfox_pico_defconfig
#################################################
# Defconfig
#################################################
# Target arch
export RK_ARCH=arm
# Target Toolchain Cross Compile
export RK_TOOLCHAIN_CROSS=arm-rockchip830-linux-uclibcgnueabihf
#misc image
export RK_MISC=wipe_all-misc.img
# Uboot defconfig
export RK_UBOOT_DEFCONFIG=luckfox_rv1106_uboot_defconfig
# Kernel defconfig
export RK_KERNEL_DEFCONFIG=luckfox_rv1106_linux_defconfig
# Config sensor IQ files
# RK_CAMERA_SENSOR_IQFILES format:
# "iqfile1 iqfile2 iqfile3 ..."
# ./build.sh media and copy <SDK root dir>/output/out/media_out/isp_iqfiles/$RK_CAMERA_SENSOR_IQFILES
export RK_CAMERA_SENSOR_IQFILES="sc4336_OT01_40IRC_F16.json sc3336_CMK-OT2119-PC1_30IRC-F16.json"
#export RK_CAMERA_SENSOR_IQFILES="sc4336_OT01_40IRC_F16.json sc3336_CMK-OT2119-PC1_30IRC-F16.json sc530ai_CMK-OT2115-PC1_30IRC-F16.json"
# Config sensor lens CAC calibrattion bin files
export RK_CAMERA_SENSOR_CAC_BIN="CAC_sc4336_OT01_40IRC_F16"
#export RK_CAMERA_SENSOR_CAC_BIN="CAC_sc4336_OT01_40IRC_F16 CAC_sc530ai_CMK-OT2115-PC1_30IRC-F16"
# build ipc web backend
# export RK_APP_IPCWEB_BACKEND=y
# enable install app to oem partition
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
# declare overlay directory
export RK_POST_OVERLAY="overlay-luckfox-config overlay-luckfox-ubuntu overlay-luckfox-ubuntu-config"

View File

@@ -1,120 +0,0 @@
#!/bin/bash
#################################################
# Board Config
#################################################
export LF_ORIGIN_BOARD_CONFIG=BoardConfig-SD_CARD-Ubuntu-RV1103_Luckfox_Pico_Mini_A-IPC.mk
# Target CHIP
export RK_CHIP=rv1106
# app config
# export RK_APP_TYPE=RKIPC_RV1103
# Config CMA size in environment
export RK_BOOTARGS_CMA_SIZE="1M"
# Kernel dts
export RK_KERNEL_DTS=rv1103g-luckfox-pico-mini.dts
#################################################
# BOOT_MEDIUM
#################################################
# Target boot medium
export RK_BOOT_MEDIUM=sd_card
# Uboot defconfig fragment
export RK_UBOOT_DEFCONFIG_FRAGMENT=rk-emmc.config
# specify post.sh for delete/overlay files
# export RK_PRE_BUILD_OEM_SCRIPT=rv1103-spi_nor-post.sh
# config partition in environment
# RK_PARTITION_CMD_IN_ENV format:
# <partdef>[,<partdef>]
# <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="32K(env),512K@32K(idblock),256K(uboot),32M(boot),512M(oem),256M(userdata),6G(rootfs)"
# config partition's filesystem type (squashfs is readonly)
# emmc: squashfs/ext4
# nand: squashfs/ubifs
# spi nor: squashfs/jffs2
# RK_PARTITION_FS_TYPE_CFG format:
# AAAA:/BBBB/CCCC@ext4
# AAAA ----------> partition name
# /BBBB/CCCC ----> partition mount point
# ext4 ----------> partition filesystem type
export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ext4,userdata@/userdata@ext4,oem@/oem@ext4
# config filesystem compress (Just for squashfs or ubifs)
# squashfs: lz4/lzo/lzma/xz/gzip, default xz
# ubifs: lzo/zlib, default lzo
# export RK_SQUASHFS_COMP=xz
# export RK_UBIFS_COMP=lzo
#################################################
# TARGET_ROOTFS
#################################################
# Target rootfs
export LF_TARGET_ROOTFS=ubuntu
# SUBMODULES : github/gitee
export LF_SUBMODULES_BY=github
# Buildroot defconfig
export RK_BUILDROOT_DEFCONFIG=luckfox_pico_defconfig
#################################################
# Defconfig
#################################################
# Target arch
export RK_ARCH=arm
# Target Toolchain Cross Compile
export RK_TOOLCHAIN_CROSS=arm-rockchip830-linux-uclibcgnueabihf
#misc image
export RK_MISC=wipe_all-misc.img
# Uboot defconfig
export RK_UBOOT_DEFCONFIG=luckfox_rv1106_uboot_defconfig
# Kernel defconfig
export RK_KERNEL_DEFCONFIG=luckfox_rv1106_linux_defconfig
# Config sensor IQ files
# RK_CAMERA_SENSOR_IQFILES format:
# "iqfile1 iqfile2 iqfile3 ..."
# ./build.sh media and copy <SDK root dir>/output/out/media_out/isp_iqfiles/$RK_CAMERA_SENSOR_IQFILES
export RK_CAMERA_SENSOR_IQFILES="sc4336_OT01_40IRC_F16.json sc3336_CMK-OT2119-PC1_30IRC-F16.json"
#export RK_CAMERA_SENSOR_IQFILES="sc4336_OT01_40IRC_F16.json sc3336_CMK-OT2119-PC1_30IRC-F16.json sc530ai_CMK-OT2115-PC1_30IRC-F16.json"
# Config sensor lens CAC calibrattion bin files
export RK_CAMERA_SENSOR_CAC_BIN="CAC_sc4336_OT01_40IRC_F16"
#export RK_CAMERA_SENSOR_CAC_BIN="CAC_sc4336_OT01_40IRC_F16 CAC_sc530ai_CMK-OT2115-PC1_30IRC-F16"
# build ipc web backend
# export RK_APP_IPCWEB_BACKEND=y
# enable install app to oem partition
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
# declare overlay directory
export RK_POST_OVERLAY="overlay-luckfox-config overlay-luckfox-ubuntu overlay-luckfox-ubuntu-config"

View File

@@ -1,120 +0,0 @@
#!/bin/bash
#################################################
# Board Config
#################################################
export LF_ORIGIN_BOARD_CONFIG=BoardConfig-SD_CARD-Ubuntu-RV1103_Luckfox_Pico_Mini_B-IPC.mk
# Target CHIP
export RK_CHIP=rv1106
# app config
# export RK_APP_TYPE=RKIPC_RV1103
# Config CMA size in environment
export RK_BOOTARGS_CMA_SIZE="1M"
# Kernel dts
export RK_KERNEL_DTS=rv1103g-luckfox-pico-mini.dts
#################################################
# BOOT_MEDIUM
#################################################
# Target boot medium
export RK_BOOT_MEDIUM=sd_card
# Uboot defconfig fragment
export RK_UBOOT_DEFCONFIG_FRAGMENT=rk-emmc.config
# specify post.sh for delete/overlay files
# export RK_PRE_BUILD_OEM_SCRIPT=rv1103-spi_nor-post.sh
# config partition in environment
# RK_PARTITION_CMD_IN_ENV format:
# <partdef>[,<partdef>]
# <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="32K(env),512K@32K(idblock),256K(uboot),32M(boot),512M(oem),256M(userdata),6G(rootfs)"
# config partition's filesystem type (squashfs is readonly)
# emmc: squashfs/ext4
# nand: squashfs/ubifs
# spi nor: squashfs/jffs2
# RK_PARTITION_FS_TYPE_CFG format:
# AAAA:/BBBB/CCCC@ext4
# AAAA ----------> partition name
# /BBBB/CCCC ----> partition mount point
# ext4 ----------> partition filesystem type
export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ext4,userdata@/userdata@ext4,oem@/oem@ext4
# config filesystem compress (Just for squashfs or ubifs)
# squashfs: lz4/lzo/lzma/xz/gzip, default xz
# ubifs: lzo/zlib, default lzo
# export RK_SQUASHFS_COMP=xz
# export RK_UBIFS_COMP=lzo
#################################################
# TARGET_ROOTFS
#################################################
# Target rootfs
export LF_TARGET_ROOTFS=ubuntu
# SUBMODULES : github/gitee
export LF_SUBMODULES_BY=github
# Buildroot defconfig
export RK_BUILDROOT_DEFCONFIG=luckfox_pico_defconfig
#################################################
# Defconfig
#################################################
# Target arch
export RK_ARCH=arm
# Target Toolchain Cross Compile
export RK_TOOLCHAIN_CROSS=arm-rockchip830-linux-uclibcgnueabihf
#misc image
export RK_MISC=wipe_all-misc.img
# Uboot defconfig
export RK_UBOOT_DEFCONFIG=luckfox_rv1106_uboot_defconfig
# Kernel defconfig
export RK_KERNEL_DEFCONFIG=luckfox_rv1106_linux_defconfig
# Config sensor IQ files
# RK_CAMERA_SENSOR_IQFILES format:
# "iqfile1 iqfile2 iqfile3 ..."
# ./build.sh media and copy <SDK root dir>/output/out/media_out/isp_iqfiles/$RK_CAMERA_SENSOR_IQFILES
export RK_CAMERA_SENSOR_IQFILES="sc4336_OT01_40IRC_F16.json sc3336_CMK-OT2119-PC1_30IRC-F16.json"
#export RK_CAMERA_SENSOR_IQFILES="sc4336_OT01_40IRC_F16.json sc3336_CMK-OT2119-PC1_30IRC-F16.json sc530ai_CMK-OT2115-PC1_30IRC-F16.json"
# Config sensor lens CAC calibrattion bin files
export RK_CAMERA_SENSOR_CAC_BIN="CAC_sc4336_OT01_40IRC_F16"
#export RK_CAMERA_SENSOR_CAC_BIN="CAC_sc4336_OT01_40IRC_F16 CAC_sc530ai_CMK-OT2115-PC1_30IRC-F16"
# build ipc web backend
# export RK_APP_IPCWEB_BACKEND=y
# enable install app to oem partition
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
# declare overlay directory
export RK_POST_OVERLAY="overlay-luckfox-config overlay-luckfox-ubuntu overlay-luckfox-ubuntu-config"

View File

@@ -1,120 +0,0 @@
#!/bin/bash
#################################################
# Board Config
#################################################
export LF_ORIGIN_BOARD_CONFIG=BoardConfig-SD_CARD-Ubuntu-RV1103_Luckfox_Pico_Plus-IPC.mk
# Target CHIP
export RK_CHIP=rv1106
# app config
# export RK_APP_TYPE=RKIPC_RV1103
# Config CMA size in environment
export RK_BOOTARGS_CMA_SIZE="1M"
# Kernel dts
export RK_KERNEL_DTS=rv1103g-luckfox-pico-plus.dts
#################################################
# BOOT_MEDIUM
#################################################
# Target boot medium
export RK_BOOT_MEDIUM=sd_card
# Uboot defconfig fragment
export RK_UBOOT_DEFCONFIG_FRAGMENT=rk-emmc.config
# specify post.sh for delete/overlay files
# export RK_PRE_BUILD_OEM_SCRIPT=rv1103-spi_nor-post.sh
# config partition in environment
# RK_PARTITION_CMD_IN_ENV format:
# <partdef>[,<partdef>]
# <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="32K(env),512K@32K(idblock),256K(uboot),32M(boot),512M(oem),256M(userdata),6G(rootfs)"
# config partition's filesystem type (squashfs is readonly)
# emmc: squashfs/ext4
# nand: squashfs/ubifs
# spi nor: squashfs/jffs2
# RK_PARTITION_FS_TYPE_CFG format:
# AAAA:/BBBB/CCCC@ext4
# AAAA ----------> partition name
# /BBBB/CCCC ----> partition mount point
# ext4 ----------> partition filesystem type
export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ext4,userdata@/userdata@ext4,oem@/oem@ext4
# config filesystem compress (Just for squashfs or ubifs)
# squashfs: lz4/lzo/lzma/xz/gzip, default xz
# ubifs: lzo/zlib, default lzo
# export RK_SQUASHFS_COMP=xz
# export RK_UBIFS_COMP=lzo
#################################################
# TARGET_ROOTFS
#################################################
# Target rootfs
export LF_TARGET_ROOTFS=ubuntu
# SUBMODULES : github/gitee
export LF_SUBMODULES_BY=github
# Buildroot defconfig
export RK_BUILDROOT_DEFCONFIG=luckfox_pico_defconfig
#################################################
# Defconfig
#################################################
# Target arch
export RK_ARCH=arm
# Target Toolchain Cross Compile
export RK_TOOLCHAIN_CROSS=arm-rockchip830-linux-uclibcgnueabihf
#misc image
export RK_MISC=wipe_all-misc.img
# Uboot defconfig
export RK_UBOOT_DEFCONFIG=luckfox_rv1106_uboot_defconfig
# Kernel defconfig
export RK_KERNEL_DEFCONFIG=luckfox_rv1106_linux_defconfig
# Config sensor IQ files
# RK_CAMERA_SENSOR_IQFILES format:
# "iqfile1 iqfile2 iqfile3 ..."
# ./build.sh media and copy <SDK root dir>/output/out/media_out/isp_iqfiles/$RK_CAMERA_SENSOR_IQFILES
export RK_CAMERA_SENSOR_IQFILES="sc4336_OT01_40IRC_F16.json sc3336_CMK-OT2119-PC1_30IRC-F16.json"
#export RK_CAMERA_SENSOR_IQFILES="sc4336_OT01_40IRC_F16.json sc3336_CMK-OT2119-PC1_30IRC-F16.json sc530ai_CMK-OT2115-PC1_30IRC-F16.json"
# Config sensor lens CAC calibrattion bin files
export RK_CAMERA_SENSOR_CAC_BIN="CAC_sc4336_OT01_40IRC_F16"
#export RK_CAMERA_SENSOR_CAC_BIN="CAC_sc4336_OT01_40IRC_F16 CAC_sc530ai_CMK-OT2115-PC1_30IRC-F16"
# build ipc web backend
# export RK_APP_IPCWEB_BACKEND=y
# enable install app to oem partition
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
# declare overlay directory
export RK_POST_OVERLAY="overlay-luckfox-config overlay-luckfox-ubuntu overlay-luckfox-ubuntu-config"

View File

@@ -1,120 +0,0 @@
#!/bin/bash
#################################################
# Board Config
#################################################
export LF_ORIGIN_BOARD_CONFIG=BoardConfig-SD_CARD-Ubuntu-RV1103_Luckfox_Pico_WebBee.mk
# Target CHIP
export RK_CHIP=rv1106
# app config
# export RK_APP_TYPE=RKIPC_RV1103
# Config CMA size in environment
export RK_BOOTARGS_CMA_SIZE="1M"
# Kernel dts
export RK_KERNEL_DTS=rv1103g-luckfox-pico-webbee.dts
#################################################
# BOOT_MEDIUM
#################################################
# Target boot medium
export RK_BOOT_MEDIUM=sd_card
# Uboot defconfig fragment
export RK_UBOOT_DEFCONFIG_FRAGMENT=rk-emmc.config
# specify post.sh for delete/overlay files
# export RK_PRE_BUILD_OEM_SCRIPT=rv1103-spi_nor-post.sh
# config partition in environment
# RK_PARTITION_CMD_IN_ENV format:
# <partdef>[,<partdef>]
# <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="32K(env),512K@32K(idblock),256K(uboot),32M(boot),512M(oem),256M(userdata),6G(rootfs)"
# config partition's filesystem type (squashfs is readonly)
# emmc: squashfs/ext4
# nand: squashfs/ubifs
# spi nor: squashfs/jffs2
# RK_PARTITION_FS_TYPE_CFG format:
# AAAA:/BBBB/CCCC@ext4
# AAAA ----------> partition name
# /BBBB/CCCC ----> partition mount point
# ext4 ----------> partition filesystem type
export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ext4,userdata@/userdata@ext4,oem@/oem@ext4
# config filesystem compress (Just for squashfs or ubifs)
# squashfs: lz4/lzo/lzma/xz/gzip, default xz
# ubifs: lzo/zlib, default lzo
# export RK_SQUASHFS_COMP=xz
# export RK_UBIFS_COMP=lzo
#################################################
# TARGET_ROOTFS
#################################################
# Target rootfs
export LF_TARGET_ROOTFS=ubuntu
# SUBMODULES : github/gitee
export LF_SUBMODULES_BY=github
# Buildroot defconfig
export RK_BUILDROOT_DEFCONFIG=luckfox_pico_defconfig
#################################################
# Defconfig
#################################################
# Target arch
export RK_ARCH=arm
# Target Toolchain Cross Compile
export RK_TOOLCHAIN_CROSS=arm-rockchip830-linux-uclibcgnueabihf
#misc image
export RK_MISC=wipe_all-misc.img
# Uboot defconfig
export RK_UBOOT_DEFCONFIG=luckfox_rv1106_uboot_defconfig
# Kernel defconfig
export RK_KERNEL_DEFCONFIG=luckfox_rv1106_linux_defconfig
# Config sensor IQ files
# RK_CAMERA_SENSOR_IQFILES format:
# "iqfile1 iqfile2 iqfile3 ..."
# ./build.sh media and copy <SDK root dir>/output/out/media_out/isp_iqfiles/$RK_CAMERA_SENSOR_IQFILES
export RK_CAMERA_SENSOR_IQFILES="sc4336_OT01_40IRC_F16.json sc3336_CMK-OT2119-PC1_30IRC-F16.json"
#export RK_CAMERA_SENSOR_IQFILES="sc4336_OT01_40IRC_F16.json sc3336_CMK-OT2119-PC1_30IRC-F16.json sc530ai_CMK-OT2115-PC1_30IRC-F16.json"
# Config sensor lens CAC calibrattion bin files
export RK_CAMERA_SENSOR_CAC_BIN="CAC_sc4336_OT01_40IRC_F16"
#export RK_CAMERA_SENSOR_CAC_BIN="CAC_sc4336_OT01_40IRC_F16 CAC_sc530ai_CMK-OT2115-PC1_30IRC-F16"
# build ipc web backend
# export RK_APP_IPCWEB_BACKEND=y
# enable install app to oem partition
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
# declare overlay directory
export RK_POST_OVERLAY="overlay-luckfox-ubuntu"

View File

@@ -1,120 +0,0 @@
#!/bin/bash
#################################################
# Board Config
#################################################
export LF_ORIGIN_BOARD_CONFIG=BoardConfig-SD_CARD-Ubuntu-RV1106_Luckfox_Pico_Max-IPC.mk
# Target CHIP
export RK_CHIP=rv1106
# app config
# export RK_APP_TYPE=RKIPC_RV1106
# Config CMA size in environment
export RK_BOOTARGS_CMA_SIZE="36M"
# Kernel dts
export RK_KERNEL_DTS=rv1106g-luckfox-pico-max.dts
#################################################
# BOOT_MEDIUM
#################################################
# Target boot medium
export RK_BOOT_MEDIUM=sd_card
# Uboot defconfig fragment
export RK_UBOOT_DEFCONFIG_FRAGMENT=rk-emmc.config
# specify post.sh for delete/overlay files
# export RK_PRE_BUILD_OEM_SCRIPT=rv1103-spi_nor-post.sh
# config partition in environment
# RK_PARTITION_CMD_IN_ENV format:
# <partdef>[,<partdef>]
# <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="32K(env),512K@32K(idblock),256K(uboot),32M(boot),512M(oem),256M(userdata),6G(rootfs)"
# config partition's filesystem type (squashfs is readonly)
# emmc: squashfs/ext4
# nand: squashfs/ubifs
# spi nor: squashfs/jffs2
# RK_PARTITION_FS_TYPE_CFG format:
# AAAA:/BBBB/CCCC@ext4
# AAAA ----------> partition name
# /BBBB/CCCC ----> partition mount point
# ext4 ----------> partition filesystem type
export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ext4,userdata@/userdata@ext4,oem@/oem@ext4
# config filesystem compress (Just for squashfs or ubifs)
# squashfs: lz4/lzo/lzma/xz/gzip, default xz
# ubifs: lzo/zlib, default lzo
# export RK_SQUASHFS_COMP=xz
# export RK_UBIFS_COMP=lzo
#################################################
# TARGET_ROOTFS
#################################################
# Target rootfs
export LF_TARGET_ROOTFS=ubuntu
# SUBMODULES : github/gitee
export LF_SUBMODULES_BY=github
# Buildroot defconfig
export RK_BUILDROOT_DEFCONFIG=luckfox_pico_defconfig
#################################################
# Defconfig
#################################################
# Target arch
export RK_ARCH=arm
# Target Toolchain Cross Compile
export RK_TOOLCHAIN_CROSS=arm-rockchip830-linux-uclibcgnueabihf
#misc image
export RK_MISC=wipe_all-misc.img
# Uboot defconfig
export RK_UBOOT_DEFCONFIG=luckfox_rv1106_uboot_defconfig
# Kernel defconfig
export RK_KERNEL_DEFCONFIG=luckfox_rv1106_linux_defconfig
# Config sensor IQ files
# RK_CAMERA_SENSOR_IQFILES format:
# "iqfile1 iqfile2 iqfile3 ..."
# ./build.sh media and copy <SDK root dir>/output/out/media_out/isp_iqfiles/$RK_CAMERA_SENSOR_IQFILES
export RK_CAMERA_SENSOR_IQFILES="sc4336_OT01_40IRC_F16.json sc3336_CMK-OT2119-PC1_30IRC-F16.json mis5001_CMK-OT2115-PC1_30IRC-F16.json"
#export RK_CAMERA_SENSOR_IQFILES="sc4336_OT01_40IRC_F16.json sc3336_CMK-OT2119-PC1_30IRC-F16.json sc530ai_CMK-OT2115-PC1_30IRC-F16.json"
# Config sensor lens CAC calibrattion bin files
export RK_CAMERA_SENSOR_CAC_BIN="CAC_sc4336_OT01_40IRC_F16"
#export RK_CAMERA_SENSOR_CAC_BIN="CAC_sc4336_OT01_40IRC_F16 CAC_sc530ai_CMK-OT2115-PC1_30IRC-F16"
# build ipc web backend
# export RK_APP_IPCWEB_BACKEND=y
# enable install app to oem partition
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
# declare overlay directory
export RK_POST_OVERLAY="overlay-luckfox-config overlay-luckfox-ubuntu overlay-luckfox-ubuntu-config overlay-luckfox-ubuntu-rockchip"

View File

@@ -1,120 +0,0 @@
#!/bin/bash
#################################################
# Board Config
#################################################
export LF_ORIGIN_BOARD_CONFIG=BoardConfig-SD_CARD-Ubuntu-RV1106_Luckfox_Pico_Pro-IPC.mk
# Target CHIP
export RK_CHIP=rv1106
# app config
# export RK_APP_TYPE=RKIPC_RV1106
# Config CMA size in environment
export RK_BOOTARGS_CMA_SIZE="36M"
# Kernel dts
export RK_KERNEL_DTS=rv1106g-luckfox-pico-pro.dts
#################################################
# BOOT_MEDIUM
#################################################
# Target boot medium
export RK_BOOT_MEDIUM=sd_card
# Uboot defconfig fragment
export RK_UBOOT_DEFCONFIG_FRAGMENT=rk-emmc.config
# specify post.sh for delete/overlay files
# export RK_PRE_BUILD_OEM_SCRIPT=rv1103-spi_nor-post.sh
# config partition in environment
# RK_PARTITION_CMD_IN_ENV format:
# <partdef>[,<partdef>]
# <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="32K(env),512K@32K(idblock),256K(uboot),32M(boot),512M(oem),256M(userdata),6G(rootfs)"
# config partition's filesystem type (squashfs is readonly)
# emmc: squashfs/ext4
# nand: squashfs/ubifs
# spi nor: squashfs/jffs2
# RK_PARTITION_FS_TYPE_CFG format:
# AAAA:/BBBB/CCCC@ext4
# AAAA ----------> partition name
# /BBBB/CCCC ----> partition mount point
# ext4 ----------> partition filesystem type
export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ext4,userdata@/userdata@ext4,oem@/oem@ext4
# config filesystem compress (Just for squashfs or ubifs)
# squashfs: lz4/lzo/lzma/xz/gzip, default xz
# ubifs: lzo/zlib, default lzo
# export RK_SQUASHFS_COMP=xz
# export RK_UBIFS_COMP=lzo
#################################################
# TARGET_ROOTFS
#################################################
# Target rootfs
export LF_TARGET_ROOTFS=ubuntu
# SUBMODULES : github/gitee
export LF_SUBMODULES_BY=github
# Buildroot defconfig
export RK_BUILDROOT_DEFCONFIG=luckfox_pico_defconfig
#################################################
# Defconfig
#################################################
# Target arch
export RK_ARCH=arm
# Target Toolchain Cross Compile
export RK_TOOLCHAIN_CROSS=arm-rockchip830-linux-uclibcgnueabihf
#misc image
export RK_MISC=wipe_all-misc.img
# Uboot defconfig
export RK_UBOOT_DEFCONFIG=luckfox_rv1106_uboot_defconfig
# Kernel defconfig
export RK_KERNEL_DEFCONFIG=luckfox_rv1106_linux_defconfig
# Config sensor IQ files
# RK_CAMERA_SENSOR_IQFILES format:
# "iqfile1 iqfile2 iqfile3 ..."
# ./build.sh media and copy <SDK root dir>/output/out/media_out/isp_iqfiles/$RK_CAMERA_SENSOR_IQFILES
export RK_CAMERA_SENSOR_IQFILES="sc4336_OT01_40IRC_F16.json sc3336_CMK-OT2119-PC1_30IRC-F16.json mis5001_CMK-OT2115-PC1_30IRC-F16.json"
#export RK_CAMERA_SENSOR_IQFILES="sc4336_OT01_40IRC_F16.json sc3336_CMK-OT2119-PC1_30IRC-F16.json sc530ai_CMK-OT2115-PC1_30IRC-F16.json"
# Config sensor lens CAC calibrattion bin files
export RK_CAMERA_SENSOR_CAC_BIN="CAC_sc4336_OT01_40IRC_F16"
#export RK_CAMERA_SENSOR_CAC_BIN="CAC_sc4336_OT01_40IRC_F16 CAC_sc530ai_CMK-OT2115-PC1_30IRC-F16"
# build ipc web backend
# export RK_APP_IPCWEB_BACKEND=y
# enable install app to oem partition
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
# declare overlay directory
export RK_POST_OVERLAY="overlay-luckfox-config overlay-luckfox-ubuntu overlay-luckfox-ubuntu-config overlay-luckfox-ubuntu-rockchip"

View File

@@ -58,7 +58,7 @@ export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ubifs,oem@/oem@ubifs,userdata@/use
# TARGET_ROOTFS
#################################################
# Target rootfs : ubuntu(only emmc)/buildroot/busybox
# Target rootfs : buildroot/busybox
export LF_TARGET_ROOTFS=buildroot
# Buildroot defconfig

View File

@@ -58,7 +58,7 @@ export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ubifs,oem@/oem@ubifs,userdata@/use
# TARGET_ROOTFS
#################################################
# Target rootfs : ubuntu(only emmc)/buildroot/busybox
# Target rootfs : buildroot/busybox
export LF_TARGET_ROOTFS=buildroot
# Buildroot defconfig

View File

@@ -58,7 +58,7 @@ export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ubifs,oem@/oem@ubifs,userdata@/use
# TARGET_ROOTFS
#################################################
# Target rootfs : ubuntu(only emmc)/buildroot/busybox
# Target rootfs : buildroot/busybox
export LF_TARGET_ROOTFS=buildroot
# Buildroot defconfig

View File

@@ -58,7 +58,7 @@ export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ubifs,oem@/oem@ubifs,userdata@/use
# TARGET_ROOTFS
#################################################
# Target rootfs : ubuntu(only emmc)/buildroot/busybox
# Target rootfs : buildroot/busybox
export LF_TARGET_ROOTFS=buildroot
# Buildroot defconfig

View File

@@ -58,7 +58,7 @@ export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ubifs,oem@/oem@ubifs,userdata@/use
# TARGET_ROOTFS
#################################################
# Target rootfs : ubuntu(only emmc)/buildroot/busybox
# Target rootfs : buildroot/busybox
export LF_TARGET_ROOTFS=buildroot
# Buildroot defconfig

View File

View File

View File

@@ -39,7 +39,9 @@ test ! -f crc16.ko || insmod crc16.ko
test ! -f mbcache.ko || insmod mbcache.ko
test ! -f ext4.ko || insmod ext4.ko
test ! -f dw_mmc-rockchip.ko || insmod dw_mmc-rockchip.ko
sleep 0.5
sh /etc/init.d/S20linkmount start &
sleep 0.5
echo "start app" > /dev/kmsg
test -n "\$persist_camera_engine_log" && \

0
project/cfg/BoardConfig_IPC/luckfox-userdata-pre.sh Normal file → Executable file
View File

View File

@@ -0,0 +1,12 @@
#!/bin/sh
case $1 in
start)
if [ -f "/usr/bin/insmod_goodix.sh" ]; then
sh /usr/bin/insmod_goodix.sh &
fi
;;
*)
exit 1
;;
esac

View File

@@ -0,0 +1,13 @@
#!/bin/sh
case $1 in
start)
if [ "$(cat /proc/device-tree/model)" == "Luckfox Pico 86Panel W" ] ||
[ -f "/oem/usr/ko/insmod_wifi.sh" ]; then
sh /oem/usr/ko/insmod_wifi.sh &
fi
;;
*)
exit 1
;;
esac

View File

@@ -0,0 +1,28 @@
#!/bin/sh
[ -f /etc/profile.d/RkEnv.sh ] && source /etc/profile.d/RkEnv.sh
network_init() {
ethaddr1=$(ifconfig -a | grep "eth.*HWaddr" | awk '{print $5}')
if [ -f /data/ethaddr.txt ]; then
ethaddr2=$(cat /data/ethaddr.txt)
if [ $ethaddr1 == $ethaddr2 ]; then
echo "eth HWaddr cfg ok"
else
ifconfig eth0 down
ifconfig eth0 hw ether $ethaddr2
fi
else
echo $ethaddr1 >/data/ethaddr.txt
fi
ifconfig eth0 up && udhcpc -i eth0 >/dev/null 2>&1
}
case $1 in
start)
network_init &
;;
*)
exit 1
;;
esac

View File

@@ -0,0 +1,14 @@
#!/bin/sh
[ -f /etc/profile.d/RkEnv.sh ] && source /etc/profile.d/RkEnv.sh
case $1 in
start)
if [ -f /usr/bin/t_s ]; then
/usr/bin/t_s &
elif [ -f /usr/bin/86UI_demo ]; then
/usr/bin/86UI_demo &
fi
;;
*)
exit 1
;;
esac

View File

@@ -0,0 +1,26 @@
#!/bin/bash
# Export Pins
echo 120 >/sys/class/gpio/export
echo 0 >/sys/class/gpio/export
# Set the initial level state
echo out >/sys/class/gpio/gpio0/direction
echo 1 >/sys/class/gpio/gpio0/value
echo out >/sys/class/gpio/gpio120/direction
echo 0 >/sys/class/gpio/gpio120/value
# Set GT911 address 0x14
sleep 0.5
echo 1 >/sys/class/gpio/gpio120/value
sleep 0.5
echo 0 >/sys/class/gpio/gpio0/value
echo in >/sys/class/gpio/gpio0/direction
echo 120 >/sys/class/gpio/unexport
echo 0 >/sys/class/gpio/unexport
# Insmod goodix driver
insmod /oem/usr/ko/goodix.ko

View File

@@ -0,0 +1,17 @@
#!/bin/sh
[ -f /etc/profile.d/RkEnv.sh ] && source /etc/profile.d/RkEnv.sh
case $1 in
start)
if command -v amixer >/dev/null 2>&1; then
amixer set 'ADC ALC Left' 26 > /dev/null 2>&1
amixer set 'ADC ALC Right' 26 > /dev/null 2>&1
amixer set 'ADC MIC Left Gain' 3 > /dev/null 2>&1
amixer set 'ADC MIC Right Gain' 3 > /dev/null 2>&1
amixer set 'ADC MICBIAS Voltage' 'VREFx0_975' > /dev/null 2>&1
amixer set 'ADC Mode' 'SingadcL' > /dev/null 2>&1
fi
;;
*)
exit 1
;;
esac

View File

@@ -343,15 +343,15 @@ function luckfox_load_cfg() {
fi
# CSI ( Priority is lower than RGB )
value=$(luckfox_get_pin_cfg "CSI_ENABLE")
if [ -z "$value" ]; then
if [ "$LUCKFOX_CHIP_MODEL" == "Luckfox Pico Ultra" ] || [ "$LUCKFOX_CHIP_MODEL" == "Luckfox Pico Ultra W" ]; then
luckfox_set_pin_mark "I2C4_M1_SCL" 1
luckfox_set_pin_mark "I2C4_M1_SDA" 1
luckfox_set_pin_mark "I2C4_M0_SCL" 1
luckfox_set_pin_mark "I2C4_M0_SDA" 1
fi
fi
# value=$(luckfox_get_pin_cfg "CSI_ENABLE")
# if [ -z "$value" ]; then
# if [ "$LUCKFOX_CHIP_MODEL" == "Luckfox Pico Ultra" ] || [ "$LUCKFOX_CHIP_MODEL" == "Luckfox Pico Ultra W" ]; then
# luckfox_set_pin_mark "I2C4_M1_SCL" 1
# luckfox_set_pin_mark "I2C4_M1_SDA" 1
# luckfox_set_pin_mark "I2C4_M0_SCL" 1
# luckfox_set_pin_mark "I2C4_M0_SDA" 1
# fi
# fi
# FBTFT
value=$(luckfox_get_pin_cfg "FBTFT_ENABLE")
@@ -1386,25 +1386,6 @@ function hex_add() {
echo "$sum_hex"
}
################################################################
# @fu hex_shift
#
# @param hex -
# shift_amount -
#
# @return The hexadecimal number after shifting hex by shift_amount.
################################################################
function hex_shift() {
local hex=$1
local shift_amount=$2
local dec=$(printf "%d" 0x$hex)
local shift=$((shift_amount * 2))
local shifted=$((dec << shift))
printf "%X\n" $shifted
}
################################################################
# @fu luckfox_gpio_app
#
@@ -1686,13 +1667,10 @@ function luckfox_check_i2c() {
csi_status=$(luckfox_get_pin_cfg "CSI_ENABLE")
# process default status
if [ -z "$csi_status" ]; then
# CSI I2C is not enabled on Ultra models by default
if [ "$LUCKFOX_CHIP_MODEL" == "Luckfox Pico Ultra" ] || [ "$LUCKFOX_CHIP_MODEL" == "Luckfox Pico Ultra W" ]; then
"$csi_status" = 0
else
"$csi_status" = 1
fi
echo "set csi_status = 1"
csi_status=1
fi
echo "csi_status = $csi_status"
if [ "$csi_status" == 1 ]; then
luckfox_result_handle "$LF_ERR" "CSI is enable,Can't config I2C4"
@@ -2861,12 +2839,9 @@ function luckfox_result_handle() {
}
################################################################
# @fu luckfox_result_handle
# @fu luckfox_pico_show_pin_diagram
#
# @brief 1. Display a message in the GUI.
#
# @param status - Status of messages
# log - Prepare the message to be printed
# @brief 1. Display pin diagram in the GUI.
#
# @return none
################################################################
@@ -2889,13 +2864,15 @@ function luckfox_show_menu() {
--menu "Choose an option" 80 50 6 \
1 "Advanced Options" \
2 "4G Module" \
3 "About Luckfox" \
3 "Backup" \
4 "About Luckfox" \
2>&1 >/dev/tty)
case $option in
1) luckfox_advanced_options ;;
2) luckfox_4G ;;
3) luckfox_about ;;
3) luckfox_backup ;;
4) luckfox_about ;;
*) luckfox_exit ;;
esac
done
@@ -2905,12 +2882,14 @@ function luckfox_show_menu() {
option=$(dialog --title "$LUCKFOX_CHIP_MODEL Config" \
--menu "Choose an option" 80 50 6 \
1 "Advanced Options" \
2 "About Luckfox" \
2 "Backup" \
3 "About Luckfox" \
2>&1 >/dev/tty)
case $option in
1) luckfox_advanced_options ;;
2) luckfox_about ;;
2) luckfox_backup ;;
3) luckfox_about ;;
*) luckfox_exit ;;
esac
done
@@ -3046,6 +3025,31 @@ function luckfox_advanced_options() {
fi
}
function luckfox_backup() {
option=$(dialog --title "Advanced Options" \
--menu "Choose an option" 80 50 6 \
1 "rootfs" \
2>&1 >/dev/tty)
if [ $option == 1 ]; then
if [ "$LUCKFOX_CHIP_MODEL" == "Luckfox Pico Pi" ] || [ "$LUCKFOX_CHIP_MODEL" == "Luckfox Pico Pi W" ]; then
media_class=$(dialog --menu "Select Backup Image Location" 80 50 6 \
0 "local" \
1 "usb_disk" \
2 "sd_card" \
2>&1 >/dev/tty)
elif [ "$LUCKFOX_CHIP_MODEL" == "Luckfox Pico Ultra" ] || [ "$LUCKFOX_CHIP_MODEL" == "Luckfox Pico Ultra W" ]; then
media_class=$(dialog --menu "Select Backup Image Location" 80 50 6 \
0 "local" \
1 "usb_disk" \
2>&1 >/dev/tty)
fi
luckfox_rootfs_BACKUP "$media_class"
else
luckfox_show_menu
fi
}
function luckfox_about() {
luckfox_pico_show_pin_diagram
}
@@ -3496,15 +3500,136 @@ function luckfox_4G() {
3) apn="3gwap" ;;
esac
fi
fi
luckfox_4g_app "$module_4g_enable" "$mode" "$apn"
}
################################################################
# ------------------------ Backup GUI --------------------------
################################################################
function luckfox_rootfs_BACKUP() {
local media_class="$1"
ROOT_FS_TYPE=$(df -T / | tail -1 | awk '{print $2}')
if [[ "$ROOT_FS_TYPE" != "ext4" ]]; then
luckfox_result_handle "$LF_ERR" "Error: Root filesystem is not ext4 (found: $ROOT_FS_TYPE)"
fi
if ! command -v rsync &>/dev/null; then
luckfox_result_handle "$LF_ERR" "The rsync is not installed"
fi
if [ "$media_class" == 1 ]; then
if ! mount | grep "/mnt/udisk"; then
luckfox_result_handle "$LF_ERR" "USB disk is not mounted"
fi
AVAILABLE_SPACE=$(df -k /mnt/udisk | tail -1 | awk '{print $4}')
IMAGE_NAME="/mnt/udisk/backup_rootfs.img"
MOUNT_POINT="/mnt/udisk/backup_img"
elif [ "$media_class" == 2 ]; then
if ! mount | grep "/mnt/sdcard"; then
luckfox_result_handle "$LF_ERR" "SD card is not mounted"
fi
AVAILABLE_SPACE=$(df -k /mnt/sdcard | tail -1 | awk '{print $4}')
IMAGE_NAME="/mnt/sdcard/backup_rootfs.img"
MOUNT_POINT="/mnt/sdcard/backup_img"
else
AVAILABLE_SPACE=$(df -k /mnt | tail -1 | awk '{print $4}')
IMAGE_NAME="/mnt/backup_rootfs.img"
MOUNT_POINT="/mnt/backup_img"
fi
used_kb=$(df -k / | tail -1 | awk '{print $3}')
REQUIRED_SPACE=$(awk -v size_kb="$used_kb" 'BEGIN { printf("%d", (size_kb * 2.4 / 1024) + 0.999) }')
if [ -z "$AVAILABLE_SPACE" ]; then
AVAILABLE_SPACE=0
fi
if [ "$AVAILABLE_SPACE" -lt "$REQUIRED_SPACE" ]; then
luckfox_result_handle "$LF_ERR" "Not enough space on $media_class (required: ${REQUIRED_SPACE}MB, available: ${AVAILABLE_SPACE}MB)"
fi
LOG_FILE="/tmp/backup_rootfs.log"
if [ -f "$IMAGE_NAME" ]; then
rm -f "$IMAGE_NAME"
fi
if mountpoint -q "$MOUNT_POINT"; then
umount "$MOUNT_POINT"
fi
rm -rf "$MOUNT_POINT"
mkdir -p "$MOUNT_POINT"
{
echo "XXX"
echo 10
echo "Starting backup process..."
echo "XXX"
echo "Calculating used disk space..." >>"$LOG_FILE"
used_kb=$(df -k / | tail -1 | awk '{print $3}')
IMAGE_SIZE_MB=$(awk -v size_kb="$used_kb" 'BEGIN { printf("%d", (size_kb * 1.2 / 1024) + 0.999) }')
echo "XXX"
echo 40
echo "Creating ext4 image ($IMAGE_SIZE_MB MB)..."
echo "XXX"
dd if=/dev/zero of="$IMAGE_NAME" bs=1M count=$IMAGE_SIZE_MB >>"$LOG_FILE" 2>&1
mkfs.ext4 -F "$IMAGE_NAME" >>"$LOG_FILE" 2>&1
echo "XXX"
echo 60
echo "Mounting image..."
echo "XXX"
mount -o loop "$IMAGE_NAME" "$MOUNT_POINT" >>"$LOG_FILE" 2>&1
echo "XXX"
echo 80
echo "Copying rootfs with rsync..."
echo "XXX"
rsync -aX --exclude={"/oem","/userdata","/mnt","/tmp","/proc"} / "$MOUNT_POINT" >>"$LOG_FILE" 2>&1
mkdir -p "$MOUNT_POINT/mnt" "$MOUNT_POINT/tmp" "$MOUNT_POINT/proc" "$MOUNT_POINT/userdata" "$MOUNT_POINT/oem"
echo "XXX"
echo 100
echo "Finalizing..."
echo "XXX"
umount "$MOUNT_POINT" >>"$LOG_FILE" 2>&1
} | dialog --title "Backup in Progress" --gauge "Preparing backup..." 10 60 0
dialog --title "Backup Succeeded" --msgbox "The image is saved at $IMAGE_NAME" 10 60
luckfox_show_menu
}
################################################################
# @fu hex_shift
#
# @param hex -
# shift_amount -
#
# @return The hexadecimal number after shifting hex by shift_amount.
################################################################
function hex_shift() {
local hex=$1
local shift_amount=$2
local dec=$(printf "%d" 0x$hex)
local shift=$((shift_amount * 2))
local shifted=$((dec << shift))
printf "%X\n" $shifted
}
################################################################
# --------------------------- Run ------------------------------
################################################################
echo 0 >/proc/sys/kernel/printk
if [ "$1" == "load" ]; then
LF_GUI_ENABLE=0
if [ -f $LUCKFOX_PIN_DIAGRAM_FILE ]; then
@@ -3535,7 +3660,7 @@ elif [ "$1" == "rgb_switch" ]; then
"18" "16" \
"2" "2" \
"0" "0" \
"0" "1"
"0" "0"
elif [ "$(luckfox_get_pin_cfg "RGB_HACTIVE")" == "720" ]; then
# 720 -> 480
echo "****************************************************"
@@ -3570,3 +3695,5 @@ elif [ -z "$1" ]; then
luckfox_config_init
luckfox_show_menu
fi
echo "7 4 1 7" >/proc/sys/kernel/printk

View File

@@ -0,0 +1,12 @@
#!/bin/sh
case $1 in
start)
if [ -f "/usr/bin/insmod_goodix.sh" ]; then
sh /usr/bin/insmod_goodix.sh &
fi
;;
*)
exit 1
;;
esac

View File

@@ -0,0 +1,45 @@
#!/bin/bash
USB_KEYWORD="android_work: sent uevent USB_STATE="
USB_MODE_PATH="/proc/device-tree/usbdrd/usb@ffb00000/dr_mode"
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
fi
sleep 5
done
}
wifibt_init() {
/usr/bin/wifi_bt_init.sh
if [ -z "$(ifconfig -a | grep wlan0)" ]; then
echo "Try Wi-Fi/BT init again!"
sleep 5
/usr/bin/wifi_bt_init.sh
fi
}
if [ -f /oem/usr/ko/insmod_ko.sh ]; then
chmod a+x /oem/usr/ko/insmod_ko.sh
/oem/usr/ko/insmod_ko.sh
fi
/usr/bin/filesystem_resize.sh
wifibt_init &
usb_mode="$(cat $USB_MODE_PATH)"
/etc/init.d/S50usbdevice start
if [ "$usb_mode" = "peripheral" ]; then
usb_reset &
fi
/etc/init.d/S25goodix start
if [ -n "$(hwclock | grep "invalid")" ]; then
date -s 2024-01-01
hwclock -w
fi

View File

@@ -0,0 +1,26 @@
#!/bin/bash
# Export Pins
echo 120 >/sys/class/gpio/export
echo 0 >/sys/class/gpio/export
# Set the initial level state
echo out >/sys/class/gpio/gpio0/direction
echo 1 >/sys/class/gpio/gpio0/value
echo out >/sys/class/gpio/gpio120/direction
echo 0 >/sys/class/gpio/gpio120/value
# Set GT911 address 0x14
sleep 0.5
echo 1 >/sys/class/gpio/gpio120/value
sleep 0.5
echo 0 >/sys/class/gpio/gpio0/value
echo in >/sys/class/gpio/gpio0/direction
echo 120 >/sys/class/gpio/unexport
echo 0 >/sys/class/gpio/unexport
# Insmod goodix driver
insmod /oem/usr/ko/goodix.ko

View File

@@ -0,0 +1,198 @@
#!/usr/bin/env bash
# This script uses openssl, gnutls, or stunnel to secure an rsync daemon connection.
# By default this script takes rsync args and hands them off to the actual
# rsync command with an --rsh option that makes it open an SSL connection to an
# rsync daemon. See the rsync-ssl manpage for usage details and env variables.
# When the first arg is --HELPER, we are being used by rsync as an --rsh helper
# script, and the args are (note the trailing dot):
#
# rsync-ssl --HELPER HOSTNAME rsync --server --daemon .
#
# --HELPER is not a user-facing option, so it is not documented in the manpage.
# The first SSL setup was based on: http://dozzie.jarowit.net/trac/wiki/RsyncSSL
# Note that an stunnel connection requires at least version 4.x of stunnel.
function rsync_ssl_run {
case "$*" in
*rsync://*) ;;
*::*) ;;
*)
echo "You must use rsync-ssl with a daemon-style hostname." 1>&2
exit 1
;;
esac
exec rsync --rsh="$0 --HELPER" "${@}"
}
function rsync_ssl_helper {
if [[ -z "$RSYNC_SSL_TYPE" ]]; then
found=`path_search openssl stunnel4 stunnel` || exit 1
if [[ "$found" == */openssl ]]; then
RSYNC_SSL_TYPE=openssl
RSYNC_SSL_OPENSSL="$found"
elif [[ "$found" == */gnutls-cli ]]; then
RSYNC_SSL_TYPE=gnutls
RSYNC_SSL_GNUTLS="$found"
else
RSYNC_SSL_TYPE=stunnel
RSYNC_SSL_STUNNEL="$found"
fi
fi
case "$RSYNC_SSL_TYPE" in
openssl)
if [[ -z "$RSYNC_SSL_OPENSSL" ]]; then
RSYNC_SSL_OPENSSL=`path_search openssl` || exit 1
fi
optsep=' '
;;
gnutls)
if [[ -z "$RSYNC_SSL_GNUTLS" ]]; then
RSYNC_SSL_GNUTLS=`path_search gnutls-cli` || exit 1
fi
optsep=' '
;;
stunnel)
if [[ -z "$RSYNC_SSL_STUNNEL" ]]; then
RSYNC_SSL_STUNNEL=`path_search stunnel4 stunnel` || exit 1
fi
optsep=' = '
;;
*)
echo "The RSYNC_SSL_TYPE specifies an unknown type: $RSYNC_SSL_TYPE" 1>&2
exit 1
;;
esac
if [[ -z "$RSYNC_SSL_CERT" ]]; then
certopt=""
gnutls_cert_opt=""
else
certopt="-cert$optsep$RSYNC_SSL_CERT"
gnutls_cert_opt="--x509certfile=$RSYNC_SSL_CERT"
fi
if [[ -z "$RSYNC_SSL_KEY" ]]; then
keyopt=""
gnutls_key_opt=""
else
keyopt="-key$optsep$RSYNC_SSL_KEY"
gnutls_key_opt="--x509keyfile=$RSYNC_SSL_KEY"
fi
if [[ -z ${RSYNC_SSL_CA_CERT+x} ]]; then
# RSYNC_SSL_CA_CERT unset - default CA set AND verify:
# openssl:
caopt="-verify_return_error -verify 4"
# gnutls:
gnutls_opts=""
# stunnel:
# Since there is no way of using the default CA certificate collection,
# we cannot do any verification. Thus, stunnel should really only be
# used if nothing else is available.
cafile=""
verify=""
elif [[ "$RSYNC_SSL_CA_CERT" == "" ]]; then
# RSYNC_SSL_CA_CERT set but empty -do NO verifications:
# openssl:
caopt="-verify 1"
# gnutls:
gnutls_opts="--insecure"
# stunnel:
cafile=""
verify="verifyChain = no"
else
# RSYNC_SSL_CA_CERT set - use CA AND verify:
# openssl:
caopt="-CAfile $RSYNC_SSL_CA_CERT -verify_return_error -verify 4"
# gnutls:
gnutls_opts="--x509cafile=$RSYNC_SSL_CA_CERT"
# stunnel:
cafile="CAfile = $RSYNC_SSL_CA_CERT"
verify="verifyChain = yes"
fi
port="${RSYNC_PORT:-0}"
if [[ "$port" == 0 ]]; then
port="${RSYNC_SSL_PORT:-874}"
fi
# If the user specified USER@HOSTNAME::module, then rsync passes us
# the -l USER option too, so we must be prepared to ignore it.
if [[ "$1" == "-l" ]]; then
shift 2
fi
hostname="$1"
shift
if [[ -z "$hostname" || "$1" != rsync || "$2" != --server || "$3" != --daemon ]]; then
echo "Usage: rsync-ssl --HELPER HOSTNAME rsync --server --daemon ." 1>&2
exit 1
fi
if [[ $RSYNC_SSL_TYPE == openssl ]]; then
exec $RSYNC_SSL_OPENSSL s_client $caopt $certopt $keyopt -quiet -verify_quiet -servername $hostname -verify_hostname $hostname -connect $hostname:$port
elif [[ $RSYNC_SSL_TYPE == gnutls ]]; then
exec $RSYNC_SSL_GNUTLS --logfile=/dev/null $gnutls_cert_opt $gnutls_key_opt $gnutls_opts $hostname:$port
else
# devzero@web.de came up with this no-tmpfile calling syntax:
exec $RSYNC_SSL_STUNNEL -fd 10 11<&0 <<EOF 10<&0 0<&11 11<&-
foreground = yes
debug = crit
connect = $hostname:$port
client = yes
TIMEOUTclose = 0
$verify
$certopt
$cafile
EOF
fi
}
function path_search {
IFS_SAVE="$IFS"
IFS=:
for prog in "${@}"; do
for dir in $PATH; do
[[ -z "$dir" ]] && dir=.
if [[ -f "$dir/$prog" && -x "$dir/$prog" ]]; then
echo "$dir/$prog"
IFS="$IFS_SAVE"
return 0
fi
done
done
IFS="$IFS_SAVE"
echo "Failed to find on your path: $*" 1>&2
echo "See the rsync-ssl manpage for configuration assistance." 1>&2
return 1
}
if [[ "$#" == 0 ]]; then
echo "Usage: rsync-ssl [--type=SSL_TYPE] RSYNC_ARG [...]" 1>&2
echo "The SSL_TYPE can be openssl or stunnel"
exit 1
fi
if [[ "$1" = --help || "$1" = -h ]]; then
exec rsync --help
fi
if [[ "$1" == --HELPER ]]; then
shift
rsync_ssl_helper "${@}"
fi
if [[ "$1" == --type=* ]]; then
export RSYNC_SSL_TYPE="${1/--type=/}"
shift
fi
rsync_ssl_run "${@}"

View File

@@ -1,9 +1,11 @@
#!/bin/bash
if [ "$(cat /proc/device-tree/model)" == "Luckfox Pico Ultra W" ]; then
if [ "$(cat /proc/device-tree/model)" == "Luckfox Pico Ultra W" ] ||
[ "$(cat /proc/device-tree/model)" == "Luckfox Pico 86Panel W" ] ||
[ "$(cat /proc/device-tree/model)" == "Luckfox Pico Pi W" ]; then
systemctl stop wpa_supplicant
if [ "$1" = "stop" ] ;then
if [ "$1" = "stop" ]; then
pkill -f "udhcpc -i wlan0"
exit 1
fi