96boards-hikey / tools-images-hikey960

Tools and images for HiKey960
BSD 2-Clause "Simplified" License
53 stars 47 forks source link

Any script updates for AOSP 9.0 #32

Open butterl opened 6 years ago

butterl commented 6 years ago

I'm new Hikey 960 user and do not know if this would work OK for me to build the newest AOSP and kernel from AOSP website:

git clone https://android.googlesource.com/kernel/hikey-linaro
cd hikey-linaro
git checkout -b android-hikey-linaro-4.9 origin/android-hikey-linaro-4.9
make ARCH=arm64 hikey960_defconfig
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-android- -j24
cp arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dtb ./hi3660-hikey960.dtb-4.9
cp arch/arm64/boot/Image.gz-dtb ./Image.gz-dtb-hikey960-4.9
bootimage -j24

but make bootimage -j24 make me confused when it pop up to select many options

I find your script but the para in build command below is still --os_version 7.0 --os_patch_level 2016-08-05, not sure if this need to modified to suit for the newest AOSP+Hikey kernel

./mkbootimg  --kernel Image.gz --ramdisk ${RAMDISK_IMG} --cmdline "loglevel=15 androidboot.hardware=hikey960 androidboot.selinux=permissive firmware_class.path=/system/etc/firmware" --base 0x0 --tags-addr 0x07A00000 --kernel_offset 0x00080000 --ramdisk_offset 0x07c00000 --os_version 7.0 --os_patch_level 2016-08-05  --output ${PRODUCT_OUT}/boot.img
./mkdtimg -d hi3660-hikey960.dtb -s 2048 -c -o ${PRODUCT_OUT}/dt.img

echo "dt.img boot.img build finished!"
hzhuang1 commented 6 years ago

Excuse me that I just noticed this issue open.

You pasted two code segment. The first segment is to generate kernel for UEFI, and the second segment is to generate kernel for hisilicon boot loader. The difference is on Image.gz and DT. In UEFI, DT image is appended on the end of kernel image. In hisilicon boot loader, DT image is independant and is stored in DT partition.