[修改] 支持uboot配置
[详细说明]
1. 基于make menuconfig与savedefconfig实现配置文件修改;
2. Lubancat2 配置文件:configs/rk3568_defconfig
This commit is contained in:
@ -463,7 +463,10 @@ function build_check_cross_compile(){
|
|||||||
arm64|aarch64)
|
arm64|aarch64)
|
||||||
if [ -d "$TOP_DIR/prebuilts/gcc/linux-x86/aarch64/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu" ]; then
|
if [ -d "$TOP_DIR/prebuilts/gcc/linux-x86/aarch64/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu" ]; then
|
||||||
CROSS_COMPILE=$(realpath $TOP_DIR)/prebuilts/gcc/linux-x86/aarch64/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-
|
CROSS_COMPILE=$(realpath $TOP_DIR)/prebuilts/gcc/linux-x86/aarch64/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-
|
||||||
export CROSS_COMPILE=$CROSS_COMPILE
|
export CROSS_COMPILE=$CROSS_COMPILE
|
||||||
|
elif [ -d "$TOP_DIR/prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu" ]; then
|
||||||
|
CROSS_COMPILE=$(realpath $TOP_DIR)/prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
|
||||||
|
export CROSS_COMPILE=$CROSS_COMPILE
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
@ -615,6 +618,30 @@ function build_uboot(){
|
|||||||
finish_build
|
finish_build
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function config_uboot(){
|
||||||
|
check_config RK_UBOOT_DEFCONFIG || return 0
|
||||||
|
build_check_cross_compile
|
||||||
|
prebuild_uboot
|
||||||
|
prebuild_security_uboot $@
|
||||||
|
|
||||||
|
echo "============Start building uboot============"
|
||||||
|
echo "TARGET_UBOOT_CONFIG=$RK_UBOOT_DEFCONFIG"
|
||||||
|
echo "========================================="
|
||||||
|
|
||||||
|
cd u-boot
|
||||||
|
rm -f *_loader_*.bin
|
||||||
|
if [ "$RK_LOADER_UPDATE_SPL" = "true" ]; then
|
||||||
|
rm -f *spl.bin
|
||||||
|
fi
|
||||||
|
|
||||||
|
make ${RK_UBOOT_DEFCONFIG}_defconfig
|
||||||
|
make menuconfig ARCH=${RK_ARCH} CROSS_COMPILE=${CROSS_COMPILE}
|
||||||
|
make savedefconfig ARCH=${RK_ARCH} CROSS_COMPILE=${CROSS_COMPILE}
|
||||||
|
cp -arf defconfig configs/${RK_UBOOT_DEFCONFIG}_defconfig
|
||||||
|
|
||||||
|
finish_build
|
||||||
|
}
|
||||||
|
|
||||||
# TODO: build_spl can be replaced by build_uboot with define RK_LOADER_UPDATE_SPL
|
# TODO: build_spl can be replaced by build_uboot with define RK_LOADER_UPDATE_SPL
|
||||||
function build_spl(){
|
function build_spl(){
|
||||||
check_config RK_SPL_DEFCONFIG || return 0
|
check_config RK_SPL_DEFCONFIG || return 0
|
||||||
@ -720,7 +747,7 @@ function build_extboot(){
|
|||||||
make ARCH=$RK_ARCH $RK_KERNEL_DEFCONFIG $RK_KERNEL_DEFCONFIG_FRAGMENT
|
make ARCH=$RK_ARCH $RK_KERNEL_DEFCONFIG $RK_KERNEL_DEFCONFIG_FRAGMENT
|
||||||
make ARCH=$RK_ARCH $RK_KERNEL_DTS.img -j$RK_JOBS
|
make ARCH=$RK_ARCH $RK_KERNEL_DTS.img -j$RK_JOBS
|
||||||
make ARCH=$RK_ARCH dtbs -j$RK_JOBS
|
make ARCH=$RK_ARCH dtbs -j$RK_JOBS
|
||||||
|
|
||||||
echo -e "\e[36m Generate extLinuxBoot image start\e[0m"
|
echo -e "\e[36m Generate extLinuxBoot image start\e[0m"
|
||||||
|
|
||||||
KERNEL_VERSION=$(cat $TOP_DIR/kernel/include/config/kernel.release)
|
KERNEL_VERSION=$(cat $TOP_DIR/kernel/include/config/kernel.release)
|
||||||
@ -1468,7 +1495,7 @@ for option in ${OPTIONS}; do
|
|||||||
sdpackage) build_sdcard_package ;;
|
sdpackage) build_sdcard_package ;;
|
||||||
toolchain) build_toolchain ;;
|
toolchain) build_toolchain ;;
|
||||||
spl) build_spl ;;
|
spl) build_spl ;;
|
||||||
uboot) build_uboot ;;
|
uboot) config_uboot ;;
|
||||||
uefi) build_uefi ;;
|
uefi) build_uefi ;;
|
||||||
loader) build_loader ;;
|
loader) build_loader ;;
|
||||||
kernel) build_kernel ;;
|
kernel) build_kernel ;;
|
||||||
|
|||||||
Reference in New Issue
Block a user