For x86_64 host local build, this patch adds prebuilt mkimage from
u-boot and local build script files uses the prebuilt mkimage as
host architecture. The mkimage requires dtc also, but it is already
in scripts/dtc and built as host tool during kernel build,so dtc is
not required prebuilt files.
Change-Id: Id3f734ee39cc1e639bcaff2a7e49ad6d6c66665a
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
exit 1
fi
+HOST_ARCH=`uname -m`
+if [ "$HOST_ARCH" == "x86_64" ]; then
+ cp tools/mkimage.x86_64 tools/mkimage
+elif [ "$HOST_ARCH" == "i586" ] || [ "$HOST_ARCH" == "i686" ]; then
+ cp tools/mkimage.i686 tools/mkimage
+else
+ echo "Unknow HOST architecture, u-boot-tools, mkimage is required!"
+fi
+
# create fit style image from its
-PATH=tools:$PATH tools/mkimage -f arch/arm64/boot/tizen-tm2.its output/kernel.img
+PATH=scripts/dtc:$PATH tools/mkimage -f arch/arm64/boot/tizen-tm2.its output/kernel.img
# Check kernel version from Makefile
_major_version=`cat Makefile | grep "^VERSION = " | awk '{print $3}'`
rm -rf vmlinux*
rm -rf kernel.img
rm -rf uapi-headers
-rm -f tools/mkbootimg tools/dtc
+rm -f tools/mkimage*
find %{_builddir}/linux-kernel-%{version} -name ".tmp_vmlinux*" -exec rm -f {} \;
find %{_builddir}/linux-kernel-%{version} -name ".gitignore" -exec rm -f {} \;
find %{_builddir}/linux-kernel-%{version} -name "\.*dtb*tmp" -exec rm -f {} \;