diff --git "a/documents/rockchip/openEuler\351\200\202\351\205\215\346\214\207\345\215\227.md" "b/documents/rockchip/openEuler\351\200\202\351\205\215\346\214\207\345\215\227.md" index c8dd9f01f748192e46483410277d0e65f3c1d09d..4a79745de144153fd3ca31cb4e0a454ff39fb2a8 100644 --- "a/documents/rockchip/openEuler\351\200\202\351\205\215\346\214\207\345\215\227.md" +++ "b/documents/rockchip/openEuler\351\200\202\351\205\215\346\214\207\345\215\227.md" @@ -95,8 +95,18 @@ POST_BOARD_OVERLAY() { - rockchip: rk3399, rk3566, rk3568, rk3588 - phytium: e2000q - - 5. POST_BOARD_OVERLAY() + + - allwinner: h616 + + 5. part_table + + 开发板所使用的分区表 ,目前使用的有: + + - gpt: rockchip, phytium + + - msdos: allwinner + + 6. POST_BOARD_OVERLAY() `POST_BOARD_OVERLAY()` 是执行复制 firmware 文件到根目录以及对目标开发板根目录执行特定操作的函数,其使用的变量与 [build_rootfs.sh](../../scripts/rockchip/build_rootfs.sh) 相同,通常包含以下两个变量: @@ -110,4 +120,4 @@ POST_BOARD_OVERLAY() { ## 运行测试 -通过运行脚本[一次构建](../瑞芯微等开发板.md#一次构建),将 `--board` 参数设置为新增开发板的版型文件来运行测试。 \ No newline at end of file +通过运行脚本[一次构建](../瑞芯微等开发板.md#一次构建),将 `--board` 参数设置为新增开发板的版型文件来运行测试。 diff --git "a/documents/\347\221\236\350\212\257\345\276\256\347\255\211\345\274\200\345\217\221\346\235\277.md" "b/documents/\347\221\236\350\212\257\345\276\256\347\255\211\345\274\200\345\217\221\346\235\277.md" index 097c67eefe8cf526dbd4eb45b95bd7187fdbd789..ba6f0dfdeaac63cd96a464fa7e66634f10a0ce4e 100644 --- "a/documents/\347\221\236\350\212\257\345\276\256\347\255\211\345\274\200\345\217\221\346\235\277.md" +++ "b/documents/\347\221\236\350\212\257\345\276\256\347\255\211\345\274\200\345\217\221\346\235\277.md" @@ -272,6 +272,18 @@ `sudo bash build.sh --board phytium-4gb -n openEuler-24.03-LTS-PhytiumPi-4GB-aarch64-alpha1 -k https://gitee.com/openeuler/phytium-kernel.git -b openEuler-24.03-LTS-Phytium -c phytium_defconfig -r https://gitee.com/src-openeuler/openEuler-repos/raw/openEuler-24.03-LTS/generic.repo -s headless` +适用的 Allwinner 开发板: + +已经测试的开发板如下,其他类型 Allwinner 开发板适用情况待测试。 + +1. Orange Pi Zero 2 + + 已测试的版本如下: + + - openEuler-24.03-LTS,构建命令如下: + + `sudo bash build.sh --board orangepi-zero2 -n openEuler-24.03-LTS-OrangePi-Zero2-aarch64-alpha1 -k https://gitee.com/openeuler/allwinner-kernel.git -b openEuler-24.03-LTS -c openeuler_allwinner_defconfig -r https://gitee.com/src-openeuler/openEuler-repos/raw/openEuler-24.03-LTS/generic.repo -s headless` + ### Docker 容器内构建 #### 使用脚本构建镜像需执行命令: diff --git a/scripts/rockchip/bin/linux-firmware/uwe5622/wcnmodem-38222.bin b/scripts/rockchip/bin/linux-firmware/uwe5622/wcnmodem-38222.bin new file mode 100644 index 0000000000000000000000000000000000000000..7adbe61d309349d3f594b2e5b8921b040deddf42 Binary files /dev/null and b/scripts/rockchip/bin/linux-firmware/uwe5622/wcnmodem-38222.bin differ diff --git a/scripts/rockchip/bin/linux-firmware/uwe5622/wcnmodem.bin b/scripts/rockchip/bin/linux-firmware/uwe5622/wcnmodem.bin new file mode 100644 index 0000000000000000000000000000000000000000..79a319633a682033ea16a65b459fd4aea67c68bd Binary files /dev/null and b/scripts/rockchip/bin/linux-firmware/uwe5622/wcnmodem.bin differ diff --git a/scripts/rockchip/bin/linux-firmware/uwe5622/wifi_2355b001_1ant.ini b/scripts/rockchip/bin/linux-firmware/uwe5622/wifi_2355b001_1ant.ini new file mode 100644 index 0000000000000000000000000000000000000000..e30b36e2e06ab70d314529a78116b75c0f478a87 --- /dev/null +++ b/scripts/rockchip/bin/linux-firmware/uwe5622/wifi_2355b001_1ant.ini @@ -0,0 +1,177 @@ +[Section 1: Version] +Major = 2 +Minor = 2 + +[Section 2: Board Config] +Calib_Bypass = 11758 +TxChain_Mask = 2 +RxChain_Mask = 2 + +[Section 3: Board Config TPC] +DPD_LUT_idx = 0x33,0x33,0x0,0x11,0x22,0x33,0x33,0x33 +TPC_Goal_Chain0 = 0,0,0,0,0,0,0,0 +TPC_Goal_Chain1 = 159,167,162,152,159,167,162,152 + +[Section 4: TPC-LUT] +Chain0_LUT_0 = 6,0,40,0 +Chain0_LUT_1 = 6,1,24,0 +Chain0_LUT_2 = 6,2,8,0 +Chain0_LUT_3 = 10,2,0,0 +Chain0_LUT_4 = 14,2,0,0 +Chain0_LUT_5 = 18,2,0,0 +Chain0_LUT_6 = 22,2,0,0 +Chain0_LUT_7 = 26,2,0,0 +Chain1_LUT_0 = 6,0,40,0 +Chain1_LUT_1 = 6,1,24,0 +Chain1_LUT_2 = 6,2,8,0 +Chain1_LUT_3 = 10,2,0,0 +Chain1_LUT_4 = 14,2,0,0 +Chain1_LUT_5 = 18,2,0,0 +Chain1_LUT_6 = 22,2,0,0 +Chain1_LUT_7 = 26,2,0,0 + +[Section 5: Board Config Frequency Compensation] +2G_Channel_Chain0 = 6,6,6,6,7,7,7,7,7,7,7,7,7,7 +2G_Channel_Chain1 = 6,6,6,6,7,7,7,7,7,7,7,7,7,7 +5G_Channel_Chain0 = 11,11,11,11,9,9,9,9,10,10,10,10,10,10,10,10,10,10,10,10,9,9,9,9,9 +5G_Channel_Chain1 = 11,11,11,11,9,9,9,9,10,10,10,10,10,10,10,10,10,10,10,10,9,9,9,9,9 + +[Section 6: Rate To Power with BW 20M] +11b_Power = 20,20,20,20 +11ag_Power = 28,32,36,44,28,32,36,48 +11n_Power = 34,38,38,40,40,44,44,48,32,36,36,40,40,44,44,54,48 +11ac_Power = 32,36,36,40,40,44,44,48,50,66,32,36,36,40,40,44,44,48,50,66 + +[Section 7: Power Backoff] +Green_WIFI_offset = 0 +HT40_Power_offset = 0 +VHT40_Power_offset = 0 +VHT80_Power_offset = 0 +SAR_Power_offset = 0 +Mean_Power_offset = 36 + +[Section 8: Reg Domain] +reg_domain1 = 0x00000001 +reg_domain2 = 0x00000002 + +[Section 9: Band Edge Power offset (MKK, FCC, ETSI)] +BW20M = 3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41 +BW40M = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21 +BW80M = 6,5,4,3,2,1 + +[Section 10: TX Scale] +Chain0_1 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 +Chain1_1 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 +Chain0_2 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,17 +Chain1_2 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,17 +Chain0_3 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,18 +Chain1_3 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,18 +Chain0_4 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,19 +Chain1_4 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,19 +Chain0_5 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,20 +Chain1_5 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,20 +Chain0_6 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,21 +Chain1_6 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,21 +Chain0_7 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,22 +Chain1_7 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,22 +Chain0_8 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,23 +Chain1_8 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,23 +Chain0_9 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,24 +Chain1_9 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,24 +Chain0_10 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,25 +Chain1_10 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,25 +Chain0_11 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,26 +Chain1_11 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,26 +Chain0_12 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,27 +Chain1_12 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,27 +Chain0_13 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,28 +Chain1_13 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,28 +Chain0_14 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,29 +Chain1_14 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,29 +Chain0_36 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,30 +Chain1_36 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,30 +Chain0_40 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,31 +Chain1_40 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,31 +Chain0_44 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,32 +Chain1_44 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,32 +Chain0_48 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,33 +Chain1_48 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,33 +Chain0_52 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,34 +Chain1_52 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,34 +Chain0_56 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,35 +Chain1_56 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,35 +Chain0_60 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,36 +Chain1_60 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,36 +Chain0_64 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,37 +Chain1_64 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,37 +Chain0_100 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,38 +Chain1_100 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,38 +Chain0_104 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,39 +Chain1_104 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,39 +Chain0_108 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,40 +Chain1_108 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,40 +Chain0_112 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,41 +Chain1_112 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,41 +Chain0_116 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,42 +Chain1_116 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,42 +Chain0_120 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,43 +Chain1_120 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,43 +Chain0_124 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,44 +Chain1_124 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,44 +Chain0_128 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,45 +Chain1_128 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,45 +Chain0_132 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,46 +Chain1_132 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,46 +Chain0_136 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,47 +Chain1_136 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,47 +Chain0_140 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,48 +Chain1_140 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,48 +Chain0_144 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,49 +Chain1_144 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,49 +Chain0_149 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,50 +Chain1_149 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,50 +Chain0_153 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,51 +Chain1_153 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,51 +Chain0_157 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,52 +Chain1_157 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,52 +Chain0_161 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,53 +Chain1_161 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,53 +Chain0_165 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,54 +Chain1_165 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,54 + +[Section 11: misc] +DFS_switch = 1 +power_save_switch = 2 +ex-Fem_and_ex-LNA_param_setup = 3 +rssi_report_diff = 4 + +[Section 12: debug reg] +address = 0x1,0x2,0x3,0x4,0x5,0x6,0x7,0x8,0x9,0x10,0x11,0x12,0x13,0x14,0x15,0x16 +value = 0x16,0x17,0x18,0x19,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x30,0x31 + +[Section 13: coex_config] +bt_performance_cfg0 = 0x01010101 +bt_performance_cfg1 = 0x01000000 +wifi_performance_cfg0 = 0x01050A01 +wifi_performance_cfg2 = 0x00000000 +strategy_cfg0 = 0x01010100 +strategy_cfg1 = 0x03000000 +strategy_cfg2 = 0x08020000 +compatibility_cfg0 = 0x04040000 +compatibility_cfg1 = 0x0 +ant_cfg0 = 0x0 +ant_cfg1 = 0x0 +isolation_cfg0 = 0x0505 +isolation_cfg1 = 0x0 +reserved_cfg0 = 0x0 +reserved_cfg1 = 0x0 +reserved_cfg2 = 0x0 +reserved_cfg3 = 0x0 +reserved_cfg4 = 0x0 +reserved_cfg5 = 0x0 +reserved_cfg6 = 0x0 +reserved_cfg7 = 0x0 + +[Section 14: rf_tlv_config] +rf_config = 0xAA,0x55,0x00,0xFF,0x8,0xA,0x0,0x5,0x0,0x0,0x0,0x0,0x0,0x0 + diff --git a/scripts/rockchip/bin/u-boot/orangepi-zero2/u-boot-sunxi-with-spl.bin b/scripts/rockchip/bin/u-boot/orangepi-zero2/u-boot-sunxi-with-spl.bin new file mode 100644 index 0000000000000000000000000000000000000000..410ccf75ced79a032a1cd9dd5326eb0884826094 Binary files /dev/null and b/scripts/rockchip/bin/u-boot/orangepi-zero2/u-boot-sunxi-with-spl.bin differ diff --git a/scripts/rockchip/boards/firefly-itx-3588j.conf b/scripts/rockchip/boards/firefly-itx-3588j.conf index 3bbd138d5e3bc7da955e510b0ae2a21444b75ffb..9c8c0ac93afd63218b27e8c21e947070cf1901f4 100644 --- a/scripts/rockchip/boards/firefly-itx-3588j.conf +++ b/scripts/rockchip/boards/firefly-itx-3588j.conf @@ -4,10 +4,11 @@ dtb_name=rk3588-firefly-itx-3588j platform=rockchip soc_name=rk3588 arch=arm64 +part_table=gpt POST_BOARD_OVERLAY() { echo "Put ${board} firmware into rootfs..." mkdir -p ${rootfs_dir}/etc/modules-load.d/ echo "8821cu" >> ${rootfs_dir}/etc/modules-load.d/8821cu.conf -} \ No newline at end of file +} diff --git a/scripts/rockchip/boards/firefly-rk3399.conf b/scripts/rockchip/boards/firefly-rk3399.conf index 8e27e4eaf8166b412387787407caf3f732325f4d..52c43d244e08e8df6076cbe6045d1ef2426851b4 100644 --- a/scripts/rockchip/boards/firefly-rk3399.conf +++ b/scripts/rockchip/boards/firefly-rk3399.conf @@ -3,6 +3,7 @@ dtb_name=rk3399-firefly platform=rockchip soc_name=rk3399 arch=arm64 +part_table=gpt POST_BOARD_OVERLAY() { echo "Put ${board} firmware into rootfs..." diff --git a/scripts/rockchip/boards/firefly-roc-rk3566-pc.conf b/scripts/rockchip/boards/firefly-roc-rk3566-pc.conf index d7cbfbafa7177b2222b331d6918653367e00a262..7570c5edbfd66de0a46e32a5600a512cdb8cab6f 100644 --- a/scripts/rockchip/boards/firefly-roc-rk3566-pc.conf +++ b/scripts/rockchip/boards/firefly-roc-rk3566-pc.conf @@ -4,6 +4,7 @@ dtb_name=rk3566-roc-pc platform=rockchip soc_name=rk3566 arch=arm64 +part_table=gpt POST_BOARD_OVERLAY() { echo "Put ${board} firmware into rootfs..." @@ -12,4 +13,4 @@ POST_BOARD_OVERLAY() { cp ${nonfree_bin_dir}/linux-firmware/ap6255/brcmfmac43455-sdio.bin ${rootfs_dir}/usr/lib/firmware/brcm/brcmfmac43455-sdio.firefly,rk3566-roc-pc.bin cp ${nonfree_bin_dir}/linux-firmware/ap6255/brcmfmac43455-sdio.txt ${rootfs_dir}/usr/lib/firmware/brcm/brcmfmac43455-sdio.firefly,rk3566-roc-pc.txt cp ${nonfree_bin_dir}/linux-firmware/ap6255/BCM4345C0.hcd ${rootfs_dir}/usr/lib/firmware/brcm -} \ No newline at end of file +} diff --git a/scripts/rockchip/boards/firefly-roc-rk3568-pc-se.conf b/scripts/rockchip/boards/firefly-roc-rk3568-pc-se.conf index ddb2326f958335157dfceccd361ee1e9c5771282..3e23914da81a1c49f6f6cc33552b9be3a160dd14 100644 --- a/scripts/rockchip/boards/firefly-roc-rk3568-pc-se.conf +++ b/scripts/rockchip/boards/firefly-roc-rk3568-pc-se.conf @@ -4,6 +4,7 @@ dtb_name=rk3568-roc-pc-se platform=rockchip soc_name=rk3568 arch=arm64 +part_table=gpt POST_BOARD_OVERLAY() { echo "Put ${board} firmware into rootfs..." diff --git a/scripts/rockchip/boards/firefly-roc-rk3568-pc.conf b/scripts/rockchip/boards/firefly-roc-rk3568-pc.conf index 37b76db59b8a4e21fa3be0600e6a9c417945897d..a5f4284d01f158104b293dae6541b050ec8774d3 100644 --- a/scripts/rockchip/boards/firefly-roc-rk3568-pc.conf +++ b/scripts/rockchip/boards/firefly-roc-rk3568-pc.conf @@ -3,6 +3,8 @@ local_uboot_dir=${nonfree_bin_dir}/u-boot/firefly-rk3568 dtb_name=rk3568-roc-pc platform=rockchip soc_name=rk3568 +arch=arm64 +part_table=gpt POST_BOARD_OVERLAY() { echo "Put ${board} firmware into rootfs..." diff --git a/scripts/rockchip/boards/firefly-roc-rk3588s-pc.conf b/scripts/rockchip/boards/firefly-roc-rk3588s-pc.conf index 4691d44e3d0ebb50ba5116238fcd7ddb834ee786..38d6e3fc305516c0129e49749e6b8018ea383528 100644 --- a/scripts/rockchip/boards/firefly-roc-rk3588s-pc.conf +++ b/scripts/rockchip/boards/firefly-roc-rk3588s-pc.conf @@ -4,8 +4,9 @@ dtb_name=rk3588s-roc-pc platform=rockchip soc_name=rk3588 arch=arm64 +part_table=gpt POST_BOARD_OVERLAY() { echo "Put ${board} firmware into rootfs..." echo "Nothing to do..." -} \ No newline at end of file +} diff --git a/scripts/rockchip/boards/orangepi-zero2.conf b/scripts/rockchip/boards/orangepi-zero2.conf new file mode 100644 index 0000000000000000000000000000000000000000..3c299761d89eea756d7cfffd70bc1ce8ab23d768 --- /dev/null +++ b/scripts/rockchip/boards/orangepi-zero2.conf @@ -0,0 +1,22 @@ +ubootconfig=none +local_uboot_dir=${nonfree_bin_dir}/u-boot/orangepi-zero2 +dtb_name=sun50i-h616-orangepi-zero2 +platform=allwinner +soc_name=h616 +arch=arm64 +part_table=msdos + +POST_BOARD_OVERLAY() { + echo "Put ${board} firmware into rootfs..." + + # uwe5622 firmware + mkdir -p ${rootfs_dir}/usr/lib/firmware/uwe5622 + cp ${nonfree_bin_dir}/linux-firmware/uwe5622/wcnmodem-38222.bin ${rootfs_dir}/usr/lib/firmware/uwe5622 + cp ${nonfree_bin_dir}/linux-firmware/uwe5622/wcnmodem.bin ${rootfs_dir}/usr/lib/firmware/uwe5622 + cp ${nonfree_bin_dir}/linux-firmware/uwe5622/wifi_2355b001_1ant.ini ${rootfs_dir}/usr/lib/firmware/uwe5622 + + pushd ${rootfs_dir}/usr/lib/firmware + ln -s uwe5622/wcnmodem.bin wcnmodem.bin + ln -s uwe5622/wifi_2355b001_1ant.ini wifi_2355b001_1ant.ini + popd +} diff --git a/scripts/rockchip/boards/phytiumpi-4gb.conf b/scripts/rockchip/boards/phytiumpi-4gb.conf index 6bbb230d50c571e56b5ddd7b79d4cd82679ff08e..418f8a4dbe8f0e9465963b3db2167cefbed56e2d 100644 --- a/scripts/rockchip/boards/phytiumpi-4gb.conf +++ b/scripts/rockchip/boards/phytiumpi-4gb.conf @@ -4,6 +4,7 @@ dtb_name=phytiumpi_firefly platform=phytium soc_name=e2000q arch=arm64 +part_table=gpt POST_BOARD_OVERLAY() { echo "Put ${board} firmware into rootfs..." @@ -14,4 +15,4 @@ POST_BOARD_OVERLAY() { cp ${nonfree_bin_dir}/linux-firmware/rtl8821c/rtl8821c_config ${rootfs_dir}/lib/firmware/rtlbt/rtl8821c_config cp ${nonfree_bin_dir}/linux-firmware/rtl8821c/rtl8821c_fw ${rootfs_dir}/lib/firmware/rtlbt/rtl8821c_fw chmod +x ${rootfs_dir}/usr/bin/rtk_hciattach -} \ No newline at end of file +} diff --git a/scripts/rockchip/boards/radxa-rock-5b.conf b/scripts/rockchip/boards/radxa-rock-5b.conf index 0ae3cc9d1b240a3dd8fe87cc824b15566ad9641d..712931b06148d443aa0e6fe66c1d00b48306f17a 100644 --- a/scripts/rockchip/boards/radxa-rock-5b.conf +++ b/scripts/rockchip/boards/radxa-rock-5b.conf @@ -4,8 +4,9 @@ dtb_name=rk3588-rock-5b platform=rockchip soc_name=rk3588 arch=arm64 +part_table=gpt POST_BOARD_OVERLAY() { echo "Put ${board} firmware into rootfs..." echo "Nothing to do..." -} \ No newline at end of file +} diff --git a/scripts/rockchip/boards/radxa-rockpi-4a.conf b/scripts/rockchip/boards/radxa-rockpi-4a.conf index d3bae4eb720539e4ce71fceab0fa4f1134ac3faf..6d2d5f637e23b9363f20e68b337192b4ea810433 100644 --- a/scripts/rockchip/boards/radxa-rockpi-4a.conf +++ b/scripts/rockchip/boards/radxa-rockpi-4a.conf @@ -3,8 +3,9 @@ dtb_name=rk3399-rock-pi-4a platform=rockchip soc_name=rk3399 arch=arm64 +part_table=gpt POST_BOARD_OVERLAY() { echo "Put ${board} firmware into rootfs..." echo "Nothing to do..." -} \ No newline at end of file +} diff --git a/scripts/rockchip/boards/sample.conf b/scripts/rockchip/boards/sample.conf index 87481911cd2488933da7b69f2a65c339b214e8a6..d36679dd1c17183f8c44ac6e204344dd3a145a3c 100644 --- a/scripts/rockchip/boards/sample.conf +++ b/scripts/rockchip/boards/sample.conf @@ -3,8 +3,9 @@ dtb_name=rk3399-firefly #Required! The device tree name of target board, which platform=rockchip #Required! The platform of target board, which defaults to rockchip. soc_name=rk3399 arch=arm64 +part_table=gpt POST_BOARD_OVERLAY() { echo "Put ${board} firmware into rootfs..." echo "This is a sample..." -} \ No newline at end of file +} diff --git a/scripts/rockchip/build_boot.sh b/scripts/rockchip/build_boot.sh index 598ed55ca3188374984e808e7cc9f692a198fef9..ab96139d17b826f48501eb6de7bada28d10b6085 100755 --- a/scripts/rockchip/build_boot.sh +++ b/scripts/rockchip/build_boot.sh @@ -216,6 +216,8 @@ mk_boot() { bootargs=${rockchip_bootargs} elif [ "${platform}" == "phytium" ];then bootargs=${phytium_bootargs} + elif [ "${platform}" == "allwinner" ];then + bootargs=${allwinner_bootargs} else echo "Unsupported platform" exit 2 @@ -259,6 +261,7 @@ set -e rockchip_bootargs="earlyprintk console=ttyS2,1500000 rw root=UUID=614e0000-0000-4b53-8000-1d28000054a9 rootfstype=ext4 init=/sbin/init rootwait" phytium_bootargs="console=ttyAMA1,115200 earlycon=pl011,0x2800d000 rw root=UUID=614e0000-0000-4b53-8000-1d28000054a9 rootfstype=ext4 rootwait cma=256m" +allwinner_bootargs="console=tty0 console=ttyS0,115200 rw root=UUID=614e0000-0000-4b53-8000-1d28000054a9 rootfstype=ext4 rootwait earlycon clk_gnore_unused" if [ ! -f $default_defconfig ] ; then LOG "kernel defconfig is : ${default_defconfig}" diff --git a/scripts/rockchip/build_rootfs.sh b/scripts/rockchip/build_rootfs.sh index 6df44ca38111c743094925dda93acbf2b87e194a..51b965f32d522bc738ce3f40359030a14cf82f48 100755 --- a/scripts/rockchip/build_rootfs.sh +++ b/scripts/rockchip/build_rootfs.sh @@ -309,8 +309,9 @@ EOF mk_rootfsimg() { trap 'LOSETUP_D_IMG' EXIT cd $workdir - size=`du -sh --block-size=1MiB ${rootfs_dir} | cut -f 1 | xargs` - size=$(($size+500)) + rootfs_size=`du -sh --block-size=1MiB ${rootfs_dir} | cut -f 1 | xargs` + mod_size=`du -sh --block-size=1MiB ${workdir}/kernel/kernel-modules/lib/modules | cut -f 1 | xargs` + size=$(($rootfs_size+$mod_size+100)) rootfs_img=${workdir}/rootfs.img dd if=/dev/zero of=${rootfs_img} bs=1MiB count=$size status=progress && sync mkfs.ext4 -L rootfs ${workdir}/rootfs.img diff --git a/scripts/rockchip/build_u-boot.sh b/scripts/rockchip/build_u-boot.sh index 13af97f6c550ff06cd6a174b9f5d68960a1bfd95..b84edc8128b3b61563839eae73e91a068421a2f1 100755 --- a/scripts/rockchip/build_u-boot.sh +++ b/scripts/rockchip/build_u-boot.sh @@ -131,6 +131,8 @@ use_prebuild_u-boot() { cp ${local_uboot_dir}/fip-all-sd-boot.bin $workdir/u-boot mkenvimage -s 0x1000 -o $workdir/u-boot/env.bin ${local_uboot_dir}/env.txt dd if=$workdir/u-boot/env.bin of=$workdir/u-boot/fip-all-sd-boot.bin bs=1k seek=1472 conv=notrunc + elif [[ "x${platform}" == "xallwinner" ]]; then + cp ${local_uboot_dir}/* $workdir/u-boot else echo "target u-boot can not found!" exit 2 diff --git a/scripts/rockchip/gen_image.sh b/scripts/rockchip/gen_image.sh index b20ec59cf12625a752d4e4a3a9db1b7e0711e04b..e2483bf8b0f8915f9d2bced5cd22416c2d253c8d 100755 --- a/scripts/rockchip/gen_image.sh +++ b/scripts/rockchip/gen_image.sh @@ -139,13 +139,15 @@ make_img(){ device="" LOSETUP_D_IMG - size=`du -sh --block-size=1MiB ${workdir}/rootfs.img | cut -f 1 | xargs` + size=`ls -l --block-size=1MiB ${workdir}/rootfs.img | awk '{ print $5 }'` size=$(($size+1100)) losetup -D img_file=${workdir}/${name}.img dd if=/dev/zero of=${img_file} bs=1MiB count=$size status=progress && sync - parted ${img_file} mklabel gpt mkpart primary fat32 32768s 524287s + LOG "create ${part_table} partition table." + parted ${img_file} mklabel ${part_table} mkpart primary fat32 32768s 524287s + parted ${img_file} -s set 1 boot on parted ${img_file} mkpart primary ext4 524288s 100% @@ -220,6 +222,14 @@ make_img(){ ERROR "phytium fip-all-sd-boot file can not be found!" exit 2 fi + elif [ "${platform}" == "allwinner" ];then + echo "Installing Allwinner U-Boot..." + if [ -f ${uboot_dir}/u-boot-sunxi-with-spl.bin ]; then + dd if=${uboot_dir}/u-boot-sunxi-with-spl.bin of=/dev/${loopX} seek=8k + else + ERROR "allwinner u-boot file can not be found!" + exit 2 + fi else echo "Unsupported platform" fi