build_kernel()
{
# Compiler kernel
cd ${BS_DIR_TOP}/kernel || return 1
cd ${BS_DIR_TOP}/kernel || return 1
//第一次的时候备份原始的配置文件,这里没有判断对应文件是否存在
if [ ! ${BS_DIR_TOP}/kernel/arch/arm/configs/x4412_defconfig.org ]; then
cp ${BS_DIR_TOP}/kernel/arch/arm/configs/x4412_defconfig ${BS_DIR_TOP}/kernel/arch/arm/configs/x4412_defconfig.org
fi
cp .config arch/arm/configs/x4412_defconfig
make ${BS_CONFIG_KERNEL} ARCH=arm CROSS_COMPILE=${BS_CROSS_TOOLCHAIN_KERNEL} || return 1
make -j${threads} ARCH=arm CROSS_COMPILE=${BS_CROSS_TOOLCHAIN_KERNEL} || return 1
# Copy zImage to release directory
cp -v ${BS_DIR_TOP}/kernel/arch/arm/boot/zImage ${BS_DIR_RELEASE}