mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-03-01 17:05:29 +08:00
bsp: cvitek: removed useless files after using rttpkgtool
Based on the patch "bsp: cvitek: use rttpkgtool to replace cvitek_bootloader", continue cleanup useless files. Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
This commit is contained in:
parent
7e0acaa254
commit
c3e5152c13
@ -1,44 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
function get_board_type()
|
|
||||||
{
|
|
||||||
BOARD_CONFIG=("CONFIG_BOARD_TYPE_MILKV_DUO" "CONFIG_BOARD_TYPE_MILKV_DUO256M" "CONFIG_BOARD_TYPE_MILKV_DUOS")
|
|
||||||
BOARD_VALUE=("milkv-duo" "milkv-duo256m" "milkv-duos-sd")
|
|
||||||
STORAGE_VAUE=("sd" "sd" "sd")
|
|
||||||
|
|
||||||
for ((i=0;i<${#BOARD_CONFIG[@]};i++))
|
|
||||||
do
|
|
||||||
config_value=$(grep -w "${BOARD_CONFIG[i]}" ${PROJECT_PATH}/.config | cut -d= -f2)
|
|
||||||
if [ "$config_value" == "y" ]; then
|
|
||||||
BOARD_TYPE=${BOARD_VALUE[i]}
|
|
||||||
STORAGE_TYPE=${STORAGE_VAUE[i]}
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
export BOARD_TYPE=${BOARD_TYPE}
|
|
||||||
export STORAGE_TYPE=${STORAGE_TYPE}
|
|
||||||
}
|
|
||||||
|
|
||||||
function check_bootloader()
|
|
||||||
{
|
|
||||||
restult=$(curl -m 10 -s http://www.ip-api.com/json)
|
|
||||||
COUNTRY=$(echo $restult | sed 's/.*"country":"\([^"]*\)".*/\1/')
|
|
||||||
echo "Country: $COUNTRY"
|
|
||||||
|
|
||||||
if [ "$COUNTRY" == "China" ]; then
|
|
||||||
BOOTLOADER_URL=https://gitee.com/flyingcys/cvitek_bootloader
|
|
||||||
else
|
|
||||||
BOOTLOADER_URL=https://github.com/flyingcys/cvitek_bootloader
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -d cvitek_bootloader ]; then
|
|
||||||
echo "cvitek_bootloader not exist, clone it from ${BOOTLOADER_URL}"
|
|
||||||
git clone ${BOOTLOADER_URL}
|
|
||||||
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo "Failed to clone ${BOOTLOADER_URL} !"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
PROJECT_PATH=$1
|
|
||||||
IMAGE_NAME=$2
|
|
||||||
|
|
||||||
if [ -z "$PROJECT_PATH" ] || [ -z "$IMAGE_NAME" ]; then
|
|
||||||
echo "Usage: $0 <PROJECT_DIR> <IMAGE_NAME>"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
ROOT_PATH=$(pwd)
|
|
||||||
echo $ROOT_PATH
|
|
||||||
|
|
||||||
. board_env.sh
|
|
||||||
|
|
||||||
get_board_type
|
|
||||||
echo "board_type: ${BOARD_TYPE}"
|
|
||||||
|
|
||||||
check_bootloader || exit 0
|
|
||||||
|
|
||||||
export BLCP_2ND_PATH=${PROJECT_PATH}/${IMAGE_NAME}
|
|
||||||
|
|
||||||
pushd cvitek_bootloader
|
|
||||||
|
|
||||||
. env.sh
|
|
||||||
|
|
||||||
get_build_board ${BOARD_TYPE}
|
|
||||||
|
|
||||||
echo "board: ${MV_BOARD_LINK}"
|
|
||||||
|
|
||||||
if [ ! -d opensbi/build/platform/generic ] || [ ! -d fsbl/build/${MV_BOARD_LINK} ] || [ ! -d u-boot-2021.10/build/${MV_BOARD_LINK} ]; then
|
|
||||||
do_build
|
|
||||||
|
|
||||||
else
|
|
||||||
echo "Build already done, skip build"
|
|
||||||
|
|
||||||
do_combine
|
|
||||||
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
do_build
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
popd
|
|
||||||
|
|
||||||
mkdir -p output/${MV_BOARD}
|
|
||||||
cp -rf cvitek_bootloader/install/soc_${MV_BOARD_LINK}/fip.bin output/${MV_BOARD}/fip.bin
|
|
Binary file not shown.
@ -1,56 +0,0 @@
|
|||||||
/*
|
|
||||||
* U-Boot uImage source file with multiple kernels, ramdisks and FDT blobs
|
|
||||||
*/
|
|
||||||
|
|
||||||
/dts-v1/;
|
|
||||||
|
|
||||||
/ {
|
|
||||||
description = "Various kernels, ramdisks and FDT blobs";
|
|
||||||
#address-cells = <2>;
|
|
||||||
|
|
||||||
images {
|
|
||||||
kernel-1 {
|
|
||||||
description = "cvitek kernel";
|
|
||||||
data = /incbin/("./Image.lzma");
|
|
||||||
type = "kernel";
|
|
||||||
arch = "riscv";
|
|
||||||
os = "linux";
|
|
||||||
compression = "lzma";
|
|
||||||
load = <0x0 0x80200000>;
|
|
||||||
entry = <0x0 0x80200000>;
|
|
||||||
hash-2 {
|
|
||||||
algo = "crc32";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/*FDT*/
|
|
||||||
|
|
||||||
fdt-cv1800b_milkv_duo_spinor {
|
|
||||||
description = "cvitek device tree - cv1800b_milkv_duo_spinor";
|
|
||||||
data = /incbin/("./cv1800b_milkv_duo_spinor.dtb");
|
|
||||||
type = "flat_dt";
|
|
||||||
arch = "riscv";
|
|
||||||
compression = "none";
|
|
||||||
hash-1 {
|
|
||||||
algo = "sha256";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/*CFG*/
|
|
||||||
configurations {
|
|
||||||
|
|
||||||
config-cv1800b_milkv_duo_spinor {
|
|
||||||
description = "boot cvitek system with board cv1800b_milkv_duo_spinor";
|
|
||||||
kernel = "kernel-1";
|
|
||||||
fdt = "fdt-cv1800b_milkv_duo_spinor";
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
};
|
|
Binary file not shown.
@ -1,56 +0,0 @@
|
|||||||
/*
|
|
||||||
* U-Boot uImage source file with multiple kernels, ramdisks and FDT blobs
|
|
||||||
*/
|
|
||||||
|
|
||||||
/dts-v1/;
|
|
||||||
|
|
||||||
/ {
|
|
||||||
description = "Various kernels, ramdisks and FDT blobs";
|
|
||||||
#address-cells = <2>;
|
|
||||||
|
|
||||||
images {
|
|
||||||
kernel-1 {
|
|
||||||
description = "cvitek kernel";
|
|
||||||
data = /incbin/("./Image.lzma");
|
|
||||||
type = "kernel";
|
|
||||||
arch = "riscv";
|
|
||||||
os = "linux";
|
|
||||||
compression = "lzma";
|
|
||||||
load = <0x0 0x80200000>;
|
|
||||||
entry = <0x0 0x80200000>;
|
|
||||||
hash-2 {
|
|
||||||
algo = "crc32";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/*FDT*/
|
|
||||||
|
|
||||||
fdt-cv1800b_milkv_duo_sd {
|
|
||||||
description = "cvitek device tree - cv1800b_milkv_duo_sd";
|
|
||||||
data = /incbin/("./cv1800b_milkv_duo_sd.dtb");
|
|
||||||
type = "flat_dt";
|
|
||||||
arch = "riscv";
|
|
||||||
compression = "none";
|
|
||||||
hash-1 {
|
|
||||||
algo = "sha256";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/*CFG*/
|
|
||||||
configurations {
|
|
||||||
|
|
||||||
config-cv1800b_milkv_duo_sd {
|
|
||||||
description = "boot cvitek system with board cv1800b_milkv_duo_sd";
|
|
||||||
kernel = "kernel-1";
|
|
||||||
fdt = "fdt-cv1800b_milkv_duo_sd";
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
};
|
|
Binary file not shown.
@ -1,56 +0,0 @@
|
|||||||
/*
|
|
||||||
* U-Boot uImage source file with multiple kernels, ramdisks and FDT blobs
|
|
||||||
*/
|
|
||||||
|
|
||||||
/dts-v1/;
|
|
||||||
|
|
||||||
/ {
|
|
||||||
description = "Various kernels, ramdisks and FDT blobs";
|
|
||||||
#address-cells = <2>;
|
|
||||||
|
|
||||||
images {
|
|
||||||
kernel-1 {
|
|
||||||
description = "cvitek kernel";
|
|
||||||
data = /incbin/("./Image.lzma");
|
|
||||||
type = "kernel";
|
|
||||||
arch = "riscv";
|
|
||||||
os = "linux";
|
|
||||||
compression = "lzma";
|
|
||||||
load = <0x0 0x80200000>;
|
|
||||||
entry = <0x0 0x80200000>;
|
|
||||||
hash-2 {
|
|
||||||
algo = "crc32";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/*FDT*/
|
|
||||||
|
|
||||||
fdt-cv1812cp_milkv_duo256m_spinor {
|
|
||||||
description = "cvitek device tree - cv1812cp_milkv_duo256m_spinor";
|
|
||||||
data = /incbin/("./cv1812cp_milkv_duo256m_spinor.dtb");
|
|
||||||
type = "flat_dt";
|
|
||||||
arch = "riscv";
|
|
||||||
compression = "none";
|
|
||||||
hash-1 {
|
|
||||||
algo = "sha256";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/*CFG*/
|
|
||||||
configurations {
|
|
||||||
|
|
||||||
config-cv1812cp_milkv_duo256m_spinor {
|
|
||||||
description = "boot cvitek system with board cv1812cp_milkv_duo256m_spinor";
|
|
||||||
kernel = "kernel-1";
|
|
||||||
fdt = "fdt-cv1812cp_milkv_duo256m_spinor";
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
};
|
|
Binary file not shown.
@ -1,56 +0,0 @@
|
|||||||
/*
|
|
||||||
* U-Boot uImage source file with multiple kernels, ramdisks and FDT blobs
|
|
||||||
*/
|
|
||||||
|
|
||||||
/dts-v1/;
|
|
||||||
|
|
||||||
/ {
|
|
||||||
description = "Various kernels, ramdisks and FDT blobs";
|
|
||||||
#address-cells = <2>;
|
|
||||||
|
|
||||||
images {
|
|
||||||
kernel-1 {
|
|
||||||
description = "cvitek kernel";
|
|
||||||
data = /incbin/("./Image.lzma");
|
|
||||||
type = "kernel";
|
|
||||||
arch = "riscv";
|
|
||||||
os = "linux";
|
|
||||||
compression = "lzma";
|
|
||||||
load = <0x0 0x80200000>;
|
|
||||||
entry = <0x0 0x80200000>;
|
|
||||||
hash-2 {
|
|
||||||
algo = "crc32";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/*FDT*/
|
|
||||||
|
|
||||||
fdt-cv1812cp_milkv_duo256m_sd {
|
|
||||||
description = "cvitek device tree - cv1812cp_milkv_duo256m_sd";
|
|
||||||
data = /incbin/("./cv1812cp_milkv_duo256m_sd.dtb");
|
|
||||||
type = "flat_dt";
|
|
||||||
arch = "riscv";
|
|
||||||
compression = "none";
|
|
||||||
hash-1 {
|
|
||||||
algo = "sha256";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/*CFG*/
|
|
||||||
configurations {
|
|
||||||
|
|
||||||
config-cv1812cp_milkv_duo256m_sd {
|
|
||||||
description = "boot cvitek system with board cv1812cp_milkv_duo256m_sd";
|
|
||||||
kernel = "kernel-1";
|
|
||||||
fdt = "fdt-cv1812cp_milkv_duo256m_sd";
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
};
|
|
Binary file not shown.
@ -1,56 +0,0 @@
|
|||||||
/*
|
|
||||||
* U-Boot uImage source file with multiple kernels, ramdisks and FDT blobs
|
|
||||||
*/
|
|
||||||
|
|
||||||
/dts-v1/;
|
|
||||||
|
|
||||||
/ {
|
|
||||||
description = "Various kernels, ramdisks and FDT blobs";
|
|
||||||
#address-cells = <2>;
|
|
||||||
|
|
||||||
images {
|
|
||||||
kernel-1 {
|
|
||||||
description = "cvitek kernel";
|
|
||||||
data = /incbin/("./Image.lzma");
|
|
||||||
type = "kernel";
|
|
||||||
arch = "riscv";
|
|
||||||
os = "linux";
|
|
||||||
compression = "lzma";
|
|
||||||
load = <0x0 0x80200000>;
|
|
||||||
entry = <0x0 0x80200000>;
|
|
||||||
hash-2 {
|
|
||||||
algo = "crc32";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/*FDT*/
|
|
||||||
|
|
||||||
fdt-cv1813h_milkv_duos_sd {
|
|
||||||
description = "cvitek device tree - cv1813h_milkv_duos_sd";
|
|
||||||
data = /incbin/("./cv1813h_milkv_duos_sd.dtb");
|
|
||||||
type = "flat_dt";
|
|
||||||
arch = "riscv";
|
|
||||||
compression = "none";
|
|
||||||
hash-1 {
|
|
||||||
algo = "sha256";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/*CFG*/
|
|
||||||
configurations {
|
|
||||||
|
|
||||||
config-cv1813h_milkv_duos_sd {
|
|
||||||
description = "boot cvitek system with board cv1813h_milkv_duos_sd";
|
|
||||||
kernel = "kernel-1";
|
|
||||||
fdt = "fdt-cv1813h_milkv_duos_sd";
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
};
|
|
Binary file not shown.
@ -1,24 +0,0 @@
|
|||||||
#/bin/sh
|
|
||||||
set -e
|
|
||||||
|
|
||||||
PROJECT_PATH=$1
|
|
||||||
IMAGE_NAME=$2
|
|
||||||
|
|
||||||
if [ -z "$PROJECT_PATH" ] || [ -z "$IMAGE_NAME" ]; then
|
|
||||||
echo "Usage: $0 <PROJECT_DIR> <IMAGE_NAME>"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
ROOT_PATH=$(pwd)
|
|
||||||
echo ${ROOT_PATH}
|
|
||||||
|
|
||||||
. board_env.sh
|
|
||||||
|
|
||||||
get_board_type
|
|
||||||
|
|
||||||
echo "start compress kernel..."
|
|
||||||
|
|
||||||
lzma -c -9 -f -k ${PROJECT_PATH}/${IMAGE_NAME} > ${PROJECT_PATH}/dtb/${BOARD_TYPE}/Image.lzma
|
|
||||||
|
|
||||||
mkdir -p ${ROOT_PATH}/output/${BOARD_TYPE}
|
|
||||||
./mkimage -f ${PROJECT_PATH}/dtb/${BOARD_TYPE}/multi.its -r ${ROOT_PATH}/output/${BOARD_TYPE}/boot.${STORAGE_TYPE}
|
|
Loading…
x
Reference in New Issue
Block a user