全志Allwinner H313的编译流程(内核和Android)
内核编译:
配置 ./build.sh config
进入到全志sdk的longan目录执行: ./build.sh config
下面展示配置过程
//./build.sh config
allwinner/Amediatech_AW_GIT_V1.11/longan$
allwinner/Amediatech_AW_GIT_V1.11/longan$ ./build.sh config
Welcome to mkscript setup progress
All available platform:
0. android
1. linux
Choice [android]: 0
All available ic:
0. h313
1. h616
2. h700
Choice [h313]: 1
All available board:
0. fpga
1. ft
2. p1
3. p2
4. p6
5. p7
6. perf1
7. perf1_axp152
8. perf2
9. perf3
10. qa
Choice [p1]: 2
INFO: kernel defconfig: generate /home/yxt-allwinner/Amediatech_AW_GIT_V1.11/longan/kernel/linux-4.9/.config by /home/allwinner/Amediatech_AW_GIT_V1.11/longan/kernel/linux-4.9/arch/arm64/configs/sun50iw9p1smp_h616_android_defconfig
*** Default configuration is based on 'sun50iw9p1smp_h616_android_defconfig'
#
# configuration written to .config
#
allwinner/Amediatech_AW_GIT_V1.11/longan$
配置完成之后就可以编译内核了
编译内核
在longan目录直接执行内核脚本:./build.sh
allwinner/Amediatech_AW_GIT_V1.11/longan$ ./build.sh
ACTION List: mklichee;========
Execute command: mklichee
INFO: ----------------------------------------
INFO: build lichee ...
INFO: chip: sun50iw9p1
INFO: platform: android
INFO: kernel: linux-4.9
INFO: board: p1
INFO: output: allwinner/Amediatech_AW_GIT_V1.11/longan/out/h616/p1/android
INFO: ----------------------------------------
INFO: build dtbo ...
INFO: mkdtbo: make dtboimg start.
...
...
...
[GPU]: mali-g31 device driver has been built.
regenerate rootfs cpio
15757 blocks
15758 blocks
build_ramfs
Copy boot.img to output directory ...
Copy modules to target ...
sun50iw9p1 compile Kernel successful
INFO: build kernel OK.
INFO: build rootfs ...
INFO: skip make rootfs for android
INFO: ----------------------------------------
INFO: build lichee OK.
INFO: ----------------------------------------
allwinner/Amediatech_AW_GIT_V1.11/longan$
allwinner/Amediatech_AW_GIT_V1.11/longan$
编译完成后提示: sun50iw9p1 compile Kernel successful 则表示内核已经编译成功
Android编译:
进入Android目录下编译
allwinner/Amediatech_AW_GIT_V1.11/longan$ cd ../android/
allwinner/Amediatech_AW_GIT_V1.11/android$
按顺序执行编译命令
source build/envsetup.sh
lunch eros_p1-userdebug
extract-bsp
make -j16
pack
pack4dist
最后提示编程成功完成Android编译
固件生成路径
allwinner/Amediatech_AW_GIT_V1.11/longan/out$
目录下的 h313_android10_p1_uart0.img
烧录 h313_android10_p1_uart0.img 到板子上