Add a spec file for all amlogic boards.
- It will be provided u-boot-{n2,c4,vim3,vim3l} packages
- Remove each spec files
Change-Id: Ic4f8ab6f5608fbe8606fdc3cca591e53c7bdfe18
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
--- /dev/null
+%define TARGET_VIM3 khadas-vim3
+%define TARGET_VIM3L khadas-vim3l
+%define TARGET_ODROID_N2 odroid-n2
+%define TARGET_ODROID_C4 odroid-c4
+
+Name: u-boot-amlogic
+Version: 2020.10
+Release: 0
+Summary: Das U-Boot - Tizen bootloader
+Group: System/Kernel
+License: GPL-2.0+
+ExclusiveArch: aarch64
+URL: http://git.denx.de/u-boot.git
+Source0: u-boot-%{version}.tar.bz2
+Source1001: u_boot_amlogic.manifest
+
+BuildRequires: gcc >= 6.0
+BuildRequires: flex
+BuildRequires: bison
+
+%description
+u-boot - Tizen bootloader for Embedded boards based on ARM processor
+
+%package -n u-boot-amlogic-common
+Summary: U-boot Amlogic Common Files
+Group: System/Kernel
+License: GPL-2.0+
+
+%description -n u-boot-amlogic-common
+u-boot-amlogic-common - Tizen Amlogic Boot Script, Tizen Logo Image, and common files
+
+%package -n u-boot-c4
+Summary: Das U-Boot - Tizen bootloader
+Group: System/Kernel
+License: GPL-2.0+
+Requires: u-boot-amlogic-common
+
+%description -n u-boot-c4
+u-boot-c4 - Tizen bootloader for Embedded boards based on ARM processor
+
+%package -n u-boot-n2
+Summary: Das U-Boot - Tizen bootloader
+Group: System/Kernel
+License: GPL-2.0+
+Requires: u-boot-amlogic-common
+
+%description -n u-boot-n2
+u-boot-n2 - Tizen bootloader for Embedded boards based on ARM processor
+
+%package -n u-boot-vim3
+Summary: Das U-Boot - Tizen bootloader
+Group: System/Kernel
+License: GPL-2.0+
+Requires: u-boot-amlogic-common
+
+%description -n u-boot-vim3
+u-boot-vim3 - Tizen bootloader for Embedded boards based on ARM processor
+
+%package -n u-boot-vim3l
+Summary: Das U-Boot - Tizen bootloader
+Group: System/Kernel
+License: GPL-2.0+
+Requires: u-boot-amlogic-common
+
+%description -n u-boot-vim3l
+u-boot-vim3l - Tizen bootloader for Embedded boards based on ARM processor
+
+%define TARGETS %{TARGET_VIM3} %{TARGET_VIM3L} %{TARGET_ODROID_N2} %{TARGET_ODROID_C4}
+
+%prep
+%setup -q -n u-boot-%{version}
+
+%build
+%{?asan:/usr/bin/gcc-unforce-options}
+cp %{SOURCE1001} .
+
+for i in %{TARGETS}; do
+ target=$i
+ case $target in
+ odroid-n2)
+ FIP=fip/n2
+ ENCRYPT=fip/aml_encrypt_g12b
+ OUTPUT_BIN=u-boot-n2.bin
+ PARAMS=params-n2.bin
+ ;;
+ odroid-c4)
+ FIP=fip/c4
+ ENCRYPT=fip/aml_encrypt_g12a
+ OUTPUT_BIN=u-boot-c4.bin
+ PARAMS=params-c4.bin
+ ;;
+ khadas-vim3)
+ FIP=fip/kvim3
+ ENCRYPT=fip/aml_encrypt_g12b
+ OUTPUT_BIN=u-boot-vim3.bin
+ PARAMS=params-vim3.bin
+ ;;
+ khadas-vim3l)
+ FIP=fip/kvim3l
+ ENCRYPT=fip/aml_encrypt_g12a
+ OUTPUT_BIN=u-boot-vim3l.bin
+ PARAMS=params-vim3l.bin
+ ;;
+ esac
+ # Make directory
+ mkdir -p %{_builddir}/${target}
+
+ ## 1. Build ##
+ # 1-0. Clean
+ make mrproper
+
+ # 1-1. Build dtc
+ make HOSTCC="gcc $RPM_OPT_FLAGS" -C tools/dtc
+
+ # 1-2. Set configuration
+ make ${target}_defconfig
+
+ # 1-3. Build tools
+ make %{?_smp_mflags} HOSTCC="gcc $RPM_OPT_FLAGS" HOSTSTRIP=/bin/true tools
+
+ make HOSTCC="gcc $RPM_OPT_FLAGS" envtools
+
+ # 1-4. Build u-boot
+ export PATH="$PATH:tools:tools/dtc/"
+ make %{?_smp_mflags} EXTRAVERSION=`echo %{vcs} | sed 's/.*u-boot.*#\(.\{9\}\).*/-g\1-TIZEN.org/'`
+
+ # 1-5. Encryption
+ chmod +x ${ENCRYPT}
+ ${ENCRYPT} --bl3sig --input u-boot.bin --compress lz4 \
+ --output ${FIP}/bl33.bin.enc \
+ --level v3 --type bl33 --compress lz4
+ ${ENCRYPT} --bootmk \
+ --output %{_builddir}/${target}/${OUTPUT_BIN} \
+ --bl2 ${FIP}/bl2.n.bin.sig \
+ --bl30 ${FIP}/bl30_new.bin.enc \
+ --bl31 ${FIP}/bl31.img.enc \
+ --bl33 ${FIP}/bl33.bin.enc \
+ --ddrfw1 ${FIP}/ddr4_1d.fw \
+ --ddrfw2 ${FIP}/ddr4_2d.fw \
+ --ddrfw3 ${FIP}/ddr3_1d.fw \
+ --ddrfw4 ${FIP}/piei.fw \
+ --ddrfw5 ${FIP}/lpddr4_1d.fw \
+ --ddrfw6 ${FIP}/lpddr4_2d.fw \
+ --ddrfw7 ${FIP}/diag_lpddr4.fw \
+ --ddrfw8 ${FIP}/aml_ddr.fw \
+ --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
+ mkenvimage -s 16384 -o ${PARAMS} default_envs.txt
+ rm copy_env_common.o default_envs.txt
+done
+
+# 1-7. Build Boot script
+mkimage -A arm64 -T script -C none -n "Tizen Amlogic u-boot helper" -d ./tizen/bootscript/tizen-boot-amlogic-64b.scr ./boot.scr.uimg
+
+%install
+rm -rf %{buildroot}
+
+# 2. u-boot installation
+
+mkdir -p %{buildroot}/boot
+mkdir -p %{buildroot}/var/tmp/u-boot-amlogic
+install -d %{buildroot}/var/tmp/u-boot-amlogic
+
+for i in %{TARGETS}; do
+ target=$i
+ case $target in
+ odroid-n2)
+ OUTPUT_BIN=u-boot-n2.bin
+ PARAMS=params-n2.bin
+ ;;
+ odroid-c4)
+ OUTPUT_BIN=u-boot-c4.bin
+ PARAMS=params-c4.bin
+ ;;
+ khadas-vim3)
+ OUTPUT_BIN=u-boot-vim3.bin
+ PARAMS=params-vim3.bin
+ ;;
+ khadas-vim3l)
+ OUTPUT_BIN=u-boot-vim3l.bin
+ PARAMS=params-vim3l.bin
+ ;;
+ esac
+
+ install -m 755 %{_builddir}/$target/$OUTPUT_BIN %{buildroot}/var/tmp/u-boot-amlogic
+ install -m 755 $PARAMS %{buildroot}/boot
+done
+
+install -m 755 boot.scr.uimg %{buildroot}/boot
+install -m 755 images/tizen_logo.bmp.gz %{buildroot}/boot
+
+%clean
+rm -rf %{_builddir}
+
+%files -n u-boot-amlogic-common
+%manifest u_boot_amlogic.manifest
+%defattr(-,root,root,-)
+/boot/boot.scr.uimg
+/boot/tizen_logo.bmp.gz
+
+%files -n u-boot-c4
+%manifest u_boot_amlogic.manifest
+%defattr(-,root,root,-)
+/var/tmp/u-boot-amlogic/u-boot-c4.bin
+/boot/params-c4.bin
+
+%files -n u-boot-n2
+%manifest u_boot_amlogic.manifest
+%defattr(-,root,root,-)
+/var/tmp/u-boot-amlogic/u-boot-n2.bin
+/boot/params-n2.bin
+
+%files -n u-boot-vim3
+%manifest u_boot_amlogic.manifest
+%defattr(-,root,root,-)
+/var/tmp/u-boot-amlogic/u-boot-vim3.bin
+/boot/params-vim3.bin
+
+%files -n u-boot-vim3l
+%manifest u_boot_amlogic.manifest
+%defattr(-,root,root,-)
+/var/tmp/u-boot-amlogic/u-boot-vim3l.bin
+/boot/params-vim3l.bin
+++ /dev/null
-Name: u-boot-c4
-Version: 2020.10
-Release: 0
-Summary: Das U-Boot - Tizen bootloader
-Group: System/Kernel
-License: GPL-2.0+
-ExclusiveArch: aarch64
-URL: http://git.denx.de/u-boot.git
-Source0: u-boot-%{version}.tar.bz2
-Source1001: u_boot_amlogic.manifest
-
-Requires(post): coreutils
-BuildRequires: gcc >= 6.0
-BuildRequires: flex
-BuildRequires: bison
-
-%description
-u-boot - Tizen bootloader for Embedded boards based on ARM processor
-
-%prep
-%setup -q -n u-boot-%{version}
-
-%build
-%{?asan:/usr/bin/gcc-unforce-options}
-cp %{SOURCE1001} .
-
-## 1. ODROID-c4 Build ##
-make mrproper
-
-# 1-1. Build dtc
-make HOSTCC="gcc $RPM_OPT_FLAGS" -C tools/dtc
-
-# 1-2. Set configuration
-make odroid-c4_defconfig
-
-# 1-3. Build tools
-make %{?_smp_mflags} HOSTCC="gcc $RPM_OPT_FLAGS" HOSTSTRIP=/bin/true tools
-
-make HOSTCC="gcc $RPM_OPT_FLAGS" envtools
-
-# 1-4. Build u-boot
-export PATH="$PATH:tools:tools/dtc/"
-make %{?_smp_mflags} EXTRAVERSION=`echo %{vcs} | sed 's/.*u-boot.*#\(.\{9\}\).*/-g\1-TIZEN.org/'`
-
-# 1-5. Encryption
-chmod +x ./fip/aml_encrypt_g12a
-./fip/aml_encrypt_g12a --bl3sig --input u-boot.bin --compress lz4 \
- --output fip/c4/bl33.bin.enc \
- --level v3 --type bl33 --compress lz4
-./fip/aml_encrypt_g12a --bootmk \
- --output u-boot-c4.bin \
- --bl2 fip/c4/bl2.n.bin.sig \
- --bl30 fip/c4/bl30_new.bin.enc \
- --bl31 fip/c4/bl31.img.enc \
- --bl33 fip/c4/bl33.bin.enc \
- --ddrfw1 fip/c4/ddr4_1d.fw \
- --ddrfw2 fip/c4/ddr4_2d.fw \
- --ddrfw3 fip/c4/ddr3_1d.fw \
- --ddrfw4 fip/c4/piei.fw \
- --ddrfw5 fip/c4/lpddr4_1d.fw \
- --ddrfw6 fip/c4/lpddr4_2d.fw \
- --ddrfw7 fip/c4/diag_lpddr4.fw \
- --ddrfw8 fip/c4/aml_ddr.fw \
- --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
-mkenvimage -s 16384 -o params-c4.bin default_envs.txt
-rm copy_env_common.o default_envs.txt
-
-# 1-7. Build Boot script
-mkimage -A arm64 -T script -C none -n "Tizen ODROID-c4 u-boot helper" -d ./tizen/bootscript/tizen-boot-amlogic-64b.scr ./boot.scr.uimg.c4
-
-
-%install
-rm -rf %{buildroot}
-
-# 1-8. u-boot installation
-mkdir -p %{buildroot}/boot/odroid-c4
-mkdir -p %{buildroot}/var/tmp/u-boot-amlogic
-install -d %{buildroot}/var/tmp/u-boot-amlogic
-install -m 755 u-boot-c4.bin %{buildroot}/var/tmp/u-boot-amlogic
-install -m 755 params-c4.bin %{buildroot}/boot
-install -m 755 boot.scr.uimg.c4 %{buildroot}/boot/
-
-%post
-mv /boot/boot.scr.uimg.c4 /boot/boot.scr.uimg
-
-%clean
-
-%files
-%manifest u_boot_amlogic.manifest
-%defattr(-,root,root,-)
-/var/tmp/u-boot-amlogic
-/boot/params-c4.bin
-/boot/boot.scr.uimg.c4
+++ /dev/null
-Name: u-boot-n2
-Version: 2020.10
-Release: 0
-Summary: Das U-Boot - Tizen bootloader
-Group: System/Kernel
-License: GPL-2.0+
-ExclusiveArch: aarch64
-URL: http://git.denx.de/u-boot.git
-Source0: u-boot-%{version}.tar.bz2
-Source1001: u_boot_amlogic.manifest
-
-Requires(post): coreutils
-BuildRequires: gcc >= 6.0
-BuildRequires: flex
-BuildRequires: bison
-
-%description
-u-boot - Tizen bootloader for Embedded boards based on ARM processor
-
-%prep
-%setup -q -n u-boot-%{version}
-
-%build
-%{?asan:/usr/bin/gcc-unforce-options}
-cp %{SOURCE1001} .
-
-## 1. ODROID-N2 Build ##
-make mrproper
-
-# 1-1. Build dtc
-make HOSTCC="gcc $RPM_OPT_FLAGS" -C tools/dtc
-
-# 1-2. Set configuration
-make odroid-n2_defconfig
-
-# 1-3. Build tools
-make %{?_smp_mflags} HOSTCC="gcc $RPM_OPT_FLAGS" HOSTSTRIP=/bin/true tools
-
-make HOSTCC="gcc $RPM_OPT_FLAGS" envtools
-
-# 1-4. Build u-boot
-export PATH="$PATH:tools:tools/dtc/"
-make %{?_smp_mflags} EXTRAVERSION=`echo %{vcs} | sed 's/.*u-boot.*#\(.\{9\}\).*/-g\1-TIZEN.org/'`
-
-# 1-5. Encryption
-chmod +x ./fip/aml_encrypt_g12b
-./fip/aml_encrypt_g12b --bl3sig --input u-boot.bin --compress lz4 \
- --output fip/n2/bl33.bin.enc \
- --level v3 --type bl33 --compress lz4
-./fip/aml_encrypt_g12b --bootmk \
- --output u-boot-n2.bin \
- --bl2 fip/n2/bl2.n.bin.sig \
- --bl30 fip/n2/bl30_new.bin.enc \
- --bl31 fip/n2/bl31.img.enc \
- --bl33 fip/n2/bl33.bin.enc \
- --ddrfw1 fip/n2/ddr4_1d.fw \
- --ddrfw2 fip/n2/ddr4_2d.fw \
- --ddrfw3 fip/n2/ddr3_1d.fw \
- --ddrfw4 fip/n2/piei.fw \
- --ddrfw5 fip/n2/lpddr4_1d.fw \
- --ddrfw6 fip/n2/lpddr4_2d.fw \
- --ddrfw7 fip/n2/diag_lpddr4.fw \
- --ddrfw8 fip/n2/aml_ddr.fw \
- --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
-mkenvimage -s 16384 -o params-n2.bin default_envs.txt
-rm copy_env_common.o default_envs.txt
-
-# 1-7. Build Boot script
-mkimage -A arm64 -T script -C none -n "Tizen ODROID-N2 u-boot helper" -d ./tizen/bootscript/tizen-boot-amlogic-64b.scr ./boot.scr.uimg.n2
-
-
-%install
-rm -rf %{buildroot}
-
-# 1-8. u-boot installation
-mkdir -p %{buildroot}/boot/odroid-n2
-mkdir -p %{buildroot}/var/tmp/u-boot-amlogic
-install -d %{buildroot}/var/tmp/u-boot-amlogic
-install -m 755 u-boot-n2.bin %{buildroot}/var/tmp/u-boot-amlogic
-install -m 755 params-n2.bin %{buildroot}/boot
-install -m 755 boot.scr.uimg.n2 %{buildroot}/boot/
-
-%post
-mv /boot/boot.scr.uimg.n2 /boot/boot.scr.uimg
-
-%clean
-
-%files
-%manifest u_boot_amlogic.manifest
-%defattr(-,root,root,-)
-/var/tmp/u-boot-amlogic
-/boot/params-n2.bin
-/boot/boot.scr.uimg.n2
+++ /dev/null
-Name: u-boot-vim3
-Version: 2020.10
-Release: 0
-Summary: Das U-Boot - Tizen bootloader
-Group: System/Kernel
-License: GPL-2.0+
-ExclusiveArch: aarch64
-URL: http://git.denx.de/u-boot.git
-Source0: u-boot-%{version}.tar.bz2
-Source1001: u_boot_amlogic.manifest
-
-Requires(post): coreutils
-BuildRequires: gcc >= 6.0
-BuildRequires: flex
-BuildRequires: bison
-
-%description
-u-boot - Tizen bootloader for Embedded boards based on ARM processor
-
-%prep
-%setup -q -n u-boot-%{version}
-
-%build
-%{?asan:/usr/bin/gcc-unforce-options}
-cp %{SOURCE1001} .
-
-## VIM3 Build ##
-make mrproper
-
-# Build dtc
-make HOSTCC="gcc $RPM_OPT_FLAGS" -C tools/dtc
-
-# Set configuration
-make khadas-vim3_defconfig
-
-# Build tools
-make %{?_smp_mflags} HOSTCC="gcc $RPM_OPT_FLAGS" HOSTSTRIP=/bin/true tools
-
-make HOSTCC="gcc $RPM_OPT_FLAGS" envtools
-
-# Build u-boot
-export PATH="$PATH:tools:tools/dtc/"
-make %{?_smp_mflags} EXTRAVERSION=`echo %{vcs} | sed 's/.*u-boot.*#\(.\{9\}\).*/-g\1-TIZEN.org/'`
-
-# Encryption
-chmod +x ./fip/aml_encrypt_g12b
-./fip/aml_encrypt_g12b --bl3sig --input u-boot.bin --compress lz4 \
- --output fip/kvim3/bl33.bin.enc \
- --level v3 --type bl33 --compress lz4
-./fip/aml_encrypt_g12b --bootmk \
- --output u-boot-vim3.bin \
- --bl2 fip/kvim3/bl2.n.bin.sig \
- --bl30 fip/kvim3/bl30_new.bin.enc \
- --bl31 fip/kvim3/bl31.img.enc \
- --bl33 fip/kvim3/bl33.bin.enc \
- --ddrfw1 fip/kvim3/ddr4_1d.fw \
- --ddrfw2 fip/kvim3/ddr4_2d.fw \
- --ddrfw3 fip/kvim3/ddr3_1d.fw \
- --ddrfw4 fip/kvim3/piei.fw \
- --ddrfw5 fip/kvim3/lpddr4_1d.fw \
- --ddrfw6 fip/kvim3/lpddr4_2d.fw \
- --ddrfw7 fip/kvim3/diag_lpddr4.fw \
- --ddrfw8 fip/kvim3/aml_ddr.fw \
- --level v3
-
-# 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
-mkenvimage -s 16384 -o params-vim3.bin default_envs.txt
-rm copy_env_common.o default_envs.txt
-
-# Build Boot script
-mkimage -A arm64 -T script -C none -n "Tizen KVIM3 u-boot helper" -d ./tizen/bootscript/tizen-boot-amlogic-64b.scr ./boot.scr.uimg.vim3
-
-# Splash image
-cp images/tizen_logo.bmp.gz tizen_logo.bmp.gz.vim3
-
-%install
-rm -rf %{buildroot}
-
-# u-boot installation
-mkdir -p %{buildroot}/boot/vim3
-mkdir -p %{buildroot}/var/tmp/u-boot-amlogic
-install -d %{buildroot}/var/tmp/u-boot-amlogic
-install -m 755 u-boot-vim3.bin %{buildroot}/var/tmp/u-boot-amlogic
-install -m 755 params-vim3.bin %{buildroot}/boot
-install -m 755 boot.scr.uimg.vim3 %{buildroot}/boot
-install -m 755 tizen_logo.bmp.gz.vim3 %{buildroot}/boot
-
-%post
-mv /boot/boot.scr.uimg.vim3 /boot/boot.scr.uimg
-mv /boot/tizen_logo.bmp.gz.vim3 /boot/tizen_logo.bmp.gz
-
-%clean
-
-%files
-%manifest u_boot_amlogic.manifest
-%defattr(-,root,root,-)
-/var/tmp/u-boot-amlogic
-/boot/params-vim3.bin
-/boot/boot.scr.uimg.vim3
-/boot/tizen_logo.bmp.gz.vim3
+++ /dev/null
-Name: u-boot-vim3l
-Version: 2020.10
-Release: 0
-Summary: Das U-Boot - Tizen bootloader
-Group: System/Kernel
-License: GPL-2.0+
-ExclusiveArch: aarch64
-URL: http://git.denx.de/u-boot.git
-Source0: u-boot-%{version}.tar.bz2
-Source1001: u_boot_amlogic.manifest
-
-Requires(post): coreutils
-BuildRequires: gcc >= 6.0
-BuildRequires: flex
-BuildRequires: bison
-
-%description
-u-boot - Tizen bootloader for Embedded boards based on ARM processor
-
-%prep
-%setup -q -n u-boot-%{version}
-
-%build
-%{?asan:/usr/bin/gcc-unforce-options}
-cp %{SOURCE1001} .
-
-## vim3l Build ##
-make mrproper
-
-# Build dtc
-make HOSTCC="gcc $RPM_OPT_FLAGS" -C tools/dtc
-
-# Set configuration
-make khadas-vim3l_defconfig
-
-# Build tools
-make %{?_smp_mflags} HOSTCC="gcc $RPM_OPT_FLAGS" HOSTSTRIP=/bin/true tools
-
-make HOSTCC="gcc $RPM_OPT_FLAGS" envtools
-
-# Build u-boot
-export PATH="$PATH:tools:tools/dtc/"
-make %{?_smp_mflags} EXTRAVERSION=`echo %{vcs} | sed 's/.*u-boot.*#\(.\{9\}\).*/-g\1-TIZEN.org/'`
-
-# Encryption
-chmod +x ./fip/aml_encrypt_g12a
-./fip/aml_encrypt_g12a --bl3sig --input u-boot.bin --compress lz4 \
- --output fip/kvim3l/bl33.bin.enc \
- --level v3 --type bl33 --compress lz4
-./fip/aml_encrypt_g12a --bootmk \
- --output u-boot-vim3l.bin \
- --bl2 fip/kvim3l/bl2.n.bin.sig \
- --bl30 fip/kvim3l/bl30_new.bin.enc \
- --bl31 fip/kvim3l/bl31.img.enc \
- --bl33 fip/kvim3l/bl33.bin.enc \
- --ddrfw1 fip/kvim3l/ddr4_1d.fw \
- --ddrfw2 fip/kvim3l/ddr4_2d.fw \
- --ddrfw3 fip/kvim3l/ddr3_1d.fw \
- --ddrfw4 fip/kvim3l/piei.fw \
- --ddrfw5 fip/kvim3l/lpddr4_1d.fw \
- --ddrfw6 fip/kvim3l/lpddr4_2d.fw \
- --ddrfw7 fip/kvim3l/diag_lpddr4.fw \
- --ddrfw8 fip/kvim3l/aml_ddr.fw \
- --level v3
-
-# 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
-mkenvimage -s 16384 -o params-vim3l.bin default_envs.txt
-rm copy_env_common.o default_envs.txt
-
-# Build Boot script
-mkimage -A arm64 -T script -C none -n "Tizen kvim3l u-boot helper" -d ./tizen/bootscript/tizen-boot-amlogic-64b.scr ./boot.scr.uimg.vim3l
-
-# Splash image
-cp images/tizen_logo.bmp.gz tizen_logo.bmp.gz.vim3l
-
-%install
-rm -rf %{buildroot}
-
-# u-boot installation
-mkdir -p %{buildroot}/boot/vim3l
-mkdir -p %{buildroot}/var/tmp/u-boot-amlogic
-install -d %{buildroot}/var/tmp/u-boot-amlogic
-install -m 755 u-boot-vim3l.bin %{buildroot}/var/tmp/u-boot-amlogic
-install -m 755 params-vim3l.bin %{buildroot}/boot
-install -m 755 boot.scr.uimg.vim3l %{buildroot}/boot
-install -m 755 tizen_logo.bmp.gz.vim3l %{buildroot}/boot
-
-%post
-mv /boot/boot.scr.uimg.vim3l /boot/boot.scr.uimg
-mv /boot/tizen_logo.bmp.gz.vim3l /boot/tizen_logo.bmp.gz
-
-%clean
-
-%files
-%manifest u_boot_amlogic.manifest
-%defattr(-,root,root,-)
-/var/tmp/u-boot-amlogic
-/boot/params-vim3l.bin
-/boot/boot.scr.uimg.vim3l
-/boot/tizen_logo.bmp.gz.vim3l