rockchip: add px30 for supporting

Change-Id: I1a87152531bd3bff858ffef1eddc31c98e5a4f68
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
This commit is contained in:
Caesar Wang
2018-07-09 15:47:01 +08:00
parent 820abbd3a7
commit 801e576fd3
10 changed files with 264 additions and 0 deletions

42
px30/BoardConfig.mk Executable file
View File

@ -0,0 +1,42 @@
#!/bin/bash
#=========================
# Compile Config
#=========================
# Target arch
ARCH=arm64
# Uboot defconfig
UBOOT_DEFCONFIG=evb-px30
# Kernel defconfig
KERNEL_DEFCONFIG=rockchip_linux_defconfig
# Kernel dts
KERNEL_DTS=px30-evb-ddr3-v10
# Buildroot config
CFG_BUILDROOT=rockchip_px30
# Recovery config
CFG_RECOVERY=rockchip_px30_recovery
# Pcba config
CFG_PCBA=rockchip_px30_pcba
# Build jobs
JOBS=12
# Yocto machine
YOCTO_MACHINE=rockchip-px30-evb
#=========================
# Platform Target
#=========================
TARGET_PRODUCT=px30
# Set rootfs type, see buildroot.
# ext4 squashfs
ROOTFS_TYPE=ext4
# Set data partition type.
# ext2 squashfs
OEM_PARTITION_TYPE=ext2
# Set flash type.
# support <emmc, nand, spi_nand, spi_nor>
FLASH_TYPE=emmc
#OEM config: /oem/dueros/aispeech/iflytekSDK/CaeDemo_VAD/smart_voice
OEM_PATH=oem

124
px30/mkfirmware.sh Executable file
View File

@ -0,0 +1,124 @@
TOOL_PATH=$(pwd)/build
IMAGE_OUT_PATH=$(pwd)/rockdev
KERNEL_PATH=$(pwd)/kernel
UBOOT_PATH=$(pwd)/u-boot
ROOTFS_PATH=$(pwd)/rootfs
DEVICE_IMG_PATH=$(pwd)/device/rockchip/px30/rockdev
PARAMETER_PATH=$DEVICE_IMG_PATH/parameter.txt
OEM_IMG_PATH=$DEVICE_IMG_PATH/oem.img
USER_DATA_IMG_PATH=$DEVICE_IMG_PATH/userdata.img
MISC_IMG_PATH=$DEVICE_IMG_PATH/wipe_all-misc.img
ROOTFS_IMG_PATH=$(pwd)/buildroot/output/rockchip_px30/images/rootfs.ext4
RECOVERY_PATH=$(pwd)/buildroot/output/rockchip_px30_recovery/images/recovery.img
mkdir -p $IMAGE_OUT_PATH
if [ ! -n "$1" ]
then
echo "build buildroot type rootfs as default"
ROOTFS_TYPE=buildroot
else
ROOTFS_TYPE="$1"
fi
if [ $ROOTFS_TYPE = debian ]
then
echo -n "create rootfs.img..."
ln -s -f $ROOTFS_PATH/linaro-rootfs.img $IMAGE_OUT_PATH/rootfs.img
echo "done."
else
echo -n "create rootfs.img..."
ln -s -f $ROOTFS_IMG_PATH $IMAGE_OUT_PATH/rootfs.img
echo "done"
fi
if [ -f $RECOVERY_PATH ]
then
echo -n "create recovery.img..."
ln -s -f $RECOVERY_PATH $IMAGE_OUT_PATH/
echo "done."
else
echo -e "\e[31m error: $RECOVERY_PATH not found! \e[0m"
exit 0
fi
if [ -f $MISC_IMG_PATH ]
then
echo -n "create misc.img..."
ln -s -f $MISC_IMG_PATH $IMAGE_OUT_PATH/misc.img
echo "done."
else
echo -e "\e[31m error: $MISC_IMG_PATH not found! \e[0m"
exit 0
fi
if [ -f $PARAMETER_PATH ]
then
echo -n "create parameter.txt..."
ln -s -f $PARAMETER_PATH $IMAGE_OUT_PATH/
echo "done."
else
echo -e "\e[31m error: $PARAMETER_PATH not found! \e[0m"
exit 0
fi
if [ -f $OEM_IMG_PATH ]
then
echo -n "create oem.img..."
ln -s -f $OEM_IMG_PATH $IMAGE_OUT_PATH/
echo "done."
else
echo -e "\e[31m error: $OEM_IMG_PATH not found! \e[0m"
exit 0
fi
if [ -f $USER_DATA_IMG_PATH ]
then
echo -n "create userdata.img..."
ln -s -f $USER_DATA_IMG_PATH $IMAGE_OUT_PATH/
echo "done."
else
echo -e "\e[31m error: $USER_DATA_IMG_PATH not found! \e[0m"
exit 0
fi
if [ -f $UBOOT_PATH/uboot.img ]
then
echo -n "create uboot.img..."
ln -s -f $UBOOT_PATH/uboot.img $IMAGE_OUT_PATH/uboot.img
echo "done."
else
echo -e "\e[31m error: $UBOOT_PATH/uboot.img not found! Please make it from $UBOOT_PATH first! \e[0m"
exit 0
fi
if [ -f $UBOOT_PATH/trust.img ]
then
echo -n "create trust.img..."
ln -s -f $UBOOT_PATH/trust.img $IMAGE_OUT_PATH/trust.img
echo "done."
else
echo -e "\e[31m error: $UBOOT_PATH/trust.img not found! Please make it from $UBOOT_PATH first! \e[0m"
exit 0
fi
if [ -f $UBOOT_PATH/*_loader_*.bin ]
then
echo -n "create loader..."
ln -s -f $UBOOT_PATH/*_loader_*.bin $IMAGE_OUT_PATH/MiniLoaderAll.bin
echo "done."
else
echo -e "\e[31m error: $UBOOT_PATH/*loader_*.bin not found,or there are multiple loaders! Please make it from $UBOOT_PATH first! \e[0m"
rm $UBOOT_PATH/*_loader_*.bin
exit 0
fi
if [ -f $KERNEL_PATH/boot.img ]
then
echo -n "create boot.img..."
ln -s -f $KERNEL_PATH/boot.img $IMAGE_OUT_PATH/boot.img
echo "done."
else
echo -e "\e[31m error: $KERNEL_PATH/boot.img not found! \e[0m"
exit 0
fi
echo -e "\e[36m Image: image in rockdev is ready \e[0m"

87
px30/rkflash.sh Executable file
View File

@ -0,0 +1,87 @@
UPGRADETOOL=$(pwd)/tools/linux/Linux_Upgrade_Tool/Linux_Upgrade_Tool/upgrade_tool
ROCKDEV_DIR=$(pwd)/rockdev
LOADER=$ROCKDEV_DIR/MiniLoaderAll.bin
PARAMETER=$ROCKDEV_DIR/parameter.txt
UBOOT=$ROCKDEV_DIR/uboot.img
TRUST=$ROCKDEV_DIR/trust.img
BOOT=$ROCKDEV_DIR/boot.img
RECOVERY=$ROCKDEV_DIR/recovery.img
OEM=$ROCKDEV_DIR/oem.img
MISC=$ROCKDEV_DIR/misc.img
ROOTFS=$ROCKDEV_DIR/rootfs.img
USERDATA=$ROCKDEV_DIR/userdata.img
if [ ! -n "$1" ]
then
echo "flash all images as default"
FLASH_TYPE=all
else
FLASH_TYPE="$1"
fi
if [ $FLASH_TYPE = all ]
then
sudo $UPGRADETOOL ul $LOADER
sudo $UPGRADETOOL di -p $PARAMETER
sudo $UPGRADETOOL di -uboot $UBOOT
sudo $UPGRADETOOL di -trust $TRUST
sudo $UPGRADETOOL di -b $BOOT
sudo $UPGRADETOOL di -r $RECOVERY
sudo $UPGRADETOOL di -m $MISC
sudo $UPGRADETOOL di -oem $OEM
sudo $UPGRADETOOL di -userdata $USERDATA
sudo $UPGRADETOOL di -rootfs $ROOTFS
fi
if [ $FLASH_TYPE = loader ]
then
sudo $UPGRADETOOL ul $LOADER
fi
if [ $FLASH_TYPE = parameter ]
then
sudo $UPGRADETOOL di -p $PARAMETER
fi
if [ $FLASH_TYPE = uboot ]
then
sudo $UPGRADETOOL di -uboot $UBOOT
fi
if [ $FLASH_TYPE = trust ]
then
sudo $UPGRADETOOL di -trust $TRUST
fi
if [ $FLASH_TYPE = boot ]
then
sudo $UPGRADETOOL di -b $BOOT
fi
if [ $FLASH_TYPE = recovery ]
then
sudo $UPGRADETOOL di -r $RECOVERY
fi
if [ $FLASH_TYPE = misc ]
then
sudo $UPGRADETOOL di -misc $MISC
fi
if [ $FLASH_TYPE = oem ]
then
sudo $UPGRADETOOL di -oem $OEM
fi
if [ $FLASH_TYPE = userdata ]
then
sudo $UPGRADETOOL di -userdata $USERDATA
fi
if [ $FLASH_TYPE = rootfs ]
then
sudo $UPGRADETOOL di -rootfs $ROOTFS
fi
sudo $UPGRADETOOL rd

BIN
px30/rockdev/blank-misc.img Executable file

Binary file not shown.

BIN
px30/rockdev/oem.img Normal file

Binary file not shown.

View File

@ -0,0 +1,11 @@
FIRMWARE_VER: 8.1
MACHINE_MODEL: PX30
MACHINE_ID: 007
MANUFACTURER: PX30
MAGIC: 0x5041524B
ATAG: 0x00200800
MACHINE: px30
CHECK_MASK: 0x80
TYPE: GPT
CMDLINE: mtdparts=rk29xxnand:0x00002000@0x00004000(uboot),0x00002000@0x00006000(trust),0x00002000@0x00008000(misc),0x00010000@0x0000a000(boot),0x00010000@0x0001a000(recovery),0x00010000@0x0002a000(backup),0x00020000@0x0003a000(oem),0x00300000@0x0005a000(rootfs),-@0x0035a000(userdata:grow)
uuid:rootfs=614e0000-0000-4b53-8000-1d28000054a9

BIN
px30/rockdev/pcba_small_misc.img Executable file

Binary file not shown.

BIN
px30/rockdev/pcba_whole_misc.img Executable file

Binary file not shown.

BIN
px30/rockdev/userdata.img Normal file

Binary file not shown.

BIN
px30/rockdev/wipe_all-misc.img Executable file

Binary file not shown.