Add Luckfox Pico 86Panel Support (#274)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

* project/cfg/BoardConfig_IPC : Discontinue support for Ubuntu

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

* project/build.sh : Discontinue support for Ubuntu

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

* sysdrv/Makefile : Discontinue support for Ubuntu

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

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

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

* . : Delete the Ubuntu rootfs submodule

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

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

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

---------

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

3
.gitmodules vendored
View File

@@ -1,3 +0,0 @@
[submodule "ubuntu"]
path = sysdrv/tools/board/ubuntu
url = https://github.com/luckfox-eng33/pico_ubuntu.git

View File

@@ -1,3 +0,0 @@
[submodule "ubuntu"]
path = sysdrv/tools/board/ubuntu
url = https://gitee.com/eng-thirty-three/pico_ubuntu.git

View File

@@ -1,3 +0,0 @@
[submodule "ubuntu"]
path = sysdrv/tools/board/ubuntu
url = https://github.com/luckfox-eng33/pico_ubuntu.git

237
README.md
View File

@@ -37,11 +37,6 @@ source env_install_toolchain.sh
```
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
* The build.sh script is used to automate the compilation process.
* Most of the compilation operations can be completed automatically through build.sh.
@@ -91,19 +86,25 @@ kernelconfig -config kernel and save defconfig"
./build.sh lunch
```
+ Output the corresponding Luckfox-pico hardware model. Enter the corresponding number to proceed to the storage media options (press Enter to select option [0] directly).
```shell
```shell
You're building on Linux
Lunch menu...pick the Luckfox Pico hardware version:
选择 Luckfox Pico 硬件版本:
[0] RV1103_Luckfox_Pico
[1] RV1103_Luckfox_Pico_Mini_A
[2] RV1103_Luckfox_Pico_Mini_B
[3] RV1103_Luckfox_Pico_Plus
[4] RV1106_Luckfox_Pico_Pro_Max
[5] RV1106_Luckfox_Pico_Ultra
[6] RV1106_Luckfox_Pico_Ultra_W
[7] custom
Which would you like? [0~7][default:0]:
Lunch menu...pick the Luckfox Pico hardware version:
选择 Luckfox Pico 硬件版本:
[0] RV1103_Luckfox_Pico
[1] RV1103_Luckfox_Pico_Mini_A
[2] RV1103_Luckfox_Pico_Mini_B
[3] RV1103_Luckfox_Pico_Plus
[4] RV1103_Luckfox_Pico_WebBee
[5] RV1106_Luckfox_Pico_Pro
[6] RV1106_Luckfox_Pico_Max
[7] RV1106_Luckfox_Pico_Ultra
[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.
```shell
@@ -119,12 +120,11 @@ kernelconfig -config kernel and save defconfig"
Lunch menu...pick the system version:
选择系统版本:
[0] Buildroot(Support Rockchip official features)
[1] Ubuntu(Support for the apt package management tool)
Which would you like? [0~1][default:0]:
```
+ If you need to use the old configuration method or a custom board support file, select the "[7]custom" option when configuring the Luckfox-pico hardware model.
```shell
```shell
You're building on Linux
Lunch menu...pick the Luckfox Pico hardware version:
选择 Luckfox Pico 硬件版本:
@@ -132,148 +132,176 @@ kernelconfig -config kernel and save defconfig"
[1] RV1103_Luckfox_Pico_Mini_A
[2] RV1103_Luckfox_Pico_Mini_B
[3] RV1103_Luckfox_Pico_Plus
[4] RV1106_Luckfox_Pico_Pro_Max
[5] RV1106_Luckfox_Pico_Ultra
[6] RV1106_Luckfox_Pico_Ultra_W
[7] custom
Which would you like? [0~7][default:0]: 7
[4] RV1103_Luckfox_Pico_WebBee
[5] RV1106_Luckfox_Pico_Pro
[6] RV1106_Luckfox_Pico_Max
[7] RV1106_Luckfox_Pico_Ultra
[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
boot medium(启动介质): EMMC
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
system version(系统版本): Buildroot
hardware version(硬件版本): RV1106_Luckfox_Pico_Ultra
applicaton(应用场景): IPC
application(应用场景): IPC
----------------------------------------------------------------
----------------------------------------------------------------
1. BoardConfig_IPC/BoardConfig-EMMC-Buildroot-RV1106_Luckfox_Pico_Ultra_W-IPC.mk
boot medium(启动介质): EMMC
5. BoardConfig_IPC/BoardConfig-EMMC-Buildroot-RV1106_Luckfox_Pico_Ultra_W-IPC.mk
boot medium(启动介质): EMMC
system version(系统版本): Buildroot
hardware version(硬件版本): RV1106_Luckfox_Pico_Ultra_W
applicaton(应用场景): IPC
application(应用场景): IPC
----------------------------------------------------------------
----------------------------------------------------------------
2. BoardConfig_IPC/BoardConfig-EMMC-Ubuntu-RV1106_Luckfox_Pico_Ultra-IPC.mk
boot medium(启动介质): EMMC
system version(系统版本): Ubuntu
6. BoardConfig_IPC/BoardConfig-EMMC-Busybox-RV1106_Luckfox_Pico_Ultra-IPC_FASTBOOT.mk
boot medium(启动介质): EMMC
system version(系统版本): Busybox
hardware version(硬件版本): RV1106_Luckfox_Pico_Ultra
applicaton(应用场景): IPC
application(应用场景): IPC_FASTBOOT
----------------------------------------------------------------
----------------------------------------------------------------
3. BoardConfig_IPC/BoardConfig-EMMC-Ubuntu-RV1106_Luckfox_Pico_Ultra_W-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
7. BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1103_Luckfox_Pico-IPC.mk
boot medium(启动介质): SD_CARD
system version(系统版本): Buildroot
hardware version(硬件版本): RV1103_Luckfox_Pico
applicaton(应用场景): IPC
application(应用场景): IPC
----------------------------------------------------------------
----------------------------------------------------------------
5. BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1103_Luckfox_Pico_Mini_A-IPC.mk
boot medium(启动介质): SD_CARD
8. BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1103_Luckfox_Pico_Mini_A-IPC.mk
boot medium(启动介质): SD_CARD
system version(系统版本): Buildroot
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
boot medium(启动介质): SD_CARD
9. BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1103_Luckfox_Pico_Mini_B-IPC.mk
boot medium(启动介质): SD_CARD
system version(系统版本): Buildroot
hardware version(硬件版本): RV1103_Luckfox_Pico_Mini_B
applicaton(应用场景): IPC
application(应用场景): IPC
----------------------------------------------------------------
----------------------------------------------------------------
7. BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1103_Luckfox_Pico_Plus-IPC.mk
boot medium(启动介质): SD_CARD
10. BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1103_Luckfox_Pico_Plus-IPC.mk
boot medium(启动介质): SD_CARD
system version(系统版本): Buildroot
hardware version(硬件版本): RV1103_Luckfox_Pico_Plus
applicaton(应用场景): IPC
application(应用场景): IPC
----------------------------------------------------------------
----------------------------------------------------------------
8. BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1106_Luckfox_Pico_Pro_Max-IPC.mk
boot medium(启动介质): SD_CARD
11. BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1103_Luckfox_Pico_WebBee-IPC.mk
boot medium(启动介质): SD_CARD
system version(系统版本): Buildroot
hardware version(硬件版本): RV1106_Luckfox_Pico_Pro_Max
applicaton(应用场景): IPC
hardware version(硬件版本): RV1103_Luckfox_Pico_WebBee
application(应用场景): IPC
----------------------------------------------------------------
----------------------------------------------------------------
9. BoardConfig_IPC/BoardConfig-SD_CARD-Ubuntu-RV1103_Luckfox_Pico-IPC.mk
boot medium(启动介质): SD_CARD
system version(系统版本): Ubuntu
hardware version(硬件版本): RV1103_Luckfox_Pico
applicaton(应用场景): IPC
12. BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1106_Luckfox_Pico_Max-IPC.mk
boot medium(启动介质): SD_CARD
system version(系统版本): Buildroot
hardware version(硬件版本): RV1106_Luckfox_Pico_Max
application(应用场景): IPC
----------------------------------------------------------------
----------------------------------------------------------------
10. BoardConfig_IPC/BoardConfig-SD_CARD-Ubuntu-RV1103_Luckfox_Pico_Mini_A-IPC.mk
boot medium(启动介质): SD_CARD
system version(系统版本): Ubuntu
hardware version(硬件版本): RV1103_Luckfox_Pico_Mini_A
applicaton(应用场景): 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
13. BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1106_Luckfox_Pico_Pro-IPC.mk
boot medium(启动介质): SD_CARD
system version(系统版本): Buildroot
hardware version(硬件版本): RV1106_Luckfox_Pico_Pro
application(应用场景): IPC
----------------------------------------------------------------
----------------------------------------------------------------
14. BoardConfig_IPC/BoardConfig-SPI_NAND-Buildroot-RV1103_Luckfox_Pico_Mini_B-IPC.mk
boot medium(启动介质): SPI_NAND
boot medium(启动介质): SPI_NAND
system version(系统版本): Buildroot
hardware version(硬件版本): RV1103_Luckfox_Pico_Mini_B
applicaton(应用场景): IPC
application(应用场景): IPC
----------------------------------------------------------------
----------------------------------------------------------------
15. BoardConfig_IPC/BoardConfig-SPI_NAND-Buildroot-RV1103_Luckfox_Pico_Plus-IPC.mk
boot medium(启动介质): SPI_NAND
boot medium(启动介质): SPI_NAND
system version(系统版本): Buildroot
hardware version(硬件版本): RV1103_Luckfox_Pico_Plus
applicaton(应用场景): IPC
application(应用场景): IPC
----------------------------------------------------------------
----------------------------------------------------------------
16. BoardConfig_IPC/BoardConfig-SPI_NAND-Buildroot-RV1106_Luckfox_Pico_Pro_Max-IPC.mk
boot medium(启动介质): SPI_NAND
16. BoardConfig_IPC/BoardConfig-SPI_NAND-Buildroot-RV1103_Luckfox_Pico_WebBee-IPC.mk
boot medium(启动介质): SPI_NAND
system version(系统版本): Buildroot
hardware version(硬件版本): RV1106_Luckfox_Pico_Pro_Max
applicaton(应用场景): IPC
hardware version(硬件版本): RV1103_Luckfox_Pico_WebBee
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.
#### 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 # 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
```shell
./build.sh clean uboot

View File

@@ -16,7 +16,7 @@
* 推荐SDK使用系统环境为Ubuntu 22.04
### 安装依赖
```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
* 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
```
* 如果你需要需要编译ubuntu系统并且使用gitee源
* 请修改对应的板型mk文件中LF_SUBMODULES_BY改为gitee
```
LF_SUBMODULES_BY=gitee
```
### 环境变量
* 需要将交叉编译工具链设置
```
@@ -88,17 +83,23 @@ kernelconfig -config kernel and save defconfig"
+ 输出对应的Luckfox-pico硬件型号,输入对应编号后进入存储介质选项(直接回车选择序号[0]选项)
```shell
You're building on Linux
Lunch menu...pick the Luckfox Pico hardware version:
选择 Luckfox Pico 硬件版本:
[0] RV1103_Luckfox_Pico
[1] RV1103_Luckfox_Pico_Mini_A
[2] RV1103_Luckfox_Pico_Mini_B
[3] RV1103_Luckfox_Pico_Plus
[4] RV1106_Luckfox_Pico_Pro_Max
[5] RV1106_Luckfox_Pico_Ultra
[6] RV1106_Luckfox_Pico_Ultra_W
[7] custom
Which would you like? [0~7][default:0]:
Lunch menu...pick the Luckfox Pico hardware version:
选择 Luckfox Pico 硬件版本:
[0] RV1103_Luckfox_Pico
[1] RV1103_Luckfox_Pico_Mini_A
[2] RV1103_Luckfox_Pico_Mini_B
[3] RV1103_Luckfox_Pico_Plus
[4] RV1103_Luckfox_Pico_WebBee
[5] RV1106_Luckfox_Pico_Pro
[6] RV1106_Luckfox_Pico_Max
[7] RV1106_Luckfox_Pico_Ultra
[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 Plus为例
@@ -115,11 +116,10 @@ kernelconfig -config kernel and save defconfig"
Lunch menu...pick the system version:
选择系统版本:
[0] Buildroot(Support Rockchip official features)
[1] Ubuntu(Support for the apt package management tool)
Which would you like? [0~1][default:0]:
```
+ 如果需要使用旧的配置方式或者使用自定义的板级支持文件在配置Luckfox-pico硬件型号时选择“[7]custom”选项
+ 如果需要使用旧的配置方式或者使用自定义的板级支持文件在配置Luckfox-pico硬件型号时选择“custom”选项
```shell
You're building on Linux
Lunch menu...pick the Luckfox Pico hardware version:
@@ -128,121 +128,127 @@ kernelconfig -config kernel and save defconfig"
[1] RV1103_Luckfox_Pico_Mini_A
[2] RV1103_Luckfox_Pico_Mini_B
[3] RV1103_Luckfox_Pico_Plus
[4] RV1106_Luckfox_Pico_Pro_Max
[5] RV1106_Luckfox_Pico_Ultra
[6] RV1106_Luckfox_Pico_Ultra_W
[7] custom
Which would you like? [0~7][default:0]: 7
[4] RV1103_Luckfox_Pico_WebBee
[5] RV1106_Luckfox_Pico_Pro
[6] RV1106_Luckfox_Pico_Max
[7] RV1106_Luckfox_Pico_Ultra
[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
system version(系统版本): Buildroot
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
system version(系统版本): Buildroot
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
system version(系统版本): Ubuntu
system version(系统版本): Busybox
hardware version(硬件版本): RV1106_Luckfox_Pico_Ultra
applicaton(应用场景): IPC
application(应用场景): IPC_FASTBOOT
----------------------------------------------------------------
----------------------------------------------------------------
3. BoardConfig_IPC/BoardConfig-EMMC-Ubuntu-RV1106_Luckfox_Pico_Ultra_W-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
7. BoardConfig_IPC/BoardConfig-SD_CARD-Buildroot-RV1103_Luckfox_Pico-IPC.mk
boot medium(启动介质): SD_CARD
system version(系统版本): Buildroot
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
system version(系统版本): Buildroot
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
system version(系统版本): Buildroot
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
system version(系统版本): Buildroot
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
system version(系统版本): Buildroot
hardware version(硬件版本): RV1106_Luckfox_Pico_Pro_Max
applicaton(应用场景): IPC
hardware version(硬件版本): RV1103_Luckfox_Pico_WebBee
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
system version(系统版本): Ubuntu
hardware version(硬件版本): RV1103_Luckfox_Pico
applicaton(应用场景): IPC
system version(系统版本): Buildroot
hardware version(硬件版本): RV1106_Luckfox_Pico_Max
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
system version(系统版本): Ubuntu
hardware version(硬件版本): RV1103_Luckfox_Pico_Mini_A
applicaton(应用场景): 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
system version(系统版本): Buildroot
hardware version(硬件版本): RV1106_Luckfox_Pico_Pro
application(应用场景): IPC
----------------------------------------------------------------
----------------------------------------------------------------
@@ -250,7 +256,7 @@ kernelconfig -config kernel and save defconfig"
boot medium(启动介质): SPI_NAND
system version(系统版本): Buildroot
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
system version(系统版本): Buildroot
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
system version(系统版本): Buildroot
hardware version(硬件版本): RV1106_Luckfox_Pico_Pro_Max
applicaton(应用场景): IPC
hardware version(硬件版本): RV1103_Luckfox_Pico_WebBee
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 配置
@@ -289,13 +317,6 @@ kernelconfig -config kernel and save defconfig"
./build.sh lunch # 选择参考板级
./build.sh # 一键自动编译
```
* 编译ubuntu
```shell
sudo ./build.sh lunch # 选择参考板级
sudo ./build.sh # 一键自动编译
```
* 注意编译ubuntu时需要注意使用sudo否则会导致文件系统错误
* 下文就不一一区分两者指令区别,请自行根据情况选择
#### 单独编译U-Boot
```shell
./build.sh clean uboot

View File

@@ -106,9 +106,9 @@ post_chk() {
echo "Error: not found rkipc.ini !!!"
exit -1
fi
if [ ! -f "$rkipc_ini" ]; then
#if [ ! -f "$rkipc_ini" ]; then
cp $default_rkipc_ini $rkipc_ini -f
fi
#fi
if [ ! -f "/userdata/image.bmp" ]; then
cp -fa /oem/usr/share/image.bmp /userdata/

View File

@@ -114,9 +114,9 @@ post_chk() {
echo "Error: not found rkipc.ini !!!"
exit -1
fi
if [ ! -f "$rkipc_ini" ]; then
#if [ ! -f "$rkipc_ini" ]; then
cp $default_rkipc_ini $rkipc_ini -f
fi
#fi
if [ ! -f "/userdata/image.bmp" ]; then
cp -fa /oem/usr/share/image.bmp /userdata/

View File

@@ -40,7 +40,6 @@ SDK_CONFIG_DIR=${SDK_ROOT_DIR}/config
DTS_CONFIG=${SDK_CONFIG_DIR}/dts_config
KERNEL_DEFCONFIG=${SDK_CONFIG_DIR}/kernel_defconfig
BUILDROOT_DEFCONFIG=${SDK_CONFIG_DIR}/buildroot_defconfig
UBUNTU_DIR=${SDK_SYSDRV_DIR}/tools/board/ubuntu
KERNEL_PATH=${SDK_SYSDRV_DIR}/source/kernel
UBOOT_PATH=${SDK_SYSDRV_DIR}/source/uboot/u-boot
#for custom rootfs
@@ -159,9 +158,11 @@ function choose_target_board() {
"RV1106_Luckfox_Pico_Ultra"
"RV1106_Luckfox_Pico_Ultra_W"
"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_SYSTEM=("Buildroot" "Ubuntu" "Custom")
local LF_SYSTEM=("Buildroot" "Custom")
local cnt=0 space8=" "
# Get Hardware Version
@@ -193,6 +194,10 @@ function choose_target_board() {
LUNCH_NUM=$((LUNCH_NUM + 1))
echo "${space8}${space8}[${LUNCH_NUM}] RV1106_Luckfox_Pico_Pi_W"
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"
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_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
echo "${space8}${space8}[0] SD_CARD"
@@ -319,12 +324,11 @@ function choose_target_board() {
if (("$BM_INDEX" == 1)); then
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
elif (("$BM_INDEX" == 0)); then
echo "${space8}${space8}[0] Buildroot "
echo "${space8}${space8}[1] Ubuntu "
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=1
fi
@@ -353,7 +357,7 @@ function choose_target_board() {
function build_select_board() {
RK_TARGET_BOARD_ARRAY=($(
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[@]}
@@ -592,7 +596,7 @@ function build_check_power_domain() {
function build_tool() {
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/compress_tool $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
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
build_get_sdk_version
cat >$RK_PROJECT_PACKAGE_ROOTFS_DIR/bin/sdkinfo <<EOF
@@ -2159,9 +2157,6 @@ __GET_BOOTARGS_FROM_BOARD_CFG() {
__LINK_DEFCONFIG_FROM_BOARD_CFG() {
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
rm -f $DTS_CONFIG
@@ -2229,7 +2224,7 @@ function build_mkimg() {
fs_type="\$${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
fi
@@ -2658,9 +2653,6 @@ function build_save() {
build_info >>$STUB_PATH/build_info.txt
echo "save to $STUB_PATH"
if [[ "$LF_TARGET_ROOTFS" == "ubuntu" ]]; then
sudo chmod a+rw $STUB_PARENT_PATH
fi
;;
esac
@@ -2753,29 +2745,6 @@ export RK_PROJECT_BOARD_DIR=$(dirname $(realpath $BOARD_CONFIG))
export RK_PROJECT_TOOLCHAIN_CROSS=$RK_TOOLCHAIN_CROSS
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 [ -n "$2" -a "$(type -t usage$2)" == function ]; then
echo "###Current Configure [ $2 ] Build Command###"

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

View File

View File

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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -120,7 +120,6 @@ endif
ifneq ($(LF_TARGET_ROOTFS),)
TARGET_ROOTFS := $(LF_TARGET_ROOTFS)
else
# TARGET_ROOTFS := ubuntu
# TARGET_ROOTFS := buildroot
TARGET_ROOTFS := busybox
# TARGET_ROOTFS := custom
@@ -128,8 +127,6 @@ endif
ifneq ($(findstring $(TARGET_ROOTFS),custom),)
ROOTFS_BUILD_ENV := custom drv
else ifneq ($(findstring $(TARGET_ROOTFS),ubuntu),)
ROOTFS_BUILD_ENV := ubuntu drv
else ifneq ($(findstring $(TARGET_ROOTFS),buildroot),)
ROOTFS_BUILD_ENV := rootfs_prepare pctools buildroot boardtools drv
else #busybox
@@ -287,7 +284,6 @@ BUILDROOT_CFG ?= config_normal
BUILDROOT_VER ?= buildroot-2023.02.6
BUILDROOT_DIR := $(SYSDRV_DIR)/source/buildroot
UBUNTU_VER ?= luckfox-ubuntu-22.04.3
CUSTOM_VER ?= custom
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
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_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}/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 ${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
@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}/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 ${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)
@@ -646,28 +647,6 @@ endif
buildroot_clean:
$(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
# author :luckfox team

View File

@@ -83,5 +83,5 @@ clean:
cd aic8800_bsp/;make clean;cd ..
cd aic8800_fdrv/;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/

View File

@@ -28,9 +28,11 @@ CONFIG_FORCE_DPD_CALIB = y
CONFIG_LOFT_CALIB = n
CONFIG_EXT_FEM_8800DCDW = n
CONFIG_RESV_MEM_SUPPORT ?= y
CONFIG_AMSDU_RX = n
CONFIG_AMSDU_RX = y
CONFIG_IRQ_FALL ?= n
CONFIG_SDIO_BT = n
CONFIG_RADAR_OR_IR_DETECT =n
CONFIG_FOR_IPCAM = n
ifeq ($(CONFIG_EXT_FEM_8800DCDW), y)
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_IRQ_FALL) += -DCONFIG_IRQ_FALL
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
$(MODULE_NAME)-y := \
@@ -126,6 +131,8 @@ MODDESTDIR ?= /lib/modules/$(KVER)/kernel/drivers/net/wireless/
ARCH ?= x86_64
CROSS_COMPILE ?=
endif
ccflags-y += -Wno-unused-function
###########################################
all: modules

View File

@@ -6,101 +6,118 @@ extern int adap_test;
typedef u32 (*array2_tbl_t)[2];
#define AIC_PATCH_MAGIG_NUM 0x48435450 // "PTCH"
#define AIC_PATCH_MAGIG_NUM_2 0x50544348 // "HCTP"
#define AIC_PATCH_BLOCK_MAX 4
#define AIC_PATCH_MAGIG_NUM 0x48435450 // "PTCH"
#define AIC_PATCH_MAGIG_NUM_2 0x50544348 // "HCTP"
#define AIC_PATCH_BLOCK_MAX 4
typedef struct {
uint32_t magic_num;
uint32_t pair_start;
uint32_t magic_num_2;
uint32_t pair_count;
uint32_t block_dst[AIC_PATCH_BLOCK_MAX];
uint32_t block_src[AIC_PATCH_BLOCK_MAX];
uint32_t block_size[AIC_PATCH_BLOCK_MAX]; // word count
uint32_t magic_num;
uint32_t pair_start;
uint32_t magic_num_2;
uint32_t pair_count;
uint32_t block_dst[AIC_PATCH_BLOCK_MAX];
uint32_t block_src[AIC_PATCH_BLOCK_MAX];
uint32_t block_size[AIC_PATCH_BLOCK_MAX]; // word count
} 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)))
u32 aicbsp_syscfg_tbl_8800d80[][2] = {
};
u32 aicbsp_syscfg_tbl_8800d80[][2] = {};
int aicbsp_system_config_8800d80(struct aic_sdio_dev *sdiodev)
{
int syscfg_num = sizeof(aicbsp_syscfg_tbl_8800d80) / sizeof(u32) / 2;
int ret, 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) {
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 0;
}
u32 adaptivity_patch_tbl_8800d80[][2] = {
{0x000C, 0x0000320A}, //linkloss_thd
{0x009C, 0x00000000}, //ac_param_conf
{0x0168, 0x00010000}, //tx_adaptivity_en
{ 0x000C, 0x0000320A }, //linkloss_thd
{ 0x009C, 0x00000000 }, //ac_param_conf
{ 0x0168, 0x00010000 }, //tx_adaptivity_en
};
#define USER_CHAN_MAX_TXPWR_EN_FLAG (0x01U << 1)
#define USER_TX_USE_ANA_F_FLAG (0x01U << 2)
#define USER_PWROFST_COVER_CALIB_FLAG 0x01U
#define USER_CHAN_MAX_TXPWR_EN_FLAG (0x01U << 1)
#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_USER_TX_USE_ANA_F 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_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] = {
#ifdef USE_5G
{0x00b4, 0xf3010001},
#else
{0x00b4, 0xf3010000},
#endif
#ifdef USE_5G
{ 0x00b4, 0xf3010001 },
#else
{ 0x00b4, 0xf3010000 },
#endif
#if defined(CONFIG_AMSDU_RX)
{0x170, 0x0100000a}
{ 0x170, 0x0100000a },
#endif
#ifdef CONFIG_IRQ_FALL
{0x00000170, 0x0000010a}, //irqf
{ 0x00000170, 0x0000010a }, //irqf
#endif
#if CFG_USER_EXT_FLAGS_EN
{0x0188, 0x00000001
#if CFG_USER_CHAN_MAX_TXPWR_EN
| USER_CHAN_MAX_TXPWR_EN_FLAG
#endif
#if CFG_USER_TX_USE_ANA_F
| USER_TX_USE_ANA_F_FLAG
#endif
}, // user_ext_flags
#endif
#if CFG_USER_EXT_FLAGS_EN
{ 0x0188, 0x00000000
#if CFG_PWROFST_COVER_CALIB
| USER_PWROFST_COVER_CALIB_FLAG
#endif
#if CFG_USER_CHAN_MAX_TXPWR_EN
| USER_CHAN_MAX_TXPWR_EN_FLAG
#endif
#if CFG_USER_TX_USE_ANA_F
| USER_TX_USE_ANA_F_FLAG
#endif
#if CFG_USER_APM_PRBRSP_OFFLOAD_DISABLE
| USER_APM_PRBRSP_OFFLOAD_DISABLE_FLAG
#endif
}, // user_ext_flags
#endif
#ifdef CONFIG_RADAR_OR_IR_DETECT
{ 0x019c, 0x00000100 }, //enable radar detect
#endif
};
#ifdef CONFIG_OOB
// for 8800d40/d80 map data1 isr to gpiob1
u32 gpio_cfg_tbl_8800d40d80[][2] = {
{0x40504084, 0x00000006},
{0x40500040, 0x00000000},
{0x40100030, 0x00000001},
{0x40241020, 0x00000001},
{0x40240030, 0x00000004},
{0x40240020, 0x03020700},
{ 0x40504084, 0x00000006 }, { 0x40500040, 0x00000000 },
{ 0x40100030, 0x00000001 }, { 0x40241020, 0x00000001 },
{ 0x40240030, 0x00000004 }, { 0x40240020, 0x03020700 },
};
#endif
int aicwifi_sys_config_8800d80(struct aic_sdio_dev *sdiodev)
{
#ifdef CONFIG_OOB
int ret, cnt;
int ret, cnt;
int gpiocfg_num = sizeof(gpio_cfg_tbl_8800d40d80) / sizeof(u32) / 2;
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) {
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;
}
}
@@ -109,19 +126,19 @@ int aicwifi_sys_config_8800d80(struct aic_sdio_dev *sdiodev)
return 0;
}
#define NEW_PATCH_BUFFER_MAP 1
#define NEW_PATCH_BUFFER_MAP 1
int aicwifi_patch_config_8800d80(struct aic_sdio_dev *sdiodev)
{
const u32 rd_patch_addr = RAM_FMAC_FW_ADDR + 0x0198;
u32 aic_patch_addr;
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;
#endif
#endif
uint32_t start_addr = 0x0016F800;
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;
int ret = 0;
int cnt = 0;
@@ -129,13 +146,15 @@ int aicwifi_patch_config_8800d80(struct aic_sdio_dev *sdiodev)
int adap_patch_cnt = 0;
if (adap_test) {
printk("%s for adaptivity test \r\n", __func__);
adap_patch_cnt = sizeof(adaptivity_patch_tbl_8800d80)/sizeof(u32)/2;
printk("%s for adaptivity test \r\n", __func__);
adap_patch_cnt =
sizeof(adaptivity_patch_tbl_8800d80) / sizeof(u32) / 2;
}
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) {
printk("patch rd fail\n");
return ret;
@@ -143,16 +162,18 @@ int aicwifi_patch_config_8800d80(struct aic_sdio_dev *sdiodev)
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) {
printk("patch str rd fail\n");
return ret;
}
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;
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);
return ret;
}
@@ -161,7 +182,8 @@ int aicwifi_patch_config_8800d80(struct aic_sdio_dev *sdiodev)
sdiodev->fw_version_uint = rd_version_val;
if (rd_version_val > 0x06090100) {
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) {
printk("patch buf rd fail\n");
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_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) {
printk("0x%x write fail\n", AIC_PATCH_ADDR(magic_num));
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) {
printk("0x%x write fail\n", AIC_PATCH_ADDR(magic_num_2));
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) {
printk("0x%x write fail\n", AIC_PATCH_ADDR(pair_start));
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) {
printk("0x%x write fail\n", AIC_PATCH_ADDR(pair_count));
return ret;
}
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) {
printk("%x write fail\n", start_addr+8*cnt);
printk("%x write fail\n", start_addr + 8 * cnt);
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) {
printk("%x write fail\n", start_addr+8*cnt+4);
printk("%x write fail\n", start_addr + 8 * cnt + 4);
return ret;
}
}
if (adap_test){
if (adap_test) {
int tmp_cnt = patch_cnt + adap_patch_cnt;
for (cnt = patch_cnt; cnt < tmp_cnt; 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);
if(ret) {
printk("%x write fail\n", start_addr+8*cnt);
ret = rwnx_send_dbg_mem_write_req(
sdiodev, 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;
}
ret = rwnx_send_dbg_mem_write_req(sdiodev, start_addr+8*cnt+4, adaptivity_patch_tbl_8800d80[tbl_idx][1]);
if(ret) {
printk("%x write fail\n", start_addr+8*cnt+4);
ret = rwnx_send_dbg_mem_write_req(
sdiodev, 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;
}
}
}
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) {
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;
}
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) {
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;
}
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) {
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;
}
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) {
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 0;
}

View File

@@ -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_patch_config_8800d80(struct aic_sdio_dev *sdiodev);
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -18,23 +18,26 @@ extern u8 chip_sub_id;
extern u8 chip_mcu_id;
#define FW_PATH_MAX_LEN 200
void aicwf_patch_config_8800dc(struct aic_sdio_dev *rwnx_hw);
void aicwf_patch_config_8800dc(struct aic_sdio_dev *rwnx_hw);
void system_config_8800dc(struct aic_sdio_dev *rwnx_hw);
int aicwf_misc_ram_init_8800dc(struct aic_sdio_dev *sdiodev);
#ifdef CONFIG_DPD
int aicwf_dpd_calib_8800dc(struct aic_sdio_dev *sdiodev, 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);
int aicwf_dpd_calib_8800dc(struct aic_sdio_dev *sdiodev,
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
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);
#endif/* !CONFIG_FORCE_DPD_CALIB */
#endif /* !CONFIG_FORCE_DPD_CALIB */
#endif
#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

File diff suppressed because it is too large Load Diff

View File

@@ -16,76 +16,69 @@
#include <linux/module.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_REQ_CFM BIT(1)
#define RWNX_CMD_FLAG_WAIT_PUSH BIT(2)
#define RWNX_CMD_FLAG_WAIT_ACK BIT(3)
#define RWNX_CMD_FLAG_WAIT_CFM BIT(4)
#define RWNX_CMD_FLAG_DONE BIT(5)
#define RWNX_CMD_FLAG_NONBLOCK BIT(0)
#define RWNX_CMD_FLAG_REQ_CFM BIT(1)
#define RWNX_CMD_FLAG_WAIT_PUSH BIT(2)
#define RWNX_CMD_FLAG_WAIT_ACK BIT(3)
#define RWNX_CMD_FLAG_WAIT_CFM BIT(4)
#define RWNX_CMD_FLAG_DONE BIT(5)
/* ATM IPC design makes it possible to get the CFM before the ACK,
* otherwise this could have simply been a state enum */
#define RWNX_CMD_WAIT_COMPLETE(flags) \
#define RWNX_CMD_WAIT_COMPLETE(flags) \
(!(flags & (RWNX_CMD_FLAG_WAIT_ACK | RWNX_CMD_FLAG_WAIT_CFM)))
#define RWNX_CMD_MAX_QUEUED 8
#define RWNX_CMD_MAX_QUEUED 8
#define IPC_E2A_MSG_PARAM_SIZE 256
#define RWNX_FN_ENTRY_STR ">>> %s()\n", __func__
/* message levels */
#define LOGERROR 0x0001
#define LOGINFO 0x0002
#define LOGTRACE 0x0004
#define LOGDEBUG 0x0008
#define LOGDATA 0x0010
#define LOGERROR 0x0001
#define LOGINFO 0x0002
#define LOGTRACE 0x0004
#define LOGDEBUG 0x0008
#define LOGDATA 0x0010
extern int aicwf_dbg_level_bsp;
#define AICWF_LOG "AICWFDBG("
#define AICWF_LOG "AICWFDBG("
#ifdef DEBUG
#define AICWFDBG(level, args, arg...) \
do { \
if (aicwf_dbg_level_bsp & level) { \
printk(AICWF_LOG#level")\t" args, ##arg); \
} \
} while (0)
#define AICWFDBG(level, args, arg...) \
do { \
if (aicwf_dbg_level_bsp & level) { \
printk(AICWF_LOG #level ")\t" args, ##arg); \
} \
} while (0)
#define RWNX_DBG(fmt, ...) \
do { \
if (aicwf_dbg_level_bsp & LOGTRACE) { \
printk(AICWF_LOG"LOGTRACE)\t"fmt , ##__VA_ARGS__); \
} \
} while (0)
#define RWNX_DBG(fmt, ...) \
do { \
if (aicwf_dbg_level_bsp & LOGTRACE) { \
printk(AICWF_LOG "LOGTRACE)\t" fmt, ##__VA_ARGS__); \
} \
} while (0)
#else
#define AICWFDBG(level, args, arg...)
#define RWNX_DBG(fmt, ...)
#endif
/// Message structure for MSGs from Emb to App
struct ipc_e2a_msg {
u16 id; ///< Message id.
u16 id; ///< Message id.
u16 dummy_dest_id;
u16 dummy_src_id;
u16 param_len; ///< Parameter embedded struct length.
u32 pattern; ///< Used to stamp a valid MSG buffer
u32 param[IPC_E2A_MSG_PARAM_SIZE]; ///< Parameter embedded struct. Must be word-aligned.
u16 param_len; ///< Parameter embedded struct length.
u32 pattern; ///< Used to stamp a valid MSG buffer
u32 param[IPC_E2A_MSG_PARAM_SIZE]; ///< Parameter embedded struct. Must be word-aligned.
};
typedef u16 lmac_msg_id_t;
typedef u16 lmac_task_id_t;
struct lmac_msg {
lmac_msg_id_t id; ///< Message id.
lmac_task_id_t dest_id; ///< Destination kernel identifier.
lmac_task_id_t src_id; ///< Source kernel identifier.
u16 param_len; ///< Parameter embedded struct length.
u32 param[]; ///< Parameter embedded struct. Must be word-aligned.
lmac_msg_id_t id; ///< Message id.
lmac_task_id_t dest_id; ///< Destination kernel identifier.
lmac_task_id_t src_id; ///< Source kernel identifier.
u16 param_len; ///< Parameter embedded struct length.
u32 param[]; ///< Parameter embedded struct. Must be word-aligned.
};
#define rwnx_cmd_e2amsg ipc_e2a_msg
@@ -95,8 +88,8 @@ struct lmac_msg {
static inline void put_u16(u8 *buf, u16 data)
{
buf[0] = (u8)(data&0x00ff);
buf[1] = (u8)((data >> 8)&0x00ff);
buf[0] = (u8)(data & 0x00ff);
buf[1] = (u8)((data >> 8) & 0x00ff);
}
enum rwnx_cmd_mgr_state {
@@ -132,9 +125,10 @@ struct rwnx_cmd_mgr {
struct list_head cmds;
int (*queue)(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 (*queue)(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);
void (*print)(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_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);
enum {
TASK_NONE = (u8) -1,
TASK_NONE = (u8)-1,
// MAC Management task.
TASK_MM = 0,
@@ -182,7 +177,7 @@ enum {
#define LMAC_FIRST_MSG(task) ((lmac_msg_id_t)((task) << 10))
#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))
enum dbg_msg_tag {
@@ -238,25 +233,23 @@ enum dbg_msg_tag {
DBG_GPIO_WRITE_REQ,
DBG_GPIO_WRITE_CFM,
/// Max number of Debug messages
DBG_MAX,
};
#if !defined(CONFIG_M2D_OTA_LZMA_SUPPORT)
#define FW_M2D_OTA_NAME "m2d_ota.bin"
#define FW_M2D_OTA_NAME "m2d_ota.bin"
#else
#define FW_M2D_OTA_NAME "m2d_ota_lzma.bin"
#define FW_M2D_OTA_NAME "m2d_ota_lzma.bin"
#endif
enum {
HOST_START_APP_AUTO = 1,
HOST_START_APP_CUSTOM,
HOST_START_APP_FNCALL = 4,
HOST_START_APP_DUMMY = 5,
HOST_START_APP_DUMMY = 5,
};
struct dbg_mem_block_write_req {
u32 memaddr;
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_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)
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);
#endif
@@ -328,113 +320,128 @@ int rwnx_load_firmware(u32 **fw_buf, const char *name, struct device *device);
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,
struct dbg_mem_read_cfm *cfm);
int rwnx_send_dbg_mem_block_write_req(struct aic_sdio_dev *sdiodev, u32 mem_addr,
u32 mem_size, u32 *mem_data);
int rwnx_send_dbg_mem_write_req(struct aic_sdio_dev *sdiodev, u32 mem_addr, u32 mem_data);
struct dbg_mem_read_cfm *cfm);
int rwnx_send_dbg_mem_block_write_req(struct aic_sdio_dev *sdiodev,
u32 mem_addr, u32 mem_size,
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,
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);
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_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);
int aicbsp_platform_init(struct aic_sdio_dev *sdiodev);
void aicbsp_platform_deinit(struct aic_sdio_dev *sdiodev);
int aicbsp_driver_fw_init(struct aic_sdio_dev *sdiodev);
#if (defined(CONFIG_DPD) && !defined(CONFIG_FORCE_DPD_CALIB))
int is_file_exist(char* name);
int is_file_exist(char *name);
#endif
int aicbsp_resv_mem_init(void);
int aicbsp_resv_mem_deinit(void);
#define AICBSP_FW_PATH CONFIG_AIC_FW_PATH
#define AICBSP_FW_PATH_MAX 200
#define AICBSP_FW_PATH CONFIG_AIC_FW_PATH
#define AICBSP_FW_PATH_MAX 200
#define RAM_FMAC_FW_ADDR 0x00120000
#define FW_RAM_ADID_BASE_ADDR 0x00161928
#define FW_RAM_ADID_BASE_ADDR_U03 0x00161928
#define FW_RAM_PATCH_BASE_ADDR 0x00100000
#define RAM_8800DC_U01_ADID_ADDR 0x00101788
#define RAM_8800DC_U02_ADID_ADDR 0x001017d8
#define RAM_8800DC_FW_PATCH_ADDR 0x00184000
#define FW_RESET_START_ADDR 0x40500128
#define FW_RESET_START_VAL 0x40
#define FW_ADID_FLAG_ADDR 0x40500150
#define FW_ADID_FLAG_VAL 0x01
#define FW_RAM_ADID_BASE_ADDR_8800D80 0x002017E0
#define FW_RAM_PATCH_BASE_ADDR_8800D80 0x0020B2B0
#define FW_RAM_ADID_BASE_ADDR_8800D80_U02 0x00201940
#define FW_RAM_PATCH_BASE_ADDR_8800D80_U02 0x0020b43c
#define AICBT_PT_TAG "AICBT_PT_TAG"
#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_U03 0x00161928
#define FW_RAM_PATCH_BASE_ADDR 0x00100000
#define RAM_8800DC_U01_ADID_ADDR 0x00101788
#define RAM_8800DC_U02_ADID_ADDR 0x001017d8
#define RAM_8800DC_FW_PATCH_ADDR 0x00184000
#define FW_RESET_START_ADDR 0x40500128
#define FW_RESET_START_VAL 0x40
#define FW_ADID_FLAG_ADDR 0x40500150
#define FW_ADID_FLAG_VAL 0x01
#define FW_RAM_ADID_BASE_ADDR_8800D80 0x002017E0
#define FW_RAM_PATCH_BASE_ADDR_8800D80 0x0020B2B0
#define FW_RAM_ADID_BASE_ADDR_8800D80_U02 0x00201940
#define FW_RAM_PATCH_BASE_ADDR_8800D80_U02 0x0020b43c
#define AICBT_PT_TAG "AICBT_PT_TAG"
/*****************************************************************************
* Addresses within RWNX_ADDR_CPU
*****************************************************************************/
#define RAM_LMAC_FW_ADDR 0x00150000
#define RAM_LMAC_FW_ADDR 0x00150000
#define ROM_FMAC_FW_ADDR 0x00010000
#define ROM_FMAC_PATCH_ADDR 0x00180000
#define ROM_FMAC_FW_ADDR 0x00010000
#define ROM_FMAC_PATCH_ADDR 0x00180000
#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 RAM_FMAC_FW_PATCH_NAME "fmacfw_patch.bin"
#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"
#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
#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
#if defined(CONFIG_DPD) || defined(CONFIG_LOFT_CALIB)
#define ROM_FMAC_CALIB_ADDR 0x00130000
#define ROM_FMAC_CALIB_ADDR 0x00130000
#endif
#ifdef CONFIG_DPD
#ifndef CONFIG_FORCE_DPD_CALIB
#define FW_DPDRESULT_NAME_8800DC "aic_dpdresult_lite_8800dc.bin"
#define FW_DPDRESULT_NAME_8800DC "aic_dpdresult_lite_8800dc.bin"
#endif
#endif
#define RWNX_MAC_FW_RF_BASE_NAME_8800DC "lmacfw_rf_8800dc.bin"
#define RWNX_MAC_FW_RF_BASE_NAME_8800DC "lmacfw_rf_8800dc.bin"
#ifdef CONFIG_FOR_IPCOM
#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_BASE_NAME_8800DC "fmacfw_patch_8800dc_ipc"
#define RWNX_MAC_PATCH_NAME2_8800DC RWNX_MAC_PATCH_BASE_NAME_8800DC ".bin"
#else
#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_U02 RWNX_MAC_PATCH_BASE_NAME_8800DC"_u02.bin"
#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_U02 \
RWNX_MAC_PATCH_BASE_NAME_8800DC "_u02.bin"
#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
#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
#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_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
#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
#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
#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 FW_USERCONFIG_NAME_8800DC "aic_userconfig_8800dc.txt"
#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 FW_USERCONFIG_NAME_8800DC "aic_userconfig_8800dc.txt"
enum {
FW_NORMAL_MODE = 0,
FW_RFTEST_MODE = 1,
FW_BLE_SCAN_WAKEUP_MODE = 2,
FW_M2D_OTA_MODE = 3,
FW_DPDCALIB_MODE = 4,
FW_BLE_SCAN_AD_FILTER_MODE = 5,
FW_NORMAL_MODE = 0,
FW_RFTEST_MODE = 1,
FW_BLE_SCAN_WAKEUP_MODE = 2,
FW_M2D_OTA_MODE = 3,
FW_DPDCALIB_MODE = 4,
FW_BLE_SCAN_AD_FILTER_MODE = 5,
};
enum aicbt_patch_table_type {
AICBT_PT_INF = 0x00,
AICBT_PT_INF = 0x00,
AICBT_PT_TRAP = 0x1,
AICBT_PT_B4,
AICBT_PT_BTMODE,
@@ -454,13 +461,13 @@ enum aicbt_btport_type {
* efuse valid and vendor_info will be invalid, even has beed set valid
*/
enum aicbt_btmode_type {
AICBT_BTMODE_BT_ONLY_SW = 0x0, // bt only mode with switch
AICBT_BTMODE_BT_WIFI_COMBO, // wifi/bt combo mode
AICBT_BTMODE_BT_ONLY, // bt only mode without switch
AICBT_BTMODE_BT_ONLY_TEST, // bt only test mode
AICBT_BTMODE_BT_WIFI_COMBO_TEST, // wifi/bt combo test mode
AICBT_BTMODE_BT_ONLY_COANT, // bt only mode with no external switch
AICBT_MODE_NULL = 0xFF, // invalid value
AICBT_BTMODE_BT_ONLY_SW = 0x0, // bt only mode with switch
AICBT_BTMODE_BT_WIFI_COMBO, // wifi/bt combo mode
AICBT_BTMODE_BT_ONLY, // bt only mode without switch
AICBT_BTMODE_BT_ONLY_TEST, // bt only test mode
AICBT_BTMODE_BT_WIFI_COMBO_TEST, // wifi/bt combo test mode
AICBT_BTMODE_BT_ONLY_COANT, // bt only mode with no external switch
AICBT_MODE_NULL = 0xFF, // invalid value
};
/* uart_baud
@@ -468,15 +475,15 @@ enum aicbt_btmode_type {
* otherwise meaningless
*/
enum aicbt_uart_baud_type {
AICBT_UART_BAUD_115200 = 115200,
AICBT_UART_BAUD_921600 = 921600,
AICBT_UART_BAUD_1_5M = 1500000,
AICBT_UART_BAUD_3_25M = 3250000,
AICBT_UART_BAUD_115200 = 115200,
AICBT_UART_BAUD_921600 = 921600,
AICBT_UART_BAUD_1_5M = 1500000,
AICBT_UART_BAUD_3_25M = 3250000,
};
enum aicbt_uart_flowctrl_type {
AICBT_UART_FLOWCTRL_DISABLE = 0x0, // uart without flow ctrl
AICBT_UART_FLOWCTRL_ENABLE, // uart with flow ctrl
AICBT_UART_FLOWCTRL_DISABLE = 0x0, // uart without flow ctrl
AICBT_UART_FLOWCTRL_ENABLE, // uart with flow ctrl
};
enum aicbsp_cpmode_type {
@@ -492,48 +499,50 @@ enum chip_rev {
CHIP_REV_U04 = 7,
};
#define AIC_M2D_OTA_INFO_ADDR 0x88000020
#define AIC_M2D_OTA_DATA_ADDR 0x88000040
#define AIC_M2D_OTA_INFO_ADDR 0x88000020
#define AIC_M2D_OTA_DATA_ADDR 0x88000040
#if !defined(CONFIG_M2D_OTA_LZMA_SUPPORT)
#define AIC_M2D_OTA_FLASH_ADDR 0x08004000
#define AIC_M2D_OTA_FLASH_ADDR 0x08004000
#define AIC_M2D_OTA_CODE_START_ADDR (AIC_M2D_OTA_FLASH_ADDR + 0x0188)
#define AIC_M2D_OTA_VER_ADDR (AIC_M2D_OTA_FLASH_ADDR + 0x018C)
#define AIC_M2D_OTA_VER_ADDR (AIC_M2D_OTA_FLASH_ADDR + 0x018C)
#else
#define AIC_M2D_OTA_FLASH_ADDR 0x08005000
#define AIC_M2D_OTA_FLASH_ADDR 0x08005000
#define AIC_M2D_OTA_CODE_START_ADDR (AIC_M2D_OTA_FLASH_ADDR + 0x1188)
#define AIC_M2D_OTA_VER_ADDR (AIC_M2D_OTA_FLASH_ADDR + 0x0010)
#define AIC_M2D_OTA_VER_ADDR (AIC_M2D_OTA_FLASH_ADDR + 0x0010)
#endif
///aic bt tx pwr lvl :lsb->msb: first byte, min pwr lvl; second byte, max pwr lvl;
///pwr lvl:20(min), 30 , 40 , 50 , 60(max)
#define AICBT_TXPWR_LVL 0x00006020
#define AICBT_TXPWR_LVL_8800dc 0x00006f2f
#define AICBT_TXPWR_LVL_8800d80 0x00006f2f
#define AICBT_TXPWR_LVL 0x00006020
#define AICBT_TXPWR_LVL_8800dc 0x00006f2f
#define AICBT_TXPWR_LVL_8800d80 0x00006f2f
#define AICBT_TXPWR_LVL_8800d80x2 0x00006f2f
#define AICBSP_HWINFO_DEFAULT (-1)
#define AICBSP_CPMODE_DEFAULT AICBSP_CPMODE_WORK
#define AICBSP_FWLOG_EN_DEFAULT 0
#define AICBSP_HWINFO_DEFAULT (-1)
#define AICBSP_CPMODE_DEFAULT AICBSP_CPMODE_WORK
#define AICBSP_FWLOG_EN_DEFAULT 0
#define AICBT_BTMODE_DEFAULT_8800d80 AICBT_BTMODE_BT_ONLY_COANT
#define AICBT_BTMODE_DEFAULT AICBT_BTMODE_BT_ONLY_SW
#define AICBT_BTMODE_DEFAULT_8800d80x2 AICBT_BTMODE_BT_ONLY_COANT
#define AICBT_BTMODE_DEFAULT_8800d80 AICBT_BTMODE_BT_ONLY_COANT
#define AICBT_BTMODE_DEFAULT AICBT_BTMODE_BT_ONLY_SW
#ifdef CONFIG_SDIO_BT
#define AICBT_BTPORT_DEFAULT AICBT_BTPORT_MB
#define AICBT_BTPORT_DEFAULT AICBT_BTPORT_MB
#else
#define AICBT_BTPORT_DEFAULT AICBT_BTPORT_UART
#define AICBT_BTPORT_DEFAULT AICBT_BTPORT_UART
#endif
#define AICBT_UART_BAUD_DEFAULT AICBT_UART_BAUD_1_5M
#define AICBT_UART_FC_DEFAULT AICBT_UART_FLOWCTRL_ENABLE
#define AICBT_LPM_ENABLE_DEFAULT 0
#define AICBT_TXPWR_LVL_DEFAULT AICBT_TXPWR_LVL
#define AICBT_TXPWR_LVL_DEFAULT_8800dc AICBT_TXPWR_LVL_8800dc
#define AICBT_UART_BAUD_DEFAULT AICBT_UART_BAUD_1_5M
#define AICBT_UART_FC_DEFAULT AICBT_UART_FLOWCTRL_ENABLE
#define AICBT_LPM_ENABLE_DEFAULT 0
#define AICBT_TXPWR_LVL_DEFAULT AICBT_TXPWR_LVL
#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_8800d80x2 AICBT_TXPWR_LVL_8800d80x2
#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_PHASE 2 // 0: default, 2: 180°
#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_PHASE 2 // 0: default, 2: 180°
struct aicbt_patch_table {
char *name;
char *name;
uint32_t type;
uint32_t *data;
uint32_t len;
@@ -550,15 +559,21 @@ struct aicbt_info_t {
};
struct aicbt_patch_info_t {
uint32_t info_len;
uint32_t adid_addrinf;
uint32_t info_len;
//base len start
uint32_t adid_addrinf;
uint32_t addr_adid;
uint32_t patch_addrinf;
uint32_t patch_addrinf;
uint32_t addr_patch;
uint32_t reset_addr;
uint32_t reset_val;
uint32_t adid_flag_addr;
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 {
@@ -567,6 +582,7 @@ struct aicbsp_firmware {
const char *bt_patch;
const char *bt_table;
const char *wl_fw;
const char *bt_ext_patch;
};
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_u02[];
extern const struct aicbsp_firmware fw_8800d80_h_u02[];
extern const struct aicbsp_firmware fw_8800d80x2[];
#endif

View File

@@ -24,39 +24,45 @@ struct skb_buff_pool {
};
struct aicbsp_feature_t {
int hwinfo;
int hwinfo;
uint32_t sdio_clock;
uint8_t sdio_phase;
bool fwlog_en;
uint8_t irqf;
uint8_t sdio_phase;
bool fwlog_en;
uint8_t irqf;
};
#ifdef CONFIG_DPD
#if defined(CONFIG_DPD) || defined(CONFIG_LOFT_CALIB)
typedef struct {
uint32_t bit_mask[3];
uint32_t reserved;
uint32_t dpd_high[96];
uint32_t dpd_11b[96];
uint32_t dpd_low[96];
uint32_t idac_11b[48];
uint32_t idac_high[48];
uint32_t idac_low[48];
uint32_t loft_res[18];
uint32_t rx_iqim_res[16];
uint32_t bit_mask[3];
uint32_t reserved;
uint32_t dpd_high[96];
uint32_t dpd_11b[96];
uint32_t dpd_low[96];
uint32_t idac_11b[48];
uint32_t idac_high[48];
uint32_t idac_low[48];
uint32_t loft_res[18];
uint32_t rx_iqim_res[16];
} rf_misc_ram_t;
typedef struct {
uint32_t bit_mask[4];
uint32_t dpd_high[96];
uint32_t loft_res[18];
uint32_t bit_mask[4];
uint32_t dpd_high[96];
uint32_t loft_res[18];
} rf_misc_ram_lite_t;
#define MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
#define DPD_RESULT_SIZE_8800DC sizeof(rf_misc_ram_lite_t)
#define MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
#define DPD_RESULT_SIZE_8800DC sizeof(rf_misc_ram_lite_t)
#endif
#ifdef CONFIG_DPD
extern rf_misc_ram_lite_t dpd_res;
#endif
#ifdef CONFIG_LOFT_CALIB
extern rf_misc_ram_lite_t loft_res_local;
#endif
int aicbsp_set_subsys(int, int);
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);

View File

@@ -9,88 +9,79 @@
#include "rwnx_version_gen.h"
#include "aicwf_txq_prealloc.h"
#define DRV_DESCRIPTION "AIC BSP"
#define DRV_COPYRIGHT "Copyright(c) 2015-2020 AICSemi"
#define DRV_AUTHOR "AICSemi"
#define DRV_VERS_MOD "1.0"
#define DRV_DESCRIPTION "AIC BSP"
#define DRV_COPYRIGHT "Copyright(c) 2015-2020 AICSemi"
#define DRV_AUTHOR "AICSemi"
#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;
const struct aicbsp_firmware *aicbsp_firmware_list = fw_u02;
const struct aicbsp_firmware fw_u02[] = {
[AICBSP_CPMODE_WORK] = {
.desc = "normal work mode(sdio u02)",
.bt_adid = "fw_adid.bin",
.bt_patch = "fw_patch.bin",
.bt_table = "fw_patch_table.bin",
#ifdef CONFIG_SDIO_BT
.wl_fw = "fmacfwbt.bin"
#else
.wl_fw = "fmacfw.bin"
#endif
},
[AICBSP_CPMODE_TEST] = {
.desc = "rf test mode(sdio u02)",
.bt_adid = "fw_adid.bin",
.bt_patch = "fw_patch.bin",
.bt_table = "fw_patch_table.bin",
.wl_fw = "fmacfw_rf.bin"
[AICBSP_CPMODE_WORK] = { .desc = "normal work mode(sdio u02)",
.bt_adid = "fw_adid.bin",
.bt_patch = "fw_patch.bin",
.bt_table = "fw_patch_table.bin",
#ifdef CONFIG_SDIO_BT
.wl_fw = "fmacfwbt.bin"
#else
.wl_fw = "fmacfw.bin"
#endif
},
[AICBSP_CPMODE_TEST] = { .desc = "rf test mode(sdio u02)",
.bt_adid = "fw_adid.bin",
.bt_patch = "fw_patch.bin",
.bt_table = "fw_patch_table.bin",
.wl_fw = "fmacfw_rf.bin" },
};
const struct aicbsp_firmware fw_u03[] = {
[AICBSP_CPMODE_WORK] = {
.desc = "normal work mode(sdio u03/u04)",
.bt_adid = "fw_adid_u03.bin",
.bt_patch = "fw_patch_u03.bin",
.bt_table = "fw_patch_table_u03.bin",
#ifdef CONFIG_MCU_MESSAGE
.wl_fw = "fmacfw_8800m_custmsg.bin"
#elif defined(CONFIG_SDIO_BT)
.wl_fw = "fmacfwbt.bin"
#else
.wl_fw = "fmacfw.bin"
#endif
[AICBSP_CPMODE_WORK] = { .desc = "normal work mode(sdio u03/u04)",
.bt_adid = "fw_adid_u03.bin",
.bt_patch = "fw_patch_u03.bin",
.bt_table = "fw_patch_table_u03.bin",
#ifdef CONFIG_MCU_MESSAGE
.wl_fw = "fmacfw_8800m_custmsg.bin"
#elif defined(CONFIG_SDIO_BT)
.wl_fw = "fmacfwbt.bin"
#else
.wl_fw = "fmacfw.bin"
#endif
},
[AICBSP_CPMODE_TEST] = {
.desc = "rf test mode(sdio u03/u04)",
.bt_adid = "fw_adid_u03.bin",
.bt_patch = "fw_patch_u03.bin",
.bt_table = "fw_patch_table_u03.bin",
.wl_fw = "fmacfw_rf.bin"
},
[AICBSP_CPMODE_TEST] = { .desc = "rf test mode(sdio u03/u04)",
.bt_adid = "fw_adid_u03.bin",
.bt_patch = "fw_patch_u03.bin",
.bt_table = "fw_patch_table_u03.bin",
.wl_fw = "fmacfw_rf.bin" },
};
const struct aicbsp_firmware fw_8800dc_u01[] = {
[AICBSP_CPMODE_WORK] = {
.desc = "normal work mode(sdio u01)",
.bt_adid = "fw_adid_8800dc.bin",
.bt_patch = "fw_patch_8800dc.bin",
.bt_table = "fw_patch_table_8800dc.bin",
.wl_fw = "fmacfw_8800dc.bin"
},
[AICBSP_CPMODE_WORK] = { .desc = "normal work mode(sdio u01)",
.bt_adid = "fw_adid_8800dc.bin",
.bt_patch = "fw_patch_8800dc.bin",
.bt_table = "fw_patch_table_8800dc.bin",
.wl_fw = "fmacfw_8800dc.bin" },
[AICBSP_CPMODE_TEST] = {
.desc = "rf test mode(sdio u01)",
.bt_adid = "fw_adid_8800dc.bin",
.bt_patch = "fw_patch_8800dc.bin",
.bt_table = "fw_patch_table_8800dc.bin",
.wl_fw = "fmacfw_rf_8800dc.bin"
},
[AICBSP_CPMODE_TEST] = { .desc = "rf test mode(sdio u01)",
.bt_adid = "fw_adid_8800dc.bin",
.bt_patch = "fw_patch_8800dc.bin",
.bt_table = "fw_patch_table_8800dc.bin",
.wl_fw = "fmacfw_rf_8800dc.bin" },
};
const struct aicbsp_firmware fw_8800dc_u02[] = {
[AICBSP_CPMODE_WORK] = {
.desc = "normal work mode(8800dc sdio u02)",
.bt_adid = "fw_adid_8800dc_u02.bin",
.bt_patch = "fw_patch_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"
},
@@ -99,6 +90,7 @@ const struct aicbsp_firmware fw_8800dc_u02[] = {
.bt_adid = "fw_adid_8800dc_u02.bin",
.bt_patch = "fw_patch_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
},
};
@@ -109,6 +101,7 @@ const struct aicbsp_firmware fw_8800dc_h_u02[] = {
.bt_adid = "fw_adid_8800dc_u02h.bin",
.bt_patch = "fw_patch_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"
},
@@ -117,82 +110,98 @@ const struct aicbsp_firmware fw_8800dc_h_u02[] = {
.bt_adid = "fw_adid_8800dc_u02h.bin",
.bt_patch = "fw_patch_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
},
};
const struct aicbsp_firmware fw_8800d80_u01[] = {
[AICBSP_CPMODE_WORK] = {
.desc = "normal work mode(8800d80 sdio u01)",
.bt_adid = "fw_adid_8800d80.bin",
.bt_patch = "fw_patch_8800d80.bin",
.bt_table = "fw_patch_table_8800d80.bin",
.wl_fw = "fmacfw_8800d80.bin"
},
[AICBSP_CPMODE_WORK] = { .desc = "normal work mode(8800d80 sdio u01)",
.bt_adid = "fw_adid_8800d80.bin",
.bt_patch = "fw_patch_8800d80.bin",
.bt_table = "fw_patch_table_8800d80.bin",
.wl_fw = "fmacfw_8800d80.bin" },
[AICBSP_CPMODE_TEST] = {
.desc = "rf test mode(8800d80 sdio u01)",
.bt_adid = "fw_adid_8800d80.bin",
.bt_patch = "fw_patch_8800d80.bin",
.bt_table = "fw_patch_table_8800d80.bin",
.wl_fw = "lmacfw_rf_8800d80.bin"
},
[AICBSP_CPMODE_TEST] = { .desc = "rf test mode(8800d80 sdio u01)",
.bt_adid = "fw_adid_8800d80.bin",
.bt_patch = "fw_patch_8800d80.bin",
.bt_table = "fw_patch_table_8800d80.bin",
.wl_fw = "lmacfw_rf_8800d80.bin" },
};
const struct aicbsp_firmware fw_8800d80_u02[] = {
[AICBSP_CPMODE_WORK] = {
.desc = "normal work mode(8800d80 sdio u02)",
.bt_adid = "fw_adid_8800d80_u02.bin",
.bt_patch = "fw_patch_8800d80_u02.bin",
.bt_table = "fw_patch_table_8800d80_u02.bin",
#ifdef CONFIG_SDIO_BT
.wl_fw = "fmacfwbt_8800d80_u02.bin"
#else
.wl_fw = "fmacfw_8800d80_u02.bin"
#endif
},
[AICBSP_CPMODE_WORK] = { .desc = "normal work mode(8800d80 sdio u02)",
.bt_adid = "fw_adid_8800d80_u02.bin",
.bt_patch = "fw_patch_8800d80_u02.bin",
.bt_table = "fw_patch_table_8800d80_u02.bin",
#if defined CONFIG_SDIO_BT
.wl_fw = "fmacfwbt_8800d80_u02.bin",
#elif defined CONFIG_FOR_IPCAM
.wl_fw = "fmacfw_8800d80_u02_ipc.bin",
#else
.wl_fw = "fmacfw_8800d80_u02.bin",
#endif
.bt_ext_patch = "fw_patch_8800d80_u02_ext" },
[AICBSP_CPMODE_TEST] = {
.desc = "rf test mode(8800d80 sdio u02)",
.bt_adid = "fw_adid_8800d80_u02.bin",
.bt_patch = "fw_patch_8800d80_u02.bin",
.bt_table = "fw_patch_table_8800d80_u02.bin",
.wl_fw = "lmacfw_rf_8800d80_u02.bin"
},
[AICBSP_CPMODE_TEST] = { .desc = "rf test mode(8800d80 sdio u02)",
.bt_adid = "fw_adid_8800d80_u02.bin",
.bt_patch = "fw_patch_8800d80_u02.bin",
.bt_table = "fw_patch_table_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[] = {
[AICBSP_CPMODE_WORK] = {
.desc = "normal work mode(8800d80 sdio h_u02)",
.bt_adid = "fw_adid_8800d80_u02.bin",
.bt_patch = "fw_patch_8800d80_u02.bin",
.bt_table = "fw_patch_table_8800d80_u02.bin",
#ifdef CONFIG_SDIO_BT
.wl_fw = "fmacfwbt_8800d80_h_u02.bin"
#else
.wl_fw = "fmacfw_8800d80_h_u02.bin"
#endif
},
[AICBSP_CPMODE_WORK] = { .desc = "normal work mode(8800d80 sdio h_u02)",
.bt_adid = "fw_adid_8800d80_u02.bin",
.bt_patch = "fw_patch_8800d80_u02.bin",
.bt_table = "fw_patch_table_8800d80_u02.bin",
#if defined CONFIG_SDIO_BT
.wl_fw = "fmacfwbt_8800d80_h_u02.bin",
#elif defined CONFIG_FOR_IPCAM
.wl_fw = "fmacfw_8800d80_h_u02_ipc.bin",
#else
.wl_fw = "fmacfw_8800d80_h_u02.bin",
#endif
.bt_ext_patch = "fw_patch_8800d80_u02_ext" },
[AICBSP_CPMODE_TEST] = {
.desc = "rf test mode(8800d80 sdio u02)",
.bt_adid = "fw_adid_8800d80_u02.bin",
.bt_patch = "fw_patch_8800d80_u02.bin",
.bt_table = "fw_patch_table_8800d80_u02.bin",
.wl_fw = "lmacfw_rf_8800d80_u02.bin"
},
[AICBSP_CPMODE_TEST] = { .desc = "rf test mode(8800d80 sdio u02)",
.bt_adid = "fw_adid_8800d80_u02.bin",
.bt_patch = "fw_patch_8800d80_u02.bin",
.bt_table = "fw_patch_table_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 = {
.hwinfo_r = AICBSP_HWINFO_DEFAULT,
.hwinfo = AICBSP_HWINFO_DEFAULT,
.cpmode = AICBSP_CPMODE_DEFAULT,
.hwinfo = AICBSP_HWINFO_DEFAULT,
.cpmode = AICBSP_CPMODE_DEFAULT,
.fwlog_en = AICBSP_FWLOG_EN_DEFAULT,
#ifdef CONFIG_IRQ_FALL
.irqf = 1,
.irqf = 1,
#else
.irqf = 0,
.irqf = 0,
#endif
};
@@ -207,8 +216,8 @@ static struct platform_driver aicbsp_driver = {
//.remove = aicbsp_remove,
};
static ssize_t cpmode_show(struct device *dev,
struct device_attribute *attr, char *buf)
static ssize_t cpmode_show(struct device *dev, struct device_attribute *attr,
char *buf)
{
ssize_t count = 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++) {
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], " BT ADID : %s\n", aicbsp_firmware_list[aicbsp_info.cpmode].bt_adid);
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);
count += sprintf(&buf[count], "Current: %d, firmware info:\n",
aicbsp_info.cpmode);
count += sprintf(&buf[count], " BT ADID : %s\n",
aicbsp_firmware_list[aicbsp_info.cpmode].bt_adid);
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;
}
static ssize_t cpmode_store(struct device *dev,
struct device_attribute *attr, const char *buf, size_t count)
static ssize_t cpmode_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{
unsigned long val;
int err = kstrtoul(buf, 0, &val);
@@ -242,13 +257,14 @@ static ssize_t cpmode_store(struct device *dev,
}
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;
}
static ssize_t hwinfo_show(struct device *dev,
struct device_attribute *attr, char *buf)
static ssize_t hwinfo_show(struct device *dev, struct device_attribute *attr,
char *buf)
{
ssize_t count = 0;
@@ -260,20 +276,23 @@ static ssize_t hwinfo_show(struct device *dev,
count += sprintf(&buf[count], "hwinfo read: ");
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
count += sprintf(&buf[count], "0x%02X, ", aicbsp_info.hwinfo_r);
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
count += sprintf(&buf[count], "set: 0x%02X\n", aicbsp_info.hwinfo);
count += sprintf(&buf[count], "set: 0x%02X\n",
aicbsp_info.hwinfo);
return count;
}
static ssize_t hwinfo_store(struct device *dev,
struct device_attribute *attr, const char *buf, size_t count)
static ssize_t hwinfo_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{
long val;
int err = kstrtol(buf, 0, &val);
@@ -292,19 +311,19 @@ static ssize_t hwinfo_store(struct device *dev,
return count;
}
static ssize_t fwdebug_show(struct device *dev,
struct device_attribute *attr, char *buf)
static ssize_t fwdebug_show(struct device *dev, struct device_attribute *attr,
char *buf)
{
ssize_t count = 0;
count += sprintf(&buf[count], "fw log status: %s\n",
aicbsp_info.fwlog_en ? "on" : "off");
aicbsp_info.fwlog_en ? "on" : "off");
return count;
}
static ssize_t fwdebug_store(struct device *dev,
struct device_attribute *attr, const char *buf, size_t count)
static ssize_t fwdebug_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{
long val;
int err = kstrtol(buf, 0, &val);
@@ -323,14 +342,11 @@ static ssize_t fwdebug_store(struct device *dev,
return count;
}
static DEVICE_ATTR(cpmode, S_IRUGO | S_IWUSR,
cpmode_show, cpmode_store);
static DEVICE_ATTR(cpmode, S_IRUGO | S_IWUSR, cpmode_show, cpmode_store);
static DEVICE_ATTR(hwinfo, S_IRUGO | S_IWUSR,
hwinfo_show, hwinfo_store);
static DEVICE_ATTR(hwinfo, S_IRUGO | S_IWUSR, hwinfo_show, hwinfo_store);
static DEVICE_ATTR(fwdebug, S_IRUGO | S_IWUSR,
fwdebug_show, fwdebug_store);
static DEVICE_ATTR(fwdebug, S_IRUGO | S_IWUSR, fwdebug_show, fwdebug_store);
static struct attribute *aicbsp_attributes[] = {
&dev_attr_cpmode.attr,
@@ -340,7 +356,7 @@ static struct attribute *aicbsp_attributes[] = {
};
static struct attribute_group aicbsp_attribute_group = {
.name = "aicbsp_info",
.name = "aicbsp_info",
.attrs = aicbsp_attributes,
};
@@ -349,7 +365,6 @@ int adap_test = 0;
module_param(testmode, int, 0660);
module_param(adap_test, int, 0660);
static int __init aicbsp_init(void)
{
int ret;
@@ -359,6 +374,9 @@ static int __init aicbsp_init(void)
aicbsp_info.cpmode = testmode;
aicbsp_resv_mem_init();
sema_init(&aicbsp_probe_semaphore, 0);
ret = platform_driver_register(&aicbsp_driver);
if (ret) {
pr_err("register platform driver failed: %d\n", ret);
@@ -372,7 +390,8 @@ static int __init aicbsp_init(void)
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) {
pr_err("register sysfs create group failed!\n");
return ret;
@@ -391,9 +410,9 @@ extern struct aic_sdio_dev *aicbsp_sdiodev;
static void __exit aicbsp_exit(void)
{
#if defined CONFIG_PLATFORM_ROCKCHIP || defined CONFIG_PLATFORM_ROCKCHIP2
if(aicbsp_sdiodev){
aicbsp_sdio_exit();
}
if (aicbsp_sdiodev) {
aicbsp_sdio_exit();
}
#endif
sysfs_remove_group(&(aicbsp_pdev->dev.kobj), &aicbsp_attribute_group);
platform_device_del(aicbsp_pdev);
@@ -401,7 +420,7 @@ static void __exit aicbsp_exit(void)
mutex_destroy(&aicbsp_power_lock);
aicbsp_resv_mem_deinit();
#ifdef CONFIG_PREALLOC_TXQ
aicwf_prealloc_txq_free();
aicwf_prealloc_txq_free();
#endif
printk("%s\n", __func__);
}

File diff suppressed because it is too large Load Diff

View File

@@ -16,75 +16,76 @@
#include <linux/semaphore.h>
#include "aic_bsp_driver.h"
#define AICBSP_SDIO_NAME "aicbsp_sdio"
#define SDIOWIFI_FUNC_BLOCKSIZE 512
#define AICBSP_SDIO_NAME "aicbsp_sdio"
#define SDIOWIFI_FUNC_BLOCKSIZE 512
#define SDIO_VENDOR_ID_AIC 0x8800
#define SDIO_DEVICE_ID_AIC 0x0001
#define SDIOWIFI_BYTEMODE_LEN_REG 0x02
#define SDIOWIFI_INTR_CONFIG_REG 0x04
#define SDIOWIFI_SLEEP_REG 0x05
#define SDIOWIFI_WAKEUP_REG 0x09
#define SDIOWIFI_FLOW_CTRL_REG 0x0A
#define SDIOWIFI_REGISTER_BLOCK 0x0B
#define SDIOWIFI_BYTEMODE_ENABLE_REG 0x11
#define SDIOWIFI_BLOCK_CNT_REG 0x12
#define SDIOWIFI_FLOWCTRL_MASK_REG 0x7F
#define SDIOWIFI_WR_FIFO_ADDR 0x07
#define SDIOWIFI_RD_FIFO_ADDR 0x08
#define SDIO_VENDOR_ID_AIC 0x8800
#define SDIO_DEVICE_ID_AIC 0x0001
#define SDIOWIFI_BYTEMODE_LEN_REG 0x02
#define SDIOWIFI_INTR_CONFIG_REG 0x04
#define SDIOWIFI_SLEEP_REG 0x05
#define SDIOWIFI_WAKEUP_REG 0x09
#define SDIOWIFI_FLOW_CTRL_REG 0x0A
#define SDIOWIFI_REGISTER_BLOCK 0x0B
#define SDIOWIFI_BYTEMODE_ENABLE_REG 0x11
#define SDIOWIFI_BLOCK_CNT_REG 0x12
#define SDIOWIFI_FLOWCTRL_MASK_REG 0x7F
#define SDIOWIFI_WR_FIFO_ADDR 0x07
#define SDIOWIFI_RD_FIFO_ADDR 0x08
#define SDIOWIFI_INTR_ENABLE_REG_V3 0x00
#define SDIOWIFI_INTR_PENDING_REG_V3 0x01
#define SDIOWIFI_INTR_TO_DEVICE_REG_V3 0x02
#define SDIOWIFI_FLOW_CTRL_Q1_REG_V3 0x03
#define SDIOWIFI_MISC_INT_STATUS_REG_V3 0x04
#define SDIOWIFI_BYTEMODE_LEN_REG_V3 0x05
#define SDIOWIFI_BYTEMODE_LEN_MSB_REG_V3 0x06
#define SDIOWIFI_BYTEMODE_ENABLE_REG_V3 0x07
#define SDIOWIFI_MISC_CTRL_REG_V3 0x08
#define SDIOWIFI_FLOW_CTRL_Q2_REG_V3 0x09
#define SDIOWIFI_CLK_TEST_RESULT_REG_V3 0x0A
#define SDIOWIFI_RD_FIFO_ADDR_V3 0x0F
#define SDIOWIFI_WR_FIFO_ADDR_V3 0x10
#define SDIOWIFI_INTR_ENABLE_REG_V3 0x00
#define SDIOWIFI_INTR_PENDING_REG_V3 0x01
#define SDIOWIFI_INTR_TO_DEVICE_REG_V3 0x02
#define SDIOWIFI_FLOW_CTRL_Q1_REG_V3 0x03
#define SDIOWIFI_MISC_INT_STATUS_REG_V3 0x04
#define SDIOWIFI_BYTEMODE_LEN_REG_V3 0x05
#define SDIOWIFI_BYTEMODE_LEN_MSB_REG_V3 0x06
#define SDIOWIFI_BYTEMODE_ENABLE_REG_V3 0x07
#define SDIOWIFI_MISC_CTRL_REG_V3 0x08
#define SDIOWIFI_FLOW_CTRL_Q2_REG_V3 0x09
#define SDIOWIFI_CLK_TEST_RESULT_REG_V3 0x0A
#define SDIOWIFI_RD_FIFO_ADDR_V3 0x0F
#define SDIOWIFI_WR_FIFO_ADDR_V3 0x10
#define SDIOCLK_FREE_RUNNING_BIT (1 << 6)
#define SDIOCLK_FREE_RUNNING_BIT (1 << 6)
#define SDIOWIFI_PWR_CTRL_INTERVAL 30
#define FLOW_CTRL_RETRY_COUNT 50
#define BUFFER_SIZE 1536
#define TAIL_LEN 4
#define TXQLEN (2048*4)
#define SDIOWIFI_PWR_CTRL_INTERVAL 30
#define FLOW_CTRL_RETRY_COUNT 50
#define BUFFER_SIZE 1536
#define TAIL_LEN 4
#define TXQLEN (2048 * 4)
#define SDIO_SLEEP_ST 0
#define SDIO_ACTIVE_ST 1
#define SDIO_SLEEP_ST 0
#define SDIO_ACTIVE_ST 1
typedef enum {
SDIO_TYPE_DATA = 0X00,
SDIO_TYPE_CFG = 0X10,
SDIO_TYPE_CFG_CMD_RSP = 0X11,
SDIO_TYPE_DATA = 0X00,
SDIO_TYPE_CFG = 0X10,
SDIO_TYPE_CFG_CMD_RSP = 0X11,
SDIO_TYPE_CFG_DATA_CFM = 0X12
} sdio_type;
enum AICWF_IC{
PRODUCT_ID_AIC8801 = 0,
enum AICWF_IC {
PRODUCT_ID_AIC8801 = 0,
PRODUCT_ID_AIC8800DC,
PRODUCT_ID_AIC8800DW,
PRODUCT_ID_AIC8800D80
PRODUCT_ID_AIC8800D80,
PRODUCT_ID_AIC8800D80X2
};
struct aic_sdio_reg {
u8 bytemode_len_reg;
u8 intr_config_reg;
u8 sleep_reg;
u8 wakeup_reg;
u8 flow_ctrl_reg;
u8 flowctrl_mask_reg;
u8 register_block;
u8 bytemode_enable_reg;
u8 block_cnt_reg;
u8 misc_int_status_reg;
u8 rd_fifo_addr;
u8 wr_fifo_addr;
u8 bytemode_len_reg;
u8 intr_config_reg;
u8 sleep_reg;
u8 wakeup_reg;
u8 flow_ctrl_reg;
u8 flowctrl_mask_reg;
u8 register_block;
u8 bytemode_enable_reg;
u8 block_cnt_reg;
u8 misc_int_status_reg;
u8 rd_fifo_addr;
u8 wr_fifo_addr;
};
struct aic_sdio_dev {
@@ -109,8 +110,8 @@ struct aic_sdio_dev {
#endif
u16 chipid;
u32 fw_version_uint;
struct aic_sdio_reg sdio_reg;
void (*sdio_hal_irqhandler) (struct sdio_func *func);
struct aic_sdio_reg sdio_reg;
void (*sdio_hal_irqhandler)(struct sdio_func *func);
};
void *aicbsp_get_drvdata(void *args);
@@ -119,19 +120,20 @@ void aicwf_sdio_hal_irqhandler(struct sdio_func *func);
void aicwf_sdio_hal_irqhandler_func2(struct sdio_func *func);
#if defined(CONFIG_SDIO_PWRCTRL)
void aicwf_sdio_pwrctl_timer(struct aic_sdio_dev *sdiodev, uint duration);
int aicwf_sdio_pwr_stctl(struct aic_sdio_dev *sdiodev, uint target);
int aicwf_sdio_pwr_stctl(struct aic_sdio_dev *sdiodev, uint target);
#endif
void aicwf_sdio_reg_init(struct aic_sdio_dev *sdiodev);
int aicwf_sdio_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);
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);
void *aicwf_sdio_bus_init(struct aic_sdio_dev *sdiodev);
void aicwf_sdio_release(struct aic_sdio_dev *sdiodev);
void aicbsp_sdio_exit(void);
int aicbsp_sdio_init(void);
int aicbsp_sdio_init(void);
void aicbsp_sdio_release(struct aic_sdio_dev *sdiodev);
int aicwf_sdio_txpkt(struct aic_sdio_dev *sdiodev, struct sk_buff *pkt);
int aicwf_sdio_bustx_thread(void *data);

View File

@@ -40,24 +40,27 @@ int aicwf_bus_init(uint bus_hdrlen, struct device *dev)
init_completion(&bus_if->bustx_trgg);
init_completion(&bus_if->busrx_trgg);
#ifdef AICWF_SDIO_SUPPORT
bus_if->bustx_thread = kthread_run(aicwf_sdio_bustx_thread, (void *)bus_if, "aicwf_bustx_thread");
bus_if->busrx_thread = kthread_run(aicwf_sdio_busrx_thread, (void *)bus_if->bus_priv.sdio->rx_priv, "aicwf_busrx_thread");
#endif
bus_if->bustx_thread = kthread_run(
aicwf_sdio_bustx_thread, (void *)bus_if, "aicwf_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");
ret = -1;
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)) {
bus_if->busrx_thread = NULL;
bus_if->busrx_thread = NULL;
txrx_err("aicwf_bustx_thread run fail\n");
ret = -1;
goto fail;
}
#endif
return ret;
fail:
aicwf_bus_deinit(dev);
@@ -173,15 +176,19 @@ int aicwf_process_rxframes(struct aicwf_rx_priv *rx_priv)
data = skb->data;
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;
if (aggr_len & (RX_ALIGNMENT - 1))
adjust_len = roundup(aggr_len, RX_ALIGNMENT);
adjust_len =
roundup(aggr_len, RX_ALIGNMENT);
else
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) {
txrx_err("no more space!\n");
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);
memcpy(skb_inblock->data, data, aggr_len);
#if 0
#if 0
rwnx_rxdataind_aicwf(rx_priv->sdiodev->rwnx_hw, skb_inblock, (void *)rx_priv);
#endif
#endif
skb_pull(skb, adjust_len);
} else { // type : config
aggr_len = pkt_len;
if (aggr_len & (RX_ALIGNMENT - 1))
adjust_len = roundup(aggr_len, RX_ALIGNMENT);
adjust_len =
roundup(aggr_len, RX_ALIGNMENT);
else
adjust_len = aggr_len;
skb_inblock = __dev_alloc_skb(aggr_len+4, GFP_KERNEL);
if (skb_inblock == NULL) {
txrx_err("no more space!\n");
aicwf_dev_skb_free(skb);
return -EBADE;
skb_inblock = __dev_alloc_skb(aggr_len + 4,
GFP_KERNEL);
if (skb_inblock == NULL) {
txrx_err("no more space!\n");
aicwf_dev_skb_free(skb);
return -EBADE;
}
skb_put(skb_inblock, aggr_len+4);
memcpy(skb_inblock->data, data, aggr_len+4);
if ((*(skb_inblock->data + 2) & 0x7f) == SDIO_TYPE_CFG_CMD_RSP)
rwnx_rx_handle_msg(rx_priv->sdiodev, (struct ipc_e2a_msg *)(skb_inblock->data + 4));
#if 0
skb_put(skb_inblock, aggr_len + 4);
memcpy(skb_inblock->data, data, aggr_len + 4);
if ((*(skb_inblock->data + 2) & 0x7f) ==
SDIO_TYPE_CFG_CMD_RSP)
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)
aicwf_sdio_host_tx_cfm_handler(&(rx_priv->sdiodev->rwnx_hw->sdio_env), (u32 *)(skb_inblock->data + 4));
#endif
skb_pull(skb, adjust_len+4);
#endif
skb_pull(skb, adjust_len + 4);
}
}
@@ -234,12 +248,13 @@ int aicwf_process_rxframes(struct aicwf_rx_priv *rx_priv)
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;
struct recv_msdu *req, *reqs;
reqs = vmalloc(qsize*sizeof(struct recv_msdu));
reqs = vmalloc(qsize * sizeof(struct recv_msdu));
if (reqs == NULL)
return NULL;
@@ -268,7 +283,8 @@ struct aicwf_rx_priv *aicwf_rx_init(void *arg)
INIT_LIST_HEAD(&rx_priv->rxframes_freequeue);
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) {
txrx_err("no enough buffer for free recv frame queue!\n");
kfree(rx_priv);
@@ -280,12 +296,11 @@ struct aicwf_rx_priv *aicwf_rx_init(void *arg)
return rx_priv;
}
static void aicwf_recvframe_queue_deinit(struct list_head *q)
{
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);
}
}
@@ -307,12 +322,12 @@ void aicwf_rx_deinit(struct aicwf_rx_priv *rx_priv)
//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);
}
void aicwf_dev_skb_free(struct sk_buff *skb)
{
if (!skb)
@@ -321,7 +336,8 @@ void aicwf_dev_skb_free(struct sk_buff *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;
@@ -345,7 +361,8 @@ void aicwf_frame_queue_flush(struct frame_queue *pq)
for (prio = 0; prio < pq->num_prio; prio++) {
q = &pq->queuelist[prio];
skb_queue_walk_safe(q, p, next) {
skb_queue_walk_safe(q, p, next)
{
skb_unlink(p, q);
aicwf_dev_skb_free(p);
pq->qcnt--;
@@ -357,7 +374,9 @@ void aicwf_frame_queue_init(struct frame_queue *pq, int num_prio, int max_len)
{
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->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;
@@ -405,7 +425,8 @@ struct sk_buff *aicwf_frame_dequeue(struct frame_queue *pq)
if (pq->qcnt == 0)
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--;
q = &pq->queuelist[prio];
@@ -430,7 +451,8 @@ static struct sk_buff *aicwf_skb_dequeue_tail(struct frame_queue *pq, int prio)
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;
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;
}

View File

@@ -13,58 +13,61 @@
#include <linux/sched.h>
#include "aicsdio.h"
#define CMD_BUF_MAX 1536
#define TXPKT_BLOCKSIZE 512
#define MAX_AGGR_TXPKT_LEN (1536*4)
#define CMD_TX_TIMEOUT 5000
#define TX_ALIGNMENT 4
#define CMD_BUF_MAX 1536
#define TXPKT_BLOCKSIZE 512
#define MAX_AGGR_TXPKT_LEN (1536 * 4)
#define CMD_TX_TIMEOUT 5000
#define TX_ALIGNMENT 4
#define RX_HWHRD_LEN 60 //58->60 word allined
#define CCMP_OR_WEP_INFO 8
#define MAX_RXQLEN 2000
#define RX_ALIGNMENT 4
#define RX_HWHRD_LEN 60 //58->60 word allined
#define CCMP_OR_WEP_INFO 8
#define MAX_RXQLEN 2000
#define RX_ALIGNMENT 4
#define DEBUG_ERROR_LEVEL 0
#define DEBUG_DEBUG_LEVEL 1
#define DEBUG_INFO_LEVEL 2
#define DEBUG_ERROR_LEVEL 0
#define DEBUG_DEBUG_LEVEL 1
#define DEBUG_INFO_LEVEL 2
#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 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__)
#define txrx_err(fmt, ...) \
pr_err("aicbsp: txrx_err:<%s,%d>: " fmt, __func__, __LINE__, \
##__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
#define sdio_dbg(fmt, ...) printk("aicbsp: " fmt, ##__VA_ARGS__)
#define usb_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__)
#else
#define sdio_dbg(fmt, ...)
#define usb_dbg(fmt, ...)
#endif
#if DBG_LEVEL >= DEBUG_INFO_LEVEL
#define sdio_info(fmt, ...) printk("aicbsp: " fmt, ##__VA_ARGS__)
#define usb_info(fmt, ...) printk("aicbsp: " fmt, ##__VA_ARGS__)
#define sdio_info(fmt, ...) printk("aicbsp: " fmt, ##__VA_ARGS__)
#define usb_info(fmt, ...) printk("aicbsp: " fmt, ##__VA_ARGS__)
#else
#define sdio_info(fmt, ...)
#define usb_info(fmt, ...)
#endif
enum aicwf_bus_state {
BUS_DOWN_ST,
BUS_UP_ST
};
enum aicwf_bus_state { BUS_DOWN_ST, BUS_UP_ST };
struct aicwf_bus_ops {
int (*start) (struct device *dev);
void (*stop) (struct device *dev);
int (*txdata) (struct device *dev, struct sk_buff *skb);
int (*txmsg) (struct device *dev, u8 *msg, uint len);
int (*start)(struct device *dev);
void (*stop)(struct device *dev);
int (*txdata)(struct device *dev, struct sk_buff *skb);
int (*txmsg)(struct device *dev, u8 *msg, uint len);
};
struct frame_queue {
u16 num_prio;
u16 hi_prio;
u16 qmax; /* max number of queued frames */
u16 qcnt;
u16 num_prio;
u16 hi_prio;
u16 qmax; /* max number of queued frames */
u16 qcnt;
struct sk_buff_head queuelist[8];
};
@@ -110,12 +113,11 @@ struct aicwf_tx_priv {
u8 *tail;
};
#define MAX_REORD_RXFRAME 250
#define REORDER_UPDATE_TIME 50
#define AICWF_REORDER_WINSIZE 64
#define SN_LESS(a, b) (((a-b)&0x800) != 0)
#define SN_EQUAL(a, b) (a == b)
#define MAX_REORD_RXFRAME 250
#define REORDER_UPDATE_TIME 50
#define AICWF_REORDER_WINSIZE 64
#define SN_LESS(a, b) (((a - b) & 0x800) != 0)
#define SN_EQUAL(a, b) (a == b)
struct reord_ctrl {
struct aicwf_rx_priv *rx_priv;
@@ -135,12 +137,12 @@ struct reord_ctrl_info {
};
struct recv_msdu {
struct sk_buff *pkt;
u8 tid;
u16 seq_num;
uint len;
u8 *rx_data;
//for pending rx reorder list
struct sk_buff *pkt;
u8 tid;
u16 seq_num;
uint len;
u8 *rx_data;
//for pending rx reorder list
struct list_head reord_pending_list;
//for total frame list, when rxframe from busif, dequeue, when submit frame to net, enqueue
struct list_head rxframe_list;
@@ -203,12 +205,15 @@ struct aicwf_tx_priv *aicwf_tx_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_flush(struct frame_queue *pq);
bool aicwf_frame_enq(struct device *dev, struct frame_queue *q, struct sk_buff *pkt, int prio);
bool aicwf_rxframe_enqueue(struct device *dev, struct frame_queue *q, struct sk_buff *pkt);
bool aicwf_frame_enq(struct device *dev, struct frame_queue *q,
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);
void aicwf_frame_tx(void *dev, 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_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_ */

File diff suppressed because it is too large Load Diff

View File

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

View File

@@ -2,10 +2,10 @@
#include "aicsdio_txrxif.h"
#include "aic_bsp_driver.h"
struct prealloc_txq{
int prealloced;
void *txq;
size_t size;
struct prealloc_txq {
int prealloced;
void *txq;
size_t size;
};
struct prealloc_txq prealloc_txq;
@@ -13,50 +13,47 @@ struct prealloc_txq prealloc_txq;
void *aicwf_prealloc_txq_alloc(size_t size)
{
BUG_ON(size > MAX_TXQ_SIZE);
BUG_ON(size > MAX_TXQ_SIZE);
//check prealloc_txq.size
if ((int)prealloc_txq.size != (int)size) {
AICWFDBG(LOGINFO, "%s size is diff will to be kzalloc \r\n",
__func__);
//check prealloc_txq.size
if((int)prealloc_txq.size != (int)size)
{
AICWFDBG(LOGINFO, "%s size is diff will to be kzalloc \r\n", __func__);
if (prealloc_txq.txq != NULL) {
AICWFDBG(LOGINFO, "%s txq to kfree \r\n", __func__);
kfree(prealloc_txq.txq);
prealloc_txq.txq = NULL;
}
if(prealloc_txq.txq != NULL)
{
AICWFDBG(LOGINFO, "%s txq to kfree \r\n", __func__);
kfree(prealloc_txq.txq);
prealloc_txq.txq = NULL;
}
prealloc_txq.size = size;
prealloc_txq.prealloced = 0;
}
prealloc_txq.size = size;
prealloc_txq.prealloced = 0;
}
//check prealloc or not
if(!prealloc_txq.prealloced)
{
prealloc_txq.txq = kzalloc(size, GFP_KERNEL);
if(!prealloc_txq.txq){
AICWFDBG(LOGERROR, "%s txq kzalloc fail \r\n", __func__);
}else{
AICWFDBG(LOGINFO, "%s txq kzalloc successful \r\n", __func__);
prealloc_txq.prealloced = 1;
}
}else{
AICWFDBG(LOGINFO, "%s txq not need to kzalloc \r\n", __func__);
}
//check prealloc or not
if (!prealloc_txq.prealloced) {
prealloc_txq.txq = kzalloc(size, GFP_KERNEL);
if (!prealloc_txq.txq) {
AICWFDBG(LOGERROR, "%s txq kzalloc fail \r\n",
__func__);
} else {
AICWFDBG(LOGINFO, "%s txq kzalloc successful \r\n",
__func__);
prealloc_txq.prealloced = 1;
}
} else {
AICWFDBG(LOGINFO, "%s txq not need to kzalloc \r\n", __func__);
}
return prealloc_txq.txq;
return prealloc_txq.txq;
}
void aicwf_prealloc_txq_free(void)
{
if(prealloc_txq.txq != NULL)
{
AICWFDBG(LOGINFO, "%s txq to kfree \r\n", __func__);
kfree(prealloc_txq.txq);
prealloc_txq.txq = NULL;
}
if (prealloc_txq.txq != NULL) {
AICWFDBG(LOGINFO, "%s txq to kfree \r\n", __func__);
kfree(prealloc_txq.txq);
prealloc_txq.txq = NULL;
}
}
EXPORT_SYMBOL(aicwf_prealloc_txq_alloc);

Some files were not shown because too many files have changed in this diff Show More