From 9b0618e953d2d3770c603e97a75a07829de1ac23 Mon Sep 17 00:00:00 2001 From: Marek Szyprowski Date: Tue, 16 Nov 2021 13:46:04 +0100 Subject: [PATCH] tizen: fix params.bin generation after v2021.10 rebase Use the script provided by the mainline u-boot to generate default params.bin instead of open coding its generation. Signed-off-by: Marek Szyprowski --- packaging/u-boot-amlogic.spec | 6 ++---- packaging/u-boot-rpi3-32b.spec | 6 ++---- packaging/u-boot-rpi3.spec | 6 ++---- packaging/u-boot-rpi4-32b.spec | 6 ++---- packaging/u-boot-rpi4.spec | 6 ++---- tizen/build-amlogic.sh | 6 ++---- 6 files changed, 12 insertions(+), 24 deletions(-) diff --git a/packaging/u-boot-amlogic.spec b/packaging/u-boot-amlogic.spec index c16a91e..b1ad5c9 100644 --- a/packaging/u-boot-amlogic.spec +++ b/packaging/u-boot-amlogic.spec @@ -146,11 +146,9 @@ for i in %{TARGETS}; do --level v3 # 1-6. Generate params.bin - cp `find ./env -name "built-in.o"` copy_env_common.o - objcopy -O binary --only-section=.rodata.default_environment `find . -name "copy_env_common.o"` - tr '\0' '\n' < copy_env_common.o > default_envs.txt + ./scripts/get_default_envs.sh > default_envs.txt mkenvimage -s 16384 -o ${PARAMS} default_envs.txt - rm copy_env_common.o default_envs.txt + rm default_envs.txt done # 1-7. Build Boot script diff --git a/packaging/u-boot-rpi3-32b.spec b/packaging/u-boot-rpi3-32b.spec index bf82cd1..f4dd7cb 100644 --- a/packaging/u-boot-rpi3-32b.spec +++ b/packaging/u-boot-rpi3-32b.spec @@ -54,11 +54,9 @@ export PATH="$PATH:tools:tools/dtc/" make %{?_smp_mflags} EXTRAVERSION=`echo %{vcs} | sed 's/.*u-boot.*#\(.\{9\}\).*/-g\1-TIZEN.org/'` # Generate uboot.env -cp `find ./env -name "built-in.o"` copy_env_common.o -objcopy -O binary --only-section=.rodata.default_environment `find . -name "copy_env_common.o"` -tr '\0' '\n' < copy_env_common.o > default_envs.txt +./scripts/get_default_envs.sh > default_envs.txt mkenvimage -s 16384 -o uboot.env default_envs.txt -rm copy_env_common.o default_envs.txt +rm default_envs.txt # Build boot.scr mkimage -A arm -T script -C none -n "Tizen RPI3 u-boot helper" -d ./tizen/bootscript/tizen-boot-rpi3.scr ./boot.scr.uimg diff --git a/packaging/u-boot-rpi3.spec b/packaging/u-boot-rpi3.spec index 1eda16e..1b623ad 100644 --- a/packaging/u-boot-rpi3.spec +++ b/packaging/u-boot-rpi3.spec @@ -54,11 +54,9 @@ export PATH="$PATH:tools:tools/dtc/" make %{?_smp_mflags} EXTRAVERSION=`echo %{vcs} | sed 's/.*u-boot.*#\(.\{9\}\).*/-g\1-TIZEN.org/'` # Generate params.bin -cp `find ./env -name "built-in.o"` copy_env_common.o -objcopy -O binary --only-section=.rodata.default_environment `find . -name "copy_env_common.o"` -tr '\0' '\n' < copy_env_common.o > default_envs.txt +./scripts/get_default_envs.sh > default_envs.txt mkenvimage -s 16384 -o uboot.env default_envs.txt -rm copy_env_common.o default_envs.txt +rm default_envs.txt # Build boot.scr mkimage -A arm64 -T script -C none -n "Tizen RPI3 u-boot helper" -d ./tizen/bootscript/tizen-boot-rpi3.scr ./boot.scr.uimg diff --git a/packaging/u-boot-rpi4-32b.spec b/packaging/u-boot-rpi4-32b.spec index 5238086..bad2d72 100644 --- a/packaging/u-boot-rpi4-32b.spec +++ b/packaging/u-boot-rpi4-32b.spec @@ -43,11 +43,9 @@ export PATH="$PATH:tools:tools/dtc/" make %{?_smp_mflags} EXTRAVERSION=`echo %{vcs} | sed 's/.*u-boot.*#\(.\{9\}\).*/-g\1-TIZEN.org/'` # Generate uboot.env -cp `find ./env -name "built-in.o"` copy_env_common.o -objcopy -O binary --only-section=.rodata.default_environment `find . -name "copy_env_common.o"` -tr '\0' '\n' < copy_env_common.o > default_envs.txt +./scripts/get_default_envs.sh > default_envs.txt mkenvimage -s 16384 -o uboot.env default_envs.txt -rm copy_env_common.o default_envs.txt +rm default_envs.txt # Build boot.scr mkimage -A arm -T script -C none -n "Tizen RPI4 u-boot helper" -d ./tizen/bootscript/tizen-boot-rpi4.scr ./boot.scr.uimg diff --git a/packaging/u-boot-rpi4.spec b/packaging/u-boot-rpi4.spec index 38bab34..ed0c7d5 100644 --- a/packaging/u-boot-rpi4.spec +++ b/packaging/u-boot-rpi4.spec @@ -43,11 +43,9 @@ export PATH="$PATH:tools:tools/dtc/" make %{?_smp_mflags} EXTRAVERSION=`echo %{vcs} | sed 's/.*u-boot.*#\(.\{9\}\).*/-g\1-TIZEN.org/'` # Generate uboot.env -cp `find ./env -name "built-in.o"` copy_env_common.o -objcopy -O binary --only-section=.rodata.default_environment `find . -name "copy_env_common.o"` -tr '\0' '\n' < copy_env_common.o > default_envs.txt +./scripts/get_default_envs.sh > default_envs.txt mkenvimage -s 16384 -o uboot.env default_envs.txt -rm copy_env_common.o default_envs.txt +rm default_envs.txt # Build boot.scr mkimage -A arm64 -T script -C none -n "Tizen RPI4 u-boot helper" -d ./tizen/bootscript/tizen-boot-rpi4.scr ./boot.scr.uimg diff --git a/tizen/build-amlogic.sh b/tizen/build-amlogic.sh index a4bf923..c8d651d 100755 --- a/tizen/build-amlogic.sh +++ b/tizen/build-amlogic.sh @@ -85,11 +85,9 @@ build_uboot() } generate_param() { - cp `find ./env -name "built-in.o"` copy_env_common.o - ${CROSS_COMPILE}objcopy -O binary --only-section=.rodata.default_environment `find . -name "copy_env_common.o"` - tr '\0' '\n' < copy_env_common.o > default_envs.txt + CROSS_COMPILE="$CROSS_COMPILE" ./scripts/get_default_envs.sh > default_envs.txt ./tools/mkenvimage -s 16384 -o params.bin default_envs.txt - rm copy_env_common.o default_envs.txt + rm default_envs.txt } build_amlogic() -- 2.7.4