mirror of
https://github.com/LuckfoxTECH/luckfox-pico.git
synced 2026-01-18 03:28:19 +01:00
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:
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -1,3 +0,0 @@
|
|||||||
[submodule "ubuntu"]
|
|
||||||
path = sysdrv/tools/board/ubuntu
|
|
||||||
url = https://github.com/luckfox-eng33/pico_ubuntu.git
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
[submodule "ubuntu"]
|
|
||||||
path = sysdrv/tools/board/ubuntu
|
|
||||||
url = https://gitee.com/eng-thirty-three/pico_ubuntu.git
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
[submodule "ubuntu"]
|
|
||||||
path = sysdrv/tools/board/ubuntu
|
|
||||||
url = https://github.com/luckfox-eng33/pico_ubuntu.git
|
|
||||||
195
README.md
195
README.md
@@ -37,11 +37,6 @@ source env_install_toolchain.sh
|
|||||||
```
|
```
|
||||||
git clone <https://gitee.com/LuckfoxTECH/luckfox-pico.git>
|
git clone <https://gitee.com/LuckfoxTECH/luckfox-pico.git>
|
||||||
```
|
```
|
||||||
* If you need to compile the Ubuntu system and use the Gitee source
|
|
||||||
* Please modify the corresponding board mk file LF_SUBMODULES_BY to gitee, for example
|
|
||||||
```
|
|
||||||
LF_SUBMODULES_BY=gitee
|
|
||||||
```
|
|
||||||
### Instructions for build.sh
|
### Instructions for build.sh
|
||||||
* The build.sh script is used to automate the compilation process.
|
* The build.sh script is used to automate the compilation process.
|
||||||
* Most of the compilation operations can be completed automatically through build.sh.
|
* Most of the compilation operations can be completed automatically through build.sh.
|
||||||
@@ -99,11 +94,17 @@ kernelconfig -config kernel and save defconfig"
|
|||||||
[1] RV1103_Luckfox_Pico_Mini_A
|
[1] RV1103_Luckfox_Pico_Mini_A
|
||||||
[2] RV1103_Luckfox_Pico_Mini_B
|
[2] RV1103_Luckfox_Pico_Mini_B
|
||||||
[3] RV1103_Luckfox_Pico_Plus
|
[3] RV1103_Luckfox_Pico_Plus
|
||||||
[4] RV1106_Luckfox_Pico_Pro_Max
|
[4] RV1103_Luckfox_Pico_WebBee
|
||||||
[5] RV1106_Luckfox_Pico_Ultra
|
[5] RV1106_Luckfox_Pico_Pro
|
||||||
[6] RV1106_Luckfox_Pico_Ultra_W
|
[6] RV1106_Luckfox_Pico_Max
|
||||||
[7] custom
|
[7] RV1106_Luckfox_Pico_Ultra
|
||||||
Which would you like? [0~7][default:0]:
|
[8] RV1106_Luckfox_Pico_Ultra_W
|
||||||
|
[9] RV1106_Luckfox_Pico_Pi
|
||||||
|
[10] RV1106_Luckfox_Pico_Pi_W
|
||||||
|
[11] RV1106_Luckfox_Pico_86Panel
|
||||||
|
[12] RV1106_Luckfox_Pico_86Panel_W
|
||||||
|
[13] custom
|
||||||
|
Which would you like? [0~13][default:0]:
|
||||||
```
|
```
|
||||||
+ Output the supported storage media for the corresponding Luckfox-pico hardware model. Enter the corresponding number to proceed to the root filesystem options (press Enter to select option [0] directly).For example, Luckfox Pico Plus.
|
+ Output the supported storage media for the corresponding Luckfox-pico hardware model. Enter the corresponding number to proceed to the root filesystem options (press Enter to select option [0] directly).For example, Luckfox Pico Plus.
|
||||||
```shell
|
```shell
|
||||||
@@ -119,7 +120,6 @@ kernelconfig -config kernel and save defconfig"
|
|||||||
Lunch menu...pick the system version:
|
Lunch menu...pick the system version:
|
||||||
选择系统版本:
|
选择系统版本:
|
||||||
[0] Buildroot(Support Rockchip official features)
|
[0] Buildroot(Support Rockchip official features)
|
||||||
[1] Ubuntu(Support for the apt package management tool)
|
|
||||||
|
|
||||||
Which would you like? [0~1][default:0]:
|
Which would you like? [0~1][default:0]:
|
||||||
```
|
```
|
||||||
@@ -132,121 +132,127 @@ kernelconfig -config kernel and save defconfig"
|
|||||||
[1] RV1103_Luckfox_Pico_Mini_A
|
[1] RV1103_Luckfox_Pico_Mini_A
|
||||||
[2] RV1103_Luckfox_Pico_Mini_B
|
[2] RV1103_Luckfox_Pico_Mini_B
|
||||||
[3] RV1103_Luckfox_Pico_Plus
|
[3] RV1103_Luckfox_Pico_Plus
|
||||||
[4] RV1106_Luckfox_Pico_Pro_Max
|
[4] RV1103_Luckfox_Pico_WebBee
|
||||||
[5] RV1106_Luckfox_Pico_Ultra
|
[5] RV1106_Luckfox_Pico_Pro
|
||||||
[6] RV1106_Luckfox_Pico_Ultra_W
|
[6] RV1106_Luckfox_Pico_Max
|
||||||
[7] custom
|
[7] RV1106_Luckfox_Pico_Ultra
|
||||||
Which would you like? [0~7][default:0]: 7
|
[8] RV1106_Luckfox_Pico_Ultra_W
|
||||||
|
[9] RV1106_Luckfox_Pico_Pi
|
||||||
|
[10] RV1106_Luckfox_Pico_Pi_W
|
||||||
|
[11] RV1106_Luckfox_Pico_86Panel
|
||||||
|
[12] RV1106_Luckfox_Pico_86Panel_W
|
||||||
|
[13] custom
|
||||||
|
Which would you like? [0~13][default:0]: 13
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
0. BoardConfig_IPC/BoardConfig-EMMC-Buildroot-RV1106_Luckfox_Pico_Ultra-IPC.mk
|
0. BoardConfig_IPC/BoardConfig-EMMC-Buildroot-RV1106_Luckfox_Pico_86Panel-IPC.mk
|
||||||
|
boot medium(启动介质): EMMC
|
||||||
|
system version(系统版本): Buildroot
|
||||||
|
hardware version(硬件版本): RV1106_Luckfox_Pico_86Panel
|
||||||
|
application(应用场景): IPC
|
||||||
|
----------------------------------------------------------------
|
||||||
|
|
||||||
|
----------------------------------------------------------------
|
||||||
|
1. BoardConfig_IPC/BoardConfig-EMMC-Buildroot-RV1106_Luckfox_Pico_86Panel_W-IPC.mk
|
||||||
|
boot medium(启动介质): EMMC
|
||||||
|
system version(系统版本): Buildroot
|
||||||
|
hardware version(硬件版本): RV1106_Luckfox_Pico_86Panel_W
|
||||||
|
application(应用场景): IPC
|
||||||
|
----------------------------------------------------------------
|
||||||
|
|
||||||
|
----------------------------------------------------------------
|
||||||
|
2. BoardConfig_IPC/BoardConfig-EMMC-Buildroot-RV1106_Luckfox_Pico_Pi-IPC.mk
|
||||||
|
boot medium(启动介质): EMMC
|
||||||
|
system version(系统版本): Buildroot
|
||||||
|
hardware version(硬件版本): RV1106_Luckfox_Pico_Pi
|
||||||
|
application(应用场景): IPC
|
||||||
|
----------------------------------------------------------------
|
||||||
|
|
||||||
|
----------------------------------------------------------------
|
||||||
|
3. BoardConfig_IPC/BoardConfig-EMMC-Buildroot-RV1106_Luckfox_Pico_Pi_W-IPC.mk
|
||||||
|
boot medium(启动介质): EMMC
|
||||||
|
system version(系统版本): Buildroot
|
||||||
|
hardware version(硬件版本): RV1106_Luckfox_Pico_Pi_W
|
||||||
|
application(应用场景): IPC
|
||||||
|
----------------------------------------------------------------
|
||||||
|
|
||||||
|
----------------------------------------------------------------
|
||||||
|
4. BoardConfig_IPC/BoardConfig-EMMC-Buildroot-RV1106_Luckfox_Pico_Ultra-IPC.mk
|
||||||
boot medium(启动介质): EMMC
|
boot medium(启动介质): EMMC
|
||||||
system version(系统版本): Buildroot
|
system version(系统版本): Buildroot
|
||||||
hardware version(硬件版本): RV1106_Luckfox_Pico_Ultra
|
hardware version(硬件版本): RV1106_Luckfox_Pico_Ultra
|
||||||
applicaton(应用场景): IPC
|
application(应用场景): IPC
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
1. BoardConfig_IPC/BoardConfig-EMMC-Buildroot-RV1106_Luckfox_Pico_Ultra_W-IPC.mk
|
5. BoardConfig_IPC/BoardConfig-EMMC-Buildroot-RV1106_Luckfox_Pico_Ultra_W-IPC.mk
|
||||||
boot medium(启动介质): EMMC
|
boot medium(启动介质): EMMC
|
||||||
system version(系统版本): Buildroot
|
system version(系统版本): Buildroot
|
||||||
hardware version(硬件版本): RV1106_Luckfox_Pico_Ultra_W
|
hardware version(硬件版本): RV1106_Luckfox_Pico_Ultra_W
|
||||||
applicaton(应用场景): IPC
|
application(应用场景): IPC
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
2. BoardConfig_IPC/BoardConfig-EMMC-Ubuntu-RV1106_Luckfox_Pico_Ultra-IPC.mk
|
6. BoardConfig_IPC/BoardConfig-EMMC-Busybox-RV1106_Luckfox_Pico_Ultra-IPC_FASTBOOT.mk
|
||||||
boot medium(启动介质): EMMC
|
boot medium(启动介质): EMMC
|
||||||
system version(系统版本): Ubuntu
|
system version(系统版本): Busybox
|
||||||
hardware version(硬件版本): RV1106_Luckfox_Pico_Ultra
|
hardware version(硬件版本): RV1106_Luckfox_Pico_Ultra
|
||||||
applicaton(应用场景): IPC
|
application(应用场景): IPC_FASTBOOT
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
3. BoardConfig_IPC/BoardConfig-EMMC-Ubuntu-RV1106_Luckfox_Pico_Ultra_W-IPC.mk
|
7. BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1103_Luckfox_Pico-IPC.mk
|
||||||
boot medium(启动介质): EMMC
|
|
||||||
system version(系统版本): Ubuntu
|
|
||||||
hardware version(硬件版本): RV1106_Luckfox_Pico_Ultra_W
|
|
||||||
applicaton(应用场景): IPC
|
|
||||||
----------------------------------------------------------------
|
|
||||||
|
|
||||||
----------------------------------------------------------------
|
|
||||||
4. BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1103_Luckfox_Pico-IPC.mk
|
|
||||||
boot medium(启动介质): SD_CARD
|
boot medium(启动介质): SD_CARD
|
||||||
system version(系统版本): Buildroot
|
system version(系统版本): Buildroot
|
||||||
hardware version(硬件版本): RV1103_Luckfox_Pico
|
hardware version(硬件版本): RV1103_Luckfox_Pico
|
||||||
applicaton(应用场景): IPC
|
application(应用场景): IPC
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
5. BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1103_Luckfox_Pico_Mini_A-IPC.mk
|
8. BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1103_Luckfox_Pico_Mini_A-IPC.mk
|
||||||
boot medium(启动介质): SD_CARD
|
boot medium(启动介质): SD_CARD
|
||||||
system version(系统版本): Buildroot
|
system version(系统版本): Buildroot
|
||||||
hardware version(硬件版本): RV1103_Luckfox_Pico_Mini_A
|
hardware version(硬件版本): RV1103_Luckfox_Pico_Mini_A
|
||||||
applicaton(应用场景): IPC
|
application(应用场景): IPC
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
6. BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1103_Luckfox_Pico_Mini_B-IPC.mk
|
9. BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1103_Luckfox_Pico_Mini_B-IPC.mk
|
||||||
boot medium(启动介质): SD_CARD
|
boot medium(启动介质): SD_CARD
|
||||||
system version(系统版本): Buildroot
|
system version(系统版本): Buildroot
|
||||||
hardware version(硬件版本): RV1103_Luckfox_Pico_Mini_B
|
hardware version(硬件版本): RV1103_Luckfox_Pico_Mini_B
|
||||||
applicaton(应用场景): IPC
|
application(应用场景): IPC
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
7. BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1103_Luckfox_Pico_Plus-IPC.mk
|
10. BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1103_Luckfox_Pico_Plus-IPC.mk
|
||||||
boot medium(启动介质): SD_CARD
|
boot medium(启动介质): SD_CARD
|
||||||
system version(系统版本): Buildroot
|
system version(系统版本): Buildroot
|
||||||
hardware version(硬件版本): RV1103_Luckfox_Pico_Plus
|
hardware version(硬件版本): RV1103_Luckfox_Pico_Plus
|
||||||
applicaton(应用场景): IPC
|
application(应用场景): IPC
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
8. BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1106_Luckfox_Pico_Pro_Max-IPC.mk
|
11. BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1103_Luckfox_Pico_WebBee-IPC.mk
|
||||||
boot medium(启动介质): SD_CARD
|
boot medium(启动介质): SD_CARD
|
||||||
system version(系统版本): Buildroot
|
system version(系统版本): Buildroot
|
||||||
hardware version(硬件版本): RV1106_Luckfox_Pico_Pro_Max
|
hardware version(硬件版本): RV1103_Luckfox_Pico_WebBee
|
||||||
applicaton(应用场景): IPC
|
application(应用场景): IPC
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
9. BoardConfig_IPC/BoardConfig-SD_CARD-Ubuntu-RV1103_Luckfox_Pico-IPC.mk
|
12. BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1106_Luckfox_Pico_Max-IPC.mk
|
||||||
boot medium(启动介质): SD_CARD
|
boot medium(启动介质): SD_CARD
|
||||||
system version(系统版本): Ubuntu
|
system version(系统版本): Buildroot
|
||||||
hardware version(硬件版本): RV1103_Luckfox_Pico
|
hardware version(硬件版本): RV1106_Luckfox_Pico_Max
|
||||||
applicaton(应用场景): IPC
|
application(应用场景): IPC
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
10. BoardConfig_IPC/BoardConfig-SD_CARD-Ubuntu-RV1103_Luckfox_Pico_Mini_A-IPC.mk
|
13. BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1106_Luckfox_Pico_Pro-IPC.mk
|
||||||
boot medium(启动介质): SD_CARD
|
boot medium(启动介质): SD_CARD
|
||||||
system version(系统版本): Ubuntu
|
system version(系统版本): Buildroot
|
||||||
hardware version(硬件版本): RV1103_Luckfox_Pico_Mini_A
|
hardware version(硬件版本): RV1106_Luckfox_Pico_Pro
|
||||||
applicaton(应用场景): IPC
|
application(应用场景): IPC
|
||||||
----------------------------------------------------------------
|
|
||||||
|
|
||||||
----------------------------------------------------------------
|
|
||||||
11. BoardConfig_IPC/BoardConfig-SD_CARD-Ubuntu-RV1103_Luckfox_Pico_Mini_B-IPC.mk
|
|
||||||
boot medium(启动介质): SD_CARD
|
|
||||||
system version(系统版本): Ubuntu
|
|
||||||
hardware version(硬件版本): RV1103_Luckfox_Pico_Mini_B
|
|
||||||
applicaton(应用场景): IPC
|
|
||||||
----------------------------------------------------------------
|
|
||||||
|
|
||||||
----------------------------------------------------------------
|
|
||||||
12. BoardConfig_IPC/BoardConfig-SD_CARD-Ubuntu-RV1103_Luckfox_Pico_Plus-IPC.mk
|
|
||||||
boot medium(启动介质): SD_CARD
|
|
||||||
system version(系统版本): Ubuntu
|
|
||||||
hardware version(硬件版本): RV1103_Luckfox_Pico_Plus
|
|
||||||
applicaton(应用场景): IPC
|
|
||||||
----------------------------------------------------------------
|
|
||||||
|
|
||||||
----------------------------------------------------------------
|
|
||||||
13. BoardConfig_IPC/BoardConfig-SD_CARD-Ubuntu-RV1106_Luckfox_Pico_Pro_Max-IPC.mk
|
|
||||||
boot medium(启动介质): SD_CARD
|
|
||||||
system version(系统版本): Ubuntu
|
|
||||||
hardware version(硬件版本): RV1106_Luckfox_Pico_Pro_Max
|
|
||||||
applicaton(应用场景): IPC
|
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
@@ -254,7 +260,7 @@ kernelconfig -config kernel and save defconfig"
|
|||||||
boot medium(启动介质): SPI_NAND
|
boot medium(启动介质): SPI_NAND
|
||||||
system version(系统版本): Buildroot
|
system version(系统版本): Buildroot
|
||||||
hardware version(硬件版本): RV1103_Luckfox_Pico_Mini_B
|
hardware version(硬件版本): RV1103_Luckfox_Pico_Mini_B
|
||||||
applicaton(应用场景): IPC
|
application(应用场景): IPC
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
@@ -262,18 +268,40 @@ kernelconfig -config kernel and save defconfig"
|
|||||||
boot medium(启动介质): SPI_NAND
|
boot medium(启动介质): SPI_NAND
|
||||||
system version(系统版本): Buildroot
|
system version(系统版本): Buildroot
|
||||||
hardware version(硬件版本): RV1103_Luckfox_Pico_Plus
|
hardware version(硬件版本): RV1103_Luckfox_Pico_Plus
|
||||||
applicaton(应用场景): IPC
|
application(应用场景): IPC
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
16. BoardConfig_IPC/BoardConfig-SPI_NAND-Buildroot-RV1106_Luckfox_Pico_Pro_Max-IPC.mk
|
16. BoardConfig_IPC/BoardConfig-SPI_NAND-Buildroot-RV1103_Luckfox_Pico_WebBee-IPC.mk
|
||||||
boot medium(启动介质): SPI_NAND
|
boot medium(启动介质): SPI_NAND
|
||||||
system version(系统版本): Buildroot
|
system version(系统版本): Buildroot
|
||||||
hardware version(硬件版本): RV1106_Luckfox_Pico_Pro_Max
|
hardware version(硬件版本): RV1103_Luckfox_Pico_WebBee
|
||||||
applicaton(应用场景): IPC
|
application(应用场景): IPC
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
||||||
Which would you like? [default:0]:
|
----------------------------------------------------------------
|
||||||
|
17. BoardConfig_IPC/BoardConfig-SPI_NAND-Buildroot-RV1106_Luckfox_Pico_Max-IPC.mk
|
||||||
|
boot medium(启动介质): SPI_NAND
|
||||||
|
system version(系统版本): Buildroot
|
||||||
|
hardware version(硬件版本): RV1106_Luckfox_Pico_Max
|
||||||
|
application(应用场景): IPC
|
||||||
|
----------------------------------------------------------------
|
||||||
|
|
||||||
|
----------------------------------------------------------------
|
||||||
|
18. BoardConfig_IPC/BoardConfig-SPI_NAND-Buildroot-RV1106_Luckfox_Pico_Pro-IPC.mk
|
||||||
|
boot medium(启动介质): SPI_NAND
|
||||||
|
system version(系统版本): Buildroot
|
||||||
|
hardware version(硬件版本): RV1106_Luckfox_Pico_Pro
|
||||||
|
application(应用场景): IPC
|
||||||
|
----------------------------------------------------------------
|
||||||
|
|
||||||
|
----------------------------------------------------------------
|
||||||
|
19. BoardConfig_IPC/BoardConfig-SPI_NAND-Busybox-RV1106_Luckfox_Pico_Pro_Max-IPC_FASTBOOT.mk
|
||||||
|
boot medium(启动介质): SPI_NAND
|
||||||
|
system version(系统版本): Busybox
|
||||||
|
hardware version(硬件版本): RV1106_Luckfox_Pico_Pro_Max
|
||||||
|
application(应用场景): IPC_FASTBOOT
|
||||||
|
----------------------------------------------------------------
|
||||||
```
|
```
|
||||||
Enter the corresponding board support file number to complete the configuration.
|
Enter the corresponding board support file number to complete the configuration.
|
||||||
#### Set Buildroot System Default WIFI Configuration
|
#### Set Buildroot System Default WIFI Configuration
|
||||||
@@ -297,13 +325,6 @@ kernelconfig -config kernel and save defconfig"
|
|||||||
./build.sh lunch # Select the reference board
|
./build.sh lunch # Select the reference board
|
||||||
./build.sh # One-click automatic compilation
|
./build.sh # One-click automatic compilation
|
||||||
```
|
```
|
||||||
* Compile Ubuntu
|
|
||||||
```
|
|
||||||
sudo ./build.sh lunch # Select the reference board
|
|
||||||
sudo ./build.sh # One-click automatic compilation
|
|
||||||
```
|
|
||||||
* Note that when compiling Ubuntu, make sure to use sudo, otherwise it may cause file system errors
|
|
||||||
* The following text will not distinguish between the two sets of instructions, please choose accordingly based on the situation
|
|
||||||
#### Build U-Boot
|
#### Build U-Boot
|
||||||
```shell
|
```shell
|
||||||
./build.sh clean uboot
|
./build.sh clean uboot
|
||||||
|
|||||||
199
README_CN.md
199
README_CN.md
@@ -16,7 +16,7 @@
|
|||||||
* 推荐SDK使用系统环境为Ubuntu 22.04
|
* 推荐SDK使用系统环境为Ubuntu 22.04
|
||||||
### 安装依赖
|
### 安装依赖
|
||||||
```shell
|
```shell
|
||||||
sudo apt-get install repo git ssh make gcc gcc-multilib g++-multilib module-assistant expect g++ gawk texinfo libssl-dev bison flex fakeroot cmake unzip gperf autoconf device-tree-compiler libncurses5-dev pkg-config
|
sudo apt-get install repo git ssh make gcc gcc-multilib g++-multilib module-assistant expect g++ gawk texinfo libssl-dev bison flex fakeroot cmake unzip gperf autoconf device-tree-compiler libncurses5-dev pkg-config bc python-is-python3 passwd openssl openssh-server openssh-client vim file cpio rsync
|
||||||
```
|
```
|
||||||
### 获取SDK
|
### 获取SDK
|
||||||
* github
|
* github
|
||||||
@@ -27,11 +27,6 @@ sudo apt-get install repo git ssh make gcc gcc-multilib g++-multilib module-assi
|
|||||||
```
|
```
|
||||||
git clone https://gitee.com/LuckfoxTECH/luckfox-pico.git
|
git clone https://gitee.com/LuckfoxTECH/luckfox-pico.git
|
||||||
```
|
```
|
||||||
* 如果你需要需要编译ubuntu系统,并且使用gitee源
|
|
||||||
* 请修改对应的板型mk文件中LF_SUBMODULES_BY改为gitee,如
|
|
||||||
```
|
|
||||||
LF_SUBMODULES_BY=gitee
|
|
||||||
```
|
|
||||||
### 环境变量
|
### 环境变量
|
||||||
* 需要将交叉编译工具链设置
|
* 需要将交叉编译工具链设置
|
||||||
```
|
```
|
||||||
@@ -94,11 +89,17 @@ kernelconfig -config kernel and save defconfig"
|
|||||||
[1] RV1103_Luckfox_Pico_Mini_A
|
[1] RV1103_Luckfox_Pico_Mini_A
|
||||||
[2] RV1103_Luckfox_Pico_Mini_B
|
[2] RV1103_Luckfox_Pico_Mini_B
|
||||||
[3] RV1103_Luckfox_Pico_Plus
|
[3] RV1103_Luckfox_Pico_Plus
|
||||||
[4] RV1106_Luckfox_Pico_Pro_Max
|
[4] RV1103_Luckfox_Pico_WebBee
|
||||||
[5] RV1106_Luckfox_Pico_Ultra
|
[5] RV1106_Luckfox_Pico_Pro
|
||||||
[6] RV1106_Luckfox_Pico_Ultra_W
|
[6] RV1106_Luckfox_Pico_Max
|
||||||
[7] custom
|
[7] RV1106_Luckfox_Pico_Ultra
|
||||||
Which would you like? [0~7][default:0]:
|
[8] RV1106_Luckfox_Pico_Ultra_W
|
||||||
|
[9] RV1106_Luckfox_Pico_Pi
|
||||||
|
[10] RV1106_Luckfox_Pico_Pi_W
|
||||||
|
[11] RV1106_Luckfox_Pico_86Panel
|
||||||
|
[12] RV1106_Luckfox_Pico_86Panel_W
|
||||||
|
[13] custom
|
||||||
|
Which would you like? [0~13][default:0]:
|
||||||
```
|
```
|
||||||
+ 输出对应的Luckfox-pico硬件型号支持的存储介质,输入对应编号后进入根文件系统选项(直接回车选择序号[0]选项)
|
+ 输出对应的Luckfox-pico硬件型号支持的存储介质,输入对应编号后进入根文件系统选项(直接回车选择序号[0]选项)
|
||||||
以Luckfox Pico Plus为例
|
以Luckfox Pico Plus为例
|
||||||
@@ -115,11 +116,10 @@ kernelconfig -config kernel and save defconfig"
|
|||||||
Lunch menu...pick the system version:
|
Lunch menu...pick the system version:
|
||||||
选择系统版本:
|
选择系统版本:
|
||||||
[0] Buildroot(Support Rockchip official features)
|
[0] Buildroot(Support Rockchip official features)
|
||||||
[1] Ubuntu(Support for the apt package management tool)
|
|
||||||
|
|
||||||
Which would you like? [0~1][default:0]:
|
Which would you like? [0~1][default:0]:
|
||||||
```
|
```
|
||||||
+ 如果需要使用旧的配置方式或者使用自定义的板级支持文件,在配置Luckfox-pico硬件型号时,选择“[7]custom”选项
|
+ 如果需要使用旧的配置方式或者使用自定义的板级支持文件,在配置Luckfox-pico硬件型号时,选择“custom”选项
|
||||||
```shell
|
```shell
|
||||||
You're building on Linux
|
You're building on Linux
|
||||||
Lunch menu...pick the Luckfox Pico hardware version:
|
Lunch menu...pick the Luckfox Pico hardware version:
|
||||||
@@ -128,121 +128,127 @@ kernelconfig -config kernel and save defconfig"
|
|||||||
[1] RV1103_Luckfox_Pico_Mini_A
|
[1] RV1103_Luckfox_Pico_Mini_A
|
||||||
[2] RV1103_Luckfox_Pico_Mini_B
|
[2] RV1103_Luckfox_Pico_Mini_B
|
||||||
[3] RV1103_Luckfox_Pico_Plus
|
[3] RV1103_Luckfox_Pico_Plus
|
||||||
[4] RV1106_Luckfox_Pico_Pro_Max
|
[4] RV1103_Luckfox_Pico_WebBee
|
||||||
[5] RV1106_Luckfox_Pico_Ultra
|
[5] RV1106_Luckfox_Pico_Pro
|
||||||
[6] RV1106_Luckfox_Pico_Ultra_W
|
[6] RV1106_Luckfox_Pico_Max
|
||||||
[7] custom
|
[7] RV1106_Luckfox_Pico_Ultra
|
||||||
Which would you like? [0~7][default:0]: 7
|
[8] RV1106_Luckfox_Pico_Ultra_W
|
||||||
|
[9] RV1106_Luckfox_Pico_Pi
|
||||||
|
[10] RV1106_Luckfox_Pico_Pi_W
|
||||||
|
[11] RV1106_Luckfox_Pico_86Panel
|
||||||
|
[12] RV1106_Luckfox_Pico_86Panel_W
|
||||||
|
[13] custom
|
||||||
|
Which would you like? [0~13][default:0]: 13
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
0. BoardConfig_IPC/BoardConfig-EMMC-Buildroot-RV1106_Luckfox_Pico_Ultra-IPC.mk
|
0. BoardConfig_IPC/BoardConfig-EMMC-Buildroot-RV1106_Luckfox_Pico_86Panel-IPC.mk
|
||||||
|
boot medium(启动介质): EMMC
|
||||||
|
system version(系统版本): Buildroot
|
||||||
|
hardware version(硬件版本): RV1106_Luckfox_Pico_86Panel
|
||||||
|
application(应用场景): IPC
|
||||||
|
----------------------------------------------------------------
|
||||||
|
|
||||||
|
----------------------------------------------------------------
|
||||||
|
1. BoardConfig_IPC/BoardConfig-EMMC-Buildroot-RV1106_Luckfox_Pico_86Panel_W-IPC.mk
|
||||||
|
boot medium(启动介质): EMMC
|
||||||
|
system version(系统版本): Buildroot
|
||||||
|
hardware version(硬件版本): RV1106_Luckfox_Pico_86Panel_W
|
||||||
|
application(应用场景): IPC
|
||||||
|
----------------------------------------------------------------
|
||||||
|
|
||||||
|
----------------------------------------------------------------
|
||||||
|
2. BoardConfig_IPC/BoardConfig-EMMC-Buildroot-RV1106_Luckfox_Pico_Pi-IPC.mk
|
||||||
|
boot medium(启动介质): EMMC
|
||||||
|
system version(系统版本): Buildroot
|
||||||
|
hardware version(硬件版本): RV1106_Luckfox_Pico_Pi
|
||||||
|
application(应用场景): IPC
|
||||||
|
----------------------------------------------------------------
|
||||||
|
|
||||||
|
----------------------------------------------------------------
|
||||||
|
3. BoardConfig_IPC/BoardConfig-EMMC-Buildroot-RV1106_Luckfox_Pico_Pi_W-IPC.mk
|
||||||
|
boot medium(启动介质): EMMC
|
||||||
|
system version(系统版本): Buildroot
|
||||||
|
hardware version(硬件版本): RV1106_Luckfox_Pico_Pi_W
|
||||||
|
application(应用场景): IPC
|
||||||
|
----------------------------------------------------------------
|
||||||
|
|
||||||
|
----------------------------------------------------------------
|
||||||
|
4. BoardConfig_IPC/BoardConfig-EMMC-Buildroot-RV1106_Luckfox_Pico_Ultra-IPC.mk
|
||||||
boot medium(启动介质): EMMC
|
boot medium(启动介质): EMMC
|
||||||
system version(系统版本): Buildroot
|
system version(系统版本): Buildroot
|
||||||
hardware version(硬件版本): RV1106_Luckfox_Pico_Ultra
|
hardware version(硬件版本): RV1106_Luckfox_Pico_Ultra
|
||||||
applicaton(应用场景): IPC
|
application(应用场景): IPC
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
1. BoardConfig_IPC/BoardConfig-EMMC-Buildroot-RV1106_Luckfox_Pico_Ultra_W-IPC.mk
|
5. BoardConfig_IPC/BoardConfig-EMMC-Buildroot-RV1106_Luckfox_Pico_Ultra_W-IPC.mk
|
||||||
boot medium(启动介质): EMMC
|
boot medium(启动介质): EMMC
|
||||||
system version(系统版本): Buildroot
|
system version(系统版本): Buildroot
|
||||||
hardware version(硬件版本): RV1106_Luckfox_Pico_Ultra_W
|
hardware version(硬件版本): RV1106_Luckfox_Pico_Ultra_W
|
||||||
applicaton(应用场景): IPC
|
application(应用场景): IPC
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
2. BoardConfig_IPC/BoardConfig-EMMC-Ubuntu-RV1106_Luckfox_Pico_Ultra-IPC.mk
|
6. BoardConfig_IPC/BoardConfig-EMMC-Busybox-RV1106_Luckfox_Pico_Ultra-IPC_FASTBOOT.mk
|
||||||
boot medium(启动介质): EMMC
|
boot medium(启动介质): EMMC
|
||||||
system version(系统版本): Ubuntu
|
system version(系统版本): Busybox
|
||||||
hardware version(硬件版本): RV1106_Luckfox_Pico_Ultra
|
hardware version(硬件版本): RV1106_Luckfox_Pico_Ultra
|
||||||
applicaton(应用场景): IPC
|
application(应用场景): IPC_FASTBOOT
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
3. BoardConfig_IPC/BoardConfig-EMMC-Ubuntu-RV1106_Luckfox_Pico_Ultra_W-IPC.mk
|
7. BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1103_Luckfox_Pico-IPC.mk
|
||||||
boot medium(启动介质): EMMC
|
|
||||||
system version(系统版本): Ubuntu
|
|
||||||
hardware version(硬件版本): RV1106_Luckfox_Pico_Ultra_W
|
|
||||||
applicaton(应用场景): IPC
|
|
||||||
----------------------------------------------------------------
|
|
||||||
|
|
||||||
----------------------------------------------------------------
|
|
||||||
4. BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1103_Luckfox_Pico-IPC.mk
|
|
||||||
boot medium(启动介质): SD_CARD
|
boot medium(启动介质): SD_CARD
|
||||||
system version(系统版本): Buildroot
|
system version(系统版本): Buildroot
|
||||||
hardware version(硬件版本): RV1103_Luckfox_Pico
|
hardware version(硬件版本): RV1103_Luckfox_Pico
|
||||||
applicaton(应用场景): IPC
|
application(应用场景): IPC
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
5. BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1103_Luckfox_Pico_Mini_A-IPC.mk
|
8. BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1103_Luckfox_Pico_Mini_A-IPC.mk
|
||||||
boot medium(启动介质): SD_CARD
|
boot medium(启动介质): SD_CARD
|
||||||
system version(系统版本): Buildroot
|
system version(系统版本): Buildroot
|
||||||
hardware version(硬件版本): RV1103_Luckfox_Pico_Mini_A
|
hardware version(硬件版本): RV1103_Luckfox_Pico_Mini_A
|
||||||
applicaton(应用场景): IPC
|
application(应用场景): IPC
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
6. BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1103_Luckfox_Pico_Mini_B-IPC.mk
|
9. BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1103_Luckfox_Pico_Mini_B-IPC.mk
|
||||||
boot medium(启动介质): SD_CARD
|
boot medium(启动介质): SD_CARD
|
||||||
system version(系统版本): Buildroot
|
system version(系统版本): Buildroot
|
||||||
hardware version(硬件版本): RV1103_Luckfox_Pico_Mini_B
|
hardware version(硬件版本): RV1103_Luckfox_Pico_Mini_B
|
||||||
applicaton(应用场景): IPC
|
application(应用场景): IPC
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
7. BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1103_Luckfox_Pico_Plus-IPC.mk
|
10. BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1103_Luckfox_Pico_Plus-IPC.mk
|
||||||
boot medium(启动介质): SD_CARD
|
boot medium(启动介质): SD_CARD
|
||||||
system version(系统版本): Buildroot
|
system version(系统版本): Buildroot
|
||||||
hardware version(硬件版本): RV1103_Luckfox_Pico_Plus
|
hardware version(硬件版本): RV1103_Luckfox_Pico_Plus
|
||||||
applicaton(应用场景): IPC
|
application(应用场景): IPC
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
8. BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1106_Luckfox_Pico_Pro_Max-IPC.mk
|
11. BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1103_Luckfox_Pico_WebBee-IPC.mk
|
||||||
boot medium(启动介质): SD_CARD
|
boot medium(启动介质): SD_CARD
|
||||||
system version(系统版本): Buildroot
|
system version(系统版本): Buildroot
|
||||||
hardware version(硬件版本): RV1106_Luckfox_Pico_Pro_Max
|
hardware version(硬件版本): RV1103_Luckfox_Pico_WebBee
|
||||||
applicaton(应用场景): IPC
|
application(应用场景): IPC
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
9. BoardConfig_IPC/BoardConfig-SD_CARD-Ubuntu-RV1103_Luckfox_Pico-IPC.mk
|
12. BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1106_Luckfox_Pico_Max-IPC.mk
|
||||||
boot medium(启动介质): SD_CARD
|
boot medium(启动介质): SD_CARD
|
||||||
system version(系统版本): Ubuntu
|
system version(系统版本): Buildroot
|
||||||
hardware version(硬件版本): RV1103_Luckfox_Pico
|
hardware version(硬件版本): RV1106_Luckfox_Pico_Max
|
||||||
applicaton(应用场景): IPC
|
application(应用场景): IPC
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
10. BoardConfig_IPC/BoardConfig-SD_CARD-Ubuntu-RV1103_Luckfox_Pico_Mini_A-IPC.mk
|
13. BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1106_Luckfox_Pico_Pro-IPC.mk
|
||||||
boot medium(启动介质): SD_CARD
|
boot medium(启动介质): SD_CARD
|
||||||
system version(系统版本): Ubuntu
|
system version(系统版本): Buildroot
|
||||||
hardware version(硬件版本): RV1103_Luckfox_Pico_Mini_A
|
hardware version(硬件版本): RV1106_Luckfox_Pico_Pro
|
||||||
applicaton(应用场景): IPC
|
application(应用场景): IPC
|
||||||
----------------------------------------------------------------
|
|
||||||
|
|
||||||
----------------------------------------------------------------
|
|
||||||
11. BoardConfig_IPC/BoardConfig-SD_CARD-Ubuntu-RV1103_Luckfox_Pico_Mini_B-IPC.mk
|
|
||||||
boot medium(启动介质): SD_CARD
|
|
||||||
system version(系统版本): Ubuntu
|
|
||||||
hardware version(硬件版本): RV1103_Luckfox_Pico_Mini_B
|
|
||||||
applicaton(应用场景): IPC
|
|
||||||
----------------------------------------------------------------
|
|
||||||
|
|
||||||
----------------------------------------------------------------
|
|
||||||
12. BoardConfig_IPC/BoardConfig-SD_CARD-Ubuntu-RV1103_Luckfox_Pico_Plus-IPC.mk
|
|
||||||
boot medium(启动介质): SD_CARD
|
|
||||||
system version(系统版本): Ubuntu
|
|
||||||
hardware version(硬件版本): RV1103_Luckfox_Pico_Plus
|
|
||||||
applicaton(应用场景): IPC
|
|
||||||
----------------------------------------------------------------
|
|
||||||
|
|
||||||
----------------------------------------------------------------
|
|
||||||
13. BoardConfig_IPC/BoardConfig-SD_CARD-Ubuntu-RV1106_Luckfox_Pico_Pro_Max-IPC.mk
|
|
||||||
boot medium(启动介质): SD_CARD
|
|
||||||
system version(系统版本): Ubuntu
|
|
||||||
hardware version(硬件版本): RV1106_Luckfox_Pico_Pro_Max
|
|
||||||
applicaton(应用场景): IPC
|
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
@@ -250,7 +256,7 @@ kernelconfig -config kernel and save defconfig"
|
|||||||
boot medium(启动介质): SPI_NAND
|
boot medium(启动介质): SPI_NAND
|
||||||
system version(系统版本): Buildroot
|
system version(系统版本): Buildroot
|
||||||
hardware version(硬件版本): RV1103_Luckfox_Pico_Mini_B
|
hardware version(硬件版本): RV1103_Luckfox_Pico_Mini_B
|
||||||
applicaton(应用场景): IPC
|
application(应用场景): IPC
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
@@ -258,18 +264,40 @@ kernelconfig -config kernel and save defconfig"
|
|||||||
boot medium(启动介质): SPI_NAND
|
boot medium(启动介质): SPI_NAND
|
||||||
system version(系统版本): Buildroot
|
system version(系统版本): Buildroot
|
||||||
hardware version(硬件版本): RV1103_Luckfox_Pico_Plus
|
hardware version(硬件版本): RV1103_Luckfox_Pico_Plus
|
||||||
applicaton(应用场景): IPC
|
application(应用场景): IPC
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
16. BoardConfig_IPC/BoardConfig-SPI_NAND-Buildroot-RV1106_Luckfox_Pico_Pro_Max-IPC.mk
|
16. BoardConfig_IPC/BoardConfig-SPI_NAND-Buildroot-RV1103_Luckfox_Pico_WebBee-IPC.mk
|
||||||
boot medium(启动介质): SPI_NAND
|
boot medium(启动介质): SPI_NAND
|
||||||
system version(系统版本): Buildroot
|
system version(系统版本): Buildroot
|
||||||
hardware version(硬件版本): RV1106_Luckfox_Pico_Pro_Max
|
hardware version(硬件版本): RV1103_Luckfox_Pico_WebBee
|
||||||
applicaton(应用场景): IPC
|
application(应用场景): IPC
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
||||||
Which would you like? [default:0]:
|
----------------------------------------------------------------
|
||||||
|
17. BoardConfig_IPC/BoardConfig-SPI_NAND-Buildroot-RV1106_Luckfox_Pico_Max-IPC.mk
|
||||||
|
boot medium(启动介质): SPI_NAND
|
||||||
|
system version(系统版本): Buildroot
|
||||||
|
hardware version(硬件版本): RV1106_Luckfox_Pico_Max
|
||||||
|
application(应用场景): IPC
|
||||||
|
----------------------------------------------------------------
|
||||||
|
|
||||||
|
----------------------------------------------------------------
|
||||||
|
18. BoardConfig_IPC/BoardConfig-SPI_NAND-Buildroot-RV1106_Luckfox_Pico_Pro-IPC.mk
|
||||||
|
boot medium(启动介质): SPI_NAND
|
||||||
|
system version(系统版本): Buildroot
|
||||||
|
hardware version(硬件版本): RV1106_Luckfox_Pico_Pro
|
||||||
|
application(应用场景): IPC
|
||||||
|
----------------------------------------------------------------
|
||||||
|
|
||||||
|
----------------------------------------------------------------
|
||||||
|
19. BoardConfig_IPC/BoardConfig-SPI_NAND-Busybox-RV1106_Luckfox_Pico_Pro_Max-IPC_FASTBOOT.mk
|
||||||
|
boot medium(启动介质): SPI_NAND
|
||||||
|
system version(系统版本): Busybox
|
||||||
|
hardware version(硬件版本): RV1106_Luckfox_Pico_Pro_Max
|
||||||
|
application(应用场景): IPC_FASTBOOT
|
||||||
|
----------------------------------------------------------------
|
||||||
```
|
```
|
||||||
输入对应的板级支持文件序号完成配置
|
输入对应的板级支持文件序号完成配置
|
||||||
#### 设置 Buildroot 系统默认 WIFI 配置
|
#### 设置 Buildroot 系统默认 WIFI 配置
|
||||||
@@ -289,13 +317,6 @@ kernelconfig -config kernel and save defconfig"
|
|||||||
./build.sh lunch # 选择参考板级
|
./build.sh lunch # 选择参考板级
|
||||||
./build.sh # 一键自动编译
|
./build.sh # 一键自动编译
|
||||||
```
|
```
|
||||||
* 编译ubuntu
|
|
||||||
```shell
|
|
||||||
sudo ./build.sh lunch # 选择参考板级
|
|
||||||
sudo ./build.sh # 一键自动编译
|
|
||||||
```
|
|
||||||
* 注意编译ubuntu时需要注意使用sudo,否则会导致文件系统错误
|
|
||||||
* 下文就不一一区分两者指令区别,请自行根据情况选择
|
|
||||||
#### 单独编译U-Boot
|
#### 单独编译U-Boot
|
||||||
```shell
|
```shell
|
||||||
./build.sh clean uboot
|
./build.sh clean uboot
|
||||||
|
|||||||
@@ -106,9 +106,9 @@ post_chk() {
|
|||||||
echo "Error: not found rkipc.ini !!!"
|
echo "Error: not found rkipc.ini !!!"
|
||||||
exit -1
|
exit -1
|
||||||
fi
|
fi
|
||||||
if [ ! -f "$rkipc_ini" ]; then
|
#if [ ! -f "$rkipc_ini" ]; then
|
||||||
cp $default_rkipc_ini $rkipc_ini -f
|
cp $default_rkipc_ini $rkipc_ini -f
|
||||||
fi
|
#fi
|
||||||
|
|
||||||
if [ ! -f "/userdata/image.bmp" ]; then
|
if [ ! -f "/userdata/image.bmp" ]; then
|
||||||
cp -fa /oem/usr/share/image.bmp /userdata/
|
cp -fa /oem/usr/share/image.bmp /userdata/
|
||||||
|
|||||||
@@ -114,9 +114,9 @@ post_chk() {
|
|||||||
echo "Error: not found rkipc.ini !!!"
|
echo "Error: not found rkipc.ini !!!"
|
||||||
exit -1
|
exit -1
|
||||||
fi
|
fi
|
||||||
if [ ! -f "$rkipc_ini" ]; then
|
#if [ ! -f "$rkipc_ini" ]; then
|
||||||
cp $default_rkipc_ini $rkipc_ini -f
|
cp $default_rkipc_ini $rkipc_ini -f
|
||||||
fi
|
#fi
|
||||||
|
|
||||||
if [ ! -f "/userdata/image.bmp" ]; then
|
if [ ! -f "/userdata/image.bmp" ]; then
|
||||||
cp -fa /oem/usr/share/image.bmp /userdata/
|
cp -fa /oem/usr/share/image.bmp /userdata/
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ SDK_CONFIG_DIR=${SDK_ROOT_DIR}/config
|
|||||||
DTS_CONFIG=${SDK_CONFIG_DIR}/dts_config
|
DTS_CONFIG=${SDK_CONFIG_DIR}/dts_config
|
||||||
KERNEL_DEFCONFIG=${SDK_CONFIG_DIR}/kernel_defconfig
|
KERNEL_DEFCONFIG=${SDK_CONFIG_DIR}/kernel_defconfig
|
||||||
BUILDROOT_DEFCONFIG=${SDK_CONFIG_DIR}/buildroot_defconfig
|
BUILDROOT_DEFCONFIG=${SDK_CONFIG_DIR}/buildroot_defconfig
|
||||||
UBUNTU_DIR=${SDK_SYSDRV_DIR}/tools/board/ubuntu
|
|
||||||
KERNEL_PATH=${SDK_SYSDRV_DIR}/source/kernel
|
KERNEL_PATH=${SDK_SYSDRV_DIR}/source/kernel
|
||||||
UBOOT_PATH=${SDK_SYSDRV_DIR}/source/uboot/u-boot
|
UBOOT_PATH=${SDK_SYSDRV_DIR}/source/uboot/u-boot
|
||||||
#for custom rootfs
|
#for custom rootfs
|
||||||
@@ -159,9 +158,11 @@ function choose_target_board() {
|
|||||||
"RV1106_Luckfox_Pico_Ultra"
|
"RV1106_Luckfox_Pico_Ultra"
|
||||||
"RV1106_Luckfox_Pico_Ultra_W"
|
"RV1106_Luckfox_Pico_Ultra_W"
|
||||||
"RV1106_Luckfox_Pico_Pi"
|
"RV1106_Luckfox_Pico_Pi"
|
||||||
"RV1106_Luckfox_Pico_Pi_W")
|
"RV1106_Luckfox_Pico_Pi_W"
|
||||||
|
"RV1106_Luckfox_Pico_86Panel"
|
||||||
|
"RV1106_Luckfox_Pico_86Panel_W")
|
||||||
local LF_BOOT_MEDIA=("SD_CARD" "SPI_NAND" "EMMC")
|
local LF_BOOT_MEDIA=("SD_CARD" "SPI_NAND" "EMMC")
|
||||||
local LF_SYSTEM=("Buildroot" "Ubuntu" "Custom")
|
local LF_SYSTEM=("Buildroot" "Custom")
|
||||||
local cnt=0 space8=" "
|
local cnt=0 space8=" "
|
||||||
|
|
||||||
# Get Hardware Version
|
# Get Hardware Version
|
||||||
@@ -193,6 +194,10 @@ function choose_target_board() {
|
|||||||
LUNCH_NUM=$((LUNCH_NUM + 1))
|
LUNCH_NUM=$((LUNCH_NUM + 1))
|
||||||
echo "${space8}${space8}[${LUNCH_NUM}] RV1106_Luckfox_Pico_Pi_W"
|
echo "${space8}${space8}[${LUNCH_NUM}] RV1106_Luckfox_Pico_Pi_W"
|
||||||
LUNCH_NUM=$((LUNCH_NUM + 1))
|
LUNCH_NUM=$((LUNCH_NUM + 1))
|
||||||
|
echo "${space8}${space8}[${LUNCH_NUM}] RV1106_Luckfox_Pico_86Panel"
|
||||||
|
LUNCH_NUM=$((LUNCH_NUM + 1))
|
||||||
|
echo "${space8}${space8}[${LUNCH_NUM}] RV1106_Luckfox_Pico_86Panel_W"
|
||||||
|
LUNCH_NUM=$((LUNCH_NUM + 1))
|
||||||
echo "${space8}${space8}[${LUNCH_NUM}] custom"
|
echo "${space8}${space8}[${LUNCH_NUM}] custom"
|
||||||
|
|
||||||
read -p "Which would you like? [0~${LUNCH_NUM}][default:0]: " HW_INDEX
|
read -p "Which would you like? [0~${LUNCH_NUM}][default:0]: " HW_INDEX
|
||||||
@@ -277,7 +282,7 @@ function choose_target_board() {
|
|||||||
|
|
||||||
range_sd_card=(0 1)
|
range_sd_card=(0 1)
|
||||||
range_sd_card_spi_nand=(2 3 4 5 6)
|
range_sd_card_spi_nand=(2 3 4 5 6)
|
||||||
range_emmc=(7 8 9 10)
|
range_emmc=(7 8 9 10 11 12)
|
||||||
|
|
||||||
if __IS_IN_ARRAY "$HW_INDEX" "${range_sd_card[@]}"; then
|
if __IS_IN_ARRAY "$HW_INDEX" "${range_sd_card[@]}"; then
|
||||||
echo "${space8}${space8}[0] SD_CARD"
|
echo "${space8}${space8}[0] SD_CARD"
|
||||||
@@ -319,12 +324,11 @@ function choose_target_board() {
|
|||||||
|
|
||||||
if (("$BM_INDEX" == 1)); then
|
if (("$BM_INDEX" == 1)); then
|
||||||
echo "${space8}${space8}[0] Buildroot "
|
echo "${space8}${space8}[0] Buildroot "
|
||||||
read -p "Which would you like? [0~1][default:0]: " SYS_INDEX
|
read -p "Which would you like? [0][default:0]: " SYS_INDEX
|
||||||
MAX_SYS_INDEX=0
|
MAX_SYS_INDEX=0
|
||||||
elif (("$BM_INDEX" == 0)); then
|
elif (("$BM_INDEX" == 0)); then
|
||||||
echo "${space8}${space8}[0] Buildroot "
|
echo "${space8}${space8}[0] Buildroot "
|
||||||
echo "${space8}${space8}[1] Ubuntu "
|
read -p "Which would you like? [0][default:0]: " SYS_INDEX
|
||||||
read -p "Which would you like? [0~1][default:0]: " SYS_INDEX
|
|
||||||
MAX_SYS_INDEX=1
|
MAX_SYS_INDEX=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -353,7 +357,7 @@ function choose_target_board() {
|
|||||||
function build_select_board() {
|
function build_select_board() {
|
||||||
RK_TARGET_BOARD_ARRAY=($(
|
RK_TARGET_BOARD_ARRAY=($(
|
||||||
cd ${TARGET_PRODUCT_DIR}/
|
cd ${TARGET_PRODUCT_DIR}/
|
||||||
ls BoardConfig*.mk BoardConfig_*/BoardConfig*.mk | sort
|
ls BoardConfig_*/BoardConfig*.mk | sort
|
||||||
))
|
))
|
||||||
|
|
||||||
RK_TARGET_BOARD_ARRAY_LEN=${#RK_TARGET_BOARD_ARRAY[@]}
|
RK_TARGET_BOARD_ARRAY_LEN=${#RK_TARGET_BOARD_ARRAY[@]}
|
||||||
@@ -592,7 +596,7 @@ function build_check_power_domain() {
|
|||||||
|
|
||||||
function build_tool() {
|
function build_tool() {
|
||||||
test -d ${SDK_SYSDRV_DIR} && make pctools -C ${SDK_SYSDRV_DIR}
|
test -d ${SDK_SYSDRV_DIR} && make pctools -C ${SDK_SYSDRV_DIR}
|
||||||
if [ $LF_ENABLE_SPI_NAND_FAST_BOOT = "y" ]; then
|
if [ $LF_ENABLE_SPI_NAND_FAST_BOOT == "y" ]; then
|
||||||
cp -fa $PROJECT_TOP_DIR/sfc_scripts/mk-fitimage.sh $RK_PROJECT_PATH_PC_TOOLS
|
cp -fa $PROJECT_TOP_DIR/sfc_scripts/mk-fitimage.sh $RK_PROJECT_PATH_PC_TOOLS
|
||||||
cp -fa $PROJECT_TOP_DIR/sfc_scripts/compress_tool $RK_PROJECT_PATH_PC_TOOLS
|
cp -fa $PROJECT_TOP_DIR/sfc_scripts/compress_tool $RK_PROJECT_PATH_PC_TOOLS
|
||||||
cp -fa $PROJECT_TOP_DIR/sfc_scripts/mk-tftp_sd_update.sh $RK_PROJECT_PATH_PC_TOOLS
|
cp -fa $PROJECT_TOP_DIR/sfc_scripts/mk-tftp_sd_update.sh $RK_PROJECT_PATH_PC_TOOLS
|
||||||
@@ -1506,12 +1510,6 @@ function __PACKAGE_ROOTFS() {
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$RK_BOOT_MEDIUM" == "emmc" ] && [ "$LF_TARGET_ROOTFS" == "ubuntu" ]; then
|
|
||||||
if [ -f $WIFI_CONF ]; then
|
|
||||||
cp $WIFI_CONF $RK_PROJECT_PACKAGE_ROOTFS_DIR/etc
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$LF_TARGET_ROOTFS" == "buildroot" ] || [ "$LF_TARGET_ROOTFS" == "busybox" ]; then
|
if [ "$LF_TARGET_ROOTFS" == "buildroot" ] || [ "$LF_TARGET_ROOTFS" == "busybox" ]; then
|
||||||
build_get_sdk_version
|
build_get_sdk_version
|
||||||
cat >$RK_PROJECT_PACKAGE_ROOTFS_DIR/bin/sdkinfo <<EOF
|
cat >$RK_PROJECT_PACKAGE_ROOTFS_DIR/bin/sdkinfo <<EOF
|
||||||
@@ -2159,9 +2157,6 @@ __GET_BOOTARGS_FROM_BOARD_CFG() {
|
|||||||
|
|
||||||
__LINK_DEFCONFIG_FROM_BOARD_CFG() {
|
__LINK_DEFCONFIG_FROM_BOARD_CFG() {
|
||||||
mkdir -p ${SDK_CONFIG_DIR}
|
mkdir -p ${SDK_CONFIG_DIR}
|
||||||
if [[ "$LF_TARGET_ROOTFS" == "ubuntu" ]]; then
|
|
||||||
sudo chmod a+rw $SDK_CONFIG_DIR
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$RK_KERNEL_DTS" ]; then
|
if [ -n "$RK_KERNEL_DTS" ]; then
|
||||||
rm -f $DTS_CONFIG
|
rm -f $DTS_CONFIG
|
||||||
@@ -2229,7 +2224,7 @@ function build_mkimg() {
|
|||||||
fs_type="\$${fs_type}"
|
fs_type="\$${fs_type}"
|
||||||
fs_type=$(eval "echo ${fs_type}")
|
fs_type=$(eval "echo ${fs_type}")
|
||||||
|
|
||||||
if [ "$LF_TARGET_ROOTFS" == "buildroot" ] || [ "$LF_TARGT_ROOTFS" == "busybox" ]; then
|
if [ "$LF_TARGET_ROOTFS" == "buildroot" ] || [ "$LF_TARGET_ROOTFS" == "busybox" ]; then
|
||||||
__RELEASE_FILESYSTEM_FILES $src
|
__RELEASE_FILESYSTEM_FILES $src
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -2658,9 +2653,6 @@ function build_save() {
|
|||||||
build_info >>$STUB_PATH/build_info.txt
|
build_info >>$STUB_PATH/build_info.txt
|
||||||
echo "save to $STUB_PATH"
|
echo "save to $STUB_PATH"
|
||||||
|
|
||||||
if [[ "$LF_TARGET_ROOTFS" == "ubuntu" ]]; then
|
|
||||||
sudo chmod a+rw $STUB_PARENT_PATH
|
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@@ -2753,29 +2745,6 @@ export RK_PROJECT_BOARD_DIR=$(dirname $(realpath $BOARD_CONFIG))
|
|||||||
export RK_PROJECT_TOOLCHAIN_CROSS=$RK_TOOLCHAIN_CROSS
|
export RK_PROJECT_TOOLCHAIN_CROSS=$RK_TOOLCHAIN_CROSS
|
||||||
export PATH="${SDK_ROOT_DIR}/tools/linux/toolchain/${RK_PROJECT_TOOLCHAIN_CROSS}/bin":$PATH
|
export PATH="${SDK_ROOT_DIR}/tools/linux/toolchain/${RK_PROJECT_TOOLCHAIN_CROSS}/bin":$PATH
|
||||||
|
|
||||||
if [[ "$LF_TARGET_ROOTFS" = "ubuntu" ]]; then
|
|
||||||
if [ "$(id -u)" != "0" ]; then
|
|
||||||
msg_error "Error! Please use sudo ./build.sh to build Ubuntu Image!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
if [[ "$LF_SUBMODULES_BY" = "github" ]]; then
|
|
||||||
cp ${SDK_ROOT_DIR}/.gitmodules.github ${SDK_ROOT_DIR}/.gitmodules
|
|
||||||
else
|
|
||||||
if [[ "$LF_SUBMODULES_BY" = "gitee" ]]; then
|
|
||||||
cp ${SDK_ROOT_DIR}/.gitmodules.gitee ${SDK_ROOT_DIR}/.gitmodules
|
|
||||||
else
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -d "$UBUNTU_DIR" ] && [ -f ${UBUNTU_DIR}/luckfox-ubuntu-22.04.3.tar.gz.md5 ]; then
|
|
||||||
msg_info "${UBUNTU_DIR} is not empty, skipping submodule update!"
|
|
||||||
else
|
|
||||||
msg_info "${UBUNTU_DIR} is empty or does not exist, updateing submodule!"
|
|
||||||
git submodule update --init --recursive
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if echo $@ | grep -wqE "help|-h"; then
|
if echo $@ | grep -wqE "help|-h"; then
|
||||||
if [ -n "$2" -a "$(type -t usage$2)" == function ]; then
|
if [ -n "$2" -a "$(type -t usage$2)" == function ]; then
|
||||||
echo "###Current Configure [ $2 ] Build Command###"
|
echo "###Current Configure [ $2 ] Build Command###"
|
||||||
|
|||||||
@@ -3,18 +3,18 @@
|
|||||||
#################################################
|
#################################################
|
||||||
# Board Config
|
# 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
|
# Target CHIP
|
||||||
export RK_CHIP=rv1106
|
export RK_CHIP=rv1106
|
||||||
|
|
||||||
# app config
|
# app config
|
||||||
# export RK_APP_TYPE=RKIPC_RV1106
|
export RK_APP_TYPE=RK_WIFI_APP
|
||||||
|
|
||||||
# Config CMA size in environment
|
# Config CMA size in environment
|
||||||
export RK_BOOTARGS_CMA_SIZE="36M"
|
export RK_BOOTARGS_CMA_SIZE="1M"
|
||||||
|
|
||||||
# Kernel dts
|
# Kernel dts
|
||||||
export RK_KERNEL_DTS=rv1106g-luckfox-pico-pi.dts
|
export RK_KERNEL_DTS=rv1106g-luckfox-pico-86panel.dts
|
||||||
|
|
||||||
#################################################
|
#################################################
|
||||||
# BOOT_MEDIUM
|
# BOOT_MEDIUM
|
||||||
@@ -59,10 +59,7 @@ export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ext4,userdata@/userdata@ext4,oem@/
|
|||||||
#################################################
|
#################################################
|
||||||
|
|
||||||
# Target rootfs
|
# Target rootfs
|
||||||
export LF_TARGET_ROOTFS=ubuntu
|
export LF_TARGET_ROOTFS=buildroot
|
||||||
|
|
||||||
# SUBMODULES : github/gitee
|
|
||||||
export LF_SUBMODULES_BY=github
|
|
||||||
|
|
||||||
# Buildroot defconfig
|
# Buildroot defconfig
|
||||||
export RK_BUILDROOT_DEFCONFIG=luckfox_pico_w_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
|
export RK_KERNEL_DEFCONFIG=luckfox_rv1106_linux_defconfig
|
||||||
|
|
||||||
# Kernel defconfig fragment
|
# 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
|
# Config sensor IQ files
|
||||||
# RK_CAMERA_SENSOR_IQFILES format:
|
# RK_CAMERA_SENSOR_IQFILES format:
|
||||||
# "iqfile1 iqfile2 iqfile3 ..."
|
# "iqfile1 iqfile2 iqfile3 ..."
|
||||||
# ./build.sh media and copy <SDK root dir>/output/out/media_out/isp_iqfiles/$RK_CAMERA_SENSOR_IQFILES
|
# ./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"
|
#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
|
# 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"
|
#export RK_CAMERA_SENSOR_CAC_BIN="CAC_sc4336_OT01_40IRC_F16 CAC_sc530ai_CMK-OT2115-PC1_30IRC-F16"
|
||||||
|
|
||||||
# build ipc web backend
|
# build ipc web backend
|
||||||
# export RK_APP_IPCWEB_BACKEND=y
|
#export RK_APP_IPCWEB_BACKEND=y
|
||||||
|
|
||||||
# enable install app to oem partition
|
# enable install app to oem partition
|
||||||
export RK_BUILD_APP_TO_OEM_PARTITION=y
|
export RK_BUILD_APP_TO_OEM_PARTITION=y
|
||||||
@@ -111,6 +108,11 @@ export RK_ENABLE_ROCKCHIP_TEST=y
|
|||||||
|
|
||||||
# enable rockchip wifi
|
# enable rockchip wifi
|
||||||
#export RK_ENABLE_WIFI=y
|
#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
|
||||||
@@ -119,11 +121,8 @@ export RK_ENABLE_ROCKCHIP_TEST=y
|
|||||||
# specify pre.sh for delete/overlay files
|
# specify pre.sh for delete/overlay files
|
||||||
export RK_PRE_BUILD_OEM_SCRIPT=luckfox-buildroot-oem-pre.sh
|
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
|
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
|
# 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"
|
||||||
overlay-luckfox-ppp overlay-luckfox-ubuntu-sim7600g"
|
|
||||||
@@ -3,18 +3,18 @@
|
|||||||
#################################################
|
#################################################
|
||||||
# Board Config
|
# 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
|
# Target CHIP
|
||||||
export RK_CHIP=rv1106
|
export RK_CHIP=rv1106
|
||||||
|
|
||||||
# app config
|
# app config
|
||||||
# export RK_APP_TYPE=RKIPC_RV1106
|
export RK_APP_TYPE=RK_WIFI_APP
|
||||||
|
|
||||||
# Config CMA size in environment
|
# Config CMA size in environment
|
||||||
export RK_BOOTARGS_CMA_SIZE="36M"
|
export RK_BOOTARGS_CMA_SIZE="1M"
|
||||||
|
|
||||||
# Kernel dts
|
# Kernel dts
|
||||||
export RK_KERNEL_DTS=rv1106g-luckfox-pico-ultra-w.dts
|
export RK_KERNEL_DTS=rv1106g-luckfox-pico-86panel-w.dts
|
||||||
|
|
||||||
#################################################
|
#################################################
|
||||||
# BOOT_MEDIUM
|
# BOOT_MEDIUM
|
||||||
@@ -59,10 +59,7 @@ export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ext4,userdata@/userdata@ext4,oem@/
|
|||||||
#################################################
|
#################################################
|
||||||
|
|
||||||
# Target rootfs
|
# Target rootfs
|
||||||
export LF_TARGET_ROOTFS=ubuntu
|
export LF_TARGET_ROOTFS=buildroot
|
||||||
|
|
||||||
# SUBMODULES : github/gitee
|
|
||||||
export LF_SUBMODULES_BY=github
|
|
||||||
|
|
||||||
# Buildroot defconfig
|
# Buildroot defconfig
|
||||||
export RK_BUILDROOT_DEFCONFIG=luckfox_pico_w_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
|
export RK_KERNEL_DEFCONFIG=luckfox_rv1106_linux_defconfig
|
||||||
|
|
||||||
# Kernel defconfig fragment
|
# 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
|
# Config sensor IQ files
|
||||||
# RK_CAMERA_SENSOR_IQFILES format:
|
# RK_CAMERA_SENSOR_IQFILES format:
|
||||||
# "iqfile1 iqfile2 iqfile3 ..."
|
# "iqfile1 iqfile2 iqfile3 ..."
|
||||||
# ./build.sh media and copy <SDK root dir>/output/out/media_out/isp_iqfiles/$RK_CAMERA_SENSOR_IQFILES
|
# ./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"
|
#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
|
# 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"
|
#export RK_CAMERA_SENSOR_CAC_BIN="CAC_sc4336_OT01_40IRC_F16 CAC_sc530ai_CMK-OT2115-PC1_30IRC-F16"
|
||||||
|
|
||||||
# build ipc web backend
|
# build ipc web backend
|
||||||
# export RK_APP_IPCWEB_BACKEND=y
|
#export RK_APP_IPCWEB_BACKEND=y
|
||||||
|
|
||||||
# enable install app to oem partition
|
# enable install app to oem partition
|
||||||
export RK_BUILD_APP_TO_OEM_PARTITION=y
|
export RK_BUILD_APP_TO_OEM_PARTITION=y
|
||||||
@@ -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
|
export RK_PRE_BUILD_USERDATA_SCRIPT=luckfox-userdata-pre.sh
|
||||||
|
|
||||||
# declare overlay directory
|
# 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"
|
||||||
@@ -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"
|
|
||||||
@@ -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"
|
|
||||||
@@ -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"
|
|
||||||
@@ -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"
|
|
||||||
@@ -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"
|
|
||||||
@@ -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"
|
|
||||||
@@ -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"
|
|
||||||
@@ -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"
|
|
||||||
@@ -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"
|
|
||||||
@@ -58,7 +58,7 @@ export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ubifs,oem@/oem@ubifs,userdata@/use
|
|||||||
# TARGET_ROOTFS
|
# TARGET_ROOTFS
|
||||||
#################################################
|
#################################################
|
||||||
|
|
||||||
# Target rootfs : ubuntu(only emmc)/buildroot/busybox
|
# Target rootfs : buildroot/busybox
|
||||||
export LF_TARGET_ROOTFS=buildroot
|
export LF_TARGET_ROOTFS=buildroot
|
||||||
|
|
||||||
# Buildroot defconfig
|
# Buildroot defconfig
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ubifs,oem@/oem@ubifs,userdata@/use
|
|||||||
# TARGET_ROOTFS
|
# TARGET_ROOTFS
|
||||||
#################################################
|
#################################################
|
||||||
|
|
||||||
# Target rootfs : ubuntu(only emmc)/buildroot/busybox
|
# Target rootfs : buildroot/busybox
|
||||||
export LF_TARGET_ROOTFS=buildroot
|
export LF_TARGET_ROOTFS=buildroot
|
||||||
|
|
||||||
# Buildroot defconfig
|
# Buildroot defconfig
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ubifs,oem@/oem@ubifs,userdata@/use
|
|||||||
# TARGET_ROOTFS
|
# TARGET_ROOTFS
|
||||||
#################################################
|
#################################################
|
||||||
|
|
||||||
# Target rootfs : ubuntu(only emmc)/buildroot/busybox
|
# Target rootfs : buildroot/busybox
|
||||||
export LF_TARGET_ROOTFS=buildroot
|
export LF_TARGET_ROOTFS=buildroot
|
||||||
|
|
||||||
# Buildroot defconfig
|
# Buildroot defconfig
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ubifs,oem@/oem@ubifs,userdata@/use
|
|||||||
# TARGET_ROOTFS
|
# TARGET_ROOTFS
|
||||||
#################################################
|
#################################################
|
||||||
|
|
||||||
# Target rootfs : ubuntu(only emmc)/buildroot/busybox
|
# Target rootfs : buildroot/busybox
|
||||||
export LF_TARGET_ROOTFS=buildroot
|
export LF_TARGET_ROOTFS=buildroot
|
||||||
|
|
||||||
# Buildroot defconfig
|
# Buildroot defconfig
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ubifs,oem@/oem@ubifs,userdata@/use
|
|||||||
# TARGET_ROOTFS
|
# TARGET_ROOTFS
|
||||||
#################################################
|
#################################################
|
||||||
|
|
||||||
# Target rootfs : ubuntu(only emmc)/buildroot/busybox
|
# Target rootfs : buildroot/busybox
|
||||||
export LF_TARGET_ROOTFS=buildroot
|
export LF_TARGET_ROOTFS=buildroot
|
||||||
|
|
||||||
# Buildroot defconfig
|
# Buildroot defconfig
|
||||||
|
|||||||
0
project/cfg/BoardConfig_IPC/luckfox-buildroot-nocsi-oem-pre.sh
Normal file → Executable file
0
project/cfg/BoardConfig_IPC/luckfox-buildroot-nocsi-oem-pre.sh
Normal file → Executable file
0
project/cfg/BoardConfig_IPC/luckfox-buildroot-oem-pre.sh
Normal file → Executable file
0
project/cfg/BoardConfig_IPC/luckfox-buildroot-oem-pre.sh
Normal file → Executable file
0
project/cfg/BoardConfig_IPC/luckfox-ubuntu-oem-pre.sh → project/cfg/BoardConfig_IPC/luckfox-glibc-oem-pre.sh
Normal file → Executable file
0
project/cfg/BoardConfig_IPC/luckfox-ubuntu-oem-pre.sh → project/cfg/BoardConfig_IPC/luckfox-glibc-oem-pre.sh
Normal file → Executable file
@@ -39,7 +39,9 @@ test ! -f crc16.ko || insmod crc16.ko
|
|||||||
test ! -f mbcache.ko || insmod mbcache.ko
|
test ! -f mbcache.ko || insmod mbcache.ko
|
||||||
test ! -f ext4.ko || insmod ext4.ko
|
test ! -f ext4.ko || insmod ext4.ko
|
||||||
test ! -f dw_mmc-rockchip.ko || insmod dw_mmc-rockchip.ko
|
test ! -f dw_mmc-rockchip.ko || insmod dw_mmc-rockchip.ko
|
||||||
|
sleep 0.5
|
||||||
sh /etc/init.d/S20linkmount start &
|
sh /etc/init.d/S20linkmount start &
|
||||||
|
sleep 0.5
|
||||||
|
|
||||||
echo "start app" > /dev/kmsg
|
echo "start app" > /dev/kmsg
|
||||||
test -n "\$persist_camera_engine_log" && \
|
test -n "\$persist_camera_engine_log" && \
|
||||||
|
|||||||
0
project/cfg/BoardConfig_IPC/luckfox-userdata-pre.sh
Normal file → Executable file
0
project/cfg/BoardConfig_IPC/luckfox-userdata-pre.sh
Normal file → Executable 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
|
||||||
@@ -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
|
||||||
@@ -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
|
||||||
@@ -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
|
||||||
Binary file not shown.
@@ -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
|
||||||
@@ -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
|
||||||
@@ -343,15 +343,15 @@ function luckfox_load_cfg() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# CSI ( Priority is lower than RGB )
|
# CSI ( Priority is lower than RGB )
|
||||||
value=$(luckfox_get_pin_cfg "CSI_ENABLE")
|
# value=$(luckfox_get_pin_cfg "CSI_ENABLE")
|
||||||
if [ -z "$value" ]; then
|
# if [ -z "$value" ]; then
|
||||||
if [ "$LUCKFOX_CHIP_MODEL" == "Luckfox Pico Ultra" ] || [ "$LUCKFOX_CHIP_MODEL" == "Luckfox Pico Ultra W" ]; 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_SCL" 1
|
||||||
luckfox_set_pin_mark "I2C4_M1_SDA" 1
|
# luckfox_set_pin_mark "I2C4_M1_SDA" 1
|
||||||
luckfox_set_pin_mark "I2C4_M0_SCL" 1
|
# luckfox_set_pin_mark "I2C4_M0_SCL" 1
|
||||||
luckfox_set_pin_mark "I2C4_M0_SDA" 1
|
# luckfox_set_pin_mark "I2C4_M0_SDA" 1
|
||||||
fi
|
# fi
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
# FBTFT
|
# FBTFT
|
||||||
value=$(luckfox_get_pin_cfg "FBTFT_ENABLE")
|
value=$(luckfox_get_pin_cfg "FBTFT_ENABLE")
|
||||||
@@ -1386,25 +1386,6 @@ function hex_add() {
|
|||||||
echo "$sum_hex"
|
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
|
# @fu luckfox_gpio_app
|
||||||
#
|
#
|
||||||
@@ -1686,13 +1667,10 @@ function luckfox_check_i2c() {
|
|||||||
csi_status=$(luckfox_get_pin_cfg "CSI_ENABLE")
|
csi_status=$(luckfox_get_pin_cfg "CSI_ENABLE")
|
||||||
# process default status
|
# process default status
|
||||||
if [ -z "$csi_status" ]; then
|
if [ -z "$csi_status" ]; then
|
||||||
# CSI I2C is not enabled on Ultra models by default
|
echo "set csi_status = 1"
|
||||||
if [ "$LUCKFOX_CHIP_MODEL" == "Luckfox Pico Ultra" ] || [ "$LUCKFOX_CHIP_MODEL" == "Luckfox Pico Ultra W" ]; then
|
csi_status=1
|
||||||
"$csi_status" = 0
|
|
||||||
else
|
|
||||||
"$csi_status" = 1
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
echo "csi_status = $csi_status"
|
||||||
|
|
||||||
if [ "$csi_status" == 1 ]; then
|
if [ "$csi_status" == 1 ]; then
|
||||||
luckfox_result_handle "$LF_ERR" "CSI is enable,Can't config I2C4"
|
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.
|
# @brief 1. Display pin diagram in the GUI.
|
||||||
#
|
|
||||||
# @param status - Status of messages
|
|
||||||
# log - Prepare the message to be printed
|
|
||||||
#
|
#
|
||||||
# @return none
|
# @return none
|
||||||
################################################################
|
################################################################
|
||||||
@@ -2889,13 +2864,15 @@ function luckfox_show_menu() {
|
|||||||
--menu "Choose an option" 80 50 6 \
|
--menu "Choose an option" 80 50 6 \
|
||||||
1 "Advanced Options" \
|
1 "Advanced Options" \
|
||||||
2 "4G Module" \
|
2 "4G Module" \
|
||||||
3 "About Luckfox" \
|
3 "Backup" \
|
||||||
|
4 "About Luckfox" \
|
||||||
2>&1 >/dev/tty)
|
2>&1 >/dev/tty)
|
||||||
|
|
||||||
case $option in
|
case $option in
|
||||||
1) luckfox_advanced_options ;;
|
1) luckfox_advanced_options ;;
|
||||||
2) luckfox_4G ;;
|
2) luckfox_4G ;;
|
||||||
3) luckfox_about ;;
|
3) luckfox_backup ;;
|
||||||
|
4) luckfox_about ;;
|
||||||
*) luckfox_exit ;;
|
*) luckfox_exit ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
@@ -2905,12 +2882,14 @@ function luckfox_show_menu() {
|
|||||||
option=$(dialog --title "$LUCKFOX_CHIP_MODEL Config" \
|
option=$(dialog --title "$LUCKFOX_CHIP_MODEL Config" \
|
||||||
--menu "Choose an option" 80 50 6 \
|
--menu "Choose an option" 80 50 6 \
|
||||||
1 "Advanced Options" \
|
1 "Advanced Options" \
|
||||||
2 "About Luckfox" \
|
2 "Backup" \
|
||||||
|
3 "About Luckfox" \
|
||||||
2>&1 >/dev/tty)
|
2>&1 >/dev/tty)
|
||||||
|
|
||||||
case $option in
|
case $option in
|
||||||
1) luckfox_advanced_options ;;
|
1) luckfox_advanced_options ;;
|
||||||
2) luckfox_about ;;
|
2) luckfox_backup ;;
|
||||||
|
3) luckfox_about ;;
|
||||||
*) luckfox_exit ;;
|
*) luckfox_exit ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
@@ -3046,6 +3025,31 @@ function luckfox_advanced_options() {
|
|||||||
fi
|
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() {
|
function luckfox_about() {
|
||||||
luckfox_pico_show_pin_diagram
|
luckfox_pico_show_pin_diagram
|
||||||
}
|
}
|
||||||
@@ -3496,15 +3500,136 @@ function luckfox_4G() {
|
|||||||
3) apn="3gwap" ;;
|
3) apn="3gwap" ;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
luckfox_4g_app "$module_4g_enable" "$mode" "$apn"
|
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 ------------------------------
|
# --------------------------- Run ------------------------------
|
||||||
################################################################
|
################################################################
|
||||||
|
|
||||||
|
echo 0 >/proc/sys/kernel/printk
|
||||||
if [ "$1" == "load" ]; then
|
if [ "$1" == "load" ]; then
|
||||||
LF_GUI_ENABLE=0
|
LF_GUI_ENABLE=0
|
||||||
if [ -f $LUCKFOX_PIN_DIAGRAM_FILE ]; then
|
if [ -f $LUCKFOX_PIN_DIAGRAM_FILE ]; then
|
||||||
@@ -3535,7 +3660,7 @@ elif [ "$1" == "rgb_switch" ]; then
|
|||||||
"18" "16" \
|
"18" "16" \
|
||||||
"2" "2" \
|
"2" "2" \
|
||||||
"0" "0" \
|
"0" "0" \
|
||||||
"0" "1"
|
"0" "0"
|
||||||
elif [ "$(luckfox_get_pin_cfg "RGB_HACTIVE")" == "720" ]; then
|
elif [ "$(luckfox_get_pin_cfg "RGB_HACTIVE")" == "720" ]; then
|
||||||
# 720 -> 480
|
# 720 -> 480
|
||||||
echo "****************************************************"
|
echo "****************************************************"
|
||||||
@@ -3570,3 +3695,5 @@ elif [ -z "$1" ]; then
|
|||||||
luckfox_config_init
|
luckfox_config_init
|
||||||
luckfox_show_menu
|
luckfox_show_menu
|
||||||
fi
|
fi
|
||||||
|
echo "7 4 1 7" >/proc/sys/kernel/printk
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -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
|
||||||
@@ -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
|
||||||
BIN
project/cfg/BoardConfig_IPC/overlay/overlay-luckfox-glibc-config/usr/bin/io
Executable file
BIN
project/cfg/BoardConfig_IPC/overlay/overlay-luckfox-glibc-config/usr/bin/io
Executable file
Binary file not shown.
BIN
project/cfg/BoardConfig_IPC/overlay/overlay-luckfox-glibc-config/usr/bin/rsync
Executable file
BIN
project/cfg/BoardConfig_IPC/overlay/overlay-luckfox-glibc-config/usr/bin/rsync
Executable file
Binary file not shown.
@@ -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 "${@}"
|
||||||
@@ -1,9 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/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
|
systemctl stop wpa_supplicant
|
||||||
|
|
||||||
if [ "$1" = "stop" ] ;then
|
if [ "$1" = "stop" ]; then
|
||||||
pkill -f "udhcpc -i wlan0"
|
pkill -f "udhcpc -i wlan0"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -120,7 +120,6 @@ endif
|
|||||||
ifneq ($(LF_TARGET_ROOTFS),)
|
ifneq ($(LF_TARGET_ROOTFS),)
|
||||||
TARGET_ROOTFS := $(LF_TARGET_ROOTFS)
|
TARGET_ROOTFS := $(LF_TARGET_ROOTFS)
|
||||||
else
|
else
|
||||||
# TARGET_ROOTFS := ubuntu
|
|
||||||
# TARGET_ROOTFS := buildroot
|
# TARGET_ROOTFS := buildroot
|
||||||
TARGET_ROOTFS := busybox
|
TARGET_ROOTFS := busybox
|
||||||
# TARGET_ROOTFS := custom
|
# TARGET_ROOTFS := custom
|
||||||
@@ -128,8 +127,6 @@ endif
|
|||||||
|
|
||||||
ifneq ($(findstring $(TARGET_ROOTFS),custom),)
|
ifneq ($(findstring $(TARGET_ROOTFS),custom),)
|
||||||
ROOTFS_BUILD_ENV := custom drv
|
ROOTFS_BUILD_ENV := custom drv
|
||||||
else ifneq ($(findstring $(TARGET_ROOTFS),ubuntu),)
|
|
||||||
ROOTFS_BUILD_ENV := ubuntu drv
|
|
||||||
else ifneq ($(findstring $(TARGET_ROOTFS),buildroot),)
|
else ifneq ($(findstring $(TARGET_ROOTFS),buildroot),)
|
||||||
ROOTFS_BUILD_ENV := rootfs_prepare pctools buildroot boardtools drv
|
ROOTFS_BUILD_ENV := rootfs_prepare pctools buildroot boardtools drv
|
||||||
else #busybox
|
else #busybox
|
||||||
@@ -287,7 +284,6 @@ BUILDROOT_CFG ?= config_normal
|
|||||||
BUILDROOT_VER ?= buildroot-2023.02.6
|
BUILDROOT_VER ?= buildroot-2023.02.6
|
||||||
BUILDROOT_DIR := $(SYSDRV_DIR)/source/buildroot
|
BUILDROOT_DIR := $(SYSDRV_DIR)/source/buildroot
|
||||||
|
|
||||||
UBUNTU_VER ?= luckfox-ubuntu-22.04.3
|
|
||||||
CUSTOM_VER ?= custom
|
CUSTOM_VER ?= custom
|
||||||
|
|
||||||
TOOLCHAIN_RUNTIME_LIB_C:=lib.tar.bz2
|
TOOLCHAIN_RUNTIME_LIB_C:=lib.tar.bz2
|
||||||
@@ -316,6 +312,7 @@ SYSDRV_RAMDISK_DIR ?= $(SYSDRV_DIR_OUT_BOARD)
|
|||||||
|
|
||||||
HCITOOL_TOOL_PATH :=$(SYSDRV_DIR)/tools/board/buildroot/hcitool_patch
|
HCITOOL_TOOL_PATH :=$(SYSDRV_DIR)/tools/board/buildroot/hcitool_patch
|
||||||
MPV_PATCH_PATH :=$(SYSDRV_DIR)/tools/board/buildroot/mpv_patch
|
MPV_PATCH_PATH :=$(SYSDRV_DIR)/tools/board/buildroot/mpv_patch
|
||||||
|
BUSYBOX_PATCH_PATH :=$(SYSDRV_DIR)/tools/board/buildroot/busybox_patch
|
||||||
|
|
||||||
export SYSDRV_DIR_OUT_PC
|
export SYSDRV_DIR_OUT_PC
|
||||||
export SYSDRV_DIR_OUT_BOARD
|
export SYSDRV_DIR_OUT_BOARD
|
||||||
@@ -608,6 +605,8 @@ buildroot_create:
|
|||||||
cp ${HCITOOL_TOOL_PATH}/0002-Fix-build-errors.patch $(BUILDROOT_DIR)/$(BUILDROOT_VER)/package/bluez5_utils/
|
cp ${HCITOOL_TOOL_PATH}/0002-Fix-build-errors.patch $(BUILDROOT_DIR)/$(BUILDROOT_VER)/package/bluez5_utils/
|
||||||
cp ${HCITOOL_TOOL_PATH}/0003-fix-compat-wordexp.patch $(BUILDROOT_DIR)/$(BUILDROOT_VER)/package/bluez5_utils/
|
cp ${HCITOOL_TOOL_PATH}/0003-fix-compat-wordexp.patch $(BUILDROOT_DIR)/$(BUILDROOT_VER)/package/bluez5_utils/
|
||||||
cp ${MPV_PATCH_PATH}/0002-change-j1.patch $(BUILDROOT_DIR)/$(BUILDROOT_VER)/package/mpv/
|
cp ${MPV_PATCH_PATH}/0002-change-j1.patch $(BUILDROOT_DIR)/$(BUILDROOT_VER)/package/mpv/
|
||||||
|
cp ${BUSYBOX_PATCH_PATH}/0009-busybox-support-chinese-display-in-terminal.patch $(BUILDROOT_DIR)/$(BUILDROOT_VER)/package/busybox/
|
||||||
|
cp ${BUSYBOX_PATCH_PATH}/0010-halt-Support-rebooting-with-arg.patch $(BUILDROOT_DIR)/$(BUILDROOT_VER)/package/busybox/
|
||||||
|
|
||||||
buildroot: prepare
|
buildroot: prepare
|
||||||
@echo -e "$(C_GREEN) ==sysdrv== build buildroot $(C_NORMAL)"
|
@echo -e "$(C_GREEN) ==sysdrv== build buildroot $(C_NORMAL)"
|
||||||
@@ -621,6 +620,8 @@ buildroot: prepare
|
|||||||
cp ${HCITOOL_TOOL_PATH}/0002-Fix-build-errors.patch $(BUILDROOT_DIR)/$(BUILDROOT_VER)/package/bluez5_utils/ ;\
|
cp ${HCITOOL_TOOL_PATH}/0002-Fix-build-errors.patch $(BUILDROOT_DIR)/$(BUILDROOT_VER)/package/bluez5_utils/ ;\
|
||||||
cp ${HCITOOL_TOOL_PATH}/0003-fix-compat-wordexp.patch $(BUILDROOT_DIR)/$(BUILDROOT_VER)/package/bluez5_utils/ ;\
|
cp ${HCITOOL_TOOL_PATH}/0003-fix-compat-wordexp.patch $(BUILDROOT_DIR)/$(BUILDROOT_VER)/package/bluez5_utils/ ;\
|
||||||
cp ${MPV_PATCH_PATH}/0002-change-j1.patch $(BUILDROOT_DIR)/$(BUILDROOT_VER)/package/mpv/ ;\
|
cp ${MPV_PATCH_PATH}/0002-change-j1.patch $(BUILDROOT_DIR)/$(BUILDROOT_VER)/package/mpv/ ;\
|
||||||
|
cp ${BUSYBOX_PATCH_PATH}/0009-busybox-support-chinese-display-in-terminal.patch $(BUILDROOT_DIR)/$(BUILDROOT_VER)/package/busybox/ ;\
|
||||||
|
cp ${BUSYBOX_PATCH_PATH}/0010-halt-Support-rebooting-with-arg.patch $(BUILDROOT_DIR)/$(BUILDROOT_VER)/package/busybox/ ;\
|
||||||
);
|
);
|
||||||
|
|
||||||
$(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) $(BUILDROOT_DEFCONFIG) -C $(BUILDROOT_DIR)/$(BUILDROOT_VER)
|
$(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) $(BUILDROOT_DEFCONFIG) -C $(BUILDROOT_DIR)/$(BUILDROOT_VER)
|
||||||
@@ -646,28 +647,6 @@ endif
|
|||||||
buildroot_clean:
|
buildroot_clean:
|
||||||
$(AT)rm -rf $(BUILDROOT_DIR)/$(BUILDROOT_VER)
|
$(AT)rm -rf $(BUILDROOT_DIR)/$(BUILDROOT_VER)
|
||||||
|
|
||||||
##########################################################################################
|
|
||||||
# build ubuntu
|
|
||||||
# author :luckfox team
|
|
||||||
# date:2023-11-28
|
|
||||||
##########################################################################################
|
|
||||||
ubuntu: prepare
|
|
||||||
@echo -e "$(C_GREEN) ==sysdrv== build ubuntu $(C_NORMAL)"
|
|
||||||
@echo -e "$(C_GREEN) ==$(LF_TARGET_ROOTFS)== $(C_NORMAL)"
|
|
||||||
test -f $(SYSDRV_DIR)/tools/board/ubuntu/$(UBUNTU_VER).tar.gz || (\
|
|
||||||
pushd $(SYSDRV_DIR)/tools/board/ubuntu/ ;\
|
|
||||||
./split_and_check_md5.sh merge ./$(UBUNTU_VER).tar.gz ;\
|
|
||||||
popd ;\
|
|
||||||
);
|
|
||||||
test -f $(SYSDRV_DIR_OUT_ROOTFS)/userdate/.ubuntu || (\
|
|
||||||
mkdir -p $(SYSDRV_DIR_OUT_ROOTFS) ;\
|
|
||||||
rm $(SYSDRV_DIR_OUT_ROOTFS)/* -rf ;\
|
|
||||||
tar xzf $(SYSDRV_DIR)/tools/board/ubuntu/$(UBUNTU_VER).tar.gz -C $(SYSDRV_DIR_OUT_ROOTFS) ;\
|
|
||||||
);
|
|
||||||
ubuntu_clean:
|
|
||||||
$(AT)rm -rf $(SYSDRV_DIR_OUT_ROOTFS)
|
|
||||||
|
|
||||||
|
|
||||||
##########################################################################################
|
##########################################################################################
|
||||||
# build custom
|
# build custom
|
||||||
# author :luckfox team
|
# author :luckfox team
|
||||||
|
|||||||
@@ -83,5 +83,5 @@ clean:
|
|||||||
cd aic8800_bsp/;make clean;cd ..
|
cd aic8800_bsp/;make clean;cd ..
|
||||||
cd aic8800_fdrv/;make clean;cd ..
|
cd aic8800_fdrv/;make clean;cd ..
|
||||||
cd aic8800_btlpm/;make clean;cd ..
|
cd aic8800_btlpm/;make clean;cd ..
|
||||||
rm -rf modules.order Module.symvers .tmp_versions/
|
rm -rf modules.order Module.symvers .modules.order.cmd .Module.symvers.cmd .tmp_versions/
|
||||||
|
|
||||||
|
|||||||
@@ -28,9 +28,11 @@ CONFIG_FORCE_DPD_CALIB = y
|
|||||||
CONFIG_LOFT_CALIB = n
|
CONFIG_LOFT_CALIB = n
|
||||||
CONFIG_EXT_FEM_8800DCDW = n
|
CONFIG_EXT_FEM_8800DCDW = n
|
||||||
CONFIG_RESV_MEM_SUPPORT ?= y
|
CONFIG_RESV_MEM_SUPPORT ?= y
|
||||||
CONFIG_AMSDU_RX = n
|
CONFIG_AMSDU_RX = y
|
||||||
CONFIG_IRQ_FALL ?= n
|
CONFIG_IRQ_FALL ?= n
|
||||||
CONFIG_SDIO_BT = n
|
CONFIG_SDIO_BT = n
|
||||||
|
CONFIG_RADAR_OR_IR_DETECT =n
|
||||||
|
CONFIG_FOR_IPCAM = n
|
||||||
|
|
||||||
ifeq ($(CONFIG_EXT_FEM_8800DCDW), y)
|
ifeq ($(CONFIG_EXT_FEM_8800DCDW), y)
|
||||||
CONFIG_DPD = n
|
CONFIG_DPD = n
|
||||||
@@ -57,6 +59,9 @@ ccflags-$(CONFIG_RESV_MEM_SUPPORT) += -DCONFIG_RESV_MEM_SUPPORT
|
|||||||
ccflags-$(CONFIG_AMSDU_RX) += -DCONFIG_AMSDU_RX
|
ccflags-$(CONFIG_AMSDU_RX) += -DCONFIG_AMSDU_RX
|
||||||
ccflags-$(CONFIG_IRQ_FALL) += -DCONFIG_IRQ_FALL
|
ccflags-$(CONFIG_IRQ_FALL) += -DCONFIG_IRQ_FALL
|
||||||
ccflags-$(CONFIG_SDIO_BT) += -DCONFIG_SDIO_BT
|
ccflags-$(CONFIG_SDIO_BT) += -DCONFIG_SDIO_BT
|
||||||
|
ccflags-$(CONFIG_RADAR_OR_IR_DETECT) += -DCONFIG_RADAR_OR_IR_DETECT
|
||||||
|
ccflags-$(CONFIG_FOR_IPCAM) += -DCONFIG_FOR_IPCAM
|
||||||
|
|
||||||
|
|
||||||
obj-m := $(MODULE_NAME).o
|
obj-m := $(MODULE_NAME).o
|
||||||
$(MODULE_NAME)-y := \
|
$(MODULE_NAME)-y := \
|
||||||
@@ -126,6 +131,8 @@ MODDESTDIR ?= /lib/modules/$(KVER)/kernel/drivers/net/wireless/
|
|||||||
ARCH ?= x86_64
|
ARCH ?= x86_64
|
||||||
CROSS_COMPILE ?=
|
CROSS_COMPILE ?=
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ccflags-y += -Wno-unused-function
|
||||||
###########################################
|
###########################################
|
||||||
|
|
||||||
all: modules
|
all: modules
|
||||||
|
|||||||
@@ -20,75 +20,89 @@ typedef struct {
|
|||||||
uint32_t block_size[AIC_PATCH_BLOCK_MAX]; // word count
|
uint32_t block_size[AIC_PATCH_BLOCK_MAX]; // word count
|
||||||
} aic_patch_t;
|
} aic_patch_t;
|
||||||
|
|
||||||
#define AIC_PATCH_OFST(mem) ((size_t) &((aic_patch_t *)0)->mem)
|
#define AIC_PATCH_OFST(mem) ((size_t) & ((aic_patch_t *)0)->mem)
|
||||||
#define AIC_PATCH_ADDR(mem) ((u32)(aic_patch_str_base + AIC_PATCH_OFST(mem)))
|
#define AIC_PATCH_ADDR(mem) ((u32)(aic_patch_str_base + AIC_PATCH_OFST(mem)))
|
||||||
|
|
||||||
u32 aicbsp_syscfg_tbl_8800d80[][2] = {
|
u32 aicbsp_syscfg_tbl_8800d80[][2] = {};
|
||||||
};
|
|
||||||
|
|
||||||
int aicbsp_system_config_8800d80(struct aic_sdio_dev *sdiodev)
|
int aicbsp_system_config_8800d80(struct aic_sdio_dev *sdiodev)
|
||||||
{
|
{
|
||||||
int syscfg_num = sizeof(aicbsp_syscfg_tbl_8800d80) / sizeof(u32) / 2;
|
int syscfg_num = sizeof(aicbsp_syscfg_tbl_8800d80) / sizeof(u32) / 2;
|
||||||
int ret, cnt;
|
int ret, cnt;
|
||||||
for (cnt = 0; cnt < syscfg_num; cnt++) {
|
for (cnt = 0; cnt < syscfg_num; cnt++) {
|
||||||
ret = rwnx_send_dbg_mem_write_req(sdiodev, aicbsp_syscfg_tbl_8800d80[cnt][0], aicbsp_syscfg_tbl_8800d80[cnt][1]);
|
ret = rwnx_send_dbg_mem_write_req(
|
||||||
|
sdiodev, aicbsp_syscfg_tbl_8800d80[cnt][0],
|
||||||
|
aicbsp_syscfg_tbl_8800d80[cnt][1]);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
printk("%x write fail: %d\n", aicbsp_syscfg_tbl_8800d80[cnt][0], ret);
|
printk("%x write fail: %d\n",
|
||||||
|
aicbsp_syscfg_tbl_8800d80[cnt][0], ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
u32 adaptivity_patch_tbl_8800d80[][2] = {
|
u32 adaptivity_patch_tbl_8800d80[][2] = {
|
||||||
{0x000C, 0x0000320A}, //linkloss_thd
|
{ 0x000C, 0x0000320A }, //linkloss_thd
|
||||||
{0x009C, 0x00000000}, //ac_param_conf
|
{ 0x009C, 0x00000000 }, //ac_param_conf
|
||||||
{0x0168, 0x00010000}, //tx_adaptivity_en
|
{ 0x0168, 0x00010000 }, //tx_adaptivity_en
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define USER_PWROFST_COVER_CALIB_FLAG 0x01U
|
||||||
#define USER_CHAN_MAX_TXPWR_EN_FLAG (0x01U << 1)
|
#define USER_CHAN_MAX_TXPWR_EN_FLAG (0x01U << 1)
|
||||||
#define USER_TX_USE_ANA_F_FLAG (0x01U << 2)
|
#define USER_TX_USE_ANA_F_FLAG (0x01U << 2)
|
||||||
|
#define USER_APM_PRBRSP_OFFLOAD_DISABLE_FLAG (0x01U << 3)
|
||||||
|
|
||||||
#define CFG_USER_CHAN_MAX_TXPWR_EN 0
|
#define CFG_PWROFST_COVER_CALIB 1
|
||||||
|
#define CFG_USER_CHAN_MAX_TXPWR_EN 1
|
||||||
#define CFG_USER_TX_USE_ANA_F 0
|
#define CFG_USER_TX_USE_ANA_F 0
|
||||||
|
#define CFG_USER_APM_PRBRSP_OFFLOAD_DISABLE 0
|
||||||
|
|
||||||
#define CFG_USER_EXT_FLAGS_EN (CFG_USER_CHAN_MAX_TXPWR_EN || CFG_USER_TX_USE_ANA_F)
|
#define CFG_USER_EXT_FLAGS_EN \
|
||||||
|
(CFG_PWROFST_COVER_CALIB || CFG_USER_CHAN_MAX_TXPWR_EN || \
|
||||||
|
CFG_USER_TX_USE_ANA_F || CFG_USER_APM_PRBRSP_OFFLOAD_DISABLE)
|
||||||
|
|
||||||
u32 patch_tbl_8800d80[][2] = {
|
u32 patch_tbl_8800d80[][2] = {
|
||||||
#ifdef USE_5G
|
#ifdef USE_5G
|
||||||
{0x00b4, 0xf3010001},
|
{ 0x00b4, 0xf3010001 },
|
||||||
#else
|
#else
|
||||||
{0x00b4, 0xf3010000},
|
{ 0x00b4, 0xf3010000 },
|
||||||
#endif
|
#endif
|
||||||
#if defined(CONFIG_AMSDU_RX)
|
#if defined(CONFIG_AMSDU_RX)
|
||||||
{0x170, 0x0100000a}
|
{ 0x170, 0x0100000a },
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_IRQ_FALL
|
#ifdef CONFIG_IRQ_FALL
|
||||||
{0x00000170, 0x0000010a}, //irqf
|
{ 0x00000170, 0x0000010a }, //irqf
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CFG_USER_EXT_FLAGS_EN
|
#if CFG_USER_EXT_FLAGS_EN
|
||||||
{0x0188, 0x00000001
|
{ 0x0188, 0x00000000
|
||||||
#if CFG_USER_CHAN_MAX_TXPWR_EN
|
#if CFG_PWROFST_COVER_CALIB
|
||||||
|
| USER_PWROFST_COVER_CALIB_FLAG
|
||||||
|
#endif
|
||||||
|
#if CFG_USER_CHAN_MAX_TXPWR_EN
|
||||||
| USER_CHAN_MAX_TXPWR_EN_FLAG
|
| USER_CHAN_MAX_TXPWR_EN_FLAG
|
||||||
#endif
|
#endif
|
||||||
#if CFG_USER_TX_USE_ANA_F
|
#if CFG_USER_TX_USE_ANA_F
|
||||||
| USER_TX_USE_ANA_F_FLAG
|
| USER_TX_USE_ANA_F_FLAG
|
||||||
#endif
|
#endif
|
||||||
|
#if CFG_USER_APM_PRBRSP_OFFLOAD_DISABLE
|
||||||
|
| USER_APM_PRBRSP_OFFLOAD_DISABLE_FLAG
|
||||||
|
#endif
|
||||||
}, // user_ext_flags
|
}, // user_ext_flags
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_RADAR_OR_IR_DETECT
|
||||||
|
{ 0x019c, 0x00000100 }, //enable radar detect
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_OOB
|
#ifdef CONFIG_OOB
|
||||||
// for 8800d40/d80 map data1 isr to gpiob1
|
// for 8800d40/d80 map data1 isr to gpiob1
|
||||||
u32 gpio_cfg_tbl_8800d40d80[][2] = {
|
u32 gpio_cfg_tbl_8800d40d80[][2] = {
|
||||||
{0x40504084, 0x00000006},
|
{ 0x40504084, 0x00000006 }, { 0x40500040, 0x00000000 },
|
||||||
{0x40500040, 0x00000000},
|
{ 0x40100030, 0x00000001 }, { 0x40241020, 0x00000001 },
|
||||||
{0x40100030, 0x00000001},
|
{ 0x40240030, 0x00000004 }, { 0x40240020, 0x03020700 },
|
||||||
{0x40241020, 0x00000001},
|
|
||||||
{0x40240030, 0x00000004},
|
|
||||||
{0x40240020, 0x03020700},
|
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -98,9 +112,12 @@ int aicwifi_sys_config_8800d80(struct aic_sdio_dev *sdiodev)
|
|||||||
int ret, cnt;
|
int ret, cnt;
|
||||||
int gpiocfg_num = sizeof(gpio_cfg_tbl_8800d40d80) / sizeof(u32) / 2;
|
int gpiocfg_num = sizeof(gpio_cfg_tbl_8800d40d80) / sizeof(u32) / 2;
|
||||||
for (cnt = 0; cnt < gpiocfg_num; cnt++) {
|
for (cnt = 0; cnt < gpiocfg_num; cnt++) {
|
||||||
ret = rwnx_send_dbg_mem_write_req(sdiodev, gpio_cfg_tbl_8800d40d80[cnt][0], gpio_cfg_tbl_8800d40d80[cnt][1]);
|
ret = rwnx_send_dbg_mem_write_req(
|
||||||
|
sdiodev, gpio_cfg_tbl_8800d40d80[cnt][0],
|
||||||
|
gpio_cfg_tbl_8800d40d80[cnt][1]);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
printk("%x write fail: %d\n", gpio_cfg_tbl_8800d40d80[cnt][0], ret);
|
printk("%x write fail: %d\n",
|
||||||
|
gpio_cfg_tbl_8800d40d80[cnt][0], ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -116,12 +133,12 @@ int aicwifi_patch_config_8800d80(struct aic_sdio_dev *sdiodev)
|
|||||||
const u32 rd_patch_addr = RAM_FMAC_FW_ADDR + 0x0198;
|
const u32 rd_patch_addr = RAM_FMAC_FW_ADDR + 0x0198;
|
||||||
u32 aic_patch_addr;
|
u32 aic_patch_addr;
|
||||||
u32 config_base, aic_patch_str_base;
|
u32 config_base, aic_patch_str_base;
|
||||||
#if (NEW_PATCH_BUFFER_MAP)
|
#if (NEW_PATCH_BUFFER_MAP)
|
||||||
u32 patch_buff_addr, patch_buff_base, rd_version_addr, rd_version_val;
|
u32 patch_buff_addr, patch_buff_base, rd_version_addr, rd_version_val;
|
||||||
#endif
|
#endif
|
||||||
uint32_t start_addr = 0x0016F800;
|
uint32_t start_addr = 0x0016F800;
|
||||||
u32 patch_addr = start_addr;
|
u32 patch_addr = start_addr;
|
||||||
u32 patch_cnt = sizeof(patch_tbl_8800d80)/sizeof(u32)/2;
|
u32 patch_cnt = sizeof(patch_tbl_8800d80) / sizeof(u32) / 2;
|
||||||
struct dbg_mem_read_cfm rd_patch_addr_cfm;
|
struct dbg_mem_read_cfm rd_patch_addr_cfm;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
int cnt = 0;
|
int cnt = 0;
|
||||||
@@ -130,12 +147,14 @@ int aicwifi_patch_config_8800d80(struct aic_sdio_dev *sdiodev)
|
|||||||
|
|
||||||
if (adap_test) {
|
if (adap_test) {
|
||||||
printk("%s for adaptivity test \r\n", __func__);
|
printk("%s for adaptivity test \r\n", __func__);
|
||||||
adap_patch_cnt = sizeof(adaptivity_patch_tbl_8800d80)/sizeof(u32)/2;
|
adap_patch_cnt =
|
||||||
|
sizeof(adaptivity_patch_tbl_8800d80) / sizeof(u32) / 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
aic_patch_addr = rd_patch_addr + 8;
|
aic_patch_addr = rd_patch_addr + 8;
|
||||||
|
|
||||||
ret = rwnx_send_dbg_mem_read_req(sdiodev, rd_patch_addr, &rd_patch_addr_cfm);
|
ret = rwnx_send_dbg_mem_read_req(sdiodev, rd_patch_addr,
|
||||||
|
&rd_patch_addr_cfm);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
printk("patch rd fail\n");
|
printk("patch rd fail\n");
|
||||||
return ret;
|
return ret;
|
||||||
@@ -143,16 +162,18 @@ int aicwifi_patch_config_8800d80(struct aic_sdio_dev *sdiodev)
|
|||||||
|
|
||||||
config_base = rd_patch_addr_cfm.memdata;
|
config_base = rd_patch_addr_cfm.memdata;
|
||||||
|
|
||||||
ret = rwnx_send_dbg_mem_read_req(sdiodev, aic_patch_addr, &rd_patch_addr_cfm);
|
ret = rwnx_send_dbg_mem_read_req(sdiodev, aic_patch_addr,
|
||||||
|
&rd_patch_addr_cfm);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
printk("patch str rd fail\n");
|
printk("patch str rd fail\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
aic_patch_str_base = rd_patch_addr_cfm.memdata;
|
aic_patch_str_base = rd_patch_addr_cfm.memdata;
|
||||||
|
|
||||||
#if (NEW_PATCH_BUFFER_MAP)
|
#if (NEW_PATCH_BUFFER_MAP)
|
||||||
rd_version_addr = RAM_FMAC_FW_ADDR + 0x01C;
|
rd_version_addr = RAM_FMAC_FW_ADDR + 0x01C;
|
||||||
if ((ret = rwnx_send_dbg_mem_read_req(sdiodev, rd_version_addr, &rd_patch_addr_cfm))) {
|
if ((ret = rwnx_send_dbg_mem_read_req(sdiodev, rd_version_addr,
|
||||||
|
&rd_patch_addr_cfm))) {
|
||||||
printk("version val[0x%x] rd fail: %d\n", rd_version_addr, ret);
|
printk("version val[0x%x] rd fail: %d\n", rd_version_addr, ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@@ -161,7 +182,8 @@ int aicwifi_patch_config_8800d80(struct aic_sdio_dev *sdiodev)
|
|||||||
sdiodev->fw_version_uint = rd_version_val;
|
sdiodev->fw_version_uint = rd_version_val;
|
||||||
if (rd_version_val > 0x06090100) {
|
if (rd_version_val > 0x06090100) {
|
||||||
patch_buff_addr = rd_patch_addr + 12;
|
patch_buff_addr = rd_patch_addr + 12;
|
||||||
ret = rwnx_send_dbg_mem_read_req(sdiodev, patch_buff_addr, &rd_patch_addr_cfm);
|
ret = rwnx_send_dbg_mem_read_req(sdiodev, patch_buff_addr,
|
||||||
|
&rd_patch_addr_cfm);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
printk("patch buf rd fail\n");
|
printk("patch buf rd fail\n");
|
||||||
return ret;
|
return ret;
|
||||||
@@ -169,84 +191,104 @@ int aicwifi_patch_config_8800d80(struct aic_sdio_dev *sdiodev)
|
|||||||
patch_buff_base = rd_patch_addr_cfm.memdata;
|
patch_buff_base = rd_patch_addr_cfm.memdata;
|
||||||
patch_addr = start_addr = patch_buff_base;
|
patch_addr = start_addr = patch_buff_base;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ret = rwnx_send_dbg_mem_write_req(sdiodev, AIC_PATCH_ADDR(magic_num), AIC_PATCH_MAGIG_NUM);
|
ret = rwnx_send_dbg_mem_write_req(sdiodev, AIC_PATCH_ADDR(magic_num),
|
||||||
|
AIC_PATCH_MAGIG_NUM);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
printk("0x%x write fail\n", AIC_PATCH_ADDR(magic_num));
|
printk("0x%x write fail\n", AIC_PATCH_ADDR(magic_num));
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = rwnx_send_dbg_mem_write_req(sdiodev, AIC_PATCH_ADDR(magic_num_2), AIC_PATCH_MAGIG_NUM_2);
|
ret = rwnx_send_dbg_mem_write_req(sdiodev, AIC_PATCH_ADDR(magic_num_2),
|
||||||
|
AIC_PATCH_MAGIG_NUM_2);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
printk("0x%x write fail\n", AIC_PATCH_ADDR(magic_num_2));
|
printk("0x%x write fail\n", AIC_PATCH_ADDR(magic_num_2));
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = rwnx_send_dbg_mem_write_req(sdiodev, AIC_PATCH_ADDR(pair_start), patch_addr);
|
ret = rwnx_send_dbg_mem_write_req(sdiodev, AIC_PATCH_ADDR(pair_start),
|
||||||
|
patch_addr);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
printk("0x%x write fail\n", AIC_PATCH_ADDR(pair_start));
|
printk("0x%x write fail\n", AIC_PATCH_ADDR(pair_start));
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = rwnx_send_dbg_mem_write_req(sdiodev, AIC_PATCH_ADDR(pair_count), patch_cnt + adap_patch_cnt);
|
ret = rwnx_send_dbg_mem_write_req(sdiodev, AIC_PATCH_ADDR(pair_count),
|
||||||
|
patch_cnt + adap_patch_cnt);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
printk("0x%x write fail\n", AIC_PATCH_ADDR(pair_count));
|
printk("0x%x write fail\n", AIC_PATCH_ADDR(pair_count));
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (cnt = 0; cnt < patch_cnt; cnt++) {
|
for (cnt = 0; cnt < patch_cnt; cnt++) {
|
||||||
ret = rwnx_send_dbg_mem_write_req(sdiodev, start_addr+8*cnt, patch_tbl_8800d80[cnt][0]+config_base);
|
ret = rwnx_send_dbg_mem_write_req(sdiodev, start_addr + 8 * cnt,
|
||||||
|
patch_tbl_8800d80[cnt][0] +
|
||||||
|
config_base);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
printk("%x write fail\n", start_addr+8*cnt);
|
printk("%x write fail\n", start_addr + 8 * cnt);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
ret = rwnx_send_dbg_mem_write_req(sdiodev, start_addr+8*cnt+4, patch_tbl_8800d80[cnt][1]);
|
ret = rwnx_send_dbg_mem_write_req(sdiodev,
|
||||||
|
start_addr + 8 * cnt + 4,
|
||||||
|
patch_tbl_8800d80[cnt][1]);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
printk("%x write fail\n", start_addr+8*cnt+4);
|
printk("%x write fail\n", start_addr + 8 * cnt + 4);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (adap_test){
|
if (adap_test) {
|
||||||
int tmp_cnt = patch_cnt + adap_patch_cnt;
|
int tmp_cnt = patch_cnt + adap_patch_cnt;
|
||||||
for (cnt = patch_cnt; cnt < tmp_cnt; cnt++) {
|
for (cnt = patch_cnt; cnt < tmp_cnt; cnt++) {
|
||||||
int tbl_idx = cnt - patch_cnt;
|
int tbl_idx = cnt - patch_cnt;
|
||||||
ret = rwnx_send_dbg_mem_write_req(sdiodev, start_addr+8*cnt, adaptivity_patch_tbl_8800d80[tbl_idx][0]+config_base);
|
ret = rwnx_send_dbg_mem_write_req(
|
||||||
if(ret) {
|
sdiodev, start_addr + 8 * cnt,
|
||||||
printk("%x write fail\n", start_addr+8*cnt);
|
adaptivity_patch_tbl_8800d80[tbl_idx][0] +
|
||||||
|
config_base);
|
||||||
|
if (ret) {
|
||||||
|
printk("%x write fail\n", start_addr + 8 * cnt);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
ret = rwnx_send_dbg_mem_write_req(sdiodev, start_addr+8*cnt+4, adaptivity_patch_tbl_8800d80[tbl_idx][1]);
|
ret = rwnx_send_dbg_mem_write_req(
|
||||||
if(ret) {
|
sdiodev, start_addr + 8 * cnt + 4,
|
||||||
printk("%x write fail\n", start_addr+8*cnt+4);
|
adaptivity_patch_tbl_8800d80[tbl_idx][1]);
|
||||||
|
if (ret) {
|
||||||
|
printk("%x write fail\n",
|
||||||
|
start_addr + 8 * cnt + 4);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = rwnx_send_dbg_mem_write_req(sdiodev, AIC_PATCH_ADDR(block_size[0]), 0);
|
ret = rwnx_send_dbg_mem_write_req(sdiodev,
|
||||||
|
AIC_PATCH_ADDR(block_size[0]), 0);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
printk("block_size[0x%x] write fail: %d\n", AIC_PATCH_ADDR(block_size[0]), ret);
|
printk("block_size[0x%x] write fail: %d\n",
|
||||||
|
AIC_PATCH_ADDR(block_size[0]), ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
ret = rwnx_send_dbg_mem_write_req(sdiodev, AIC_PATCH_ADDR(block_size[1]), 0);
|
ret = rwnx_send_dbg_mem_write_req(sdiodev,
|
||||||
|
AIC_PATCH_ADDR(block_size[1]), 0);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
printk("block_size[0x%x] write fail: %d\n", AIC_PATCH_ADDR(block_size[1]), ret);
|
printk("block_size[0x%x] write fail: %d\n",
|
||||||
|
AIC_PATCH_ADDR(block_size[1]), ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
ret = rwnx_send_dbg_mem_write_req(sdiodev, AIC_PATCH_ADDR(block_size[2]), 0);
|
ret = rwnx_send_dbg_mem_write_req(sdiodev,
|
||||||
|
AIC_PATCH_ADDR(block_size[2]), 0);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
printk("block_size[0x%x] write fail: %d\n", AIC_PATCH_ADDR(block_size[2]), ret);
|
printk("block_size[0x%x] write fail: %d\n",
|
||||||
|
AIC_PATCH_ADDR(block_size[2]), ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
ret = rwnx_send_dbg_mem_write_req(sdiodev, AIC_PATCH_ADDR(block_size[3]), 0);
|
ret = rwnx_send_dbg_mem_write_req(sdiodev,
|
||||||
|
AIC_PATCH_ADDR(block_size[3]), 0);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
printk("block_size[0x%x] write fail: %d\n", AIC_PATCH_ADDR(block_size[3]), ret);
|
printk("block_size[0x%x] write fail: %d\n",
|
||||||
|
AIC_PATCH_ADDR(block_size[3]), ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -17,8 +17,4 @@ int aicbsp_system_config_8800d80(struct aic_sdio_dev *sdiodev);
|
|||||||
int aicwifi_sys_config_8800d80(struct aic_sdio_dev *sdiodev);
|
int aicwifi_sys_config_8800d80(struct aic_sdio_dev *sdiodev);
|
||||||
int aicwifi_patch_config_8800d80(struct aic_sdio_dev *sdiodev);
|
int aicwifi_patch_config_8800d80(struct aic_sdio_dev *sdiodev);
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -23,18 +23,21 @@ void system_config_8800dc(struct aic_sdio_dev *rwnx_hw);
|
|||||||
int aicwf_misc_ram_init_8800dc(struct aic_sdio_dev *sdiodev);
|
int aicwf_misc_ram_init_8800dc(struct aic_sdio_dev *sdiodev);
|
||||||
|
|
||||||
#ifdef CONFIG_DPD
|
#ifdef CONFIG_DPD
|
||||||
int aicwf_dpd_calib_8800dc(struct aic_sdio_dev *sdiodev, rf_misc_ram_lite_t *dpd_res);
|
int aicwf_dpd_calib_8800dc(struct aic_sdio_dev *sdiodev,
|
||||||
int aicwf_dpd_result_apply_8800dc(struct aic_sdio_dev *sdiodev, rf_misc_ram_lite_t *dpd_res);
|
rf_misc_ram_lite_t *dpd_res);
|
||||||
|
int aicwf_dpd_result_apply_8800dc(struct aic_sdio_dev *sdiodev,
|
||||||
|
rf_misc_ram_lite_t *dpd_res);
|
||||||
#ifndef CONFIG_FORCE_DPD_CALIB
|
#ifndef CONFIG_FORCE_DPD_CALIB
|
||||||
int aicwf_dpd_result_load_8800dc(struct aic_sdio_dev *sdiodev, rf_misc_ram_lite_t *dpd_res);
|
int aicwf_dpd_result_load_8800dc(struct aic_sdio_dev *sdiodev,
|
||||||
|
rf_misc_ram_lite_t *dpd_res);
|
||||||
int aicwf_dpd_result_write_8800dc(void *buf, int buf_len);
|
int aicwf_dpd_result_write_8800dc(void *buf, int buf_len);
|
||||||
#endif/* !CONFIG_FORCE_DPD_CALIB */
|
#endif /* !CONFIG_FORCE_DPD_CALIB */
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_LOFT_CALIB
|
#ifdef CONFIG_LOFT_CALIB
|
||||||
int aicwf_loft_calib_8800dc(struct aic_sdio_dev *sdiodev);
|
int aicwf_loft_calib_8800dc(struct aic_sdio_dev *sdiodev,
|
||||||
|
rf_misc_ram_lite_t *loft_res);
|
||||||
|
int aicwf_loft_result_apply_8800dc(struct aic_sdio_dev *sdiodev,
|
||||||
|
rf_misc_ram_lite_t *loft_res);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -16,7 +16,7 @@
|
|||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include "aic_bsp_export.h"
|
#include "aic_bsp_export.h"
|
||||||
|
|
||||||
#define RWNX_80211_CMD_TIMEOUT_MS 3000//500//300
|
#define RWNX_80211_CMD_TIMEOUT_MS 6000 //500//300
|
||||||
|
|
||||||
#define RWNX_CMD_FLAG_NONBLOCK BIT(0)
|
#define RWNX_CMD_FLAG_NONBLOCK BIT(0)
|
||||||
#define RWNX_CMD_FLAG_REQ_CFM BIT(1)
|
#define RWNX_CMD_FLAG_REQ_CFM BIT(1)
|
||||||
@@ -46,27 +46,20 @@ extern int aicwf_dbg_level_bsp;
|
|||||||
|
|
||||||
#define AICWF_LOG "AICWFDBG("
|
#define AICWF_LOG "AICWFDBG("
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
#define AICWFDBG(level, args, arg...) \
|
#define AICWFDBG(level, args, arg...) \
|
||||||
do { \
|
do { \
|
||||||
if (aicwf_dbg_level_bsp & level) { \
|
if (aicwf_dbg_level_bsp & level) { \
|
||||||
printk(AICWF_LOG#level")\t" args, ##arg); \
|
printk(AICWF_LOG #level ")\t" args, ##arg); \
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define RWNX_DBG(fmt, ...) \
|
#define RWNX_DBG(fmt, ...) \
|
||||||
do { \
|
do { \
|
||||||
if (aicwf_dbg_level_bsp & LOGTRACE) { \
|
if (aicwf_dbg_level_bsp & LOGTRACE) { \
|
||||||
printk(AICWF_LOG"LOGTRACE)\t"fmt , ##__VA_ARGS__); \
|
printk(AICWF_LOG "LOGTRACE)\t" fmt, ##__VA_ARGS__); \
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
#define AICWFDBG(level, args, arg...)
|
|
||||||
#define RWNX_DBG(fmt, ...)
|
|
||||||
|
|
||||||
#endif
|
|
||||||
/// Message structure for MSGs from Emb to App
|
/// Message structure for MSGs from Emb to App
|
||||||
struct ipc_e2a_msg {
|
struct ipc_e2a_msg {
|
||||||
u16 id; ///< Message id.
|
u16 id; ///< Message id.
|
||||||
@@ -95,8 +88,8 @@ struct lmac_msg {
|
|||||||
|
|
||||||
static inline void put_u16(u8 *buf, u16 data)
|
static inline void put_u16(u8 *buf, u16 data)
|
||||||
{
|
{
|
||||||
buf[0] = (u8)(data&0x00ff);
|
buf[0] = (u8)(data & 0x00ff);
|
||||||
buf[1] = (u8)((data >> 8)&0x00ff);
|
buf[1] = (u8)((data >> 8) & 0x00ff);
|
||||||
}
|
}
|
||||||
|
|
||||||
enum rwnx_cmd_mgr_state {
|
enum rwnx_cmd_mgr_state {
|
||||||
@@ -134,7 +127,8 @@ struct rwnx_cmd_mgr {
|
|||||||
|
|
||||||
int (*queue)(struct rwnx_cmd_mgr *, struct rwnx_cmd *);
|
int (*queue)(struct rwnx_cmd_mgr *, struct rwnx_cmd *);
|
||||||
int (*llind)(struct rwnx_cmd_mgr *, struct rwnx_cmd *);
|
int (*llind)(struct rwnx_cmd_mgr *, struct rwnx_cmd *);
|
||||||
int (*msgind)(struct rwnx_cmd_mgr *, struct rwnx_cmd_e2amsg *, msg_cb_fct);
|
int (*msgind)(struct rwnx_cmd_mgr *, struct rwnx_cmd_e2amsg *,
|
||||||
|
msg_cb_fct);
|
||||||
void (*print)(struct rwnx_cmd_mgr *);
|
void (*print)(struct rwnx_cmd_mgr *);
|
||||||
void (*drain)(struct rwnx_cmd_mgr *);
|
void (*drain)(struct rwnx_cmd_mgr *);
|
||||||
|
|
||||||
@@ -144,11 +138,12 @@ struct rwnx_cmd_mgr {
|
|||||||
|
|
||||||
void rwnx_cmd_mgr_init(struct rwnx_cmd_mgr *cmd_mgr);
|
void rwnx_cmd_mgr_init(struct rwnx_cmd_mgr *cmd_mgr);
|
||||||
void rwnx_cmd_mgr_deinit(struct rwnx_cmd_mgr *cmd_mgr);
|
void rwnx_cmd_mgr_deinit(struct rwnx_cmd_mgr *cmd_mgr);
|
||||||
int cmd_mgr_queue_force_defer(struct rwnx_cmd_mgr *cmd_mgr, struct rwnx_cmd *cmd);
|
int cmd_mgr_queue_force_defer(struct rwnx_cmd_mgr *cmd_mgr,
|
||||||
|
struct rwnx_cmd *cmd);
|
||||||
void rwnx_set_cmd_tx(void *dev, struct lmac_msg *msg, uint len);
|
void rwnx_set_cmd_tx(void *dev, struct lmac_msg *msg, uint len);
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
TASK_NONE = (u8) -1,
|
TASK_NONE = (u8)-1,
|
||||||
|
|
||||||
// MAC Management task.
|
// MAC Management task.
|
||||||
TASK_MM = 0,
|
TASK_MM = 0,
|
||||||
@@ -182,7 +177,7 @@ enum {
|
|||||||
|
|
||||||
#define LMAC_FIRST_MSG(task) ((lmac_msg_id_t)((task) << 10))
|
#define LMAC_FIRST_MSG(task) ((lmac_msg_id_t)((task) << 10))
|
||||||
#define DRV_TASK_ID 100
|
#define DRV_TASK_ID 100
|
||||||
#define MSG_I(msg) ((msg) & ((1<<10)-1))
|
#define MSG_I(msg) ((msg) & ((1 << 10) - 1))
|
||||||
#define MSG_T(msg) ((lmac_task_id_t)((msg) >> 10))
|
#define MSG_T(msg) ((lmac_task_id_t)((msg) >> 10))
|
||||||
|
|
||||||
enum dbg_msg_tag {
|
enum dbg_msg_tag {
|
||||||
@@ -238,7 +233,6 @@ enum dbg_msg_tag {
|
|||||||
DBG_GPIO_WRITE_REQ,
|
DBG_GPIO_WRITE_REQ,
|
||||||
DBG_GPIO_WRITE_CFM,
|
DBG_GPIO_WRITE_CFM,
|
||||||
|
|
||||||
|
|
||||||
/// Max number of Debug messages
|
/// Max number of Debug messages
|
||||||
DBG_MAX,
|
DBG_MAX,
|
||||||
};
|
};
|
||||||
@@ -256,7 +250,6 @@ enum {
|
|||||||
HOST_START_APP_DUMMY = 5,
|
HOST_START_APP_DUMMY = 5,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struct dbg_mem_block_write_req {
|
struct dbg_mem_block_write_req {
|
||||||
u32 memaddr;
|
u32 memaddr;
|
||||||
u32 memsize;
|
u32 memsize;
|
||||||
@@ -317,10 +310,9 @@ struct dbg_start_app_cfm {
|
|||||||
|
|
||||||
int aicwf_plat_patch_load_8800dc(struct aic_sdio_dev *sdiodev);
|
int aicwf_plat_patch_load_8800dc(struct aic_sdio_dev *sdiodev);
|
||||||
int aicwf_plat_rftest_load_8800dc(struct aic_sdio_dev *sdiodev);
|
int aicwf_plat_rftest_load_8800dc(struct aic_sdio_dev *sdiodev);
|
||||||
#ifdef CONFIG_DPD
|
|
||||||
int aicwf_misc_ram_valid_check_8800dc(struct aic_sdio_dev *sdiodev, int *valid_out);
|
|
||||||
#endif
|
|
||||||
#if defined(CONFIG_DPD) || defined(CONFIG_LOFT_CALIB)
|
#if defined(CONFIG_DPD) || defined(CONFIG_LOFT_CALIB)
|
||||||
|
int aicwf_misc_ram_valid_check_8800dc(struct aic_sdio_dev *sdiodev,
|
||||||
|
int *valid_out);
|
||||||
int aicwf_plat_calib_load_8800dc(struct aic_sdio_dev *sdiodev);
|
int aicwf_plat_calib_load_8800dc(struct aic_sdio_dev *sdiodev);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -329,21 +321,26 @@ int aicwf_patch_table_load(struct aic_sdio_dev *rwnx_hw, char *filename);
|
|||||||
|
|
||||||
int rwnx_send_dbg_mem_read_req(struct aic_sdio_dev *sdiodev, u32 mem_addr,
|
int rwnx_send_dbg_mem_read_req(struct aic_sdio_dev *sdiodev, u32 mem_addr,
|
||||||
struct dbg_mem_read_cfm *cfm);
|
struct dbg_mem_read_cfm *cfm);
|
||||||
int rwnx_send_dbg_mem_block_write_req(struct aic_sdio_dev *sdiodev, u32 mem_addr,
|
int rwnx_send_dbg_mem_block_write_req(struct aic_sdio_dev *sdiodev,
|
||||||
u32 mem_size, u32 *mem_data);
|
u32 mem_addr, u32 mem_size,
|
||||||
int rwnx_send_dbg_mem_write_req(struct aic_sdio_dev *sdiodev, u32 mem_addr, u32 mem_data);
|
u32 *mem_data);
|
||||||
|
int rwnx_send_dbg_mem_write_req(struct aic_sdio_dev *sdiodev, u32 mem_addr,
|
||||||
|
u32 mem_data);
|
||||||
int rwnx_send_dbg_mem_mask_write_req(struct aic_sdio_dev *sdiodev, u32 mem_addr,
|
int rwnx_send_dbg_mem_mask_write_req(struct aic_sdio_dev *sdiodev, u32 mem_addr,
|
||||||
u32 mem_mask, u32 mem_data);
|
u32 mem_mask, u32 mem_data);
|
||||||
int rwnx_send_dbg_start_app_req(struct aic_sdio_dev *sdiodev, u32 boot_addr, u32 boot_type, struct dbg_start_app_cfm *start_app_cfm);
|
int rwnx_send_dbg_start_app_req(struct aic_sdio_dev *sdiodev, u32 boot_addr,
|
||||||
|
u32 boot_type,
|
||||||
|
struct dbg_start_app_cfm *start_app_cfm);
|
||||||
|
|
||||||
int rwnx_plat_bin_fw_upload_android(struct aic_sdio_dev *sdiodev, u32 fw_addr, const char *filename);
|
int rwnx_plat_bin_fw_upload_android(struct aic_sdio_dev *sdiodev, u32 fw_addr,
|
||||||
|
const char *filename);
|
||||||
|
|
||||||
void rwnx_rx_handle_msg(struct aic_sdio_dev *sdiodev, struct ipc_e2a_msg *msg);
|
void rwnx_rx_handle_msg(struct aic_sdio_dev *sdiodev, struct ipc_e2a_msg *msg);
|
||||||
int aicbsp_platform_init(struct aic_sdio_dev *sdiodev);
|
int aicbsp_platform_init(struct aic_sdio_dev *sdiodev);
|
||||||
void aicbsp_platform_deinit(struct aic_sdio_dev *sdiodev);
|
void aicbsp_platform_deinit(struct aic_sdio_dev *sdiodev);
|
||||||
int aicbsp_driver_fw_init(struct aic_sdio_dev *sdiodev);
|
int aicbsp_driver_fw_init(struct aic_sdio_dev *sdiodev);
|
||||||
#if (defined(CONFIG_DPD) && !defined(CONFIG_FORCE_DPD_CALIB))
|
#if (defined(CONFIG_DPD) && !defined(CONFIG_FORCE_DPD_CALIB))
|
||||||
int is_file_exist(char* name);
|
int is_file_exist(char *name);
|
||||||
#endif
|
#endif
|
||||||
int aicbsp_resv_mem_init(void);
|
int aicbsp_resv_mem_init(void);
|
||||||
int aicbsp_resv_mem_deinit(void);
|
int aicbsp_resv_mem_deinit(void);
|
||||||
@@ -352,6 +349,7 @@ int aicbsp_resv_mem_deinit(void);
|
|||||||
#define AICBSP_FW_PATH_MAX 200
|
#define AICBSP_FW_PATH_MAX 200
|
||||||
|
|
||||||
#define RAM_FMAC_FW_ADDR 0x00120000
|
#define RAM_FMAC_FW_ADDR 0x00120000
|
||||||
|
#define RAM_FMAC_FW_PATCH_ADDR 0x00190000
|
||||||
#define FW_RAM_ADID_BASE_ADDR 0x00161928
|
#define FW_RAM_ADID_BASE_ADDR 0x00161928
|
||||||
#define FW_RAM_ADID_BASE_ADDR_U03 0x00161928
|
#define FW_RAM_ADID_BASE_ADDR_U03 0x00161928
|
||||||
#define FW_RAM_PATCH_BASE_ADDR 0x00100000
|
#define FW_RAM_PATCH_BASE_ADDR 0x00100000
|
||||||
@@ -369,7 +367,6 @@ int aicbsp_resv_mem_deinit(void);
|
|||||||
|
|
||||||
#define AICBT_PT_TAG "AICBT_PT_TAG"
|
#define AICBT_PT_TAG "AICBT_PT_TAG"
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Addresses within RWNX_ADDR_CPU
|
* Addresses within RWNX_ADDR_CPU
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
@@ -378,12 +375,16 @@ int aicbsp_resv_mem_deinit(void);
|
|||||||
#define ROM_FMAC_FW_ADDR 0x00010000
|
#define ROM_FMAC_FW_ADDR 0x00010000
|
||||||
#define ROM_FMAC_PATCH_ADDR 0x00180000
|
#define ROM_FMAC_PATCH_ADDR 0x00180000
|
||||||
|
|
||||||
|
#define RAM_FMAC_FW_PATCH_NAME "fmacfw_patch.bin"
|
||||||
#define RWNX_MAC_CALIB_BASE_NAME_8800DC "fmacfw_calib_8800dc"
|
#define RWNX_MAC_CALIB_BASE_NAME_8800DC "fmacfw_calib_8800dc"
|
||||||
#define RWNX_MAC_CALIB_NAME_8800DC_U02 RWNX_MAC_CALIB_BASE_NAME_8800DC"_u02.bin"
|
#define RWNX_MAC_CALIB_NAME_8800DC_U02 \
|
||||||
|
RWNX_MAC_CALIB_BASE_NAME_8800DC "_u02.bin"
|
||||||
#ifdef CONFIG_SDIO_BT
|
#ifdef CONFIG_SDIO_BT
|
||||||
#define RWNX_MAC_CALIB_NAME_8800DC_H_U02 RWNX_MAC_CALIB_BASE_NAME_8800DC"_hbt_u02.bin"
|
#define RWNX_MAC_CALIB_NAME_8800DC_H_U02 \
|
||||||
|
RWNX_MAC_CALIB_BASE_NAME_8800DC "_hbt_u02.bin"
|
||||||
#else
|
#else
|
||||||
#define RWNX_MAC_CALIB_NAME_8800DC_H_U02 RWNX_MAC_CALIB_BASE_NAME_8800DC"_h_u02.bin"
|
#define RWNX_MAC_CALIB_NAME_8800DC_H_U02 \
|
||||||
|
RWNX_MAC_CALIB_BASE_NAME_8800DC "_h_u02.bin"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_DPD) || defined(CONFIG_LOFT_CALIB)
|
#if defined(CONFIG_DPD) || defined(CONFIG_LOFT_CALIB)
|
||||||
@@ -399,29 +400,35 @@ int aicbsp_resv_mem_deinit(void);
|
|||||||
|
|
||||||
#ifdef CONFIG_FOR_IPCOM
|
#ifdef CONFIG_FOR_IPCOM
|
||||||
#define RWNX_MAC_PATCH_BASE_NAME_8800DC "fmacfw_patch_8800dc_ipc"
|
#define RWNX_MAC_PATCH_BASE_NAME_8800DC "fmacfw_patch_8800dc_ipc"
|
||||||
#define RWNX_MAC_PATCH_NAME2_8800DC RWNX_MAC_PATCH_BASE_NAME_8800DC".bin"
|
#define RWNX_MAC_PATCH_NAME2_8800DC RWNX_MAC_PATCH_BASE_NAME_8800DC ".bin"
|
||||||
#else
|
#else
|
||||||
#define RWNX_MAC_PATCH_BASE_NAME_8800DC "fmacfw_patch_8800dc"
|
#define RWNX_MAC_PATCH_BASE_NAME_8800DC "fmacfw_patch_8800dc"
|
||||||
#define RWNX_MAC_PATCH_NAME2_8800DC RWNX_MAC_PATCH_BASE_NAME_8800DC".bin"
|
#define RWNX_MAC_PATCH_NAME2_8800DC RWNX_MAC_PATCH_BASE_NAME_8800DC ".bin"
|
||||||
#define RWNX_MAC_PATCH_NAME2_8800DC_U02 RWNX_MAC_PATCH_BASE_NAME_8800DC"_u02.bin"
|
#define RWNX_MAC_PATCH_NAME2_8800DC_U02 \
|
||||||
|
RWNX_MAC_PATCH_BASE_NAME_8800DC "_u02.bin"
|
||||||
#ifdef CONFIG_SDIO_BT
|
#ifdef CONFIG_SDIO_BT
|
||||||
#define RWNX_MAC_PATCH_NAME2_8800DC_H_U02 RWNX_MAC_PATCH_BASE_NAME_8800DC"_hbt_u02.bin"
|
#define RWNX_MAC_PATCH_NAME2_8800DC_H_U02 \
|
||||||
|
RWNX_MAC_PATCH_BASE_NAME_8800DC "_hbt_u02.bin"
|
||||||
#else
|
#else
|
||||||
#define RWNX_MAC_PATCH_NAME2_8800DC_H_U02 RWNX_MAC_PATCH_BASE_NAME_8800DC"_h_u02.bin"
|
#define RWNX_MAC_PATCH_NAME2_8800DC_H_U02 \
|
||||||
|
RWNX_MAC_PATCH_BASE_NAME_8800DC "_h_u02.bin"
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define RWNX_MAC_PATCH_TABLE_NAME_8800DC "fmacfw_patch_tbl_8800dc"
|
#define RWNX_MAC_PATCH_TABLE_NAME_8800DC "fmacfw_patch_tbl_8800dc"
|
||||||
#define RWNX_MAC_PATCH_TABLE_8800DC RWNX_MAC_PATCH_TABLE_NAME_8800DC ".bin"
|
#define RWNX_MAC_PATCH_TABLE_8800DC RWNX_MAC_PATCH_TABLE_NAME_8800DC ".bin"
|
||||||
#define RWNX_MAC_PATCH_TABLE_8800DC_U02 RWNX_MAC_PATCH_TABLE_NAME_8800DC "_u02.bin"
|
#define RWNX_MAC_PATCH_TABLE_8800DC_U02 \
|
||||||
|
RWNX_MAC_PATCH_TABLE_NAME_8800DC "_u02.bin"
|
||||||
#ifdef CONFIG_SDIO_BT
|
#ifdef CONFIG_SDIO_BT
|
||||||
#define RWNX_MAC_PATCH_TABLE_8800DC_H_U02 RWNX_MAC_PATCH_TABLE_NAME_8800DC "_hbt_u02.bin"
|
#define RWNX_MAC_PATCH_TABLE_8800DC_H_U02 \
|
||||||
|
RWNX_MAC_PATCH_TABLE_NAME_8800DC "_hbt_u02.bin"
|
||||||
#else
|
#else
|
||||||
#define RWNX_MAC_PATCH_TABLE_8800DC_H_U02 RWNX_MAC_PATCH_TABLE_NAME_8800DC "_h_u02.bin"
|
#define RWNX_MAC_PATCH_TABLE_8800DC_H_U02 \
|
||||||
|
RWNX_MAC_PATCH_TABLE_NAME_8800DC "_h_u02.bin"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define RWNX_MAC_RF_PATCH_BASE_NAME_8800DC "fmacfw_rf_patch_8800dc"
|
#define RWNX_MAC_RF_PATCH_BASE_NAME_8800DC "fmacfw_rf_patch_8800dc"
|
||||||
#define RWNX_MAC_RF_PATCH_NAME_8800DC RWNX_MAC_RF_PATCH_BASE_NAME_8800DC".bin"
|
#define RWNX_MAC_RF_PATCH_NAME_8800DC RWNX_MAC_RF_PATCH_BASE_NAME_8800DC ".bin"
|
||||||
#define FW_USERCONFIG_NAME_8800DC "aic_userconfig_8800dc.txt"
|
#define FW_USERCONFIG_NAME_8800DC "aic_userconfig_8800dc.txt"
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
@@ -508,11 +515,13 @@ enum chip_rev {
|
|||||||
#define AICBT_TXPWR_LVL 0x00006020
|
#define AICBT_TXPWR_LVL 0x00006020
|
||||||
#define AICBT_TXPWR_LVL_8800dc 0x00006f2f
|
#define AICBT_TXPWR_LVL_8800dc 0x00006f2f
|
||||||
#define AICBT_TXPWR_LVL_8800d80 0x00006f2f
|
#define AICBT_TXPWR_LVL_8800d80 0x00006f2f
|
||||||
|
#define AICBT_TXPWR_LVL_8800d80x2 0x00006f2f
|
||||||
|
|
||||||
#define AICBSP_HWINFO_DEFAULT (-1)
|
#define AICBSP_HWINFO_DEFAULT (-1)
|
||||||
#define AICBSP_CPMODE_DEFAULT AICBSP_CPMODE_WORK
|
#define AICBSP_CPMODE_DEFAULT AICBSP_CPMODE_WORK
|
||||||
#define AICBSP_FWLOG_EN_DEFAULT 0
|
#define AICBSP_FWLOG_EN_DEFAULT 0
|
||||||
|
|
||||||
|
#define AICBT_BTMODE_DEFAULT_8800d80x2 AICBT_BTMODE_BT_ONLY_COANT
|
||||||
#define AICBT_BTMODE_DEFAULT_8800d80 AICBT_BTMODE_BT_ONLY_COANT
|
#define AICBT_BTMODE_DEFAULT_8800d80 AICBT_BTMODE_BT_ONLY_COANT
|
||||||
#define AICBT_BTMODE_DEFAULT AICBT_BTMODE_BT_ONLY_SW
|
#define AICBT_BTMODE_DEFAULT AICBT_BTMODE_BT_ONLY_SW
|
||||||
#ifdef CONFIG_SDIO_BT
|
#ifdef CONFIG_SDIO_BT
|
||||||
@@ -526,7 +535,7 @@ enum chip_rev {
|
|||||||
#define AICBT_TXPWR_LVL_DEFAULT AICBT_TXPWR_LVL
|
#define AICBT_TXPWR_LVL_DEFAULT AICBT_TXPWR_LVL
|
||||||
#define AICBT_TXPWR_LVL_DEFAULT_8800dc AICBT_TXPWR_LVL_8800dc
|
#define AICBT_TXPWR_LVL_DEFAULT_8800dc AICBT_TXPWR_LVL_8800dc
|
||||||
#define AICBT_TXPWR_LVL_DEFAULT_8800d80 AICBT_TXPWR_LVL_8800d80
|
#define AICBT_TXPWR_LVL_DEFAULT_8800d80 AICBT_TXPWR_LVL_8800d80
|
||||||
|
#define AICBT_TXPWR_LVL_DEFAULT_8800d80x2 AICBT_TXPWR_LVL_8800d80x2
|
||||||
|
|
||||||
#define FEATURE_SDIO_CLOCK 50000000 // 0: default, other: target clock rate
|
#define FEATURE_SDIO_CLOCK 50000000 // 0: default, other: target clock rate
|
||||||
#define FEATURE_SDIO_CLOCK_V3 150000000 // 0: default, other: target clock rate
|
#define FEATURE_SDIO_CLOCK_V3 150000000 // 0: default, other: target clock rate
|
||||||
@@ -551,6 +560,7 @@ struct aicbt_info_t {
|
|||||||
|
|
||||||
struct aicbt_patch_info_t {
|
struct aicbt_patch_info_t {
|
||||||
uint32_t info_len;
|
uint32_t info_len;
|
||||||
|
//base len start
|
||||||
uint32_t adid_addrinf;
|
uint32_t adid_addrinf;
|
||||||
uint32_t addr_adid;
|
uint32_t addr_adid;
|
||||||
uint32_t patch_addrinf;
|
uint32_t patch_addrinf;
|
||||||
@@ -559,6 +569,11 @@ struct aicbt_patch_info_t {
|
|||||||
uint32_t reset_val;
|
uint32_t reset_val;
|
||||||
uint32_t adid_flag_addr;
|
uint32_t adid_flag_addr;
|
||||||
uint32_t adid_flag;
|
uint32_t adid_flag;
|
||||||
|
//base len end
|
||||||
|
//ext patch nb
|
||||||
|
uint32_t ext_patch_nb_addr;
|
||||||
|
uint32_t ext_patch_nb;
|
||||||
|
uint32_t *ext_patch_param;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct aicbsp_firmware {
|
struct aicbsp_firmware {
|
||||||
@@ -567,6 +582,7 @@ struct aicbsp_firmware {
|
|||||||
const char *bt_patch;
|
const char *bt_patch;
|
||||||
const char *bt_table;
|
const char *bt_table;
|
||||||
const char *wl_fw;
|
const char *wl_fw;
|
||||||
|
const char *bt_ext_patch;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct aicbsp_info_t {
|
struct aicbsp_info_t {
|
||||||
@@ -589,5 +605,6 @@ extern const struct aicbsp_firmware fw_8800dc_h_u02[];
|
|||||||
extern const struct aicbsp_firmware fw_8800d80_u01[];
|
extern const struct aicbsp_firmware fw_8800d80_u01[];
|
||||||
extern const struct aicbsp_firmware fw_8800d80_u02[];
|
extern const struct aicbsp_firmware fw_8800d80_u02[];
|
||||||
extern const struct aicbsp_firmware fw_8800d80_h_u02[];
|
extern const struct aicbsp_firmware fw_8800d80_h_u02[];
|
||||||
|
extern const struct aicbsp_firmware fw_8800d80x2[];
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ struct aicbsp_feature_t {
|
|||||||
uint8_t irqf;
|
uint8_t irqf;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_DPD
|
#if defined(CONFIG_DPD) || defined(CONFIG_LOFT_CALIB)
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint32_t bit_mask[3];
|
uint32_t bit_mask[3];
|
||||||
uint32_t reserved;
|
uint32_t reserved;
|
||||||
@@ -53,10 +53,16 @@ typedef struct {
|
|||||||
|
|
||||||
#define MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
|
#define MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
|
||||||
#define DPD_RESULT_SIZE_8800DC sizeof(rf_misc_ram_lite_t)
|
#define DPD_RESULT_SIZE_8800DC sizeof(rf_misc_ram_lite_t)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_DPD
|
||||||
extern rf_misc_ram_lite_t dpd_res;
|
extern rf_misc_ram_lite_t dpd_res;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_LOFT_CALIB
|
||||||
|
extern rf_misc_ram_lite_t loft_res_local;
|
||||||
|
#endif
|
||||||
|
|
||||||
int aicbsp_set_subsys(int, int);
|
int aicbsp_set_subsys(int, int);
|
||||||
int aicbsp_get_feature(struct aicbsp_feature_t *feature, char *fw_path);
|
int aicbsp_get_feature(struct aicbsp_feature_t *feature, char *fw_path);
|
||||||
struct sk_buff *aicbsp_resv_mem_alloc_skb(unsigned int length, uint32_t id);
|
struct sk_buff *aicbsp_resv_mem_alloc_skb(unsigned int length, uint32_t id);
|
||||||
|
|||||||
@@ -9,88 +9,79 @@
|
|||||||
#include "rwnx_version_gen.h"
|
#include "rwnx_version_gen.h"
|
||||||
#include "aicwf_txq_prealloc.h"
|
#include "aicwf_txq_prealloc.h"
|
||||||
|
|
||||||
|
|
||||||
#define DRV_DESCRIPTION "AIC BSP"
|
#define DRV_DESCRIPTION "AIC BSP"
|
||||||
#define DRV_COPYRIGHT "Copyright(c) 2015-2020 AICSemi"
|
#define DRV_COPYRIGHT "Copyright(c) 2015-2020 AICSemi"
|
||||||
#define DRV_AUTHOR "AICSemi"
|
#define DRV_AUTHOR "AICSemi"
|
||||||
#define DRV_VERS_MOD "1.0"
|
#define DRV_VERS_MOD "1.0"
|
||||||
|
|
||||||
int aicwf_dbg_level_bsp = LOGERROR|LOGINFO|LOGDEBUG|LOGTRACE;
|
int aicwf_dbg_level_bsp = LOGERROR | LOGINFO | LOGDEBUG | LOGTRACE;
|
||||||
|
|
||||||
|
struct semaphore aicbsp_probe_semaphore;
|
||||||
|
|
||||||
static struct platform_device *aicbsp_pdev;
|
static struct platform_device *aicbsp_pdev;
|
||||||
|
|
||||||
const struct aicbsp_firmware *aicbsp_firmware_list = fw_u02;
|
const struct aicbsp_firmware *aicbsp_firmware_list = fw_u02;
|
||||||
|
|
||||||
const struct aicbsp_firmware fw_u02[] = {
|
const struct aicbsp_firmware fw_u02[] = {
|
||||||
[AICBSP_CPMODE_WORK] = {
|
[AICBSP_CPMODE_WORK] = { .desc = "normal work mode(sdio u02)",
|
||||||
.desc = "normal work mode(sdio u02)",
|
|
||||||
.bt_adid = "fw_adid.bin",
|
.bt_adid = "fw_adid.bin",
|
||||||
.bt_patch = "fw_patch.bin",
|
.bt_patch = "fw_patch.bin",
|
||||||
.bt_table = "fw_patch_table.bin",
|
.bt_table = "fw_patch_table.bin",
|
||||||
#ifdef CONFIG_SDIO_BT
|
#ifdef CONFIG_SDIO_BT
|
||||||
.wl_fw = "fmacfwbt.bin"
|
.wl_fw = "fmacfwbt.bin"
|
||||||
#else
|
#else
|
||||||
.wl_fw = "fmacfw.bin"
|
.wl_fw = "fmacfw.bin"
|
||||||
#endif
|
#endif
|
||||||
},
|
},
|
||||||
[AICBSP_CPMODE_TEST] = {
|
[AICBSP_CPMODE_TEST] = { .desc = "rf test mode(sdio u02)",
|
||||||
.desc = "rf test mode(sdio u02)",
|
|
||||||
.bt_adid = "fw_adid.bin",
|
.bt_adid = "fw_adid.bin",
|
||||||
.bt_patch = "fw_patch.bin",
|
.bt_patch = "fw_patch.bin",
|
||||||
.bt_table = "fw_patch_table.bin",
|
.bt_table = "fw_patch_table.bin",
|
||||||
.wl_fw = "fmacfw_rf.bin"
|
.wl_fw = "fmacfw_rf.bin" },
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct aicbsp_firmware fw_u03[] = {
|
const struct aicbsp_firmware fw_u03[] = {
|
||||||
[AICBSP_CPMODE_WORK] = {
|
[AICBSP_CPMODE_WORK] = { .desc = "normal work mode(sdio u03/u04)",
|
||||||
.desc = "normal work mode(sdio u03/u04)",
|
|
||||||
.bt_adid = "fw_adid_u03.bin",
|
.bt_adid = "fw_adid_u03.bin",
|
||||||
.bt_patch = "fw_patch_u03.bin",
|
.bt_patch = "fw_patch_u03.bin",
|
||||||
.bt_table = "fw_patch_table_u03.bin",
|
.bt_table = "fw_patch_table_u03.bin",
|
||||||
#ifdef CONFIG_MCU_MESSAGE
|
#ifdef CONFIG_MCU_MESSAGE
|
||||||
.wl_fw = "fmacfw_8800m_custmsg.bin"
|
.wl_fw = "fmacfw_8800m_custmsg.bin"
|
||||||
#elif defined(CONFIG_SDIO_BT)
|
#elif defined(CONFIG_SDIO_BT)
|
||||||
.wl_fw = "fmacfwbt.bin"
|
.wl_fw = "fmacfwbt.bin"
|
||||||
#else
|
#else
|
||||||
.wl_fw = "fmacfw.bin"
|
.wl_fw = "fmacfw.bin"
|
||||||
#endif
|
#endif
|
||||||
},
|
},
|
||||||
|
|
||||||
[AICBSP_CPMODE_TEST] = {
|
[AICBSP_CPMODE_TEST] = { .desc = "rf test mode(sdio u03/u04)",
|
||||||
.desc = "rf test mode(sdio u03/u04)",
|
|
||||||
.bt_adid = "fw_adid_u03.bin",
|
.bt_adid = "fw_adid_u03.bin",
|
||||||
.bt_patch = "fw_patch_u03.bin",
|
.bt_patch = "fw_patch_u03.bin",
|
||||||
.bt_table = "fw_patch_table_u03.bin",
|
.bt_table = "fw_patch_table_u03.bin",
|
||||||
.wl_fw = "fmacfw_rf.bin"
|
.wl_fw = "fmacfw_rf.bin" },
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct aicbsp_firmware fw_8800dc_u01[] = {
|
const struct aicbsp_firmware fw_8800dc_u01[] = {
|
||||||
[AICBSP_CPMODE_WORK] = {
|
[AICBSP_CPMODE_WORK] = { .desc = "normal work mode(sdio u01)",
|
||||||
.desc = "normal work mode(sdio u01)",
|
|
||||||
.bt_adid = "fw_adid_8800dc.bin",
|
.bt_adid = "fw_adid_8800dc.bin",
|
||||||
.bt_patch = "fw_patch_8800dc.bin",
|
.bt_patch = "fw_patch_8800dc.bin",
|
||||||
.bt_table = "fw_patch_table_8800dc.bin",
|
.bt_table = "fw_patch_table_8800dc.bin",
|
||||||
.wl_fw = "fmacfw_8800dc.bin"
|
.wl_fw = "fmacfw_8800dc.bin" },
|
||||||
},
|
|
||||||
|
|
||||||
[AICBSP_CPMODE_TEST] = {
|
[AICBSP_CPMODE_TEST] = { .desc = "rf test mode(sdio u01)",
|
||||||
.desc = "rf test mode(sdio u01)",
|
|
||||||
.bt_adid = "fw_adid_8800dc.bin",
|
.bt_adid = "fw_adid_8800dc.bin",
|
||||||
.bt_patch = "fw_patch_8800dc.bin",
|
.bt_patch = "fw_patch_8800dc.bin",
|
||||||
.bt_table = "fw_patch_table_8800dc.bin",
|
.bt_table = "fw_patch_table_8800dc.bin",
|
||||||
.wl_fw = "fmacfw_rf_8800dc.bin"
|
.wl_fw = "fmacfw_rf_8800dc.bin" },
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const struct aicbsp_firmware fw_8800dc_u02[] = {
|
const struct aicbsp_firmware fw_8800dc_u02[] = {
|
||||||
[AICBSP_CPMODE_WORK] = {
|
[AICBSP_CPMODE_WORK] = {
|
||||||
.desc = "normal work mode(8800dc sdio u02)",
|
.desc = "normal work mode(8800dc sdio u02)",
|
||||||
.bt_adid = "fw_adid_8800dc_u02.bin",
|
.bt_adid = "fw_adid_8800dc_u02.bin",
|
||||||
.bt_patch = "fw_patch_8800dc_u02.bin",
|
.bt_patch = "fw_patch_8800dc_u02.bin",
|
||||||
.bt_table = "fw_patch_table_8800dc_u02.bin",
|
.bt_table = "fw_patch_table_8800dc_u02.bin",
|
||||||
|
.bt_ext_patch = "fw_patch_8800dc_u02_ext",
|
||||||
.wl_fw = "fmacfw_patch_8800dc_u02.bin"
|
.wl_fw = "fmacfw_patch_8800dc_u02.bin"
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -99,6 +90,7 @@ const struct aicbsp_firmware fw_8800dc_u02[] = {
|
|||||||
.bt_adid = "fw_adid_8800dc_u02.bin",
|
.bt_adid = "fw_adid_8800dc_u02.bin",
|
||||||
.bt_patch = "fw_patch_8800dc_u02.bin",
|
.bt_patch = "fw_patch_8800dc_u02.bin",
|
||||||
.bt_table = "fw_patch_table_8800dc_u02.bin",
|
.bt_table = "fw_patch_table_8800dc_u02.bin",
|
||||||
|
.bt_ext_patch = "fw_patch_8800dc_u02_ext",
|
||||||
.wl_fw = "lmacfw_rf_8800dc.bin" //u01,u02 lmacfw load same bin
|
.wl_fw = "lmacfw_rf_8800dc.bin" //u01,u02 lmacfw load same bin
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -109,6 +101,7 @@ const struct aicbsp_firmware fw_8800dc_h_u02[] = {
|
|||||||
.bt_adid = "fw_adid_8800dc_u02h.bin",
|
.bt_adid = "fw_adid_8800dc_u02h.bin",
|
||||||
.bt_patch = "fw_patch_8800dc_u02h.bin",
|
.bt_patch = "fw_patch_8800dc_u02h.bin",
|
||||||
.bt_table = "fw_patch_table_8800dc_u02h.bin",
|
.bt_table = "fw_patch_table_8800dc_u02h.bin",
|
||||||
|
.bt_ext_patch = "fw_patch_8800dc_u02h_ext",
|
||||||
.wl_fw = "fmacfw_patch_8800dc_h_u02.bin"
|
.wl_fw = "fmacfw_patch_8800dc_h_u02.bin"
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -117,71 +110,87 @@ const struct aicbsp_firmware fw_8800dc_h_u02[] = {
|
|||||||
.bt_adid = "fw_adid_8800dc_u02h.bin",
|
.bt_adid = "fw_adid_8800dc_u02h.bin",
|
||||||
.bt_patch = "fw_patch_8800dc_u02h.bin",
|
.bt_patch = "fw_patch_8800dc_u02h.bin",
|
||||||
.bt_table = "fw_patch_table_8800dc_u02h.bin",
|
.bt_table = "fw_patch_table_8800dc_u02h.bin",
|
||||||
|
.bt_ext_patch = "fw_patch_8800dc_u02h_ext",
|
||||||
.wl_fw = "lmacfw_rf_8800dc.bin" //u01,u02 lmacfw load same bin
|
.wl_fw = "lmacfw_rf_8800dc.bin" //u01,u02 lmacfw load same bin
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const struct aicbsp_firmware fw_8800d80_u01[] = {
|
const struct aicbsp_firmware fw_8800d80_u01[] = {
|
||||||
[AICBSP_CPMODE_WORK] = {
|
[AICBSP_CPMODE_WORK] = { .desc = "normal work mode(8800d80 sdio u01)",
|
||||||
.desc = "normal work mode(8800d80 sdio u01)",
|
|
||||||
.bt_adid = "fw_adid_8800d80.bin",
|
.bt_adid = "fw_adid_8800d80.bin",
|
||||||
.bt_patch = "fw_patch_8800d80.bin",
|
.bt_patch = "fw_patch_8800d80.bin",
|
||||||
.bt_table = "fw_patch_table_8800d80.bin",
|
.bt_table = "fw_patch_table_8800d80.bin",
|
||||||
.wl_fw = "fmacfw_8800d80.bin"
|
.wl_fw = "fmacfw_8800d80.bin" },
|
||||||
},
|
|
||||||
|
|
||||||
[AICBSP_CPMODE_TEST] = {
|
[AICBSP_CPMODE_TEST] = { .desc = "rf test mode(8800d80 sdio u01)",
|
||||||
.desc = "rf test mode(8800d80 sdio u01)",
|
|
||||||
.bt_adid = "fw_adid_8800d80.bin",
|
.bt_adid = "fw_adid_8800d80.bin",
|
||||||
.bt_patch = "fw_patch_8800d80.bin",
|
.bt_patch = "fw_patch_8800d80.bin",
|
||||||
.bt_table = "fw_patch_table_8800d80.bin",
|
.bt_table = "fw_patch_table_8800d80.bin",
|
||||||
.wl_fw = "lmacfw_rf_8800d80.bin"
|
.wl_fw = "lmacfw_rf_8800d80.bin" },
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct aicbsp_firmware fw_8800d80_u02[] = {
|
const struct aicbsp_firmware fw_8800d80_u02[] = {
|
||||||
[AICBSP_CPMODE_WORK] = {
|
[AICBSP_CPMODE_WORK] = { .desc = "normal work mode(8800d80 sdio u02)",
|
||||||
.desc = "normal work mode(8800d80 sdio u02)",
|
|
||||||
.bt_adid = "fw_adid_8800d80_u02.bin",
|
.bt_adid = "fw_adid_8800d80_u02.bin",
|
||||||
.bt_patch = "fw_patch_8800d80_u02.bin",
|
.bt_patch = "fw_patch_8800d80_u02.bin",
|
||||||
.bt_table = "fw_patch_table_8800d80_u02.bin",
|
.bt_table = "fw_patch_table_8800d80_u02.bin",
|
||||||
#ifdef CONFIG_SDIO_BT
|
#if defined CONFIG_SDIO_BT
|
||||||
.wl_fw = "fmacfwbt_8800d80_u02.bin"
|
.wl_fw = "fmacfwbt_8800d80_u02.bin",
|
||||||
#else
|
#elif defined CONFIG_FOR_IPCAM
|
||||||
.wl_fw = "fmacfw_8800d80_u02.bin"
|
.wl_fw = "fmacfw_8800d80_u02_ipc.bin",
|
||||||
#endif
|
#else
|
||||||
},
|
.wl_fw = "fmacfw_8800d80_u02.bin",
|
||||||
|
#endif
|
||||||
|
.bt_ext_patch = "fw_patch_8800d80_u02_ext" },
|
||||||
|
|
||||||
[AICBSP_CPMODE_TEST] = {
|
[AICBSP_CPMODE_TEST] = { .desc = "rf test mode(8800d80 sdio u02)",
|
||||||
.desc = "rf test mode(8800d80 sdio u02)",
|
|
||||||
.bt_adid = "fw_adid_8800d80_u02.bin",
|
.bt_adid = "fw_adid_8800d80_u02.bin",
|
||||||
.bt_patch = "fw_patch_8800d80_u02.bin",
|
.bt_patch = "fw_patch_8800d80_u02.bin",
|
||||||
.bt_table = "fw_patch_table_8800d80_u02.bin",
|
.bt_table = "fw_patch_table_8800d80_u02.bin",
|
||||||
.wl_fw = "lmacfw_rf_8800d80_u02.bin"
|
.wl_fw = "lmacfw_rf_8800d80_u02.bin",
|
||||||
},
|
.bt_ext_patch = "fw_patch_8800d80_u02_ext" },
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct aicbsp_firmware fw_8800d80_h_u02[] = {
|
const struct aicbsp_firmware fw_8800d80_h_u02[] = {
|
||||||
[AICBSP_CPMODE_WORK] = {
|
[AICBSP_CPMODE_WORK] = { .desc = "normal work mode(8800d80 sdio h_u02)",
|
||||||
.desc = "normal work mode(8800d80 sdio h_u02)",
|
|
||||||
.bt_adid = "fw_adid_8800d80_u02.bin",
|
.bt_adid = "fw_adid_8800d80_u02.bin",
|
||||||
.bt_patch = "fw_patch_8800d80_u02.bin",
|
.bt_patch = "fw_patch_8800d80_u02.bin",
|
||||||
.bt_table = "fw_patch_table_8800d80_u02.bin",
|
.bt_table = "fw_patch_table_8800d80_u02.bin",
|
||||||
#ifdef CONFIG_SDIO_BT
|
#if defined CONFIG_SDIO_BT
|
||||||
.wl_fw = "fmacfwbt_8800d80_h_u02.bin"
|
.wl_fw = "fmacfwbt_8800d80_h_u02.bin",
|
||||||
#else
|
#elif defined CONFIG_FOR_IPCAM
|
||||||
.wl_fw = "fmacfw_8800d80_h_u02.bin"
|
.wl_fw = "fmacfw_8800d80_h_u02_ipc.bin",
|
||||||
#endif
|
#else
|
||||||
},
|
.wl_fw = "fmacfw_8800d80_h_u02.bin",
|
||||||
|
#endif
|
||||||
|
.bt_ext_patch = "fw_patch_8800d80_u02_ext" },
|
||||||
|
|
||||||
[AICBSP_CPMODE_TEST] = {
|
[AICBSP_CPMODE_TEST] = { .desc = "rf test mode(8800d80 sdio u02)",
|
||||||
.desc = "rf test mode(8800d80 sdio u02)",
|
|
||||||
.bt_adid = "fw_adid_8800d80_u02.bin",
|
.bt_adid = "fw_adid_8800d80_u02.bin",
|
||||||
.bt_patch = "fw_patch_8800d80_u02.bin",
|
.bt_patch = "fw_patch_8800d80_u02.bin",
|
||||||
.bt_table = "fw_patch_table_8800d80_u02.bin",
|
.bt_table = "fw_patch_table_8800d80_u02.bin",
|
||||||
.wl_fw = "lmacfw_rf_8800d80_u02.bin"
|
.wl_fw = "lmacfw_rf_8800d80_u02.bin",
|
||||||
},
|
.bt_ext_patch = "fw_patch_8800d80_u02_ext" },
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct aicbsp_firmware fw_8800d80x2[] = {
|
||||||
|
[AICBSP_CPMODE_WORK] = { .desc = "normal work mode(8800d80x2 sdio)",
|
||||||
|
.bt_adid = "fw_adid_8800d80x2_u05.bin",
|
||||||
|
.bt_patch = "fw_patch_8800d80x2_u05.bin",
|
||||||
|
.bt_table = "fw_patch_table_8800d80x2_u05.bin",
|
||||||
|
#ifdef CONFIG_SDIO_BT
|
||||||
|
.wl_fw = "fmacfwbt_8800d80_h_u02.bin",
|
||||||
|
#else
|
||||||
|
.wl_fw = "fmacfw_8800d80x2.bin",
|
||||||
|
#endif
|
||||||
|
.bt_ext_patch = "fw_patch_8800d80x2_u05_ext" },
|
||||||
|
|
||||||
|
[AICBSP_CPMODE_TEST] = { .desc = "rf test mode(8800d80x2 sdio)",
|
||||||
|
.bt_adid = "fw_adid_8800d80x2_u05.bin",
|
||||||
|
.bt_patch = "fw_patch_8800d80x2_u05.bin",
|
||||||
|
.bt_table = "fw_patch_table_8800d80x2_u05.bin",
|
||||||
|
.wl_fw = "lmacfw_rf_8800d80x2.bin",
|
||||||
|
.bt_ext_patch = "fw_patch_8800d80x2_u05_ext" },
|
||||||
};
|
};
|
||||||
|
|
||||||
struct aicbsp_info_t aicbsp_info = {
|
struct aicbsp_info_t aicbsp_info = {
|
||||||
@@ -207,8 +216,8 @@ static struct platform_driver aicbsp_driver = {
|
|||||||
//.remove = aicbsp_remove,
|
//.remove = aicbsp_remove,
|
||||||
};
|
};
|
||||||
|
|
||||||
static ssize_t cpmode_show(struct device *dev,
|
static ssize_t cpmode_show(struct device *dev, struct device_attribute *attr,
|
||||||
struct device_attribute *attr, char *buf)
|
char *buf)
|
||||||
{
|
{
|
||||||
ssize_t count = 0;
|
ssize_t count = 0;
|
||||||
uint8_t i = 0;
|
uint8_t i = 0;
|
||||||
@@ -217,19 +226,25 @@ static ssize_t cpmode_show(struct device *dev,
|
|||||||
|
|
||||||
for (i = 0; i < AICBSP_CPMODE_MAX; i++) {
|
for (i = 0; i < AICBSP_CPMODE_MAX; i++) {
|
||||||
if (aicbsp_firmware_list[i].desc)
|
if (aicbsp_firmware_list[i].desc)
|
||||||
count += sprintf(&buf[count], " %2d: %s\n", i, aicbsp_firmware_list[i].desc);
|
count += sprintf(&buf[count], " %2d: %s\n", i,
|
||||||
|
aicbsp_firmware_list[i].desc);
|
||||||
}
|
}
|
||||||
|
|
||||||
count += sprintf(&buf[count], "Current: %d, firmware info:\n", aicbsp_info.cpmode);
|
count += sprintf(&buf[count], "Current: %d, firmware info:\n",
|
||||||
count += sprintf(&buf[count], " BT ADID : %s\n", aicbsp_firmware_list[aicbsp_info.cpmode].bt_adid);
|
aicbsp_info.cpmode);
|
||||||
count += sprintf(&buf[count], " BT PATCH: %s\n", aicbsp_firmware_list[aicbsp_info.cpmode].bt_patch);
|
count += sprintf(&buf[count], " BT ADID : %s\n",
|
||||||
count += sprintf(&buf[count], " BT TABLE: %s\n", aicbsp_firmware_list[aicbsp_info.cpmode].bt_table);
|
aicbsp_firmware_list[aicbsp_info.cpmode].bt_adid);
|
||||||
count += sprintf(&buf[count], " WIFI FW : %s\n", aicbsp_firmware_list[aicbsp_info.cpmode].wl_fw);
|
count += sprintf(&buf[count], " BT PATCH: %s\n",
|
||||||
|
aicbsp_firmware_list[aicbsp_info.cpmode].bt_patch);
|
||||||
|
count += sprintf(&buf[count], " BT TABLE: %s\n",
|
||||||
|
aicbsp_firmware_list[aicbsp_info.cpmode].bt_table);
|
||||||
|
count += sprintf(&buf[count], " WIFI FW : %s\n",
|
||||||
|
aicbsp_firmware_list[aicbsp_info.cpmode].wl_fw);
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ssize_t cpmode_store(struct device *dev,
|
static ssize_t cpmode_store(struct device *dev, struct device_attribute *attr,
|
||||||
struct device_attribute *attr, const char *buf, size_t count)
|
const char *buf, size_t count)
|
||||||
{
|
{
|
||||||
unsigned long val;
|
unsigned long val;
|
||||||
int err = kstrtoul(buf, 0, &val);
|
int err = kstrtoul(buf, 0, &val);
|
||||||
@@ -242,13 +257,14 @@ static ssize_t cpmode_store(struct device *dev,
|
|||||||
}
|
}
|
||||||
|
|
||||||
aicbsp_info.cpmode = val;
|
aicbsp_info.cpmode = val;
|
||||||
printk("%s, set mode to: %lu[%s] done\n", __func__, val, aicbsp_firmware_list[val].desc);
|
printk("%s, set mode to: %lu[%s] done\n", __func__, val,
|
||||||
|
aicbsp_firmware_list[val].desc);
|
||||||
|
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ssize_t hwinfo_show(struct device *dev,
|
static ssize_t hwinfo_show(struct device *dev, struct device_attribute *attr,
|
||||||
struct device_attribute *attr, char *buf)
|
char *buf)
|
||||||
{
|
{
|
||||||
ssize_t count = 0;
|
ssize_t count = 0;
|
||||||
|
|
||||||
@@ -260,20 +276,23 @@ static ssize_t hwinfo_show(struct device *dev,
|
|||||||
|
|
||||||
count += sprintf(&buf[count], "hwinfo read: ");
|
count += sprintf(&buf[count], "hwinfo read: ");
|
||||||
if (aicbsp_info.hwinfo_r < 0)
|
if (aicbsp_info.hwinfo_r < 0)
|
||||||
count += sprintf(&buf[count], "%d(not avalible), ", aicbsp_info.hwinfo_r);
|
count += sprintf(&buf[count], "%d(not avalible), ",
|
||||||
|
aicbsp_info.hwinfo_r);
|
||||||
else
|
else
|
||||||
count += sprintf(&buf[count], "0x%02X, ", aicbsp_info.hwinfo_r);
|
count += sprintf(&buf[count], "0x%02X, ", aicbsp_info.hwinfo_r);
|
||||||
|
|
||||||
if (aicbsp_info.hwinfo < 0)
|
if (aicbsp_info.hwinfo < 0)
|
||||||
count += sprintf(&buf[count], "set: %d(not avalible)\n", aicbsp_info.hwinfo);
|
count += sprintf(&buf[count], "set: %d(not avalible)\n",
|
||||||
|
aicbsp_info.hwinfo);
|
||||||
else
|
else
|
||||||
count += sprintf(&buf[count], "set: 0x%02X\n", aicbsp_info.hwinfo);
|
count += sprintf(&buf[count], "set: 0x%02X\n",
|
||||||
|
aicbsp_info.hwinfo);
|
||||||
|
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ssize_t hwinfo_store(struct device *dev,
|
static ssize_t hwinfo_store(struct device *dev, struct device_attribute *attr,
|
||||||
struct device_attribute *attr, const char *buf, size_t count)
|
const char *buf, size_t count)
|
||||||
{
|
{
|
||||||
long val;
|
long val;
|
||||||
int err = kstrtol(buf, 0, &val);
|
int err = kstrtol(buf, 0, &val);
|
||||||
@@ -292,8 +311,8 @@ static ssize_t hwinfo_store(struct device *dev,
|
|||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ssize_t fwdebug_show(struct device *dev,
|
static ssize_t fwdebug_show(struct device *dev, struct device_attribute *attr,
|
||||||
struct device_attribute *attr, char *buf)
|
char *buf)
|
||||||
{
|
{
|
||||||
ssize_t count = 0;
|
ssize_t count = 0;
|
||||||
|
|
||||||
@@ -303,8 +322,8 @@ static ssize_t fwdebug_show(struct device *dev,
|
|||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ssize_t fwdebug_store(struct device *dev,
|
static ssize_t fwdebug_store(struct device *dev, struct device_attribute *attr,
|
||||||
struct device_attribute *attr, const char *buf, size_t count)
|
const char *buf, size_t count)
|
||||||
{
|
{
|
||||||
long val;
|
long val;
|
||||||
int err = kstrtol(buf, 0, &val);
|
int err = kstrtol(buf, 0, &val);
|
||||||
@@ -323,14 +342,11 @@ static ssize_t fwdebug_store(struct device *dev,
|
|||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
static DEVICE_ATTR(cpmode, S_IRUGO | S_IWUSR,
|
static DEVICE_ATTR(cpmode, S_IRUGO | S_IWUSR, cpmode_show, cpmode_store);
|
||||||
cpmode_show, cpmode_store);
|
|
||||||
|
|
||||||
static DEVICE_ATTR(hwinfo, S_IRUGO | S_IWUSR,
|
static DEVICE_ATTR(hwinfo, S_IRUGO | S_IWUSR, hwinfo_show, hwinfo_store);
|
||||||
hwinfo_show, hwinfo_store);
|
|
||||||
|
|
||||||
static DEVICE_ATTR(fwdebug, S_IRUGO | S_IWUSR,
|
static DEVICE_ATTR(fwdebug, S_IRUGO | S_IWUSR, fwdebug_show, fwdebug_store);
|
||||||
fwdebug_show, fwdebug_store);
|
|
||||||
|
|
||||||
static struct attribute *aicbsp_attributes[] = {
|
static struct attribute *aicbsp_attributes[] = {
|
||||||
&dev_attr_cpmode.attr,
|
&dev_attr_cpmode.attr,
|
||||||
@@ -349,7 +365,6 @@ int adap_test = 0;
|
|||||||
module_param(testmode, int, 0660);
|
module_param(testmode, int, 0660);
|
||||||
module_param(adap_test, int, 0660);
|
module_param(adap_test, int, 0660);
|
||||||
|
|
||||||
|
|
||||||
static int __init aicbsp_init(void)
|
static int __init aicbsp_init(void)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
@@ -359,6 +374,9 @@ static int __init aicbsp_init(void)
|
|||||||
aicbsp_info.cpmode = testmode;
|
aicbsp_info.cpmode = testmode;
|
||||||
|
|
||||||
aicbsp_resv_mem_init();
|
aicbsp_resv_mem_init();
|
||||||
|
|
||||||
|
sema_init(&aicbsp_probe_semaphore, 0);
|
||||||
|
|
||||||
ret = platform_driver_register(&aicbsp_driver);
|
ret = platform_driver_register(&aicbsp_driver);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
pr_err("register platform driver failed: %d\n", ret);
|
pr_err("register platform driver failed: %d\n", ret);
|
||||||
@@ -372,7 +390,8 @@ static int __init aicbsp_init(void)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = sysfs_create_group(&(aicbsp_pdev->dev.kobj), &aicbsp_attribute_group);
|
ret = sysfs_create_group(&(aicbsp_pdev->dev.kobj),
|
||||||
|
&aicbsp_attribute_group);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
pr_err("register sysfs create group failed!\n");
|
pr_err("register sysfs create group failed!\n");
|
||||||
return ret;
|
return ret;
|
||||||
@@ -391,7 +410,7 @@ extern struct aic_sdio_dev *aicbsp_sdiodev;
|
|||||||
static void __exit aicbsp_exit(void)
|
static void __exit aicbsp_exit(void)
|
||||||
{
|
{
|
||||||
#if defined CONFIG_PLATFORM_ROCKCHIP || defined CONFIG_PLATFORM_ROCKCHIP2
|
#if defined CONFIG_PLATFORM_ROCKCHIP || defined CONFIG_PLATFORM_ROCKCHIP2
|
||||||
if(aicbsp_sdiodev){
|
if (aicbsp_sdiodev) {
|
||||||
aicbsp_sdio_exit();
|
aicbsp_sdio_exit();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -53,7 +53,7 @@
|
|||||||
#define FLOW_CTRL_RETRY_COUNT 50
|
#define FLOW_CTRL_RETRY_COUNT 50
|
||||||
#define BUFFER_SIZE 1536
|
#define BUFFER_SIZE 1536
|
||||||
#define TAIL_LEN 4
|
#define TAIL_LEN 4
|
||||||
#define TXQLEN (2048*4)
|
#define TXQLEN (2048 * 4)
|
||||||
|
|
||||||
#define SDIO_SLEEP_ST 0
|
#define SDIO_SLEEP_ST 0
|
||||||
#define SDIO_ACTIVE_ST 1
|
#define SDIO_ACTIVE_ST 1
|
||||||
@@ -65,11 +65,12 @@ typedef enum {
|
|||||||
SDIO_TYPE_CFG_DATA_CFM = 0X12
|
SDIO_TYPE_CFG_DATA_CFM = 0X12
|
||||||
} sdio_type;
|
} sdio_type;
|
||||||
|
|
||||||
enum AICWF_IC{
|
enum AICWF_IC {
|
||||||
PRODUCT_ID_AIC8801 = 0,
|
PRODUCT_ID_AIC8801 = 0,
|
||||||
PRODUCT_ID_AIC8800DC,
|
PRODUCT_ID_AIC8800DC,
|
||||||
PRODUCT_ID_AIC8800DW,
|
PRODUCT_ID_AIC8800DW,
|
||||||
PRODUCT_ID_AIC8800D80
|
PRODUCT_ID_AIC8800D80,
|
||||||
|
PRODUCT_ID_AIC8800D80X2
|
||||||
};
|
};
|
||||||
|
|
||||||
struct aic_sdio_reg {
|
struct aic_sdio_reg {
|
||||||
@@ -110,7 +111,7 @@ struct aic_sdio_dev {
|
|||||||
u16 chipid;
|
u16 chipid;
|
||||||
u32 fw_version_uint;
|
u32 fw_version_uint;
|
||||||
struct aic_sdio_reg sdio_reg;
|
struct aic_sdio_reg sdio_reg;
|
||||||
void (*sdio_hal_irqhandler) (struct sdio_func *func);
|
void (*sdio_hal_irqhandler)(struct sdio_func *func);
|
||||||
};
|
};
|
||||||
|
|
||||||
void *aicbsp_get_drvdata(void *args);
|
void *aicbsp_get_drvdata(void *args);
|
||||||
@@ -126,7 +127,8 @@ int aicwf_sdio_func_init(struct aic_sdio_dev *sdiodev);
|
|||||||
int aicwf_sdiov3_func_init(struct aic_sdio_dev *sdiodev);
|
int aicwf_sdiov3_func_init(struct aic_sdio_dev *sdiodev);
|
||||||
void aicwf_sdio_func_deinit(struct aic_sdio_dev *sdiodev);
|
void aicwf_sdio_func_deinit(struct aic_sdio_dev *sdiodev);
|
||||||
int aicwf_sdio_flow_ctrl(struct aic_sdio_dev *sdiodev);
|
int aicwf_sdio_flow_ctrl(struct aic_sdio_dev *sdiodev);
|
||||||
int aicwf_sdio_recv_pkt(struct aic_sdio_dev *sdiodev, struct sk_buff *skbbuf, u32 size, u8 msg);
|
int aicwf_sdio_recv_pkt(struct aic_sdio_dev *sdiodev, struct sk_buff *skbbuf,
|
||||||
|
u32 size, u8 msg);
|
||||||
int aicwf_sdio_send_pkt(struct aic_sdio_dev *sdiodev, u8 *buf, uint count);
|
int aicwf_sdio_send_pkt(struct aic_sdio_dev *sdiodev, u8 *buf, uint count);
|
||||||
void *aicwf_sdio_bus_init(struct aic_sdio_dev *sdiodev);
|
void *aicwf_sdio_bus_init(struct aic_sdio_dev *sdiodev);
|
||||||
void aicwf_sdio_release(struct aic_sdio_dev *sdiodev);
|
void aicwf_sdio_release(struct aic_sdio_dev *sdiodev);
|
||||||
|
|||||||
@@ -40,10 +40,8 @@ int aicwf_bus_init(uint bus_hdrlen, struct device *dev)
|
|||||||
init_completion(&bus_if->bustx_trgg);
|
init_completion(&bus_if->bustx_trgg);
|
||||||
init_completion(&bus_if->busrx_trgg);
|
init_completion(&bus_if->busrx_trgg);
|
||||||
#ifdef AICWF_SDIO_SUPPORT
|
#ifdef AICWF_SDIO_SUPPORT
|
||||||
bus_if->bustx_thread = kthread_run(aicwf_sdio_bustx_thread, (void *)bus_if, "aicwf_bustx_thread");
|
bus_if->bustx_thread = kthread_run(
|
||||||
bus_if->busrx_thread = kthread_run(aicwf_sdio_busrx_thread, (void *)bus_if->bus_priv.sdio->rx_priv, "aicwf_busrx_thread");
|
aicwf_sdio_bustx_thread, (void *)bus_if, "aicwf_bustx_thread");
|
||||||
#endif
|
|
||||||
|
|
||||||
if (IS_ERR(bus_if->bustx_thread)) {
|
if (IS_ERR(bus_if->bustx_thread)) {
|
||||||
bus_if->bustx_thread = NULL;
|
bus_if->bustx_thread = NULL;
|
||||||
txrx_err("aicwf_bustx_thread run fail\n");
|
txrx_err("aicwf_bustx_thread run fail\n");
|
||||||
@@ -51,6 +49,10 @@ int aicwf_bus_init(uint bus_hdrlen, struct device *dev)
|
|||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bus_if->busrx_thread =
|
||||||
|
kthread_run(aicwf_sdio_busrx_thread,
|
||||||
|
(void *)bus_if->bus_priv.sdio->rx_priv,
|
||||||
|
"aicwf_busrx_thread");
|
||||||
if (IS_ERR(bus_if->busrx_thread)) {
|
if (IS_ERR(bus_if->busrx_thread)) {
|
||||||
bus_if->busrx_thread = NULL;
|
bus_if->busrx_thread = NULL;
|
||||||
txrx_err("aicwf_bustx_thread run fail\n");
|
txrx_err("aicwf_bustx_thread run fail\n");
|
||||||
@@ -58,6 +60,7 @@ int aicwf_bus_init(uint bus_hdrlen, struct device *dev)
|
|||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
return ret;
|
return ret;
|
||||||
fail:
|
fail:
|
||||||
aicwf_bus_deinit(dev);
|
aicwf_bus_deinit(dev);
|
||||||
@@ -173,15 +176,19 @@ int aicwf_process_rxframes(struct aicwf_rx_priv *rx_priv)
|
|||||||
data = skb->data;
|
data = skb->data;
|
||||||
pkt_len = (*skb->data | (*(skb->data + 1) << 8));
|
pkt_len = (*skb->data | (*(skb->data + 1) << 8));
|
||||||
|
|
||||||
if ((skb->data[2] & SDIO_TYPE_CFG) != SDIO_TYPE_CFG) { // type : data
|
if ((skb->data[2] & SDIO_TYPE_CFG) !=
|
||||||
|
SDIO_TYPE_CFG) { // type : data
|
||||||
aggr_len = pkt_len + RX_HWHRD_LEN;
|
aggr_len = pkt_len + RX_HWHRD_LEN;
|
||||||
|
|
||||||
if (aggr_len & (RX_ALIGNMENT - 1))
|
if (aggr_len & (RX_ALIGNMENT - 1))
|
||||||
adjust_len = roundup(aggr_len, RX_ALIGNMENT);
|
adjust_len =
|
||||||
|
roundup(aggr_len, RX_ALIGNMENT);
|
||||||
else
|
else
|
||||||
adjust_len = aggr_len;
|
adjust_len = aggr_len;
|
||||||
|
|
||||||
skb_inblock = __dev_alloc_skb(aggr_len + CCMP_OR_WEP_INFO, GFP_KERNEL);//8 is for ccmp mic or wep icv
|
skb_inblock = __dev_alloc_skb(
|
||||||
|
aggr_len + CCMP_OR_WEP_INFO,
|
||||||
|
GFP_KERNEL); //8 is for ccmp mic or wep icv
|
||||||
if (skb_inblock == NULL) {
|
if (skb_inblock == NULL) {
|
||||||
txrx_err("no more space!\n");
|
txrx_err("no more space!\n");
|
||||||
aicwf_dev_skb_free(skb);
|
aicwf_dev_skb_free(skb);
|
||||||
@@ -190,34 +197,41 @@ int aicwf_process_rxframes(struct aicwf_rx_priv *rx_priv)
|
|||||||
|
|
||||||
skb_put(skb_inblock, aggr_len);
|
skb_put(skb_inblock, aggr_len);
|
||||||
memcpy(skb_inblock->data, data, aggr_len);
|
memcpy(skb_inblock->data, data, aggr_len);
|
||||||
#if 0
|
#if 0
|
||||||
rwnx_rxdataind_aicwf(rx_priv->sdiodev->rwnx_hw, skb_inblock, (void *)rx_priv);
|
rwnx_rxdataind_aicwf(rx_priv->sdiodev->rwnx_hw, skb_inblock, (void *)rx_priv);
|
||||||
#endif
|
#endif
|
||||||
skb_pull(skb, adjust_len);
|
skb_pull(skb, adjust_len);
|
||||||
} else { // type : config
|
} else { // type : config
|
||||||
aggr_len = pkt_len;
|
aggr_len = pkt_len;
|
||||||
|
|
||||||
if (aggr_len & (RX_ALIGNMENT - 1))
|
if (aggr_len & (RX_ALIGNMENT - 1))
|
||||||
adjust_len = roundup(aggr_len, RX_ALIGNMENT);
|
adjust_len =
|
||||||
|
roundup(aggr_len, RX_ALIGNMENT);
|
||||||
else
|
else
|
||||||
adjust_len = aggr_len;
|
adjust_len = aggr_len;
|
||||||
|
|
||||||
skb_inblock = __dev_alloc_skb(aggr_len+4, GFP_KERNEL);
|
skb_inblock = __dev_alloc_skb(aggr_len + 4,
|
||||||
|
GFP_KERNEL);
|
||||||
if (skb_inblock == NULL) {
|
if (skb_inblock == NULL) {
|
||||||
txrx_err("no more space!\n");
|
txrx_err("no more space!\n");
|
||||||
aicwf_dev_skb_free(skb);
|
aicwf_dev_skb_free(skb);
|
||||||
return -EBADE;
|
return -EBADE;
|
||||||
}
|
}
|
||||||
|
|
||||||
skb_put(skb_inblock, aggr_len+4);
|
skb_put(skb_inblock, aggr_len + 4);
|
||||||
memcpy(skb_inblock->data, data, aggr_len+4);
|
memcpy(skb_inblock->data, data, aggr_len + 4);
|
||||||
if ((*(skb_inblock->data + 2) & 0x7f) == SDIO_TYPE_CFG_CMD_RSP)
|
if ((*(skb_inblock->data + 2) & 0x7f) ==
|
||||||
rwnx_rx_handle_msg(rx_priv->sdiodev, (struct ipc_e2a_msg *)(skb_inblock->data + 4));
|
SDIO_TYPE_CFG_CMD_RSP)
|
||||||
#if 0
|
rwnx_rx_handle_msg(
|
||||||
|
rx_priv->sdiodev,
|
||||||
|
(struct ipc_e2a_msg
|
||||||
|
*)(skb_inblock->data +
|
||||||
|
4));
|
||||||
|
#if 0
|
||||||
if ((*(skb_inblock->data + 2) & 0x7f) == SDIO_TYPE_CFG_DATA_CFM)
|
if ((*(skb_inblock->data + 2) & 0x7f) == SDIO_TYPE_CFG_DATA_CFM)
|
||||||
aicwf_sdio_host_tx_cfm_handler(&(rx_priv->sdiodev->rwnx_hw->sdio_env), (u32 *)(skb_inblock->data + 4));
|
aicwf_sdio_host_tx_cfm_handler(&(rx_priv->sdiodev->rwnx_hw->sdio_env), (u32 *)(skb_inblock->data + 4));
|
||||||
#endif
|
#endif
|
||||||
skb_pull(skb, adjust_len+4);
|
skb_pull(skb, adjust_len + 4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -234,12 +248,13 @@ int aicwf_process_rxframes(struct aicwf_rx_priv *rx_priv)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct recv_msdu *aicwf_rxframe_queue_init(struct list_head *q, int qsize)
|
static struct recv_msdu *aicwf_rxframe_queue_init(struct list_head *q,
|
||||||
|
int qsize)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
struct recv_msdu *req, *reqs;
|
struct recv_msdu *req, *reqs;
|
||||||
|
|
||||||
reqs = vmalloc(qsize*sizeof(struct recv_msdu));
|
reqs = vmalloc(qsize * sizeof(struct recv_msdu));
|
||||||
if (reqs == NULL)
|
if (reqs == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
@@ -268,7 +283,8 @@ struct aicwf_rx_priv *aicwf_rx_init(void *arg)
|
|||||||
|
|
||||||
INIT_LIST_HEAD(&rx_priv->rxframes_freequeue);
|
INIT_LIST_HEAD(&rx_priv->rxframes_freequeue);
|
||||||
spin_lock_init(&rx_priv->freeq_lock);
|
spin_lock_init(&rx_priv->freeq_lock);
|
||||||
rx_priv->recv_frames = aicwf_rxframe_queue_init(&rx_priv->rxframes_freequeue, MAX_REORD_RXFRAME);
|
rx_priv->recv_frames = aicwf_rxframe_queue_init(
|
||||||
|
&rx_priv->rxframes_freequeue, MAX_REORD_RXFRAME);
|
||||||
if (!rx_priv->recv_frames) {
|
if (!rx_priv->recv_frames) {
|
||||||
txrx_err("no enough buffer for free recv frame queue!\n");
|
txrx_err("no enough buffer for free recv frame queue!\n");
|
||||||
kfree(rx_priv);
|
kfree(rx_priv);
|
||||||
@@ -280,12 +296,11 @@ struct aicwf_rx_priv *aicwf_rx_init(void *arg)
|
|||||||
return rx_priv;
|
return rx_priv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void aicwf_recvframe_queue_deinit(struct list_head *q)
|
static void aicwf_recvframe_queue_deinit(struct list_head *q)
|
||||||
{
|
{
|
||||||
struct recv_msdu *req, *next;
|
struct recv_msdu *req, *next;
|
||||||
|
|
||||||
list_for_each_entry_safe(req, next, q, rxframe_list) {
|
list_for_each_entry_safe (req, next, q, rxframe_list) {
|
||||||
list_del_init(&req->rxframe_list);
|
list_del_init(&req->rxframe_list);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -307,12 +322,12 @@ void aicwf_rx_deinit(struct aicwf_rx_priv *rx_priv)
|
|||||||
//rx_priv = NULL;
|
//rx_priv = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool aicwf_rxframe_enqueue(struct device *dev, struct frame_queue *q, struct sk_buff *pkt)
|
bool aicwf_rxframe_enqueue(struct device *dev, struct frame_queue *q,
|
||||||
|
struct sk_buff *pkt)
|
||||||
{
|
{
|
||||||
return aicwf_frame_enq(dev, q, pkt, 0);
|
return aicwf_frame_enq(dev, q, pkt, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void aicwf_dev_skb_free(struct sk_buff *skb)
|
void aicwf_dev_skb_free(struct sk_buff *skb)
|
||||||
{
|
{
|
||||||
if (!skb)
|
if (!skb)
|
||||||
@@ -321,7 +336,8 @@ void aicwf_dev_skb_free(struct sk_buff *skb)
|
|||||||
dev_kfree_skb_any(skb);
|
dev_kfree_skb_any(skb);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct sk_buff *aicwf_frame_queue_penq(struct frame_queue *pq, int prio, struct sk_buff *p)
|
static struct sk_buff *aicwf_frame_queue_penq(struct frame_queue *pq, int prio,
|
||||||
|
struct sk_buff *p)
|
||||||
{
|
{
|
||||||
struct sk_buff_head *q;
|
struct sk_buff_head *q;
|
||||||
|
|
||||||
@@ -345,7 +361,8 @@ void aicwf_frame_queue_flush(struct frame_queue *pq)
|
|||||||
|
|
||||||
for (prio = 0; prio < pq->num_prio; prio++) {
|
for (prio = 0; prio < pq->num_prio; prio++) {
|
||||||
q = &pq->queuelist[prio];
|
q = &pq->queuelist[prio];
|
||||||
skb_queue_walk_safe(q, p, next) {
|
skb_queue_walk_safe(q, p, next)
|
||||||
|
{
|
||||||
skb_unlink(p, q);
|
skb_unlink(p, q);
|
||||||
aicwf_dev_skb_free(p);
|
aicwf_dev_skb_free(p);
|
||||||
pq->qcnt--;
|
pq->qcnt--;
|
||||||
@@ -357,7 +374,9 @@ void aicwf_frame_queue_init(struct frame_queue *pq, int num_prio, int max_len)
|
|||||||
{
|
{
|
||||||
int prio;
|
int prio;
|
||||||
|
|
||||||
memset(pq, 0, offsetof(struct frame_queue, queuelist) + (sizeof(struct sk_buff_head) * num_prio));
|
memset(pq, 0,
|
||||||
|
offsetof(struct frame_queue, queuelist) +
|
||||||
|
(sizeof(struct sk_buff_head) * num_prio));
|
||||||
pq->num_prio = (u16)num_prio;
|
pq->num_prio = (u16)num_prio;
|
||||||
pq->qmax = (u16)max_len;
|
pq->qmax = (u16)max_len;
|
||||||
|
|
||||||
@@ -366,7 +385,8 @@ void aicwf_frame_queue_init(struct frame_queue *pq, int num_prio, int max_len)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct sk_buff *aicwf_frame_queue_peek_tail(struct frame_queue *pq, int *prio_out)
|
struct sk_buff *aicwf_frame_queue_peek_tail(struct frame_queue *pq,
|
||||||
|
int *prio_out)
|
||||||
{
|
{
|
||||||
int prio;
|
int prio;
|
||||||
|
|
||||||
@@ -405,7 +425,8 @@ struct sk_buff *aicwf_frame_dequeue(struct frame_queue *pq)
|
|||||||
if (pq->qcnt == 0)
|
if (pq->qcnt == 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
while ((prio = pq->hi_prio) > 0 && skb_queue_empty(&pq->queuelist[prio]))
|
while ((prio = pq->hi_prio) > 0 &&
|
||||||
|
skb_queue_empty(&pq->queuelist[prio]))
|
||||||
pq->hi_prio--;
|
pq->hi_prio--;
|
||||||
|
|
||||||
q = &pq->queuelist[prio];
|
q = &pq->queuelist[prio];
|
||||||
@@ -430,7 +451,8 @@ static struct sk_buff *aicwf_skb_dequeue_tail(struct frame_queue *pq, int prio)
|
|||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool aicwf_frame_enq(struct device *dev, struct frame_queue *q, struct sk_buff *pkt, int prio)
|
bool aicwf_frame_enq(struct device *dev, struct frame_queue *q,
|
||||||
|
struct sk_buff *pkt, int prio)
|
||||||
{
|
{
|
||||||
struct sk_buff *p = NULL;
|
struct sk_buff *p = NULL;
|
||||||
int prio_modified = -1;
|
int prio_modified = -1;
|
||||||
@@ -461,5 +483,3 @@ bool aicwf_frame_enq(struct device *dev, struct frame_queue *q, struct sk_buff *
|
|||||||
|
|
||||||
return p != NULL;
|
return p != NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
#define CMD_BUF_MAX 1536
|
#define CMD_BUF_MAX 1536
|
||||||
#define TXPKT_BLOCKSIZE 512
|
#define TXPKT_BLOCKSIZE 512
|
||||||
#define MAX_AGGR_TXPKT_LEN (1536*4)
|
#define MAX_AGGR_TXPKT_LEN (1536 * 4)
|
||||||
#define CMD_TX_TIMEOUT 5000
|
#define CMD_TX_TIMEOUT 5000
|
||||||
#define TX_ALIGNMENT 4
|
#define TX_ALIGNMENT 4
|
||||||
|
|
||||||
@@ -30,9 +30,15 @@
|
|||||||
|
|
||||||
#define DBG_LEVEL DEBUG_DEBUG_LEVEL
|
#define DBG_LEVEL DEBUG_DEBUG_LEVEL
|
||||||
|
|
||||||
#define txrx_err(fmt, ...) pr_err("aicbsp: txrx_err:<%s,%d>: " fmt, __func__, __LINE__, ##__VA_ARGS__)
|
#define txrx_err(fmt, ...) \
|
||||||
#define sdio_err(fmt, ...) pr_err("aicbsp: sdio_err:<%s,%d>: " fmt, __func__, __LINE__, ##__VA_ARGS__)
|
pr_err("aicbsp: txrx_err:<%s,%d>: " fmt, __func__, __LINE__, \
|
||||||
#define usb_err(fmt, ...) pr_err("aicbsp: usb_err:<%s,%d>: " fmt, __func__, __LINE__, ##__VA_ARGS__)
|
##__VA_ARGS__)
|
||||||
|
#define sdio_err(fmt, ...) \
|
||||||
|
pr_err("aicbsp: sdio_err:<%s,%d>: " fmt, __func__, __LINE__, \
|
||||||
|
##__VA_ARGS__)
|
||||||
|
#define usb_err(fmt, ...) \
|
||||||
|
pr_err("aicbsp: usb_err:<%s,%d>: " fmt, __func__, __LINE__, \
|
||||||
|
##__VA_ARGS__)
|
||||||
#if DBG_LEVEL >= DEBUG_DEBUG_LEVEL
|
#if DBG_LEVEL >= DEBUG_DEBUG_LEVEL
|
||||||
#define sdio_dbg(fmt, ...) printk("aicbsp: " fmt, ##__VA_ARGS__)
|
#define sdio_dbg(fmt, ...) printk("aicbsp: " fmt, ##__VA_ARGS__)
|
||||||
#define usb_dbg(fmt, ...) printk("aicbsp: " fmt, ##__VA_ARGS__)
|
#define usb_dbg(fmt, ...) printk("aicbsp: " fmt, ##__VA_ARGS__)
|
||||||
@@ -48,16 +54,13 @@
|
|||||||
#define usb_info(fmt, ...)
|
#define usb_info(fmt, ...)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
enum aicwf_bus_state {
|
enum aicwf_bus_state { BUS_DOWN_ST, BUS_UP_ST };
|
||||||
BUS_DOWN_ST,
|
|
||||||
BUS_UP_ST
|
|
||||||
};
|
|
||||||
|
|
||||||
struct aicwf_bus_ops {
|
struct aicwf_bus_ops {
|
||||||
int (*start) (struct device *dev);
|
int (*start)(struct device *dev);
|
||||||
void (*stop) (struct device *dev);
|
void (*stop)(struct device *dev);
|
||||||
int (*txdata) (struct device *dev, struct sk_buff *skb);
|
int (*txdata)(struct device *dev, struct sk_buff *skb);
|
||||||
int (*txmsg) (struct device *dev, u8 *msg, uint len);
|
int (*txmsg)(struct device *dev, u8 *msg, uint len);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct frame_queue {
|
struct frame_queue {
|
||||||
@@ -110,11 +113,10 @@ struct aicwf_tx_priv {
|
|||||||
u8 *tail;
|
u8 *tail;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#define MAX_REORD_RXFRAME 250
|
#define MAX_REORD_RXFRAME 250
|
||||||
#define REORDER_UPDATE_TIME 50
|
#define REORDER_UPDATE_TIME 50
|
||||||
#define AICWF_REORDER_WINSIZE 64
|
#define AICWF_REORDER_WINSIZE 64
|
||||||
#define SN_LESS(a, b) (((a-b)&0x800) != 0)
|
#define SN_LESS(a, b) (((a - b) & 0x800) != 0)
|
||||||
#define SN_EQUAL(a, b) (a == b)
|
#define SN_EQUAL(a, b) (a == b)
|
||||||
|
|
||||||
struct reord_ctrl {
|
struct reord_ctrl {
|
||||||
@@ -203,12 +205,15 @@ struct aicwf_tx_priv *aicwf_tx_init(void *arg);
|
|||||||
struct aicwf_rx_priv *aicwf_rx_init(void *arg);
|
struct aicwf_rx_priv *aicwf_rx_init(void *arg);
|
||||||
void aicwf_frame_queue_init(struct frame_queue *pq, int num_prio, int max_len);
|
void aicwf_frame_queue_init(struct frame_queue *pq, int num_prio, int max_len);
|
||||||
void aicwf_frame_queue_flush(struct frame_queue *pq);
|
void aicwf_frame_queue_flush(struct frame_queue *pq);
|
||||||
bool aicwf_frame_enq(struct device *dev, struct frame_queue *q, struct sk_buff *pkt, int prio);
|
bool aicwf_frame_enq(struct device *dev, struct frame_queue *q,
|
||||||
bool aicwf_rxframe_enqueue(struct device *dev, struct frame_queue *q, struct sk_buff *pkt);
|
struct sk_buff *pkt, int prio);
|
||||||
|
bool aicwf_rxframe_enqueue(struct device *dev, struct frame_queue *q,
|
||||||
|
struct sk_buff *pkt);
|
||||||
bool aicwf_is_framequeue_empty(struct frame_queue *pq);
|
bool aicwf_is_framequeue_empty(struct frame_queue *pq);
|
||||||
void aicwf_frame_tx(void *dev, struct sk_buff *skb);
|
void aicwf_frame_tx(void *dev, struct sk_buff *skb);
|
||||||
void aicwf_dev_skb_free(struct sk_buff *skb);
|
void aicwf_dev_skb_free(struct sk_buff *skb);
|
||||||
struct sk_buff *aicwf_frame_dequeue(struct frame_queue *pq);
|
struct sk_buff *aicwf_frame_dequeue(struct frame_queue *pq);
|
||||||
struct sk_buff *aicwf_frame_queue_peek_tail(struct frame_queue *pq, int *prio_out);
|
struct sk_buff *aicwf_frame_queue_peek_tail(struct frame_queue *pq,
|
||||||
|
int *prio_out);
|
||||||
|
|
||||||
#endif /* _AICWF_TXRXIF_H_ */
|
#endif /* _AICWF_TXRXIF_H_ */
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1 @@
|
|||||||
int aicwf_get_firmware_array(char* fw_name, u32 **fw_buf);
|
int aicwf_get_firmware_array(char *fw_name, u32 **fw_buf);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#include "aicsdio_txrxif.h"
|
#include "aicsdio_txrxif.h"
|
||||||
#include "aic_bsp_driver.h"
|
#include "aic_bsp_driver.h"
|
||||||
|
|
||||||
struct prealloc_txq{
|
struct prealloc_txq {
|
||||||
int prealloced;
|
int prealloced;
|
||||||
void *txq;
|
void *txq;
|
||||||
size_t size;
|
size_t size;
|
||||||
@@ -13,16 +13,14 @@ struct prealloc_txq prealloc_txq;
|
|||||||
|
|
||||||
void *aicwf_prealloc_txq_alloc(size_t size)
|
void *aicwf_prealloc_txq_alloc(size_t size)
|
||||||
{
|
{
|
||||||
|
|
||||||
BUG_ON(size > MAX_TXQ_SIZE);
|
BUG_ON(size > MAX_TXQ_SIZE);
|
||||||
|
|
||||||
//check prealloc_txq.size
|
//check prealloc_txq.size
|
||||||
if((int)prealloc_txq.size != (int)size)
|
if ((int)prealloc_txq.size != (int)size) {
|
||||||
{
|
AICWFDBG(LOGINFO, "%s size is diff will to be kzalloc \r\n",
|
||||||
AICWFDBG(LOGINFO, "%s size is diff will to be kzalloc \r\n", __func__);
|
__func__);
|
||||||
|
|
||||||
if(prealloc_txq.txq != NULL)
|
if (prealloc_txq.txq != NULL) {
|
||||||
{
|
|
||||||
AICWFDBG(LOGINFO, "%s txq to kfree \r\n", __func__);
|
AICWFDBG(LOGINFO, "%s txq to kfree \r\n", __func__);
|
||||||
kfree(prealloc_txq.txq);
|
kfree(prealloc_txq.txq);
|
||||||
prealloc_txq.txq = NULL;
|
prealloc_txq.txq = NULL;
|
||||||
@@ -33,16 +31,17 @@ void *aicwf_prealloc_txq_alloc(size_t size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//check prealloc or not
|
//check prealloc or not
|
||||||
if(!prealloc_txq.prealloced)
|
if (!prealloc_txq.prealloced) {
|
||||||
{
|
|
||||||
prealloc_txq.txq = kzalloc(size, GFP_KERNEL);
|
prealloc_txq.txq = kzalloc(size, GFP_KERNEL);
|
||||||
if(!prealloc_txq.txq){
|
if (!prealloc_txq.txq) {
|
||||||
AICWFDBG(LOGERROR, "%s txq kzalloc fail \r\n", __func__);
|
AICWFDBG(LOGERROR, "%s txq kzalloc fail \r\n",
|
||||||
}else{
|
__func__);
|
||||||
AICWFDBG(LOGINFO, "%s txq kzalloc successful \r\n", __func__);
|
} else {
|
||||||
|
AICWFDBG(LOGINFO, "%s txq kzalloc successful \r\n",
|
||||||
|
__func__);
|
||||||
prealloc_txq.prealloced = 1;
|
prealloc_txq.prealloced = 1;
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
AICWFDBG(LOGINFO, "%s txq not need to kzalloc \r\n", __func__);
|
AICWFDBG(LOGINFO, "%s txq not need to kzalloc \r\n", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -50,8 +49,7 @@ void *aicwf_prealloc_txq_alloc(size_t size)
|
|||||||
}
|
}
|
||||||
void aicwf_prealloc_txq_free(void)
|
void aicwf_prealloc_txq_free(void)
|
||||||
{
|
{
|
||||||
if(prealloc_txq.txq != NULL)
|
if (prealloc_txq.txq != NULL) {
|
||||||
{
|
|
||||||
AICWFDBG(LOGINFO, "%s txq to kfree \r\n", __func__);
|
AICWFDBG(LOGINFO, "%s txq to kfree \r\n", __func__);
|
||||||
kfree(prealloc_txq.txq);
|
kfree(prealloc_txq.txq);
|
||||||
prealloc_txq.txq = NULL;
|
prealloc_txq.txq = NULL;
|
||||||
@@ -59,4 +57,3 @@ void aicwf_prealloc_txq_free(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
EXPORT_SYMBOL(aicwf_prealloc_txq_alloc);
|
EXPORT_SYMBOL(aicwf_prealloc_txq_alloc);
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user