summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2014-05-05 16:01:39 (EDT)
committer P. J. McDermott <pj@pehjota.net>2014-05-05 16:13:47 (EDT)
commit12565a0a69c642394391912652cd98d35ad44ed4 (patch)
tree2903afae00a96961a58800c069249d0f57f412a0
parent8516ca3b3703cddea29c724f657f4e5bcb2ba024 (diff)
build: Build and install a Linux image.
-rwxr-xr-xbuild16
1 files changed, 16 insertions, 0 deletions
diff --git a/build b/build
index 1a99618..3482e25 100755
--- a/build
+++ b/build
@@ -2,12 +2,28 @@
include ../source.mk
+KBUILD_ARCH = $$(oh-architecture "$${OPK_HOST_ARCH}")
+
nop:
@:
build:
+ set -e; \
+ if [ 'x$(OPK_HOST_PLAT)' != 'xdev' ]; then \
+ read img_src img_dest <image; \
+ oh-autobuild -T mrproper; \
+ oh-autobuild -T "$${img_src}" -- -j "$${JOBS:-1}"; \
+ fi
install:
+ set -e; \
+ if [ 'x$(OPK_HOST_PLAT)' != 'xdev' ]; then \
+ read img_src img_dest <image; \
+ install -D "src/arch/$${KBUILD_ARCH}/boot/$${img_src}" \
+ linux-image.data/boot/$${img_dest}; \
+ install -D src/System.map \
+ linux-sysmap.data/boot/System.map; \
+ fi
oh-autoinstall -T headers_install -- INSTALL_HDR_PATH="$${PWD}/dest/usr"
find dest/usr/include \
\( -name .install -o -name ..install.cmd \