生成boot.img的脚本

#!/bin/bash

        source build/envsetup.sh

        lunch $1-userdebug

 

if [ ! -z"msm_defconfig" ]

then

        rm -fout/target/product/$TARGET_PRODUCT/obj/KERNEL_OBJ/.config;

        make -C kernelO=../out/target/product/$TARGET_PRODUCT/obj/KERNEL_OBJ ARCH=arm64CROSS_COMPILE=aarch64-linux-android- msm_defconfig;

        make -C kernelO=../out/target/product/$TARGET_PRODUCT/obj/KERNEL_OBJ ARCH=arm64CROSS_COMPILE=aarch64-linux-android- headers_install

fi

 

if [ ! -z"" ]

then

        echo "Overriding kernel configwith ''";

        echo >> out/target/product/$TARGET_PRODUCT/obj/KERNEL_OBJ/.config;

        make -C kernelO=../out/target/product/$TARGET_PRODUCT/obj/KERNEL_OBJ ARCH=arm64CROSS_COMPILE=aarch64-linux-android- oldconfig

fi

 

echo"#######################    Buildingkernel   ##########################"

 

rm -rf out/target/product/$TARGET_PRODUCT/obj/KERNEL_OBJ/arch/arm64/boot/dts

 

make -C kernelO=../out/target/product/$TARGET_PRODUCT/obj/KERNEL_OBJ ARCH=arm64CROSS_COMPILE=aarch64-linux-android- KCFLAGS=-mno-android -j16

 

make -C kernelO=../out/target/product/$TARGET_PRODUCT/obj/KERNEL_OBJ ARCH=arm64CROSS_COMPILE=aarch64-linux-android- KCFLAGS=-mno-android modules -j16

 

make -C kernelO=../out/target/product/$TARGET_PRODUCT/obj/KERNEL_OBJINSTALL_MOD_PATH=../../system INSTALL_MOD_STRIP=1 ARCH=arm64CROSS_COMPILE=aarch64-linux-android- modules_install -j16

 

cp out/target/product/$TARGET_PRODUCT/obj/KERNEL_OBJ/arch/arm64/boot/Image.gz-dtb out/target/product/$TARGET_PRODUCT/kernel

 

#echo "Targetdt image: out/target/product/$TARGET_PRODUCT/dt.img"

#out/host/linux-x86/bin/dtbTool-o out/target/product/$TARGET_PRODUCT/dt.img -s 2048 -pout/target/product/$TARGET_PRODUCT/obj/KERNEL_OBJ/scripts/dtc/out/target/product/$TARGET_PRODUCT/obj/KERNEL_OBJ/arch/arm64/boot/dts/

 

#chmod a+rout/target/product/$TARGET_PRODUCT/dt.img

 

echo "Targetboot image: out/target/product/$TARGET_PRODUCT/boot.img"

 

out/host/linux-x86/bin/mkbootimg --kernelout/target/product/$TARGET_PRODUCT/kernel --ramdiskout/target/product/$TARGET_PRODUCT/ramdisk.img --cmdline"console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0androidboot.hardware=qcom msm_rtb.filter=0x237 ehci-hcd.park=3androidboot.bootdevice=7824900.sdhci lpm_levels.sleep_disabled=1earlyprintk" --base 0x80000000 --pagesize 2048 --outputout/target/product/$TARGET_PRODUCT/boot.img

 

out/host/linux-x86/bin/boot_signer/boot out/target/product/$TARGET_PRODUCT/boot.imgbuild/target/product/security/verity_private_dev_keyout/target/product/$TARGET_PRODUCT/boot.img

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值