summaryrefslogtreecommitdiff
path: root/target/sparc/Makefile
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2015-07-03 18:18:22 -0500
committerWaldemar Brodkorb <wbx@openadk.org>2015-07-03 18:18:22 -0500
commitb5635d2d4442ace639cb649398269533056d8c62 (patch)
treef51e30e153626ec08fa7df5f6d57053be759c00e /target/sparc/Makefile
parentce956d0f964c2a85207f3c81f392b88a7b03cc91 (diff)
use zimage and build kernel without serial drivers, otherwise kernel gets to big for the voyager
Diffstat (limited to 'target/sparc/Makefile')
-rw-r--r--target/sparc/Makefile17
1 files changed, 12 insertions, 5 deletions
diff --git a/target/sparc/Makefile b/target/sparc/Makefile
index f203596cf..0390aa7b9 100644
--- a/target/sparc/Makefile
+++ b/target/sparc/Makefile
@@ -7,11 +7,13 @@ include $(ADK_TOPDIR)/mk/modules.mk
include $(ADK_TOPDIR)/mk/kernel-build.mk
include $(ADK_TOPDIR)/mk/image.mk
+OSTRIP:=-R .reginfo -R .notes -R .note -R .comment -R .mdebug
+OSTRIP+=-R .note.gnu.build-id -K sun4u_init -K _end -K _start
+
ifeq ($(ADK_TARGET_KERNEL_ZIMAGE),y)
KERNEL:=$(LINUX_DIR)/arch/sparc/boot/zImage
-endif
-ifeq ($(ADK_TARGET_KERNEL_VMLINUX_AOUT),y)
-KERNEL:=$(LINUX_DIR)/arch/sparc/boot/vmlinux.aout
+else
+KERNEL:=$(LINUX_DIR)/vmlinux
endif
QEMU_ARGS:=-M SS-10
@@ -62,10 +64,15 @@ endif
# image creation and kernel install
kernel-strip:
+ cp $(KERNEL) $(BUILD_DIR)/$(TARGET_KERNEL)
$(TARGET_CROSS)objcopy $(OSTRIP) -S $(KERNEL) $(BUILD_DIR)/$(TARGET_KERNEL)
-kernel-install: kernel-strip
- @cp $(BUILD_DIR)/$(TARGET_KERNEL) $(FW_DIR)/${TARGET_KERNEL}
+kernel-install:
+ifeq ($(ADK_TARGET_SYSTEM_SUN_VOYAGER),y)
+ PATH='$(HOST_PATH)' elftoaout -o $(FW_DIR)/$(TARGET_KERNEL) $(KERNEL)
+else
+ @cp $(BUILD_DIR)/$(TARGET_KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
+endif
# filesystem specific targets
ifeq ($(ADK_TARGET_FS),archive)