1 # This file is part of the OpenADK project. OpenADK is copyrighted
2 # material, please see the LICENCE file in the top-level directory.
4 include $(ADK_TOPDIR
)/rules.mk
5 include $(ADK_TOPDIR
)/mk
/kernel-build.mk
6 include $(ADK_TOPDIR
)/mk
/image.mk
8 OSTRIP
:=-R .reginfo
-R .notes
-R .note
-R .comment
-R .mdebug
9 OSTRIP
+=-R .note.gnu.build-id
-K sun4u_init
-K _end
-K _start
11 ifeq ($(ADK_TARGET_KERNEL_ZIMAGE
),y
)
12 KERNEL
:=$(LINUX_DIR
)/arch
/sparc
/boot
/zImage
14 KERNEL
:=$(LINUX_DIR
)/vmlinux
18 QEMU_ARGS
+=${ADK_QEMU_ARGS}
19 ifeq ($(ADK_TARGET_FS
),archive
)
20 QEMU_ARGS
+=-append
"root=/dev/sda1"
24 ifeq ($(ADK_TARGET_FS
),archive
)
26 @echo
"The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
27 ifeq ($(ADK_TARGET_QEMU
),y
)
28 @echo
'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
29 @echo
"Use following command to create a QEMU Image:"
30 @echo
"./scripts/create.sh qemu-${ADK_TARGET_CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
31 @echo
"Start qemu with following options:"
32 @echo
'qemu-system-${ADK_TARGET_CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) qemu-${ADK_TARGET_CPU_ARCH}.img'
35 ifeq ($(ADK_TARGET_FS
),initramfs
)
37 @echo
'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
38 @echo
'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
39 ifeq ($(ADK_TARGET_QEMU
),y
)
40 @echo
"Start qemu with following command line:"
41 @echo
'qemu-system-${ADK_TARGET_CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
44 ifeq ($(ADK_TARGET_FS
),initramfsarchive
)
46 @echo
'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
47 @echo
"The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
49 ifeq ($(ADK_TARGET_FS
),initramfspiggyback
)
51 @echo
'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
52 ifeq ($(ADK_TARGET_QEMU
),y
)
53 @echo
"Start qemu with following command line:"
54 @echo
'qemu-system-${ADK_TARGET_CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL)'
57 ifeq ($(ADK_TARGET_FS
),nfsroot
)
59 @echo
'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
60 @echo
'The nfs root tarball is: ${FW_DIR}/${ROOTFSUSERTARBALL}'
63 # image creation and kernel install
65 cp
$(KERNEL
) $(BUILD_DIR
)/$(TARGET_KERNEL
)
66 $(TARGET_CROSS
)objcopy
$(OSTRIP
) -S
$(KERNEL
) $(BUILD_DIR
)/$(TARGET_KERNEL
)
68 kernel-install
: kernel-strip
69 ifeq ($(ADK_TARGET_SYSTEM_SUN_VOYAGER
),y
)
70 PATH
='$(HOST_PATH)' elftoaout
-o
$(FW_DIR
)/$(TARGET_KERNEL
) $(KERNEL
)
72 @cp
$(BUILD_DIR
)/$(TARGET_KERNEL
) $(FW_DIR
)/$(TARGET_KERNEL
)
75 # filesystem specific targets
76 ifeq ($(ADK_TARGET_FS
),archive
)
77 imageinstall
: $(FW_DIR
)/$(ROOTFSTARBALL
) targethelp
79 ifeq ($(ADK_TARGET_FS
),initramfs
)
80 imageinstall
: kernel-install
$(FW_DIR
)/$(INITRAMFS
) targethelp
82 ifeq ($(ADK_TARGET_FS
),initramfsarchive
)
83 imageinstall
: kernel-install
$(FW_DIR
)/$(ROOTFSUSERTARBALL
) targethelp
85 ifeq ($(ADK_TARGET_FS
),initramfspiggyback
)
86 imageinstall
: createinitramfs targethelp
88 ifeq ($(ADK_TARGET_FS
),nfsroot
)
89 imageinstall
: kernel-install
$(FW_DIR
)/$(ROOTFSUSERTARBALL
) targethelp