1SUMMARY="Boot loader for embedded boards"
2DESCRIPTION="boot loader for embedded boards based on PowerPC, ARM, MIPS and several other \
3processors, which can be installed in a boot ROM and used to \
4initialize and test the hardware or to download and run application code.
5
6The development of U-Boot is closely related to Linux: some parts of \
7the source code originate in the Linux source tree, we have some \
8header files in common, and special provision has been made to \
9support booting of Linux images.
10
11Some attention has been paid to make this software easily \
12configurable and extendable. For instance, all monitor commands are \
13implemented with the same call interface, so that it's very easy to \
14add new commands. Also, instead of permanently adding rarely used \
15code (for instance hardware test utilities) to the monitor, you can \
16load and run it dynamically."
17HOMEPAGE="https://www.denx.de/wiki/U-Boot"
18COPYRIGHT="2000-2024 Wolfgang Denk, DENX Software Engineering"
19LICENSE="GNU GPL v2"
20REVISION="1"
21SOURCE_URI="https://ftp.denx.de/pub/u-boot/u-boot-$portVersion.tar.bz2"
22SOURCE_DIR="u-boot-$portVersion"
23CHECKSUM_SHA256="18a853fe39fad7ad03a90cc2d4275aeaed6da69735defac3492b80508843dd4a"
24PATCHES="u_boot-$portVersion.patchset"
25
26ARCHITECTURES="any"
27
28PROVIDES="
29	u_boot$secondaryArchSuffix = $portVersion
30	"
31REQUIRES="
32	"
33
34# The package is "any" because the result is only binaries. However, on gcc2 systems, we still need
35# to build it using a modern compiler and set of libraries.
36if [ "$targetArchitecture" = x86_gcc2 ]; then
37	hostArchSuffix="_x86"
38else
39	hostArchSuffix="$secondaryArchSuffix"
40fi
41
42BUILD_REQUIRES="
43	haiku${hostArchSuffix}_devel
44	devel:libssl$hostArchSuffix
45	setuptools_python310
46	"
47BUILD_PREREQUIRES="
48	cmd:arm_none_eabi_gcc
49	cmd:awk
50	cmd:bison
51	cmd:cmp
52	cmd:find
53	cmd:flex
54	cmd:gcc$hostArchSuffix
55	cmd:make
56	cmd:python3
57	cmd:swig
58	cmd:xargs
59	"
60
61BUILD()
62{
63	export PATH=/bin/x86:$PATH
64	export HOME=/tmp
65	# TODO figure out how to add more boards. Are out-of-tree builds possible?
66	CROSS_COMPILE=arm-none-eabi- make mk802ii_defconfig
67	CROSS_COMPILE=arm-none-eabi- make $jobArgs
68}
69
70INSTALL()
71{
72	mkdir -p $dataDir/platform_loaders
73	cp u-boot-sunxi-with-spl.bin $dataDir/platform_loaders/
74}
75