Problem reason
At present, the WIFI of the image compiled by our SDK is useless. We will continue to solve this problem.
Check the schematic diagram and confirm the pin
It can be confirmed from the schematic diagram that SDC1 module is used for WIFI, power supply is provided by VCC33-WIFI, and VCC33-WIFI is provided by CLDO3 and CLDO2. VCC-WIFI-IO is provided by BLDO3.
Sys config.fex configuration
Found configuration item for WIFI
;--------------------------------------------------------------------------------
;wlan configuration
;wlan_used: 0-not use, 1- use
;wlan_busnum: sdio/usb index
;clocks: external low power clock input (32.768KHz)
;wlan_power: input supply voltage
;wlan_io_regulator: wlan/sdio I/O voltage
;wlan_regon: power up/down internal regulators used by wifi section
;wlan_hostwake: wlan to wake-up host
;--------------------------------------------------------------------------------
[wlan]
wlan_used = 1
wlan_busnum = 1
wlan_usbnum = 3
;wlan_power = "vcc-wifi"
wlan_io_regulator = "axp806_bldo3"
wlan_en = port:PL08<1><default><default><0>
wlan_regon = port:PM03<1><default><default><0>
wlan_hostwake = port:PM00<0><default><default><0>
Here is the meaning of each:
WLAN used -- whether to use wifi
WLAN busnum -- SDIO module used
WLAN? Usbnum -- USB module used
WLAN power - which AXP power is used by wifi module
WLAN io regulator – which AXP power supply is used by wifi module io
WLAN en - IO used for wifi power control
WLAN region – wifi enable pin
wlan_hostwake -- io used for wifi power control
According to the schematic diagram and code comparison, we need to modify the corresponding settings to provide the power supply of the relevant WIFI module:
lemon@ubuntu:~/Develop/OrangePi_Lite2/lichee$ git diff tools/pack/chips/sun50iw6p1/configs/petrel-p1/sys_config.fex
diff --git a/lichee/tools/pack/chips/sun50iw6p1/configs/petrel-p1/sys_config.fex b/lichee/tools/pack/chips/sun50iw6p1/configs/petrel-p1/sys_config.fex
index dc74d30..61295cb 100755
--- a/lichee/tools/pack/chips/sun50iw6p1/configs/petrel-p1/sys_config.fex
+++ b/lichee/tools/pack/chips/sun50iw6p1/configs/petrel-p1/sys_config.fex
@@ -33,6 +33,9 @@ drm_region_start_mbytes = 0
[power_sply]
dcdca_vol = 1001000
aldo2_vol = 1003300
+bldo3_vol = 1001800
+cldo2_vol = 1003300
+cldo3_vol = 1003300
;---------------------------------------------
;
@@ -1204,7 +1207,7 @@ wlan_busnum = 1
wlan_usbnum = 3
;wlan_power = "vcc-wifi"
wlan_io_regulator = "axp806_bldo3"
-wlan_en = port:PL08<1><default><default><0>
+;wlan_en = port:PL08<1><default><default><0>
wlan_regon = port:PM03<1><default><default><0>
wlan_hostwake = port:PM00<0><default><default><0>
After modifying the code, recompile the Kernel
lemon@ubuntu:~/Develop/OrangePi_Lite2/lichee$ ./build.sh config
Welcome to mkscript setup progress
All available chips:
0. sun50iw1p1
1. sun50iw2p1
2. sun50iw6p1
3. sun8iw11p1
4. sun8iw12p1
5. sun8iw6p1
6. sun8iw7p1
7. sun8iw8p1
8. sun9iw1p1
Choice: 2
All available platforms:
0. android
1. dragonboard
2. linux
3. eyeseelinux
Choice: 0
All available business:
0. 5.1
1. 4.4
2. 7.x
Choice: 2
LICHEE_BUSINESS=7.x
using kernel 'linux-3.10':
select arch by kernel version and chip
==================================
INFO: ----------------------------------------
INFO: build lichee ...
INFO: chip: sun50iw6p1
INFO: platform: android
INFO: business: 7.x
INFO: kernel: linux-3.10
INFO: arch: arm64
INFO: board:
INFO: output: out/sun50iw6p1/android/
INFO: ----------------------------------------
INFO: build buildroot ...
external toolchain has been installed
external toolchain_32 has been installed
INFO: build buildroot OK.
regenerate rootfs cpio
15757 blocks
17099 blocks
build_ramfs
Copy boot.img to output directory ...
Copy modules to target ...
sun50iw6p1 compile Kernel successful
INFO: build kernel OK.
INFO: build rootfs ...
INFO: skip make rootfs for android
INFO: build rootfs OK.
----------------------------------------
build sun50iw6p1 android 7.x lichee OK
----------------------------------------
After compiling the Kernel, the image needs to be packaged so that it can be burned to the SD card.
lemon@ubuntu:~/Develop/OrangePi_Lite2/lichee$ cd ..
lemon@ubuntu:~/Develop/OrangePi_Lite2$ cd android/
lemon@ubuntu:~/Develop/OrangePi_Lite2/android$ export LC_ALL=C
lemon@ubuntu:~/Develop/OrangePi_Lite2/android$ source ./build/envsetup.sh
including device/asus/fugu/vendorsetup.sh
including device/generic/mini-emulator-arm64/vendorsetup.sh
including device/generic/mini-emulator-armv7-a-neon/vendorsetup.sh
including device/generic/mini-emulator-mips/vendorsetup.sh
including device/generic/mini-emulator-mips64/vendorsetup.sh
including device/generic/mini-emulator-x86/vendorsetup.sh
including device/generic/mini-emulator-x86_64/vendorsetup.sh
including device/google/dragon/vendorsetup.sh
including device/htc/flounder/vendorsetup.sh
including device/huawei/angler/vendorsetup.sh
including device/lge/bullhead/vendorsetup.sh
including device/linaro/hikey/vendorsetup.sh
including device/moto/shamu/vendorsetup.sh
including device/softwinner/cheetah-cmcc-p1/vendorsetup.sh
including device/softwinner/cheetah-p1/vendorsetup.sh
including device/softwinner/common/vendorsetup.sh
including device/softwinner/petrel-cmcc-p1/vendorsetup.sh
including device/softwinner/petrel-p1/vendorsetup.sh
including sdk/bash_completion/adb.bash
lemon@ubuntu:~/Develop/OrangePi_Lite2/android$ lunch petrel_fvd_p1-eng
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=7.0
TARGET_PRODUCT=petrel_fvd_p1
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=cortex-a7
TARGET_2ND_ARCH=
TARGET_2ND_ARCH_VARIANT=
TARGET_2ND_CPU_VARIANT=
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.15.0-33-generic-x86_64-with-Ubuntu-18.04-bionic
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=NRD91N
OUT_DIR=out
============================================
lemon@ubuntu:~/Develop/OrangePi_Lite2/android$ extract-bsp
/home/lemon/Develop/OrangePi_Lite2/android/device/*/petrel-p1/bImage copied!
/home/lemon/Develop/OrangePi_Lite2/android/device/*/petrel-p1/modules copied!
lemon@ubuntu:~/Develop/OrangePi_Lite2/android$ pack
copying tools file
copying configs file
./out/aultls32.fex
./out/aultools.fex
./out/boot_package.cfg
./out/boot_package.fex
./out/cardscript.fex
./out/cardscript_secure.fex
./out/cardtool.fex
./out/diskfs.fex
./out/env.cfg
./out/env_burn.cfg
./out/env_dragon.cfg
./out/esm.fex
./out/image.cfg
./out/parameter.fex
./out/split_xxxx.fex
./out/sunxi.fex
./out/sys_config.fex
./out/sys_partition.fex
./out/sys_partition_dragonboard.fex
./out/sys_partition_dump.fex
./out/sys_partition_linux.fex
./out/sys_partition_private.fex
./out/sysrecovery.fex
./out/test_config.fex
./out/toc0.fex
./out/toc1.fex
./out/usbtool.fex
./out/usbtool_test.fex
./out/verity_block.fex
copying boot resource
cp: cannot stat 'out/boot-resource/bootlogo.jpg': No such file or directory
lzma: out/bootlogo.jpg: No such file or directory
lzma: out/bempty.bmp: No such file or directory
lzma: out/battery_charge.bmp: No such file or directory
copying boot file
Conver script to dts ok.
update scp
pack boot package
GetPrivateProfileSection read to end
content_count=10
no used multi config
packing for android
normal
mbr count = 4
partitation file Path=/home/lemon/Develop/OrangePi_Lite2/lichee/tools/pack/out/sys_partition.bin
mbr_name file Path=/home/lemon/Develop/OrangePi_Lite2/lichee/tools/pack/out/sunxi_mbr.fex
download_name file Path=/home/lemon/Develop/OrangePi_Lite2/lichee/tools/pack/out/dlinfo.fex
mbr size = 16384
mbr magic softw411
disk name=bootloader
filename = bootloader.fex
dl_file_size = 16058 sector
part_size = 32768 sector
disk name=env
filename = env.fex
dl_file_size = 256 sector
part_size = 32768 sector
disk name=boot
filename = boot.fex
dl_file_size = 33644 sector
part_size = 65536 sector
disk name=system
filename = system.fex
dl_file_size = 1232405 sector
part_size = 3145728 sector
disk name=verity_block
filename = verity_block.fex
dl_file_size = 2082 sector
part_size = 32768 sector
disk name=misc
disk name=recovery
filename = recovery.fex
dl_file_size = 38504 sector
part_size = 65536 sector
disk name=sysrecovery
filename = sysrecovery.fex
dl_file_size = 0 sector
part_size = 3145728 sector
disk name=private
disk name=alog
disk name=Reserve0
disk name=Reserve1
disk name=Reserve2
disk name=cache
disk name=UDISK
this is not a partition key
update_for_part_info 0
crc 0 = c8b8d2aa
crc 1 = 5d0583f7
crc 2 = 38b37651
crc 3 = ad0e270c
update mbr file ok
/home/lemon/Develop/OrangePi_Lite2/lichee/tools/pack/pctools/linux/eDragonEx/
/home/lemon/Develop/OrangePi_Lite2/lichee/tools/pack/out
Begin Parse sys_partion.fex
Add partion bootloader.fex BOOTLOADER_FEX00
Add partion very bootloader.fex BOOTLOADER_FEX00
FilePath: bootloader.fex
FileLength=7d7400Add partion env.fex ENV_FEX000000000
Add partion very env.fex ENV_FEX000000000
FilePath: env.fex
FileLength=20000Add partion boot.fex BOOT_FEX00000000
Add partion very boot.fex BOOT_FEX00000000
FilePath: boot.fex
FileLength=106d800Add partion system.fex SYSTEM_FEX000000
Add partion very system.fex SYSTEM_FEX000000
FilePath: system.fex
FileLength=259c2a74Add partion verity_block.fex VERITY_BLOCK_FEX
Add partion very verity_block.fex VERITY_BLOCK_FEX
FilePath: verity_block.fex
FileLength=1045b4Add partion recovery.fex RECOVERY_FEX0000
Add partion very recovery.fex RECOVERY_FEX0000
FilePath: recovery.fex
FileLength=12cd000Add partion sysrecovery.fex SYSRECOVERY_FEX0
Add partion diskfs.fex DISKFS_FEX000000
sys_config.fex Len: 0x10232
board.fex Len: 0x400
config.fex Len: 0xcc00
split_xxxx.fex Len: 0x200
sys_partition.fex Len: 0x124b
sunxi.fex Len: 0x18800
boot0_nand.fex Len: 0xc000
boot0_sdcard.fex Len: 0x8000
u-boot.fex Len: 0x138000
toc1.fex Len: 0x8
toc0.fex Len: 0x8
fes1.fex Len: 0x4340
boot_package.fex Len: 0x1ac000
usbtool.fex Len: 0x23600
aultools.fex Len: 0x2847b
aultls32.fex Len: 0x24d23
cardtool.fex Len: 0x11e00
cardscript.fex Len: 0x779
sunxi_mbr.fex Len: 0x10000
dlinfo.fex Len: 0x4000
arisc.fex Len: 0x6
bootloader.fex Len: 0x7d7400
Vbootloader.fex Len: 0x4
env.fex Len: 0x20000
Venv.fex Len: 0x4
boot.fex Len: 0x106d800
Vboot.fex Len: 0x4
system.fex Len: 0x259c2a74
Vsystem.fex Len: 0x4
verity_block.fex Len: 0x1045b4
Vverity_block.fex Len: 0x4
recovery.fex Len: 0x12cd000
Vrecovery.fex Len: 0x4
sysrecovery.fex Len: 0xb
diskfs.fex Len: 0x200
BuildImg 0
Dragon execute image.cfg SUCCESS !
----------image is at----------
/home/lemon/Develop/OrangePi_Lite2/lichee/tools/pack/sun50iw6p1_android_petrel-p1_uart0.img
pack finish
test
First, we need to check whether the wifi module is powered on normally,
Echo 1 > / sys / devices / virtual / misc / Sunxi WLAN / RF Ctrl / power? State, open WIFI
Test whether WL ﹣ reg ﹣ on is 1.8v, VBAT pin is 3.3v, VDDIO pin is 1.8v. If the power is not normal, recheck the sys ﹣ config.fex configuration
It can be seen from the figure that WIFI configuration is normal and can be connected normally.