From c2828711882778b6be2899633480b94e487ea20d Mon Sep 17 00:00:00 2001
From: Claudio Fontana <claudio.fontana@huawei.com>
Date: Tue, 13 May 2014 15:26:13 +0200
Subject: [PATCH] aarch64: build.mk: enable real bootfs.bin

we start with only a tst-hello.so.

Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>
---
 build.mk | 28 ++++++++++++++++++++++------
 1 file changed, 22 insertions(+), 6 deletions(-)

diff --git a/build.mk b/build.mk
index 2c4d2a3a7..125541864 100644
--- a/build.mk
+++ b/build.mk
@@ -210,6 +210,9 @@ autodepend = -MD -MT $@ -MP
 
 do-sys-includes = $(foreach inc, $(sys-includes), -isystem $(inc))
 
+ifeq ($(arch),aarch64)
+boost-tests :=
+else
 boost-tests := tests/tst-rename.so
 boost-tests += tests/tst-vfs.so
 boost-tests += tests/tst-libc-locking.so
@@ -225,9 +228,17 @@ boost-tests += tests/tst-bsd-tcp1.so
 boost-tests += tests/tst-async.so
 boost-tests += tests/tst-rcu-list.so
 boost-tests += tests/tst-tcp-listen.so
+endif
 
+ifeq ($(arch),aarch64)
+java_tests :=
+else
 java_tests := tests/hello/Hello.class
+endif
 
+ifeq ($(arch),aarch64)
+tests :=
+else
 tests := tests/tst-pthread.so tests/tst-ramdisk.so
 tests += tests/tst-vblk.so tests/bench/bench.jar tests/reclaim/reclaim.jar
 tests += tests/tst-bsd-evh.so tests/misc-bsd-callout.so
@@ -296,10 +307,15 @@ tests += tests/tst-align.so
 tests += tests/misc-tcp-close-without-reading.so
 tests += tests/tst-sigwait.so
 tests += tests/tst-sampler.so
+endif
 
 tests/hello/Hello.class: javabase=tests/hello
 
-java-targets = java-jars java/java.so
+ifeq ($(arch),aarch64)
+java-targets :=
+else
+java-targets := java-jars java/java.so
+endif
 
 java-jars:
 	$(call quiet, cd $(src)/java && mvn package -q -DskipTests=true, MVN $@)
@@ -311,6 +327,11 @@ tools += tools/route/lsroute.so
 tools += tools/mkfs/mkfs.so
 tools += tools/cpiod/cpiod.so
 
+ifeq ($(arch),aarch64)
+tools += tests/tst-hello.so
+cmdline = tests/tst-hello.so
+endif
+
 ifeq ($(arch),x64)
 
 all: loader.img loader.bin usr.img
@@ -860,17 +881,12 @@ osv.vmdk osv.vdi:
 
 $(jni): INCLUDES += -I /usr/lib/jvm/java/include -I /usr/lib/jvm/java/include/linux/
 
-ifeq ($(arch),aarch64)
-bootfs.bin:
-	touch bootfs.bin
-else
 bootfs.bin: scripts/mkbootfs.py $(java-targets) $(out)/bootfs.manifest $(tests) $(java_tests) $(tools) \
 		tests/testrunner.so \
 		zpool.so zfs.so
 	$(call quiet, $(src)/scripts/mkbootfs.py -o $@ -d $@.d -m $(out)/bootfs.manifest \
 		-D jdkbase=$(jdkbase) -D gccbase=$(gccbase) -D \
 		glibcbase=$(glibcbase) -D miscbase=$(miscbase), MKBOOTFS $@)
-endif
 
 bootfs.o: bootfs.bin
 
-- 
GitLab