common: add ramdisk image
Change-Id: Ib138724446b22403257eca183a4d84bb51672155 Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
This commit is contained in:
@ -28,6 +28,7 @@ usage()
|
||||
echo "kernel -build kernel"
|
||||
echo "rootfs -build default rootfs, currently build buildroot as default"
|
||||
echo "buildroot -build buildroot rootfs"
|
||||
echo "ramboot -build ramboot image"
|
||||
echo "yocto -build yocto rootfs, currently build ros as default"
|
||||
echo "ros -build ros rootfs"
|
||||
echo "debian -build debian rootfs"
|
||||
@ -88,6 +89,20 @@ function build_buildroot(){
|
||||
fi
|
||||
}
|
||||
|
||||
function build_ramboot(){
|
||||
# build ramboot image
|
||||
echo "=========Start build ramboot========="
|
||||
echo "TARGET_RAMBOOT_CONFIG=$RK_CFG_RAMBOOT"
|
||||
echo "====================================="
|
||||
/usr/bin/time -f "you take %E to build ramboot" $COMMON_DIR/mk-ramdisk.sh ramboot.img $RK_CFG_RAMBOOT
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "====Build ramboot ok!===="
|
||||
else
|
||||
echo "====Build ramboot failed!===="
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
function build_rootfs(){
|
||||
build_buildroot
|
||||
}
|
||||
@ -162,11 +177,13 @@ function build_all(){
|
||||
echo "TARGET_BUILDROOT_CONFIG=$RK_CFG_BUILDROOT"
|
||||
echo "TARGET_RECOVERY_CONFIG=$RK_CFG_RECOVERY"
|
||||
echo "TARGET_PCBA_CONFIG=$RK_CFG_PCBA"
|
||||
echo "TARGET_RAMBOOT_CONFIG=$RK_CFG_RAMBOOT"
|
||||
echo "============================================"
|
||||
build_uboot
|
||||
build_kernel
|
||||
build_rootfs
|
||||
build_recovery
|
||||
build_ramboot
|
||||
}
|
||||
|
||||
function clean_all(){
|
||||
@ -253,6 +270,9 @@ elif [ $BUILD_TARGET == buildroot ];then
|
||||
elif [ $BUILD_TARGET == recovery ];then
|
||||
build_recovery
|
||||
exit 0
|
||||
elif [ $BUILD_TARGET == ramboot ];then
|
||||
build_ramboot
|
||||
exit 0
|
||||
elif [ $BUILD_TARGET == pcba ];then
|
||||
build_pcba
|
||||
exit 0
|
||||
|
||||
@ -17,6 +17,7 @@ OEM_DIR=$TOP_DIR/device/rockchip/oem/$RK_OEM_DIR
|
||||
USER_DATA_DIR=$TOP_DIR/device/rockchip/userdata/$RK_USERDATA_DIR
|
||||
MISC_IMG=$TOP_DIR/device/rockchip/rockimg/$RK_MISC
|
||||
ROOTFS_IMG=$TOP_DIR/$RK_ROOTFS_IMG
|
||||
RAMBOOT_IMG=$TOP_DIR/buildroot/output/$RK_CFG_RAMBOOT/images/ramboot.img
|
||||
RECOVERY_IMG=$TOP_DIR/buildroot/output/$RK_CFG_RECOVERY/images/recovery.img
|
||||
TRUST_IMG=$TOP_DIR/u-boot/trust.img
|
||||
UBOOT_IMG=$TOP_DIR/u-boot/uboot.img
|
||||
@ -145,4 +146,15 @@ then
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $RK_CFG_RAMBOOT ]
|
||||
then
|
||||
if [ -f $RAMBOOT_IMG ]
|
||||
then
|
||||
echo -n "create boot.img..."
|
||||
ln -s -f $RAMBOOT_IMG $ROCKDEV/boot.img
|
||||
echo "done."
|
||||
else
|
||||
echo "warning: $RAMBOOT_IMG not found!"
|
||||
fi
|
||||
fi
|
||||
echo -e "\e[36m Image: image in rockdev is ready \e[0m"
|
||||
|
||||
Reference in New Issue
Block a user