Support yocto for rk3399

Change-Id: I6f1cb3e796307f1240d99d2fa9f9b4f55dd7ed1a
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
This commit is contained in:
Jeffy Chen
2019-04-10 10:23:45 +08:00
parent 445e638aa0
commit 7e89caae2d
3 changed files with 36 additions and 2 deletions

View File

@ -131,7 +131,26 @@ function build_multi-npu_boot(){
}
function build_yocto(){
echo "we don't support yocto at this time"
if [ -z "$RK_YOCTO_MACHINE" ]; then
echo "This board doesn't support yocto!"
exit 1
fi
echo "=========Start build ramboot========="
echo "TARGET_MACHINE=$RK_YOCTO_MACHINE"
echo "====================================="
cd yocto
ln -sf $RK_YOCTO_MACHINE.conf build/conf/local.conf
source oe-init-build-env
bitbake core-image-minimal
if [ $? -eq 0 ]; then
echo "====Build yocto ok!===="
else
echo "====Build yocto failed!===="
exit 1
fi
}
function build_debian(){
@ -155,7 +174,7 @@ function build_rootfs(){
case "$1" in
yocto)
build_yocto
ROOTFS_IMG=
ROOTFS_IMG=yocto/build/tmp/deploy/images/$RK_YOCTO_MACHINE/rootfs.img
;;
debian)
build_debian

13
common/yocto-install.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/sh
[ -z "$1" ] && return
ROOTDIR=$1
echo "Runing install script for $ROOTDIR ..."
# For oem and userdata partitions
mkdir -p "${ROOTDIR}/oem" "${ROOTDIR}/userdata"
cat << EOF >> "${ROOTDIR}/etc/fstab"
PARTLABEL=oem /oem auto defaults 0 2
PARTLABEL=userdata /userdata auto defaults 0 2
EOF

View File

@ -28,6 +28,8 @@ export RK_JOBS=12
export RK_TARGET_PRODUCT=rk3399
# Set rootfs type, including ext2 ext4 squashfs
export RK_ROOTFS_TYPE=ext4
# yocto machine
export RK_YOCTO_MACHINE=rockchip-rk3399-sapphire-excavator
# rootfs image path
export RK_ROOTFS_IMG=rockdev/rootfs.${RK_ROOTFS_TYPE}
# Set oem partition type, including ext2 squashfs