###############################################################################
name = u-boot
-version = 2011.09
+version = 2013.07
release = 1
sup_arches = armv5tel armv7hl
sources = %{thisapp}.tar.bz2
build
+ requires
+ dtc
+ end
+
build
- while read arch platform target; do
+ while read arch platform targets; do
# Skip all other architectures.
[ "${arch}" = "%{DISTRO_ARCH}" ] || continue
- builddir="$(pwd)/build-${platform}"
- mkdir -p ${builddir}
+ make CROSS_COMPILE="" ${platform}_config
+ make HOSTCC="gcc %{CFLAGS}" CROSS_COMPILE="" all ${targets}
- make O=${builddir} ${platform}_config
- make O=${builddir} ${builddir}/${target}
+ # install
+ installdir="%{BUILDROOT}/usr/lib/%{name}/${platform}"
+ mkdir -pv ${installdir}
+
+ for target in ${targets}; do
+ install -D -m 644 ${target} ${installdir}
+ done
+ if [ -e "MLO" ]; then
+ install -D -m 644 MLO ${installdir}
+ fi
+ for f in spl/*.bin; do
+ [ -e "${f}" ] || continue
+ install -D -m 644 ${f} ${installdir}
+ done
+
+ # Clean out the build environment.
+ make distclean
done < %{DIR_SOURCE}/targets
# Build tools.
end
install
- while read arch platform target; do
- # Skip all other architectures.
- [ "${arch}" = "%{DISTRO_ARCH}" ] || continue
-
- builddir="build-${platform}"
- installdir="%{BUILDROOT}/usr/lib/%{name}/${platform}"
- mkdir -pv ${installdir}
-
- install -D -m 644 ${builddir}/${target} ${installdir}
- install -D -m 644 ${builddir}/u-boot ${installdir}/uboot.elf
- done < %{DIR_SOURCE}/targets
-
# Install tools.
mkdir -pv %{BUILDROOT}/usr/bin %{BUILDROOT}/usr/share/man/man1
install -p -m 0755 tools/mkimage %{BUILDROOT}/usr/bin