1 Name: u-boot-visionfive2
4 Summary: Das U-Boot - Tizen bootloader
8 URL: https://source.denx.de/u-boot/u-boot.git
9 Source0: u-boot-%{version}.tar.bz2
10 Source1001: u_boot_visionfive2.manifest
12 BuildRequires: gcc >= 6.0
16 BuildRequires: pkgconfig(openssl3)
17 BuildRequires: opensbi
18 BuildRequires: python3-devel
20 BuildRequires: python3-setuptools
23 u-boot - Tizen bootloader for visionfive2 boards based
25 %package -n u-boot-tools
26 Summary: Companion tools for Das U-Boot bootloader
29 %description -n u-boot-tools
30 This package includes the mkimage program, which allows generation of U-Boot
31 images in various formats, and the fw_printenv and fw_setenv programs to read
32 and modify U-Boot's environment.
35 %setup -q -n u-boot-%{version}
38 %{?asan:/usr/bin/gcc-unforce-options}
41 CONFIG=tizen_starfive_visionfive2_defconfig
49 make %{?_smp_mflags} HOSTCC="gcc $RPM_OPT_FLAGS" HOSTSTRIP=/bin/true tools
51 make HOSTCC="gcc $RPM_OPT_FLAGS" envtools
53 # Build Starfive SPL tool and Create SPL Image
54 cd tools/starfive/spl_tool
59 export PATH="$PATH:tools"
60 make OPENSBI=/platform/generic/firmware/fw_dynamic.bin %{?_smp_mflags} EXTRAVERSION=`echo %{vcs} | sed 's/.*u-boot.*#\(.\{9\}\).*/-g\1-TIZEN.org/'`
62 # Build SPL TOOL of StarFive
63 tools/starfive/spl_tool/spl_tool -c -f spl/u-boot-spl.bin
66 ./scripts/get_default_envs.sh > default_envs.txt
67 mkenvimage -s 16384 -o uboot.env default_envs.txt
71 mkimage -A riscv -T script -C none -n "Tizen VisionFive2 Board Script" -d ./tizen/bootscript/tizen-boot-vf2.scr ./boot.scr.uimg
77 mkdir -p %{buildroot}%{_bindir}
78 install -p -m 0755 tools/mkimage %{buildroot}%{_bindir}
79 install -p -m 0755 tools/env/fw_printenv %{buildroot}%{_bindir}
80 install -p -m 0755 scripts/dtc/dtc %{buildroot}%{_bindir}
81 ( cd %{buildroot}%{_bindir}; ln -sf fw_printenv fw_setenv )
84 mkdir -p %{buildroot}/boot
85 mkdir -p %{buildroot}/var/tmp
86 install -m 755 u-boot.itb %{buildroot}/var/tmp/
87 install -m 755 uboot.env %{buildroot}/boot/
88 install -m 755 tizen/bootscript/tizen-boot-vf2-uEnv.txt %{buildroot}/boot/uEnv.txt
89 install -m 755 boot.scr.uimg %{buildroot}/boot/
90 install -m 755 spl/u-boot-spl.bin.normal.out %{buildroot}/var/tmp/
95 %manifest u_boot_visionfive2.manifest
96 %defattr(-,root,root,-)
98 /var/tmp/u-boot-spl.bin.normal.out
103 %files -n u-boot-tools
104 %manifest u_boot_visionfive2.manifest
105 %defattr(-,root,root,-)
107 %{_bindir}/fw_printenv