Build Linux for Hikey log
1. How to build kernel
cd /data/cj.chang/hikey960/tools-images-hikey960/build-from-source
./genimg.sh
export ARCH=arm64
export CROSS_COMPILE=${AOSP_ROOTDIR}/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-
cd ${KERNEL_DIR} make distclean make hikey960_defconfig make -j7 Image.gz make hisilicon/hi3660-hikey960.dtb cp arch/arm64/boot/Image.gz ${GEN_IMAGES_DIR} cp arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dtb ${GEN_IMAGES_DIR} cd ${GEN_IMAGES_DIR} # Note: here build result boot.img and dt.img are in folder ${PRODUCT_OUT} # To change this, change --output and -o. ./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!"
export PATH=$PATH:/data/cj.chang/hikey960/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu/bin 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-gnu- -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
./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
bootimage -j24
2. Remove printk log:
(1). CPU7: update max cpu_capacity 1024
implemented in ./kernel/sched/fair.c:7131 undefine CONFIG_SCHED_DEBUG in .config
(2) audit: audit_lost=54513 audit_rate_limit=5 audit_backlog_limit=64
implemented in ./kernel/audit.c:277 remark it. if(print)==> if(0)