summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaehoon Chung <jh80.chung@samsung.com>2017-04-20 12:42:46 +0900
committerJaehoon Chung <jh80.chung@samsung.com>2017-04-21 12:10:27 +0900
commit6df73267e54e0063baeafa307bda45cc3208cf32 (patch)
treedf8a2986a7512a12bdff745f804b0c1ec1994b3e
parentac57570eaa6dba2b70cf57679306b75bb123c1cd (diff)
downloadu-boot-6df73267e54e0063baeafa307bda45cc3208cf32.tar.gz
u-boot-6df73267e54e0063baeafa307bda45cc3208cf32.tar.bz2
u-boot-6df73267e54e0063baeafa307bda45cc3208cf32.zip
To build the u-boot for rpi3, add the u-boot-rpi3 spec file. This spec file should be built to arm64 processor. Change-Id: I0088cf6a58169e84034a321fdf0ee99904bce997 Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
-rw-r--r--packaging/u-boot-rpi3.spec96
-rw-r--r--packaging/u_boot_rpi3.manifest5
2 files changed, 101 insertions, 0 deletions
diff --git a/packaging/u-boot-rpi3.spec b/packaging/u-boot-rpi3.spec
new file mode 100644
index 0000000000..d8860b56c5
--- /dev/null
+++ b/packaging/u-boot-rpi3.spec
@@ -0,0 +1,96 @@
+Name: u-boot-rpi3
+Version: 2017.03
+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_rpi3.manifest
+
+BuildRequires: gcc >= 4.8
+BuildRequires: flex
+BuildRequires: bison
+
+%description
+u-boot - Tizen bootloader for RPI3 boards based
+
+%package -n u-boot-tools
+Summary: Companion tools for Das U-Boot bootloader
+Group: System/Kernel
+Provides: dtc
+
+%description -n u-boot-tools
+This package includes the mkimage program, which allows generation of U-Boot
+images in various formats, and the fw_printenv and fw_setenv programs to read
+and modify U-Boot's environment.
+
+
+%prep
+%setup -q -n u-boot-%{version}
+
+%build
+cp %{SOURCE1001} .
+
+CONFIG=rpi_3_defconfig
+
+make mrproper
+
+# Build dtc
+make HOSTCC="gcc $RPM_OPT_FLAGS" -C tools/dtc
+
+# Set configuration
+make $CONFIG
+
+# Build tools
+make %{?_smp_mflags} HOSTCC="gcc $RPM_OPT_FLAGS" HOSTSTRIP=/bin/true tools
+
+make HOSTCC="gcc $RPM_OPT_FLAGS" env
+
+# Build u-boot
+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 . -name "env_common.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 uboot.env default_envs.txt
+rm copy_env_common.o default_envs.txt
+
+# Build boot.scr
+mkimage -A arm64 -T script -C none -n "Tizen RPI3 u-boot helper" -d ./board/raspberrypi/rpi/tizen-boot.scr ./boot.scr.uimg
+
+%install
+rm -rf %{buildroot}
+
+# Tools installation
+mkdir -p %{buildroot}%{_bindir}
+install -p -m 0755 tools/mkimage %{buildroot}%{_bindir}
+install -p -m 0755 tools/env/fw_printenv %{buildroot}%{_bindir}
+install -p -m 0755 tools/dtc/dtc %{buildroot}%{_bindir}
+( cd %{buildroot}%{_bindir}; ln -sf fw_printenv fw_setenv )
+
+# u-boot installation
+mkdir -p %{buildroot}/boot
+install -m 755 u-boot.bin %{buildroot}/boot/
+install -m 755 uboot.env %{buildroot}/boot/
+install -m 755 boot.scr.uimg %{buildroot}/boot/
+
+%clean
+
+%files
+%manifest u_boot_rpi3.manifest
+%defattr(-,root,root,-)
+/boot/u-boot.bin
+/boot/uboot.env
+/boot/boot.scr.uimg
+
+%files -n u-boot-tools
+%manifest u_boot_rpi3.manifest
+%defattr(-,root,root,-)
+%{_bindir}/mkimage
+%{_bindir}/fw_printenv
+%{_bindir}/fw_setenv
+%{_bindir}/dtc
diff --git a/packaging/u_boot_rpi3.manifest b/packaging/u_boot_rpi3.manifest
new file mode 100644
index 0000000000..017d22d3af
--- /dev/null
+++ b/packaging/u_boot_rpi3.manifest
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+ <domain name="_"/>
+ </request>
+</manifest>