rockchip: make_fit_boot: support generate arm64 boot.img
Signed-off-by: Joseph Chen <chenjh@rock-chips.com> Change-Id: Ic21f0f642aed40bc005048be2fe898af88ccf023
This commit is contained in:
parent
c4e6abcd5e
commit
811f8a32ef
|
|
@ -21,8 +21,10 @@ function help()
|
||||||
echo " arg type output variable description"
|
echo " arg type output variable description"
|
||||||
echo "--------------------------------------------------------------------------------------------"
|
echo "--------------------------------------------------------------------------------------------"
|
||||||
echo " -c [comp] ==> <string> COMPRESSION set compression: \"none\", \"gzip\""
|
echo " -c [comp] ==> <string> COMPRESSION set compression: \"none\", \"gzip\""
|
||||||
echo " -m [offset] ==> <hex> MCU_LOAD_ADDR set mcu.bin offset address"
|
echo " -m [offset] ==> <hex> MCU_LOAD_ADDR set mcu.bin load address"
|
||||||
echo " -t [offset] ==> <hex> TEE_LOAD_ADDR set tee.bin offset address"
|
echo " -t [offset] ==> <hex> TEE_LOAD_ADDR set tee.bin load address"
|
||||||
|
echo " (none) ==> <hex> UBOOT_LOAD_ADDR set U-Boot load address"
|
||||||
|
echo " (none) ==> <string> ARCH set arch: \"arm\", \"arm64\""
|
||||||
echo
|
echo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -61,6 +63,11 @@ fi
|
||||||
# Base
|
# Base
|
||||||
DARM_BASE=`sed -n "/CONFIG_SYS_SDRAM_BASE=/s/CONFIG_SYS_SDRAM_BASE=//p" ${srctree}/include/autoconf.mk|tr -d '\r'`
|
DARM_BASE=`sed -n "/CONFIG_SYS_SDRAM_BASE=/s/CONFIG_SYS_SDRAM_BASE=//p" ${srctree}/include/autoconf.mk|tr -d '\r'`
|
||||||
UBOOT_LOAD_ADDR=`sed -n "/CONFIG_SYS_TEXT_BASE=/s/CONFIG_SYS_TEXT_BASE=//p" ${srctree}/include/autoconf.mk|tr -d '\r'`
|
UBOOT_LOAD_ADDR=`sed -n "/CONFIG_SYS_TEXT_BASE=/s/CONFIG_SYS_TEXT_BASE=//p" ${srctree}/include/autoconf.mk|tr -d '\r'`
|
||||||
|
if grep -q '^CONFIG_ARM64=y' .config ; then
|
||||||
|
ARCH="arm64"
|
||||||
|
else
|
||||||
|
ARCH="arm"
|
||||||
|
fi
|
||||||
|
|
||||||
# tee
|
# tee
|
||||||
if [ ! -z "${TEE_OFFSET}" ]; then
|
if [ ! -z "${TEE_OFFSET}" ]; then
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,10 @@
|
||||||
# Process args and auto set variables
|
# Process args and auto set variables
|
||||||
source ./${srctree}/arch/arm/mach-rockchip/make_fit_args.sh
|
source ./${srctree}/arch/arm/mach-rockchip/make_fit_args.sh
|
||||||
|
|
||||||
|
if [ ! -f ${srctree}/images/ramdisk ]; then
|
||||||
|
touch ${srctree}/images/ramdisk
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "${COMPRESSION}" == "gzip" ]; then
|
if [ "${COMPRESSION}" == "gzip" ]; then
|
||||||
gzip -k -f -9 ${srctree}/images/kernel
|
gzip -k -f -9 ${srctree}/images/kernel
|
||||||
gzip -k -f -9 ${srctree}/images/ramdisk
|
gzip -k -f -9 ${srctree}/images/ramdisk
|
||||||
|
|
@ -35,7 +39,7 @@ cat << EOF
|
||||||
fdt {
|
fdt {
|
||||||
data = /incbin/("./images/rk-kernel.dtb");
|
data = /incbin/("./images/rk-kernel.dtb");
|
||||||
type = "flat_dt";
|
type = "flat_dt";
|
||||||
arch = "arm";
|
arch = "${ARCH}";
|
||||||
compression = "none";
|
compression = "none";
|
||||||
load = <0xffffff00>;
|
load = <0xffffff00>;
|
||||||
hash {
|
hash {
|
||||||
|
|
@ -49,7 +53,7 @@ echo " data = /incbin/(\"./images/kernel${SUFFIX}\");"
|
||||||
echo " compression = \"${COMPRESSION}\";"
|
echo " compression = \"${COMPRESSION}\";"
|
||||||
cat << EOF
|
cat << EOF
|
||||||
type = "kernel";
|
type = "kernel";
|
||||||
arch = "arm";
|
arch = "${ARCH}";
|
||||||
os = "linux";
|
os = "linux";
|
||||||
entry = <0xffffff01>;
|
entry = <0xffffff01>;
|
||||||
load = <0xffffff01>;
|
load = <0xffffff01>;
|
||||||
|
|
@ -64,7 +68,7 @@ echo " data = /incbin/(\"./images/ramdisk${SUFFIX}\");"
|
||||||
echo " compression = \"${COMPRESSION}\";"
|
echo " compression = \"${COMPRESSION}\";"
|
||||||
cat << EOF
|
cat << EOF
|
||||||
type = "ramdisk";
|
type = "ramdisk";
|
||||||
arch = "arm";
|
arch = "${ARCH}";
|
||||||
os = "linux";
|
os = "linux";
|
||||||
load = <0xffffff02>;
|
load = <0xffffff02>;
|
||||||
hash {
|
hash {
|
||||||
|
|
@ -75,7 +79,7 @@ cat << EOF
|
||||||
resource {
|
resource {
|
||||||
data = /incbin/("./images/resource");
|
data = /incbin/("./images/resource");
|
||||||
type = "multi";
|
type = "multi";
|
||||||
arch = "arm";
|
arch = "${ARCH}";
|
||||||
compression = "none";
|
compression = "none";
|
||||||
hash {
|
hash {
|
||||||
algo = "sha256";
|
algo = "sha256";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue