when OpenADK nfsroot is used for Gentoo installation, /dev/fd is required
[openadk.git] / target / alpha / Makefile
blob0d3b4f873f625a0235fbe2b4a2f1a1888c04c3cb
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 KERNEL:=$(LINUX_DIR)/vmlinux
9 ifeq ($(ADK_TARGET_SYSTEM_DEC_MULTIA),y)
10 KERNEL:=$(LINUX_DIR)/arch/alpha/boot/bootpfile
11 endif
13 QEMU_ARGS:=-monitor null
14 QEMU_ARGS+=${ADK_QEMU_ARGS}
16 ifeq ($(ADK_TARGET_QEMU_WITH_BLOCK),y)
17 QEMU_ARGS+=-drive file=qemu-alpha.img,format=raw -append "root=/dev/hda1"
18 endif
20 # target helper text
21 ifeq ($(ADK_TARGET_FS),archive)
22 targethelp:
23 @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
24 ifeq ($(ADK_TARGET_QEMU),y)
25 @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
26 @echo "Use following command to create a QEMU Image:"
27 @echo "./scripts/create.sh qemu-${ADK_TARGET_CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
28 @echo "Start qemu with following options:"
29 @echo 'qemu-system-${ADK_TARGET_CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL)'
30 endif
31 endif
32 ifeq ($(ADK_TARGET_FS),initramfs)
33 targethelp:
34 @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
35 @echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
36 ifeq ($(ADK_TARGET_QEMU),y)
37 @echo "Start qemu with following command line:"
38 @echo 'qemu-system-${ADK_TARGET_CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
39 endif
40 endif
41 ifeq ($(ADK_TARGET_FS),initramfsarchive)
42 targethelp:
43 @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
44 @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
45 endif
46 ifeq ($(ADK_TARGET_FS),initramfspiggyback)
47 targethelp:
48 @echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
49 ifeq ($(ADK_TARGET_QEMU),y)
50 @echo "Start qemu with following command line:"
51 @echo 'qemu-system-${ADK_TARGET_CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL)'
52 endif
53 endif
54 ifeq ($(ADK_TARGET_FS),nfsroot)
55 targethelp:
56 @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
57 @echo 'The nfs root tarball is: ${FW_DIR}/${ROOTFSUSERTARBALL}'
58 ifeq ($(ADK_TARGET_SYSTEM_DEC_MULTIA),y)
59 @echo 'The SRM console uses 9600 baud'
60 @echo 'To netboot the Dec multia type following in SRM console:'
61 @echo '>>>boot ewa0 -protocols bootp -fl "root=/dev/nfs ip=dhcp"'
62 endif
63 endif
65 # image creation and kernel install
66 kernel-strip:
67 ifeq ($(ADK_TARGET_SYSTEM_DEC_MULTIA),y)
68 cp $(KERNEL) $(BUILD_DIR)/${TARGET_KERNEL}
69 else
70 $(TARGET_CROSS)objcopy $(OSTRIP) -S $(KERNEL) $(BUILD_DIR)/$(TARGET_KERNEL)
71 endif
73 kernel-install: kernel-strip
74 cp $(BUILD_DIR)/$(TARGET_KERNEL) $(FW_DIR)/${TARGET_KERNEL}
76 # filesystem specific targets
77 ifeq ($(ADK_TARGET_FS),archive)
78 imageinstall: $(FW_DIR)/$(ROOTFSTARBALL) targethelp
79 endif
80 ifeq ($(ADK_TARGET_FS),initramfs)
81 imageinstall: kernel-install $(FW_DIR)/$(INITRAMFS) targethelp
82 endif
83 ifeq ($(ADK_TARGET_FS),initramfsarchive)
84 imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
85 endif
86 ifeq ($(ADK_TARGET_FS),initramfspiggyback)
87 imageinstall: createinitramfs targethelp
88 endif
89 ifeq ($(ADK_TARGET_FS),nfsroot)
90 imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
91 endif