H616 Android 10 编译过程记录

longan

  • ./build.sh config
  • ./build.sh

编译 longan 结果:

juwan@juwan-n85-dls:/media/juwan/70970A1D041A95C2/H616/longan$ ./build.sh config
 
Welcome to mkscript setup progress
All available platform:
   0. android
   1. linux
Choice [android]: 
All available ic:
   0. h313
   1. h616
   2. h700
Choice [h616]: 
All available board:
   0. fpga
   1. ft
   2. p1
   3. p2
   4. perf1
   5. perf1_axp152
   6. perf2
   7. perf3
   8. qa
Choice [p2]: 
INFO: kernel defconfig: generate /media/juwan/70970A1D041A95C2/H616/longan/kernel/linux-4.9/.config by /media/juwan/70970A1D041A95C2/H616/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
#
juwan@juwan-n85-dls:/media/juwan/70970A1D041A95C2/H616/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: p2
INFO: output: /media/juwan/70970A1D041A95C2/H616/longan/out/h616/p2/android
INFO: ----------------------------------------
INFO: build dtbo ...
INFO: mkdtbo: make  dtboimg start.
create image file: /media/juwan/70970A1D041A95C2/H616/longan/out/h616/p2/android/dtbo.img...
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: ----------------------------------------


android

  • source build/envsetup.sh
  • lunch cupid_p2-eng
  • extract-bsp
  • make -j8

FAILED: out/soong/.bootstrap/blueprint-pathtools/test/test.passed

juwan@juwan-n85-dls:/media/juwan/70970A1D041A95C2/H616/android$ make -j1
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=10
TARGET_PRODUCT=cupid_p2
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=cortex-a7
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.15.0-52-generic-x86_64-Ubuntu-20.04.4-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=QP1A.191105.004
OUT_DIR=out
============================================
[ 35% 48/137] test github.com/google/blueprint/pathtools
FAILED: out/soong/.bootstrap/blueprint-pathtools/test/test.passed
out/soong/.bootstrap/bin/gotestrunner -p ./build/blueprint/pathtools -f out/soong/.bootstrap/blueprint-pathtools/test/test.passed -- out/soong/.bootstrap/blueprint-pathtools/test/test -test.short
--- FAIL: TestGlobEscapes (0.02s)
    --- FAIL: TestGlobEscapes/**/* (0.02s)
        glob_test.go:562: incorrect matches list:
        glob_test.go:562:  pattern: "**/*"
        glob_test.go:562:      got: []string{"a/", "b", "a/a"}
        glob_test.go:562: expected: []string{"*", "**/", "?", "a/", "b", "**/*", "**/a", "**/b/", "**/b/b", "a/a"}
        glob_test.go:562: incorrect deps list:
        glob_test.go:562:  pattern: "**/*"
        glob_test.go:562:      got: []string{".", "a"}
        glob_test.go:562: expected: []string{".", "**", "**/b", "a"}
    --- FAIL: TestGlobEscapes/**/\* (0.00s)
        glob_test.go:562: incorrect matches list:
        glob_test.go:562:  pattern: "**/\\*"
        glob_test.go:562:      got: []string(nil)
        glob_test.go:562: expected: []string{"*", "**/*"}
        glob_test.go:562: incorrect deps list:
        glob_test.go:562:  pattern: "**/\\*"
        glob_test.go:562:      got: []string{".", "a"}
        glob_test.go:562: expected: []string{".", "**", "**/b", "a"}
    --- FAIL: TestGlobEscapes/\*\*/* (0.00s)
        glob_test.go:562: incorrect matches list:
        glob_test.go:562:  pattern: "\\*\\*/*"
        glob_test.go:562:      got: []string(nil)
        glob_test.go:562: expected: []string{"**/*", "**/a", "**/b/"}
        glob_test.go:562: incorrect deps list:
        glob_test.go:562:  pattern: "\\*\\*/*"
        glob_test.go:562:      got: []string{"."}
        glob_test.go:562: expected: []string{".", "**"}
    --- FAIL: TestGlobEscapes/\*\*/**/* (0.00s)
        glob_test.go:562: incorrect matches list:
        glob_test.go:562:  pattern: "\\*\\*/**/*"
        glob_test.go:562:      got: []string(nil)
        glob_test.go:562: expected: []string{"**/*", "**/a", "**/b/", "**/b/b"}
        glob_test.go:562: incorrect deps list:
        glob_test.go:562:  pattern: "\\*\\*/**/*"
        glob_test.go:562:      got: []string{"."}
        glob_test.go:562: expected: []string{".", "**", "**/b"}
FAIL
18:54:13 soong bootstrap failed with: exit status 1

#### failed to build some targets (06:58 (mm:ss)) ####

先看一下谁在调用 glob_test.go ,关了再说

juwan@juwan-n85-dls:/media/juwan/70970A1D041A95C2/H616/android$ grep -rn glob_test.go
匹配到二进制文件 build/blueprint/.git/index
build/blueprint/Blueprints:26:        "glob_test.go",
build/blueprint/Blueprints:71:        "pathtools/glob_test.go",
匹配到二进制文件 build/soong/.git/index
build/soong/cmd/diff_target_files/Android.bp:13:        "glob_test.go",

build/blueprint/Blueprints:71: "pathtools/glob_test.go", 删除了继续。

接着 build/blueprint/pathtools/fs_test.go:41:27: undefined: pwd 同理干掉 pathtools/fs_test.go 字段。

检查完毕,开始构建......

然后一天一夜就过去了......

[ 99% 25905/25906] build check-all-partition-sizes
The sum of sizes of [system vendor product] is within BOARD_SUPER_PARTITION_SIZE:
702726144+116772864+154460160 == 973959168 <=  1610612736 == 1610612736
The sum of sizes of [system vendor product] is within BOARD_SB_SIZE:
702726144+116772864+154460160 == 973959168 <= 1602224128 == 1602224128
The sum of sizes of [sb] is within BOARD_SUPER_PARTITION_SIZE:
1602224128 == 1602224128 <= 1610612736 == 1610612736
[100% 25906/25906] Target super fs image for debug: out/target/product/cupid-p2/super.img
2022-11-03 15:53:53 - build_super_image.py - INFO    : Building super image from info dict...
2022-11-03 15:53:53 - sparse_img.py - INFO    : Total of 171564 4096-byte output blocks in 15 input chunks.
2022-11-03 15:53:53 - sparse_img.py - INFO    : Total of 28509 4096-byte output blocks in 7 input chunks.
2022-11-03 15:53:53 - sparse_img.py - INFO    : Total of 37710 4096-byte output blocks in 11 input chunks.
2022-11-03 15:53:53 - common.py - INFO    :   Running: "lpmake --metadata-size 65536 --super-name super --metadata-slots 2 --device super:1610612736 --group sb:1602224128 --partition system:readonly:702726144:sb --image system=out/target/product/cupid-p2/system.img --partition vendor:readonly:116772864:sb --image vendor=out/target/product/cupid-p2/vendor.img --partition product:readonly:154460160:sb --image product=out/target/product/cupid-p2/product.img --sparse --output out/target/product/cupid-p2/super.img"
2022-11-03 15:54:25 - common.py - INFO    : lpmake I 11-03 15:53:54 117685 117685 builder.cpp:949] [liblp]Partition system will resize from 0 bytes to 702726144 bytes
lpmake I 11-03 15:53:54 117685 117685 builder.cpp:949] [liblp]Partition vendor will resize from 0 bytes to 116772864 bytes
lpmake I 11-03 15:53:54 117685 117685 builder.cpp:949] [liblp]Partition product will resize from 0 bytes to 154460160 bytes
2022-11-03 15:54:25 - build_super_image.py - INFO    : Done writing image out/target/product/cupid-p2/super.img

pack 烧录

编译结束 pack 打包,烧录 /media/juwan/70970A1D041A95C2/H616/longan/out/h616_android10_p2_uart0.img

recovery.fex Len: 0x2000000
Vrecovery.fex Len: 0x4
vbmeta.fex Len: 0x1000
Vvbmeta.fex Len: 0x4
vbmeta_system.fex Len: 0x1000
Vvbmeta_system.fex Len: 0x4
vbmeta_vendor.fex Len: 0x1000
Vvbmeta_vendor.fex Len: 0x4
BuildImg 0
Dragon execute image.cfg SUCCESS !
----------image is at----------

/media/juwan/70970A1D041A95C2/H616/longan/out/h616_android10_p2_uart0.img

pack finish
use pack4dist for release

试了一下 pack4dist 的操作。

/media/juwan/70970A1D041A95C2/H616/longan/out/h616_android10_p2_uart0.img

pack finish
use pack4dist for release
copy fex into /media/juwan/70970A1D041A95C2/H616/android/out/target/product/cupid-p2/obj/PACKAGING/target_files_intermediates/cupid_p2-target_files-eng.juwan.zip
'/media/juwan/70970A1D041A95C2/H616/longan/out/pack_out/boot-resource.fex' -> './IMAGES/boot-resource.fex'
'/media/juwan/70970A1D041A95C2/H616/longan/out/pack_out/env.fex' -> './IMAGES/env.fex'
'/media/juwan/70970A1D041A95C2/H616/longan/out/pack_out/boot0_nand.fex' -> './IMAGES/boot0_nand.fex'
'/media/juwan/70970A1D041A95C2/H616/longan/out/pack_out/boot0_sdcard.fex' -> './IMAGES/boot0_sdcard.fex'
'/media/juwan/70970A1D041A95C2/H616/longan/out/pack_out/boot_package.fex' -> './IMAGES/u-boot.fex'
'/media/juwan/70970A1D041A95C2/H616/longan/out/pack_out/toc1.fex' -> './IMAGES/toc1.fex'
'/media/juwan/70970A1D041A95C2/H616/longan/out/pack_out/toc0.fex' -> './IMAGES/toc0.fex'
updating: IMAGES/ (stored 0%)
  adding: IMAGES/boot-resource.fex (deflated 93%)
  adding: IMAGES/boot0_nand.fex (deflated 33%)
  adding: IMAGES/boot0_sdcard.fex (deflated 35%)
  adding: IMAGES/env.fex (deflated 100%)
  adding: IMAGES/toc0.fex (stored 0%)
  adding: IMAGES/toc1.fex (stored 0%)
  adding: IMAGES/u-boot.fex (deflated 49%)
2022-11-03 16:53:04 - common.py - WARNING : Failed to read PRODUCT_SERVICES/build.prop
2022-11-03 16:53:04 - common.py - WARNING : Failed to read PRODUCT_SERVICES/etc/build.prop
2022-11-03 16:53:04 - common.py - WARNING : Failed to read ODM/build.prop
2022-11-03 16:53:04 - common.py - WARNING : Failed to read ODM/etc/build.prop
2022-11-03 16:53:12 - common.py - WARNING : Failed to read PRODUCT_SERVICES/build.prop
2022-11-03 16:53:12 - common.py - WARNING : Failed to read PRODUCT_SERVICES/etc/build.prop
2022-11-03 16:53:12 - common.py - WARNING : Failed to read ODM/build.prop
2022-11-03 16:53:12 - common.py - WARNING : Failed to read ODM/etc/build.prop
Compressing product.new.dat with brotli
Compressing vendor.new.dat with brotli
Compressing system.new.dat with brotli
pack custom to OTA package...
bootloader                = boot-resource.fex
env                       = env.fex
vbmeta                    = vbmeta.img
vbmeta_system             = vbmeta_system.img
vbmeta_vendor             = vbmeta_vendor.img
target files package: /media/juwan/70970A1D041A95C2/H616/android/out/target/product/cupid-p2/obj/PACKAGING/target_files_intermediates/cupid_p2-target_files-eng.juwan.zip
full ota zip: /media/juwan/70970A1D041A95C2/H616/android/out/target/product/cupid-p2/cupid_p2-full_ota-eng.juwan.zip
juwan@juwan-n85-dls:/media/juwan/70970A1D041A95C2/H616/android$ 

好了,开烧!

posted @ 2022-11-01 19:07  Juwan  阅读(1277)  评论(0编辑  收藏  举报