summaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-05-23 16:31:14 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2014-05-23 16:32:21 +0200
commit65c2ab93616bdf982152a94ab35c2079a5e3a2d7 (patch)
tree95aa163c4c2762647e8dfb1f499236cfcceeb687 /target
parent41c3a26c00f63f880d657aaaa6935015915f275f (diff)
split targethelp from install target
cleanup target/*/Makefile stuff.
Diffstat (limited to 'target')
-rw-r--r--target/aarch64/Makefile40
-rw-r--r--target/arm/Makefile117
-rw-r--r--target/config/Config.in25
-rw-r--r--target/linux/config/Config.in.block1
-rw-r--r--target/linux/config/Config.in.flash19
-rw-r--r--target/linux/config/Config.in.misc3
-rw-r--r--target/m68k/Makefile29
-rw-r--r--target/microblaze/Makefile86
-rw-r--r--target/mips/Makefile163
-rw-r--r--target/ppc/Makefile61
-rw-r--r--target/ppc64/Makefile61
-rw-r--r--target/sh/Makefile44
-rw-r--r--target/sparc/Makefile61
-rw-r--r--target/sparc64/Makefile62
-rw-r--r--target/x86/Makefile103
-rw-r--r--target/x86_64/Makefile100
16 files changed, 548 insertions, 427 deletions
diff --git a/target/aarch64/Makefile b/target/aarch64/Makefile
index d276472fa..1de454020 100644
--- a/target/aarch64/Makefile
+++ b/target/aarch64/Makefile
@@ -9,7 +9,28 @@ include $(TOPDIR)/mk/image.mk
KERNEL:=${LINUX_DIR}/arch/arm64/boot/Image
-kernel-install:
+# target helper text
+ifeq ($(ADK_TARGET_FS),archive)
+targethelp:
+ @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
+endif
+ifeq ($(ADK_TARGET_FS),initramfs)
+targethelp:
+ @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
+ @echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
+endif
+ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
+targethelp:
+ @echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
+ifeq ($(ADK_TARGET_SYSTEM_ARM_FM),y)
+ @echo 'Start emulator via:'
+ @echo 'Foundation_v8 --image=$(FW_DIR)/${TARGET_KERNEL}'
+endif
+endif
+
+kernel-strip:
+
+kernel-install: kernel-strip
cd $(TOPDIR) && \
make -f Makefile \
-C package/boot-wrapper-aarch64 clean
@@ -19,20 +40,13 @@ kernel-install:
${CP} ${LINUX_DIR}/linux-system.axf \
$(FW_DIR)/$(TARGET_KERNEL)
+# filesystem specific targets
ifeq ($(ADK_TARGET_FS),archive)
-imageinstall: $(FW_DIR)/$(ROOTFSTARBALL)
- @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
+imageinstall: $(FW_DIR)/$(ROOTFSTARBALL) targethelp
endif
-ifeq ($(ADK_TARGET_FS),initramfsarchive)
-imageinstall: $(FW_DIR)/$(ROOTFSUSERTARBALL)
- @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
- @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
+ifeq ($(ADK_TARGET_FS),initramfs)
+imageinstall: kernel-install $(FW_DIR)/$(INITRAMFS) targethelp
endif
ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
-imageinstall: createinitramfs kernel-install
- @echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
-ifeq ($(ADK_TARGET_SYSTEM_ARM_FM),y)
- @echo 'Start emulator via:'
- @echo 'Foundation_v8 --image=$(FW_DIR)/${TARGET_KERNEL}'
-endif
+imageinstall: createinitramfs targethelp
endif
diff --git a/target/arm/Makefile b/target/arm/Makefile
index df3f1d72f..cb6b49d79 100644
--- a/target/arm/Makefile
+++ b/target/arm/Makefile
@@ -8,54 +8,38 @@ include $(TOPDIR)/mk/kernel-build.mk
include $(TOPDIR)/mk/image.mk
KERNEL:=$(LINUX_DIR)/$(ADK_TARGET_KERNEL)
-
ifeq ($(ADK_TARGET_KERNEL_ZIMAGE),y)
KERNEL:=$(LINUX_DIR)/arch/arm/boot/zImage
endif
-
ifeq ($(ADK_TARGET_KERNEL_UIMAGE),y)
KERNEL:=$(LINUX_DIR)/arch/arm/boot/uImage
endif
-LOADADDR:=0x20008000
-
+QEMU_ARGS:=${ADK_QEMU_ARGS}
ifeq ($(ADK_TARGET_QEMU_ARM_MODEL_SPITZ),y)
-MACH:=spitz
+QEMU_ARGS+=-M spitz
endif
ifeq ($(ADK_TARGET_QEMU_ARM_MODEL_VERSATILEPB),y)
-MACH:=versatilepb
-NET:=-net user -net nic,model=smc91c111
+QEMU_ARGS+=-M versatilepb -net user -net nic,model=smc91c111
endif
ifeq ($(ADK_TARGET_QEMU_ARM_MODEL_VEXPRESS_A9),y)
-MACH:=vexpress-a9
-NET:=-cpu cortex-a9 -net user -net nic,model=lan9118
+QEMU_ARGS+=vexpress-a9 -cpu cortex-a9 -net user -net nic,model=lan9118
endif
-
-dtb-install:
- env $(KERNEL_MAKE_ENV) $(MAKE) -C $(LINUX_DIR) $(KERNEL_MAKE_OPTS) \
- -j${ADK_MAKE_JOBS} imx6q-cubox-i.dtb imx6dl-cubox-i.dtb $(MAKE_TRACE)
- $(CP) $(LINUX_DIR)/arch/arm/boot/dts/imx6*-cubox-i.dtb \
- $(FW_DIR)
-
-kernel-install:
- gzip -9 < $(LINUX_DIR)/arch/arm/boot/Image > ${BUILD_DIR}/Image.gz
- PATH='${TARGET_PATH}' mkimage -A arm -O linux -T kernel -C gzip \
- -a ${LOADADDR} -e ${LOADADDR} -d ${BUILD_DIR}/Image.gz \
- -n foxg20 $(KERNEL) $(MAKE_TRACE)
-
-ifeq ($(ADK_TARGET_FS),nfsroot)
-imageinstall: ${FW_DIR}/${ROOTFSUSERTARBALL}
- @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
- @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
- @echo 'The nfs root tarball is: ${FW_DIR}/${ROOTFSUSERTARBALL}'
+ifeq ($(ADK_TARGET_QEMU_WITH_VIRTIO),y)
+QEMU_ARGS+=-drive file=qemu-${CPU_ARCH}.img,if=virtio,index=0 -net nic,model=virtio -net user
endif
+
+# target helper text
ifeq ($(ADK_TARGET_FS),archive)
-ifeq ($(ADK_TARGET_SYSTEM_CUBOX_I),y)
-imageinstall: dtb-install $(FW_DIR)/$(ROOTFSTARBALL)
-else
-imageinstall: $(FW_DIR)/$(ROOTFSTARBALL)
-endif
+targethelp:
@echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
+ifeq ($(ADK_HARDWARE_QEMU),y)
+ @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
+ @echo "Use following command to create a QEMU Image:"
+ @echo "./scripts/create.sh qemu-${CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
+ @echo "Start qemu with following options:"
+ @echo 'qemu-system-${CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) qemu-${CPU_ARCH}.img'
+endif
ifeq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI),y)
@echo "Use following command to install it on SD card:"
@echo "sudo ./scripts/install-rpi.sh /dev/sdX $(FW_DIR)/$(ROOTFSTARBALL)"
@@ -65,41 +49,62 @@ ifeq ($(ADK_TARGET_SYSTEM_CUBOX_I),y)
@echo "sudo ./scripts/install-cubox.sh /dev/sdX $(FW_DIR)/$(ROOTFSTARBALL) $(FW_DIR)"
endif
-ifeq ($(ADK_TARGET_SYSTEM_QEMU_ARM)$(ADK_TARGET_SYSTEM_QEMU_ARMHF),y)
- @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
+endif
+ifeq ($(ADK_TARGET_FS),initramfs)
+targethelp:
@echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
- @echo "Use following command to create a QEMU Image:"
- @echo "./scripts/create.sh qemu-${CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
- @echo "Start qemu with following options:"
- @echo 'qemu-system-arm -M $(MACH) -nographic $(NET) -kernel $(FW_DIR)/$(TARGET_KERNEL) -hda qemu-${CPU_ARCH}.img'
+ @echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
+ifeq ($(ADK_HARDWARE_QEMU),y)
+ @echo "Start qemu with following command line:"
+ @echo 'qemu-system-${CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
endif
endif
-ifeq ($(ADK_TARGET_FS),initramfsarchive)
-imageinstall: $(FW_DIR)/$(ROOTFSUSERTARBALL)
- @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
+ifeq ($(ADK_TARGET_FS),initramfs-archive)
+targethelp:
@echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
@echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
endif
-ifeq ($(ADK_TARGET_FS),initramfs)
-imageinstall: $(FW_DIR)/$(INITRAMFS)
+ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
+targethelp:
+ @echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
+ifeq ($(ADK_HARDWARE_QEMU),y)
+ @echo "Start qemu with following command line:"
+ @echo 'qemu-system-${CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL)'
+endif
+endif
+
+kernel-strip:
+
+kernel-install:
@cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
- @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
- @echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
-ifeq ($(ADK_TARGET_SYSTEM_QEMU_ARM)$(ADK_TARGET_SYSTEM_QEMU_ARMHF),y)
-ifeq ($(ADK_TARGET_QEMU_WITH_VIRTIO),y)
- @echo 'qemu-system-arm -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL) -drive file=qemu-${CPU_ARCH}.img,if=virtio,index=0 -net nic,model=virtio -net user'
+
+dtb-install:
+ env $(KERNEL_MAKE_ENV) $(MAKE) -C $(LINUX_DIR) $(KERNEL_MAKE_OPTS) \
+ -j${ADK_MAKE_JOBS} imx6q-cubox-i.dtb imx6dl-cubox-i.dtb $(MAKE_TRACE)
+ $(CP) $(LINUX_DIR)/arch/arm/boot/dts/imx6*-cubox-i.dtb \
+ $(FW_DIR)
+
+
+# filesystem specific targets
+ifeq ($(ADK_TARGET_FS),archive)
+ifeq ($(ADK_TARGET_SYSTEM_CUBOX_I),y)
+imageinstall: dtb-install $(FW_DIR)/$(ROOTFSTARBALL) targethelp
else
- @echo "Start qemu with following command line:"
- @echo 'qemu-system-arm -M $(MACH) -nographic $(NET) -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
+imageinstall: $(FW_DIR)/$(ROOTFSTARBALL) targethelp
+endif
endif
+ifeq ($(ADK_TARGET_FS),initramfs)
+imageinstall: kernel-install $(FW_DIR)/$(INITRAMFS) targethelp
endif
+ifeq ($(ADK_TARGET_FS),initramfs-archive)
+imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
endif
ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
-imageinstall: createinitramfs
- @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
- @echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
-ifeq ($(ADK_TARGET_SYSTEM_QEMU_ARM)$(ADK_TARGET_SYSTEM_QEMU_ARMHF),y)
- @echo "Start qemu with following command line:"
- @echo 'qemu-system-arm -M $(MACH) -nographic $(NET) -kernel $(FW_DIR)/$(TARGET_KERNEL)'
+imageinstall: createinitramfs targethelp
+endif
+ifeq ($(ADK_TARGET_FS),nfsroot)
+imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
endif
+ifeq ($(ADK_TARGET_FS),usb)
+imageinstall: $(FW_DIR)/$(ROOTFSTARBALL) targethelp
endif
diff --git a/target/config/Config.in b/target/config/Config.in
index a1615679e..25582aa5b 100644
--- a/target/config/Config.in
+++ b/target/config/Config.in
@@ -595,11 +595,12 @@ config ADK_TARGET_ROOTFS_INITRAMFS_PIGGYBACK
ADK_LINUX_X86_64
depends on !ADK_HARDWARE_VBOX
depends on !ADK_TARGET_SYSTEM_MIKROTIK_RB532
+ depends on !ADK_TARGET_SYSTEM_ARANYM_M68K
help
create an read-only initramfs system.
config ADK_TARGET_ROOTFS_SQUASHFS
- boolean "Compressed read-only root filesystem (squashfs)"
+ boolean "compressed read-only root filesystem for NOR flash"
select ADK_KERNEL_SQUASHFS
select ADK_HOST_NEED_SQUASHFS
select ADK_HOST_NEED_QEMU if ADK_HARDWARE_QEMU
@@ -609,16 +610,16 @@ config ADK_TARGET_ROOTFS_SQUASHFS
highly compressed read-only filesystem for MTD flash systems.
config ADK_TARGET_ROOTFS_JFFS2
- boolean "Compressed read-write root filesystem (jffs2)"
+ boolean "compressed read-write root filesystem for NOR flash"
select ADK_KERNEL_JFFS2_FS
select ADK_HOST_NEED_MTD_UTILS
select ADK_TARGET_QEMU_WITH_BLOCK if ADK_HARDWARE_QEMU
depends on ADK_TARGET_WITH_MTD
help
- compressed read-write filesystem for MTD flash systems.
+ compressed read-write filesystem for MTD NOR flash systems.
config ADK_TARGET_ROOTFS_YAFFS
- boolean "YAFFS2 root filesystem (NAND)"
+ boolean "YAFFS2 root filesystem for NAND flash"
select ADK_KERNEL_MISC_FILESYSTEMS
select ADK_KERNEL_YAFFS_FS
select ADK_KERNEL_YAFFS_YAFFS2
@@ -641,10 +642,10 @@ config ADK_TARGET_ROOTFS_NFSROOT
depends on !ADK_HARDWARE_QEMU && !ADK_HARDWARE_VBOX && !ADK_TARGET_SYSTEM_ARANYM_M68K
depends on !ADK_TARGET_SYSTEM_ARM_FM
help
- Root filesystem mounted via NFS. (DHCP)
+ Root filesystem mounted via NFS and DHCP.
config ADK_TARGET_ROOTFS_USB
- boolean "Boot from USB stick"
+ boolean "boot from USB stick"
select ADK_KERNEL_NLS
select ADK_KERNEL_SCSI
select ADK_KERNEL_BLK_DEV_SD
@@ -660,7 +661,7 @@ config ADK_TARGET_ROOTFS_USB
Boot system from USB stick.
config ADK_TARGET_ROOTFS_ISO
- boolean "ISO image"
+ boolean "create ISO image"
select ADK_KERNEL_ISO9660_FS
select ADK_KERNEL_JOLIET
select ADK_KERNEL_SCSI
@@ -673,18 +674,22 @@ config ADK_TARGET_ROOTFS_ISO
help
Use this option to create a bootable ISO image.
-config ADK_TARGET_ROOTFS_INITRAMFSARCHIVE
- boolean "Archive usable for initramfs creation"
+config ADK_TARGET_ROOTFS_INITRAMFS_ARCHIVE
+ boolean "archive usable for initramfs creation"
depends on !ADK_TARGET_SYSTEM_MIKROTIK_RB532
+ depends on !ADK_TARGET_SYSTEM_ARM_FM
+ depends on !ADK_TARGET_SYSTEM_ARANYM_M68K
help
Use this option if your planning to create a initramfs,
useful for adk-test-framework.
config ADK_TARGET_ROOTFS_ARCHIVE
- boolean "Archive usable for different filesystems"
+ boolean "archive usable for different filesystems"
select ADK_HOST_NEED_GENEXT2FS if ADK_HARDWARE_QEMU
select ADK_KERNEL_EXT2_FS if ADK_HARDWARE_QEMU
select ADK_TARGET_QEMU_WITH_BLOCK if ADK_HARDWARE_QEMU
+ depends on !ADK_TARGET_SYSTEM_ARANYM_M68K
+ depends on !ADK_TARGET_SYSTEM_QEMU_MICROBLAZE
help
Use this option if your root filesystem is ext2/ext3/ext4/xfs.
diff --git a/target/linux/config/Config.in.block b/target/linux/config/Config.in.block
index 9130961f1..4a441de8f 100644
--- a/target/linux/config/Config.in.block
+++ b/target/linux/config/Config.in.block
@@ -258,6 +258,7 @@ config ADK_KERNEL_SCSI_SUNESP
prompt "SUN ESP support"
tristate
select ADK_KERNEL_SCSI
+ select ADK_KERNEL_SBUS
select ADK_KERNEL_BLK_DEV
select ADK_KERNEL_BLK_DEV_SD
depends on ADK_TARGET_SYSTEM_QEMU_SPARC
diff --git a/target/linux/config/Config.in.flash b/target/linux/config/Config.in.flash
index 689c0bcb1..eec15af42 100644
--- a/target/linux/config/Config.in.flash
+++ b/target/linux/config/Config.in.flash
@@ -56,40 +56,24 @@ config ADK_KERNEL_MTD_CFI_ADV_OPTIONS
config ADK_KERNEL_MTD_NAND_RB4XX
boolean
- default y if ADK_TARGET_SYSTEM_MIKROTIK_RB4XX
- default n
config ADK_KERNEL_MTD_AR7_PARTS
boolean
- default y if ADK_TARGET_SYSTEM_LINKSYS_AG241
- default n
config ADK_KERNEL_MTD_CFI_INTELEXT
boolean
- default y if ADK_TARGET_SYSTEM_BROADCOM_BCM47XX
- default y if ADK_TARGET_SYSTEM_QEMU_MICROBLAZEEL
- default y if ADK_TARGET_SYSTEM_QEMU_MICROBLAZE
- default n
config ADK_KERNEL_MTD_CFI_AMDSTD
boolean
- default y if ADK_TARGET_SYSTEM_BROADCOM_BCM47XX
- default y if ADK_TARGET_SYSTEM_QEMU_MICROBLAZEEL
- default y if ADK_TARGET_SYSTEM_QEMU_MICROBLAZE
- default n
config ADK_KERNEL_MTD_CFI_STAA
boolean
- default y if ADK_TARGET_SYSTEM_BROADCOM_BCM47XX
- default y if ADK_TARGET_SYSTEM_QEMU_MICROBLAZEEL
- default y if ADK_TARGET_SYSTEM_QEMU_MICROBLAZE
- default n
config ADK_KERNEL_MTD_OF_PARTS
boolean
- default n
config ADK_KERNEL_MTD_M25P80
+ prompt "MTD M25P80 driver"
boolean
select ADK_KERNEL_MTD
select ADK_KERNEL_MTD_PARTITIONS
@@ -98,6 +82,7 @@ config ADK_KERNEL_MTD_M25P80
select ADK_KERNEL_MTD_BLOCK
select ADK_KERNEL_MTD_ROOTFS_ROOT_DEV
select ADK_KERNEL_MTD_CFI
+ select ADK_KERNEL_MTD_CFI_INTELEXT
select ADK_KERNEL_MTD_GEN_PROBE
select ADK_KERNEL_MTD_PHYSMAP
select ADK_KERNEL_MTD_PHYSMAP_OF
diff --git a/target/linux/config/Config.in.misc b/target/linux/config/Config.in.misc
index 1b60ef1e8..463a8f369 100644
--- a/target/linux/config/Config.in.misc
+++ b/target/linux/config/Config.in.misc
@@ -9,6 +9,9 @@ config ADK_KERNEL_FW_LOADER_USER_HELPER
config ADK_KERNEL_KEYS
boolean
+config ADK_KERNEL_SBUS
+ boolean
+
menu "Miscellaneous devices support"
source "target/linux/config/Config.in.rtc"
diff --git a/target/m68k/Makefile b/target/m68k/Makefile
index 78206042c..0827ee0f0 100644
--- a/target/m68k/Makefile
+++ b/target/m68k/Makefile
@@ -9,21 +9,9 @@ include $(TOPDIR)/mk/image.mk
KERNEL:=$(LINUX_DIR)/vmlinux.gz
-ifeq ($(ADK_TARGET_FS),archive)
-imageinstall: $(FW_DIR)/$(ROOTFSTARBALL)
- @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
- @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
- @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
-endif
-ifeq ($(ADK_TARGET_FS),initramfsarchive)
-imageinstall: $(FW_DIR)/$(ROOTFSUSERTARBALL)
- @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
- @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
- @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
-endif
+# target helper text
ifeq ($(ADK_TARGET_FS),initramfs)
-imageinstall: $(FW_DIR)/$(INITRAMFS)
- @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
+targethelp:
@echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
@echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
ifeq ($(ADK_TARGET_SYSTEM_ARANYM_M68K),y)
@@ -35,8 +23,13 @@ ifeq ($(ADK_TARGET_SYSTEM_ARANYM_M68K),y)
@echo 'Ungrab mouse with middle mouse click'
endif
endif
-ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
-imageinstall: createinitramfs
- @cp $(KERNEL) $(FW_DIR)/${TARGET_KERNEL}
- @echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
+
+kernel-strip:
+
+kernel-install: kernel-strip
+ @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
+
+# filesystem specific targets
+ifeq ($(ADK_TARGET_FS),initramfs)
+imageinstall: kernel-install $(FW_DIR)/$(INITRAMFS) targethelp
endif
diff --git a/target/microblaze/Makefile b/target/microblaze/Makefile
index 4a39e1c3b..7595cf5cf 100644
--- a/target/microblaze/Makefile
+++ b/target/microblaze/Makefile
@@ -9,6 +9,7 @@ include $(TOPDIR)/mk/image.mk
KERNEL:=$(LINUX_DIR)/arch/microblaze/boot/$(ADK_TARGET_KERNEL)
+QEMU_ARGS:=${ADK_QEMU_ARGS}
ifeq ($(ADK_TARGET_QEMU_MICROBLAZE_MODEL_ML605),y)
QEMU_ARGS+=-M petalogix-ml605 -dtb target/microblaze/ml605.dtb
endif
@@ -16,52 +17,71 @@ ifeq ($(ADK_TARGET_QEMU_MICROBLAZE_MODEL_S3ADSP1800),y)
QEMU_ARGS+=-M petalogix-s3adsp1800
endif
+# target helper text
+ifeq ($(ADK_TARGET_FS),initramfs)
+targethelp:
+ @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
+ @echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
+ifeq ($(ADK_HARDWARE_QEMU),y)
+ @echo "Start qemu with following command line:"
+ @echo 'qemu-system-${CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
+endif
+endif
+ifeq ($(ADK_TARGET_FS),initramfs-archive)
+targethelp:
+ @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
+ @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
+endif
+ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
+targethelp:
+ @echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
+ifeq ($(ADK_HARDWARE_QEMU),y)
+ @echo "Start qemu with following command line:"
+ @echo 'qemu-system-${CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL)'
+endif
+endif
ifeq ($(ADK_TARGET_FS),squashfs)
-imageinstall: $(BUILD_DIR)/root.squashfs
- env PATH=$(HOST_PATH) qemu-img create -f raw $(FW_DIR)/$(ROOTFSSQUASHFS) $(ADK_TARGET_MTD_SIZE)
- dd conv=notrunc if=$(BUILD_DIR)/root.squashfs of=$(FW_DIR)/$(ROOTFSSQUASHFS)
- @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
-ifneq ($(ADK_HARDWARE_QEMU),)
+targethelp:
+ @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
+ @echo "The RootFS image is: $(FW_DIR)/$(ROOTFSSQUASHFS)"
+ifeq ($(ADK_HARDWARE_QEMU),y)
@echo "Start qemu with following options:"
@echo 'qemu-system-${CPU_ARCH} $(QEMU_ARGS) -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL) -pflash $(FW_DIR)/$(ROOTFSSQUASHFS)'
endif
endif
ifeq ($(ADK_TARGET_FS),jffs2)
-imageinstall: $(FW_DIR)/$(ROOTFSJFFS2)
- @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
-ifneq ($(ADK_HARDWARE_QEMU),)
+targethelp:
+ @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
+ @echo "The RootFS image is: $(FW_DIR)/$(ROOTFSSQUASHFS)"
+ifeq ($(ADK_HARDWARE_QEMU),y)
@echo "Start qemu with following options:"
- @echo 'qemu-system-${CPU_ARCH} $(QEMU_ARGS) -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL) -pflash $(FW_DIR)/$(ROOTFSJFFS2)'
+ @echo 'qemu-system-${CPU_ARCH} $(QEMU_ARGS) -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL) -pflash $(FW_DIR)/$(ROOTFSSQUASHFS)'
endif
endif
-ifeq ($(ADK_TARGET_FS),initramfs)
-imageinstall: $(FW_DIR)/$(INITRAMFS)
+
+kernel-strip:
+ @cp $(KERNEL) $(BUILD_DIR)/$(TARGET_KERNEL)
+
+kernel-install: kernel-strip
@cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
- @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
- @echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
-ifneq ($(ADK_HARDWARE_QEMU),)
- @echo "Start qemu with following command line:"
- @echo 'qemu-system-${CPU_ARCH} $(QEMU_ARGS) -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
+ifeq ($(ADK_TARGET_FS),squashfs)
+ env PATH=$(HOST_PATH) qemu-img create -f raw $(FW_DIR)/$(ROOTFSSQUASHFS) $(ADK_TARGET_MTD_SIZE) >/dev/null 2>&1
+ dd conv=notrunc if=$(BUILD_DIR)/root.squashfs of=$(FW_DIR)/$(ROOTFSSQUASHFS) >/dev/null 2>&1
endif
+
+# filesystem specific targets
+ifeq ($(ADK_TARGET_FS),initramfs)
+imageinstall: kernel-install $(FW_DIR)/$(INITRAMFS) targethelp
endif
-ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
-imageinstall: createinitramfs
- @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
- @echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
-ifneq ($(ADK_HARDWARE_QEMU),)
- @echo "Start qemu with following command line:"
- @echo 'qemu-system-${CPU_ARCH} $(QEMU_ARGS) -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL)'
+ifeq ($(ADK_TARGET_FS),initramfs-archive)
+imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
endif
+ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
+imageinstall: createinitramfs targethelp
endif
-ifeq ($(ADK_TARGET_FS),archive)
-imageinstall: $(FW_DIR)/$(ROOTFSTARBALL)
- @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
- @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
- @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
+ifeq ($(ADK_TARGET_FS),squashfs)
+imageinstall: kernel-install $(BUILD_DIR)/root.squashfs targethelp
endif
-ifeq ($(ADK_TARGET_FS),initramfsarchive)
-imageinstall: $(FW_DIR)/$(ROOTFSUSERTARBALL)
- @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
- @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
- @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
+ifeq ($(ADK_TARGET_FS),jffs2)
+imageinstall: kernel-install $(FW_DIR)/$(ROOTFSJFFS2) targethelp
endif
diff --git a/target/mips/Makefile b/target/mips/Makefile
index 06a0a84a2..cdb5b7f8a 100644
--- a/target/mips/Makefile
+++ b/target/mips/Makefile
@@ -10,39 +10,11 @@ include $(TOPDIR)/mk/image.mk
KERNEL:=$(LINUX_DIR)/$(ADK_TARGET_KERNEL)
OSTRIP:=-R .reginfo -R .notes -R .note -R .comment -R .mdebug -R .note.gnu.build-id
+QEMU_ARGS:=-M malta
+QEMU_ARGS+=${ADK_QEMU_ARGS}
+QEMU_ARGS+=-device e1000,netdev=adk0 -netdev user,id=adk0
+
# target helper text
-ifeq ($(ADK_TARGET_FS),nfsroot)
-targethelp:
- @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
- @echo 'The nfs root tarball is: ${FW_DIR}/${ROOTFSUSERTARBALL}'
-ifeq ($(ADK_TARGET_SYSTEM_FON_FON2100),y)
- @echo 'Type the following in Redboot:'
- @echo 'RedBoot> load $(TARGET_KERNEL)'
- @echo 'RedBoot> go'
-endif
-ifeq ($(ADK_TARGET_SYSTEM_LEMOTE_YEELONG),y)
- @echo 'Boot your Lemote Yeelong and type following commands in PMON:'
- @echo 'PMON> ifaddr rtl0 <ip-address-client>'
- @echo 'PMON> load tftp://<ip-address-server>/${TARGET_KERNEL}'
- @echo 'PMON> g'
-endif
-endif
-ifeq ($(ADK_TARGET_FS),yaffs)
-targethelp:
- @echo 'The root tarball is: ${FW_DIR}/${ROOTFSTARBALL}'
- @echo 'Format your NAND with Routerboot, boot via NFS and'
- @echo 'then install kernel and filesystem via:'
- @echo 'adkinstall ${ROOTFSTARBALL}'
-endif
-ifeq ($(ADK_TARGET_FS),usb)
-targethelp:
- @echo 'The root tarball is: ${FW_DIR}/${ROOTFSTARBALL}'
-ifeq ($(ADK_TARGET_SYSTEM_LEMOTE_YEELONG),y)
- @echo "Startup the netbook and type del to enter PMON:"
- @echo "PMON> load /dev/fs/ext2@usb0/boot/kernel"
- @echo "PMON> g"
-endif
-endif
ifeq ($(ADK_TARGET_FS),archive)
targethelp:
@echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
@@ -51,7 +23,7 @@ ifeq ($(ADK_HARDWARE_QEMU),y)
@echo "Use following command to create a QEMU Image:"
@echo "./scripts/create.sh qemu-${CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
@echo "Start qemu with following options:"
- @echo 'qemu-system-${CPU_ARCH} -nographic -M malta -device e1000,netdev=adk0 -netdev user,id=adk0 -kernel $(FW_DIR)/$(TARGET_KERNEL) qemu-${CPU_ARCH}.img'
+ @echo 'qemu-system-${CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) qemu-${CPU_ARCH}.img'
endif
ifeq ($(ADK_TARGET_SYSTEM_LEMOTE_YEELONG),y)
@echo "Startup the Lemote Yeelong and type del to enter PMON:"
@@ -63,127 +35,98 @@ ifeq ($(ADK_TARGET_SYSTEM_MIKROTIK_RB532),y)
@echo "sudo ./scripts/install-rb532.sh /dev/sdX $(FW_DIR)/$(ROOTFSTARBALL)"
endif
endif
-ifeq ($(ADK_TARGET_FS),initramfsarchive)
-targethelp:
- @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
- @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
-endif
ifeq ($(ADK_TARGET_FS),initramfs)
targethelp:
@echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
@echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
ifeq ($(ADK_HARDWARE_QEMU),y)
@echo "Start qemu with following command line:"
- @echo 'qemu-system-${CPU_ARCH} -nographic -M malta -device e1000,netdev=adk0 -netdev user,id=adk0 -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
+ @echo 'qemu-system-${CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
+endif
endif
+ifeq ($(ADK_TARGET_FS),initramfs-archive)
+targethelp:
+ @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
+ @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
endif
ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
targethelp:
@echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
ifeq ($(ADK_HARDWARE_QEMU),y)
@echo "Start qemu with following command line:"
- @echo 'qemu-system-${CPU_ARCH} -nographic -M malta -device e1000,netdev=adk0 -netdev user,id=adk0 -kernel $(FW_DIR)/$(TARGET_KERNEL)'
+ @echo 'qemu-system-${CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL)'
endif
endif
-ifeq ($(ADK_TARGET_FS),squashfs)
+ifeq ($(ADK_TARGET_FS),nfsroot)
targethelp:
-ifeq ($(ADK_TARGET_SYSTEM_BROADCOM_BCM47XX),y)
- @echo 'You can flash the image via tftp:'
- @echo 'tftp 192.168.1.1'
- @echo 'tftp> binary'
- @echo "tftp> put $(ROOTFSSQUASHFS) upgrade_code.bin"
+ @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
+ @echo 'The nfs root tarball is: ${FW_DIR}/${ROOTFSUSERTARBALL}'
+ifeq ($(ADK_TARGET_SYSTEM_LEMOTE_YEELONG),y)
+ @echo 'Boot your Lemote Yeelong and type following commands in PMON:'
+ @echo 'PMON> ifaddr rtl0 <ip-address-client>'
+ @echo 'PMON> load tftp://<ip-address-server>/${TARGET_KERNEL}'
+ @echo 'PMON> g'
endif
endif
-
-# image creation and kernel install
-ifeq ($(ADK_TARGET_SYSTEM_BROADCOM_BCM47XX),y)
-kernel-install:
- ${TARGET_CROSS}objcopy ${OSTRIP} -S ${LINUX_DIR}/vmlinuz.elf \
- ${BUILD_DIR}/${TARGET_KERNEL}
-
-${BUILD_DIR}/${ROOTFSSQUASHFS}: ${BUILD_DIR}/root.squashfs
- ${TARGET_CROSS}objcopy -O binary ${BUILD_DIR}/${TARGET_KERNEL} \
- ${BUILD_DIR}/${TARGET_KERNEL}.bin
- gzip -n9 <${BUILD_DIR}/${TARGET_KERNEL}.bin \
- >${BUILD_DIR}/${TARGET_KERNEL}.bin.gz
- printf '\0' >>${BUILD_DIR}/${TARGET_KERNEL}.bin.gz
- PATH='${TARGET_PATH}' trx -o $@~ -f ${BUILD_DIR}/${TARGET_KERNEL}.bin.gz -a 1024 -f ${BUILD_DIR}/root.squashfs
-ifneq ($(ADK_TARGET_BROADCOM_MODEL_ASUS_WL500GP),y)
- PATH='${TARGET_PATH}' addpattern -4 ${ADK_TOOLS_ADDPATTERN_ARGS} -g -i $@~ -o $@
-else
- cp $@~ $@
-endif
-endif
-ifeq ($(ADK_TARGET_SYSTEM_LINKSYS_AG241),y)
-kernel-install:
- ${TARGET_CROSS}objcopy -S -O srec $(KERNEL) $(LINUX_DIR)/vmlinux.srec
- PATH='${TARGET_PATH}' srec2bin $(LINUX_DIR)/vmlinux.srec $(LINUX_DIR)/vmlinux.bin
- (dd if=/dev/zero bs=16 count=1; cat $(LINUX_DIR)/vmlinux.bin) > $(LINUX_DIR)/vmlinux.tmp
- PATH='${TARGET_PATH}' addpattern -p AG3B -b -r 2.0 -i $(LINUX_DIR)/vmlinux.tmp \
- -o $(BUILD_DIR)/$(TARGET_KERNEL) 2>/dev/null
+ifeq ($(ADK_TARGET_FS),usb)
+targethelp:
+ @echo 'The root tarball is: ${FW_DIR}/${ROOTFSTARBALL}'
+ifeq ($(ADK_TARGET_SYSTEM_LEMOTE_YEELONG),y)
+ @echo "Startup the netbook and type del to enter PMON:"
+ @echo "PMON> load /dev/fs/ext2@usb0/boot/kernel"
+ @echo "PMON> g"
endif
-ifeq ($(ADK_TARGET_SYSTEM_MIKROTIK_RB532),y)
-kernel-install:
- $(TARGET_CROSS)objcopy $(OSTRIP) -S $(KERNEL) $(BUILD_DIR)/$(TARGET_KERNEL)
- @cp $(BUILD_DIR)/$(TARGET_KERNEL) $(FW_DIR)/${TARGET_KERNEL}
endif
-ifeq ($(ADK_TARGET_SYSTEM_MIKROTIK_RB4XX),y)
-kernel-install:
- $(TARGET_CROSS)objcopy $(OSTRIP) -S $(KERNEL) $(BUILD_DIR)/$(TARGET_KERNEL)
- @cp $(BUILD_DIR)/$(TARGET_KERNEL) $(FW_DIR)/${TARGET_KERNEL}
+ifeq ($(ADK_TARGET_FS),yaffs)
+targethelp:
+ @echo 'The root tarball is: ${FW_DIR}/${ROOTFSTARBALL}'
+ @echo 'Format your NAND with Routerboot, boot via NFS and'
+ @echo 'then install kernel and filesystem via:'
+ @echo 'adkinstall ${ROOTFSTARBALL}'
endif
-ifeq ($(ADK_TARGET_SYSTEM_FON_FON2100),y)
-kernel-install:
+
+# image creation and kernel install
+ifeq ($(ADK_TARGET_SYSTEM_MIKROTIK_RB532),y)
+kernel-strip:
$(TARGET_CROSS)objcopy $(OSTRIP) -S $(KERNEL) $(BUILD_DIR)/$(TARGET_KERNEL)
- @cp $(BUILD_DIR)/$(TARGET_KERNEL) $(FW_DIR)/${TARGET_KERNEL}
-${BUILD_DIR}/${ROOTFSSQUASHFS}: ${BUILD_DIR}/root.squashfs
- $(TARGET_CROSS)objcopy $(OSTRIP) -S $(LINUX_DIR)/vmlinux $(BUILD_DIR)/vmlinux.strip
- dd if=$(BUILD_DIR)/vmlinux.strip of=${BUILD_DIR}/vmlinux bs=65536 conv=sync
- lzma -9efzc ${BUILD_DIR}/vmlinux > $(FW_DIR)/${TARGET_KERNEL}
- cp ${BUILD_DIR}/root.squashfs ${BUILD_DIR}/${ROOTFSSQUASHFS}
+kernel-install: kernel-strip
+ @cp $(BUILD_DIR)/$(TARGET_KERNEL) $(FW_DIR)/${TARGET_KERNEL}
endif
ifeq ($(ADK_TARGET_SYSTEM_LEMOTE_YEELONG),y)
-kernel-install:
+kernel-strip:
$(TARGET_CROSS)objcopy $(OSTRIP) -S $(KERNEL) $(BUILD_DIR)/$(TARGET_KERNEL)
+
+kernel-install: kernel-strip
@cp $(BUILD_DIR)/$(TARGET_KERNEL) $(FW_DIR)/${TARGET_KERNEL}
endif
ifeq ($(ADK_HARDWARE_QEMU),y)
-kernel-install:
+kernel-strip:
$(TARGET_CROSS)objcopy $(OSTRIP) -S $(KERNEL) $(BUILD_DIR)/$(TARGET_KERNEL)
+
+kernel-install: kernel-strip
@cp $(BUILD_DIR)/$(TARGET_KERNEL) $(FW_DIR)/${TARGET_KERNEL}
endif
# filesystem specific targets
-ifeq ($(ADK_TARGET_FS),nfsroot)
-imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
-endif
-ifeq ($(ADK_TARGET_FS),yaffs)
-imageinstall: $(FW_DIR)/$(ROOTFSTARBALL) targethelp
-endif
ifeq ($(ADK_TARGET_FS),archive)
imageinstall: $(FW_DIR)/$(ROOTFSTARBALL) targethelp
endif
-ifeq ($(ADK_TARGET_FS),initramfsarchive)
-imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
-endif
ifeq ($(ADK_TARGET_FS),initramfs)
imageinstall: kernel-install $(FW_DIR)/$(INITRAMFS) targethelp
endif
+ifeq ($(ADK_TARGET_FS),initramfs-archive)
+imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
+endif
ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
imageinstall: createinitramfs targethelp
- @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
+endif
+ifeq ($(ADK_TARGET_FS),nfsroot)
+imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
endif
ifeq ($(ADK_TARGET_FS),usb)
imageinstall: $(FW_DIR)/$(ROOTFSTARBALL) targethelp
endif
-ifeq ($(ADK_TARGET_FS),squashfs)
-imageinstall: kernel-install ${BUILD_DIR}/${ROOTFSSQUASHFS} targethelp
- @if [ $$($(STATCMD) ${BUILD_DIR}/${ROOTFSSQUASHFS}) -gt 3801088 ];then \
- echo 'Image is too big!'; \
- else \
- ${CP} ${BUILD_DIR}/${ROOTFSSQUASHFS} ${FW_DIR}/${ROOTFSSQUASHFS}; \
- echo The image file is $(ROOTFSSQUASHFS); \
- fi
+ifeq ($(ADK_TARGET_FS),yaffs)
+imageinstall: $(FW_DIR)/$(ROOTFSTARBALL) targethelp
endif
-
diff --git a/target/ppc/Makefile b/target/ppc/Makefile
index fa1cd1698..b3bcfc98e 100644
--- a/target/ppc/Makefile
+++ b/target/ppc/Makefile
@@ -8,42 +8,63 @@ include $(TOPDIR)/mk/kernel-build.mk
include $(TOPDIR)/mk/image.mk
KERNEL:=$(LINUX_DIR)/vmlinux
+OSTRIP:=-R .reginfo -R .notes -R .note -R .comment -R .mdebug -R .note.gnu.build-id
+QEMU_ARGS:=-M mac99
+QEMU_ARGS+=${ADK_QEMU_ARGS}
+
+# target helper text
ifeq ($(ADK_TARGET_FS),archive)
-imageinstall: $(FW_DIR)/$(ROOTFSTARBALL)
- @cp $(KERNEL) $(FW_DIR)/${TARGET_KERNEL}
- @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
+targethelp:
@echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
ifeq ($(ADK_HARDWARE_QEMU),y)
- @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
+ @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
@echo "Use following command to create a QEMU Image:"
@echo "./scripts/create.sh qemu-${CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
- @echo "Start qemu with following command line:"
- @echo 'qemu-system-ppc -M mac99 -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL) qemu-${CPU_ARCH}.img'
+ @echo "Start qemu with following options:"
+ @echo 'qemu-system-${CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) qemu-${CPU_ARCH}.img'
endif
endif
-ifeq ($(ADK_TARGET_FS),initramfsarchive)
-imageinstall: $(FW_DIR)/$(ROOTFSUSERTARBALL)
- @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
- @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
- @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
-endif
ifeq ($(ADK_TARGET_FS),initramfs)
-imageinstall: $(FW_DIR)/$(INITRAMFS)
- @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
+targethelp:
@echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
@echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
-ifeq ($(ADK_TARGET_SYSTEM_QEMU_PPC),y)
+ifeq ($(ADK_HARDWARE_QEMU),y)
@echo "Start qemu with following command line:"
- @echo 'qemu-system-ppc -M mac99 -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
+ @echo 'qemu-system-${CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
+endif
endif
+ifeq ($(ADK_TARGET_FS),initramfs-archive)
+targethelp:
+ @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
+ @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
endif
ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
-imageinstall: createinitramfs
- @cp $(KERNEL) $(FW_DIR)/${TARGET_KERNEL}
+targethelp:
@echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
-ifeq ($(ADK_TARGET_SYSTEM_QEMU_PPC),y)
+ifeq ($(ADK_HARDWARE_QEMU),y)
@echo "Start qemu with following command line:"
- @echo 'qemu-system-ppc -M mac99 -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL)'
+ @echo 'qemu-system-${CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL)'
+endif
endif
+
+# image creation and kernel install
+kernel-strip:
+ $(TARGET_CROSS)objcopy $(OSTRIP) -S $(KERNEL) $(BUILD_DIR)/$(TARGET_KERNEL)
+
+kernel-install: kernel-strip
+ @cp $(BUILD_DIR)/$(TARGET_KERNEL) $(FW_DIR)/${TARGET_KERNEL}
+
+# filesystem specific targets
+ifeq ($(ADK_TARGET_FS),archive)
+imageinstall: $(FW_DIR)/$(ROOTFSTARBALL) targethelp
+endif
+ifeq ($(ADK_TARGET_FS),initramfs)
+imageinstall: kernel-install $(FW_DIR)/$(INITRAMFS) targethelp
+endif
+ifeq ($(ADK_TARGET_FS),initramfs-archive)
+imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
+endif
+ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
+imageinstall: createinitramfs targethelp
endif
diff --git a/target/ppc64/Makefile b/target/ppc64/Makefile
index 5b9c1caa6..d704c4973 100644
--- a/target/ppc64/Makefile
+++ b/target/ppc64/Makefile
@@ -8,42 +8,63 @@ include $(TOPDIR)/mk/kernel-build.mk
include $(TOPDIR)/mk/image.mk
KERNEL:=$(LINUX_DIR)/vmlinux
+OSTRIP:=-R .reginfo -R .notes -R .note -R .comment -R .mdebug -R .note.gnu.build-id
+QEMU_ARGS:=-M pseries
+QEMU_ARGS+=${ADK_QEMU_ARGS}
+
+# target helper text
ifeq ($(ADK_TARGET_FS),archive)
-imageinstall: $(FW_DIR)/$(ROOTFSTARBALL)
- @cp $(KERNEL) $(FW_DIR)/${TARGET_KERNEL}
- @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
+targethelp:
@echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
ifeq ($(ADK_HARDWARE_QEMU),y)
- @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
+ @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
@echo "Use following command to create a QEMU Image:"
@echo "./scripts/create.sh qemu-${CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
- @echo "Start qemu with following command line:"
- @echo 'qemu-system-ppc64 -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL) qemu-${CPU_ARCH}.img'
+ @echo "Start qemu with following options:"
+ @echo 'qemu-system-${CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) qemu-${CPU_ARCH}.img'
endif
endif
-ifeq ($(ADK_TARGET_FS),initramfsarchive)
-imageinstall: $(FW_DIR)/$(ROOTFSUSERTARBALL)
- @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
- @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
- @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
-endif
ifeq ($(ADK_TARGET_FS),initramfs)
-imageinstall: $(FW_DIR)/$(INITRAMFS)
- @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
+targethelp:
@echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
@echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
-ifeq ($(ADK_TARGET_SYSTEM_QEMU_PPC64),y)
+ifeq ($(ADK_HARDWARE_QEMU),y)
@echo "Start qemu with following command line:"
- @echo 'qemu-system-ppc64 -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
+ @echo 'qemu-system-${CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
+endif
endif
+ifeq ($(ADK_TARGET_FS),initramfs-archive)
+targethelp:
+ @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
+ @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
endif
ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
-imageinstall: createinitramfs
- @cp $(KERNEL) $(FW_DIR)/${TARGET_KERNEL}
+targethelp:
@echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
-ifeq ($(ADK_TARGET_SYSTEM_QEMU_PPC64),y)
+ifeq ($(ADK_HARDWARE_QEMU),y)
@echo "Start qemu with following command line:"
- @echo 'qemu-system-ppc64 -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL)'
+ @echo 'qemu-system-${CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL)'
+endif
endif
+
+# image creation and kernel install
+kernel-strip:
+ $(TARGET_CROSS)objcopy $(OSTRIP) -S $(KERNEL) $(BUILD_DIR)/$(TARGET_KERNEL)
+
+kernel-install: kernel-strip
+ @cp $(BUILD_DIR)/$(TARGET_KERNEL) $(FW_DIR)/${TARGET_KERNEL}
+
+# filesystem specific targets
+ifeq ($(ADK_TARGET_FS),archive)
+imageinstall: $(FW_DIR)/$(ROOTFSTARBALL) targethelp
+endif
+ifeq ($(ADK_TARGET_FS),initramfs)
+imageinstall: kernel-install $(FW_DIR)/$(INITRAMFS) targethelp
+endif
+ifeq ($(ADK_TARGET_FS),initramfs-archive)
+imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
+endif
+ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
+imageinstall: createinitramfs targethelp
endif
diff --git a/target/sh/Makefile b/target/sh/Makefile
index 201ea1efe..a11856b21 100644
--- a/target/sh/Makefile
+++ b/target/sh/Makefile
@@ -17,11 +17,11 @@ ifeq ($(ADK_TARGET_QEMU_WITH_GRAPHIC),)
QEMU_ARGS+=-serial null -serial stdio
endif
+# target helper text
ifeq ($(ADK_TARGET_FS),archive)
-imageinstall: $(FW_DIR)/$(ROOTFSTARBALL)
+targethelp:
@echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
-ifneq ($(ADK_HARDWARE_QEMU),)
- @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
+ifeq ($(ADK_HARDWARE_QEMU),y)
@echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
@echo "Use following command to create a QEMU Image:"
@echo "./scripts/create.sh qemu-${CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
@@ -29,15 +29,8 @@ ifneq ($(ADK_HARDWARE_QEMU),)
@echo 'qemu-system-${CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) qemu-${CPU_ARCH}.img'
endif
endif
-ifeq ($(ADK_TARGET_FS),initramfsarchive)
-imageinstall: $(FW_DIR)/$(ROOTFSUSERTARBALL)
- @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
- @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
- @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
-endif
ifeq ($(ADK_TARGET_FS),initramfs)
-imageinstall: $(FW_DIR)/$(INITRAMFS)
- @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
+targethelp:
@echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
@echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
ifeq ($(ADK_HARDWARE_QEMU),y)
@@ -45,12 +38,37 @@ ifeq ($(ADK_HARDWARE_QEMU),y)
@echo 'qemu-system-${CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
endif
endif
+ifeq ($(ADK_TARGET_FS),initramfs-archive)
+targethelp:
+ @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
+ @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
+endif
ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
-imageinstall: createinitramfs
- @cp $(KERNEL) $(FW_DIR)/${TARGET_KERNEL}
+targethelp:
@echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
ifeq ($(ADK_HARDWARE_QEMU),y)
@echo "Start qemu with following command line:"
@echo 'qemu-system-${CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL)'
endif
endif
+
+# image creation and kernel install
+kernel-strip:
+ @cp $(KERNEL) $(BUILD_DIR)/$(TARGET_KERNEL)
+
+kernel-install: kernel-strip
+ @cp $(BUILD_DIR)/$(TARGET_KERNEL) $(FW_DIR)/${TARGET_KERNEL}
+
+# filesystem specific targets
+ifeq ($(ADK_TARGET_FS),archive)
+imageinstall: $(FW_DIR)/$(ROOTFSTARBALL) targethelp
+endif
+ifeq ($(ADK_TARGET_FS),initramfs)
+imageinstall: kernel-install $(FW_DIR)/$(INITRAMFS) targethelp
+endif
+ifeq ($(ADK_TARGET_FS),initramfs-archive)
+imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
+endif
+ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
+imageinstall: createinitramfs targethelp
+endif
diff --git a/target/sparc/Makefile b/target/sparc/Makefile
index 356f8745b..b0f86317f 100644
--- a/target/sparc/Makefile
+++ b/target/sparc/Makefile
@@ -9,40 +9,61 @@ include $(TOPDIR)/mk/image.mk
KERNEL:=$(LINUX_DIR)/arch/sparc/boot/zImage
+QEMU_ARGS:=-M SS-5
+QEMU_ARGS+=${ADK_QEMU_ARGS}
+
+# target helper text
ifeq ($(ADK_TARGET_FS),archive)
-imageinstall: $(FW_DIR)/$(ROOTFSTARBALL)
- @cp $(KERNEL) $(FW_DIR)/${TARGET_KERNEL}
- @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
+targethelp:
@echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
-ifeq ($(ADK_TARGET_SYSTEM_QEMU_SPARC),y)
+ifeq ($(ADK_HARDWARE_QEMU),y)
+ @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
@echo "Use following command to create a QEMU Image:"
@echo "./scripts/create.sh qemu-${CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
- @echo "Start qemu with following command line:"
- @echo 'qemu-system-sparc -M SS-5 -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL) qemu-${CPU_ARCH}.img -append "root=/dev/sda1"'
-endif
+ @echo "Start qemu with following options:"
+ @echo 'qemu-system-${CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) qemu-${CPU_ARCH}.img'
endif
-ifeq ($(ADK_TARGET_FS),initramfsarchive)
-imageinstall: $(FW_DIR)/$(ROOTFSUSERTARBALL)
- @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
- @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
- @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
endif
ifeq ($(ADK_TARGET_FS),initramfs)
-imageinstall: $(FW_DIR)/$(INITRAMFS)
- @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
+targethelp:
@echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
@echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
-ifeq ($(ADK_TARGET_SYSTEM_QEMU_SPARC),y)
+ifeq ($(ADK_HARDWARE_QEMU),y)
@echo "Start qemu with following command line:"
- @echo 'qemu-system-sparc -M SS-5 -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
+ @echo 'qemu-system-${CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
+endif
endif
+ifeq ($(ADK_TARGET_FS),initramfs-archive)
+targethelp:
+ @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
+ @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
endif
ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
-imageinstall: createinitramfs
- @cp $(KERNEL) $(FW_DIR)/${TARGET_KERNEL}
+targethelp:
@echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
-ifeq ($(ADK_TARGET_SYSTEM_QEMU_SPARC),y)
+ifeq ($(ADK_HARDWARE_QEMU),y)
@echo "Start qemu with following command line:"
- @echo 'qemu-system-sparc -M SS-5 -nographic -kernel $(FW_DIR)/$(TARGET_KERNEL)'
+ @echo 'qemu-system-${CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL)'
endif
endif
+
+# image creation and kernel install
+kernel-strip:
+ $(TARGET_CROSS)objcopy $(OSTRIP) -S $(KERNEL) $(BUILD_DIR)/$(TARGET_KERNEL)
+
+kernel-install: kernel-strip
+ @cp $(BUILD_DIR)/$(TARGET_KERNEL) $(FW_DIR)/${TARGET_KERNEL}
+
+# filesystem specific targets
+ifeq ($(ADK_TARGET_FS),archive)
+imageinstall: $(FW_DIR)/$(ROOTFSTARBALL) targethelp
+endif
+ifeq ($(ADK_TARGET_FS),initramfs)
+imageinstall: kernel-install $(FW_DIR)/$(INITRAMFS) targethelp
+endif
+ifeq ($(ADK_TARGET_FS),initramfs-archive)
+imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
+endif
+ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
+imageinstall: createinitramfs targethelp
+endif
diff --git a/target/sparc64/Makefile b/target/sparc64/Makefile
index 69d4a0d79..9e16607fc 100644
--- a/target/sparc64/Makefile
+++ b/target/sparc64/Makefile
@@ -10,9 +10,7 @@ include $(TOPDIR)/mk/image.mk
KERNEL:=$(LINUX_DIR)/vmlinux
QEMU_ARGS:=-M sun4u
-ifeq ($(ADK_TARGET_QEMU_WITH_GRAPHIC),)
-QEMU_ARGS+=-nographic
-endif
+QEMU_ARGS+=${ADK_QEMU_ARGS}
ifeq ($(ADK_TARGET_QEMU_WITH_VIRTIO),y)
QEMU_ARGS+=-net nic,model=virtio -net user
ifeq ($(ADK_TARGET_FS),archive)
@@ -20,40 +18,58 @@ QEMU_ARGS+=-drive file=qemu-${CPU_ARCH}.img,if=virtio,index=0
endif
endif
+# target helper text
ifeq ($(ADK_TARGET_FS),archive)
-imageinstall: $(FW_DIR)/$(ROOTFSTARBALL)
- @cp $(KERNEL) $(FW_DIR)/${TARGET_KERNEL}
- @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
+targethelp:
@echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
-ifeq ($(ADK_TARGET_SYSTEM_QEMU_SPARC64),y)
+ifeq ($(ADK_HARDWARE_QEMU),y)
+ @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
@echo "Use following command to create a QEMU Image:"
@echo "./scripts/create.sh qemu-${CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
- @echo "Start qemu with following command line:"
- @echo 'qemu-system-sparc64 $(QEMU_ARGS) -kernel $(FW_DIR)/$(TARGET_KERNEL) qemu-${CPU_ARCH}.img'
-endif
+ @echo "Start qemu with following options:"
+ @echo 'qemu-system-${CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) qemu-${CPU_ARCH}.img'
endif
-ifeq ($(ADK_TARGET_FS),initramfsarchive)
-imageinstall: $(FW_DIR)/$(ROOTFSUSERTARBALL)
- @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
- @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
- @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
endif
ifeq ($(ADK_TARGET_FS),initramfs)
-imageinstall: $(FW_DIR)/$(INITRAMFS)
- @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
+targethelp:
@echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
@echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
-ifeq ($(ADK_TARGET_SYSTEM_QEMU_SPARC64),y)
+ifeq ($(ADK_HARDWARE_QEMU),y)
@echo "Start qemu with following command line:"
- @echo 'qemu-system-sparc64 $(QEMU_ARGS) -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
+ @echo 'qemu-system-${CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
+endif
endif
+ifeq ($(ADK_TARGET_FS),initramfs-archive)
+targethelp:
+ @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
+ @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
endif
ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
-imageinstall: createinitramfs
- @cp $(KERNEL) $(FW_DIR)/${TARGET_KERNEL}
+targethelp:
@echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
-ifeq ($(ADK_TARGET_SYSTEM_QEMU_SPARC64),y)
+ifeq ($(ADK_HARDWARE_QEMU),y)
@echo "Start qemu with following command line:"
- @echo 'qemu-system-sparc64 $(QEMU_ARGS) -kernel $(FW_DIR)/$(TARGET_KERNEL)'
+ @echo 'qemu-system-${CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL)'
endif
endif
+
+# image creation and kernel install
+kernel-strip:
+ $(TARGET_CROSS)objcopy $(OSTRIP) -S $(KERNEL) $(BUILD_DIR)/$(TARGET_KERNEL)
+
+kernel-install: kernel-strip
+ @cp $(BUILD_DIR)/$(TARGET_KERNEL) $(FW_DIR)/${TARGET_KERNEL}
+
+# filesystem specific targets
+ifeq ($(ADK_TARGET_FS),archive)
+imageinstall: $(FW_DIR)/$(ROOTFSTARBALL) targethelp
+endif
+ifeq ($(ADK_TARGET_FS),initramfs)
+imageinstall: kernel-install $(FW_DIR)/$(INITRAMFS) targethelp
+endif
+ifeq ($(ADK_TARGET_FS),initramfs-archive)
+imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
+endif
+ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
+imageinstall: createinitramfs targethelp
+endif
diff --git a/target/x86/Makefile b/target/x86/Makefile
index 89e59095a..215476eb4 100644
--- a/target/x86/Makefile
+++ b/target/x86/Makefile
@@ -9,14 +9,10 @@ include $(TOPDIR)/mk/image.mk
KERNEL:=$(LINUX_DIR)/arch/x86/boot/bzImage
+QEMU_ARCH:=i386
QEMU_ARGS:=-M pc
QEMU_ARGS+=${ADK_QEMU_ARGS}
-
-ifeq ($(ADK_TARGET_SYSTEM_QEMU_X86_64_32),y)
-QEMU_ARCH:=x86_84
-else
-QEMU_ARCH:=i386
-endif
+QEMU_ARGS+=-net user -net nic,model=e1000
ifeq ($(ADK_TARGET_QEMU_WITH_BOOTLOADER),y)
ifeq ($(ADK_TARGET_QEMU_WITHOUT_GRAPHIC),y)
@@ -28,30 +24,15 @@ else
CREATE:=./scripts/create.sh
endif
-ifeq ($(ADK_TARGET_FS),genext2fs)
-imageinstall: $(FW_DIR)/$(ROOTFSTARBALL)
- @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
- @echo "To install everything to CompactFlash use scripts/genext2.sh"
-endif
-ifeq ($(ADK_TARGET_FS),cf)
-imageinstall: $(FW_DIR)/$(ROOTFSTARBALL)
- @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
- @echo "To install everything to CompactFlash use scripts/install.sh"
-endif
-ifeq ($(ADK_TARGET_FS),nfsroot)
-imageinstall: $(FW_DIR)/$(ROOTFSUSERTARBALL)
- @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
- @echo 'The linux kernel is here: $(FW_DIR)/$(TARGET_KERNEL)'
- @echo 'The nfs root tarball is: ${FW_DIR}/${ROOTFSUSERTARBALL}'
-endif
+# target helper text
ifeq ($(ADK_TARGET_FS),archive)
-imageinstall: $(FW_DIR)/$(ROOTFSTARBALL)
+targethelp:
@echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
ifeq ($(ADK_HARDWARE_QEMU),y)
- @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
+ @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
@echo "Use following command to create a QEMU Image:"
- @echo "$(CREATE) qemu-${CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
- @echo "Start qemu with following command line:"
+ @echo "./scripts/create.sh qemu-${CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
+ @echo "Start qemu with following options:"
ifeq ($(ADK_TARGET_QEMU_WITH_BOOTLOADER),y)
@echo 'qemu-system-${QEMU_ARCH} ${QEMU_ARGS} -net user -net nic,model=e1000 qemu-${CPU_ARCH}.img'
else
@@ -64,37 +45,69 @@ ifeq ($(ADK_HARDWARE_VBOX),y)
@echo "./scripts/create.sh -T vdi vbox-${CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
endif
endif
-ifeq ($(ADK_TARGET_FS),initramfsarchive)
-imageinstall: $(FW_DIR)/$(ROOTFSUSERTARBALL)
- @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
- @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
- @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
-endif
-ifeq ($(ADK_TARGET_FS),usb)
-imageinstall: $(FW_DIR)/$(ROOTFSTARBALL)
- @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
- @echo "To install everything to USB use scripts/install.sh"
-endif
ifeq ($(ADK_TARGET_FS),initramfs)
-imageinstall: $(FW_DIR)/$(INITRAMFS)
- @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
+targethelp:
@echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
@echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
ifeq ($(ADK_HARDWARE_QEMU),y)
@echo "Start qemu with following command line:"
- @echo 'qemu-system-${QEMU_ARCH} ${QEMU_ARGS} -net user -net nic,model=e1000 -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
+ @echo 'qemu-system-${QEMU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
+endif
endif
+ifeq ($(ADK_TARGET_FS),initramfs-archive)
+targethelp:
+ @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
+ @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
endif
ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
-imageinstall: createinitramfs
- @cp $(KERNEL) $(FW_DIR)/${TARGET_KERNEL}
+targethelp:
@echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
ifeq ($(ADK_HARDWARE_QEMU),y)
@echo "Start qemu with following command line:"
- @echo 'qemu-system-${QEMU_ARCH} ${QEMU_ARGS} -net user -net nic,model=e1000 -kernel $(FW_DIR)/$(TARGET_KERNEL)'
+ @echo 'qemu-system-${QEMU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL)'
endif
endif
-ifeq (${ADK_TARGET_FS},iso)
-imageinstall: ${FW_DIR}/${ROOTFSISO}
+ifeq ($(ADK_TARGET_FS),nfsroot)
+targethelp:
+ @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
+ @echo 'The nfs root tarball is: ${FW_DIR}/${ROOTFSUSERTARBALL}'
+endif
+ifeq ($(ADK_TARGET_FS),usb)
+targethelp:
+ @echo 'The root tarball is: ${FW_DIR}/${ROOTFSTARBALL}'
+ @echo "To install everything to USB use scripts/install.sh"
+endif
+ifeq ($(ADK_TARGET_FS),iso)
+targethelp:
@echo 'ISO image is at $<'
endif
+
+# image creation and kernel install
+kernel-strip:
+ @cp $(KERNEL) $(BUILD_DIR)/$(TARGET_KERNEL)
+
+kernel-install: kernel-strip
+ @cp $(BUILD_DIR)/$(TARGET_KERNEL) $(FW_DIR)/${TARGET_KERNEL}
+
+# filesystem specific targets
+ifeq ($(ADK_TARGET_FS),archive)
+imageinstall: $(FW_DIR)/$(ROOTFSTARBALL) targethelp
+endif
+ifeq ($(ADK_TARGET_FS),initramfs)
+imageinstall: kernel-install $(FW_DIR)/$(INITRAMFS) targethelp
+endif
+ifeq ($(ADK_TARGET_FS),initramfs-archive)
+imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
+endif
+ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
+imageinstall: createinitramfs targethelp
+endif
+ifeq (${ADK_TARGET_FS},iso)
+imageinstall: ${FW_DIR}/${ROOTFSISO} targethelp
+endif
+ifeq ($(ADK_TARGET_FS),nfsroot)
+imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
+endif
+ifeq ($(ADK_TARGET_FS),usb)
+imageinstall: $(FW_DIR)/$(ROOTFSTARBALL) targethelp
+endif
diff --git a/target/x86_64/Makefile b/target/x86_64/Makefile
index 63785c12a..46e5f03a6 100644
--- a/target/x86_64/Makefile
+++ b/target/x86_64/Makefile
@@ -8,6 +8,12 @@ include $(TOPDIR)/mk/kernel-build.mk
include $(TOPDIR)/mk/image.mk
KERNEL:=$(LINUX_DIR)/arch/x86/boot/bzImage
+
+QEMU_ARCH:=x86_64
+QEMU_ARGS:=-M pc
+QEMU_ARGS+=${ADK_QEMU_ARGS}
+QEMU_ARGS+=-net user -net nic,model=e1000
+
ifeq ($(ADK_TARGET_QEMU_WITH_BOOTLOADER),y)
ifeq ($(ADK_TARGET_QEMU_WITHOUT_GRAPHIC),y)
CREATE:=./scripts/create.sh -g -t
@@ -18,54 +24,90 @@ else
CREATE:=./scripts/create.sh
endif
+# target helper text
ifeq ($(ADK_TARGET_FS),archive)
-imageinstall: $(FW_DIR)/$(ROOTFSTARBALL)
- @echo 'The RootFS tarball is: ${FW_DIR}/${ROOTFSTARBALL}'
-ifeq ($(ADK_TARGET_SYSTEM_QEMU_X86_64),y)
- @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
+targethelp:
+ @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
+ifeq ($(ADK_HARDWARE_QEMU),y)
+ @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
@echo "Use following command to create a QEMU Image:"
- @echo "$(CREATE) qemu-${CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
- @echo "Start qemu with following command line:"
+ @echo "./scripts/create.sh qemu-${CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
+ @echo "Start qemu with following options:"
ifeq ($(ADK_TARGET_QEMU_WITH_BOOTLOADER),y)
- @echo 'qemu-system-x86_64 ${ADK_QEMU_ARGS} -net user -net nic,model=e1000 qemu-${CPU_ARCH}.img'
+ @echo 'qemu-system-${QEMU_ARCH} ${QEMU_ARGS} -net user -net nic,model=e1000 qemu-${CPU_ARCH}.img'
else
- @echo 'qemu-system-x86_64 ${ADK_QEMU_ARGS} -net user -net nic,model=e1000 -kernel $(FW_DIR)/$(TARGET_KERNEL) qemu-${CPU_ARCH}.img'
-endif
+ @echo 'qemu-system-${QEMU_ARCH} ${QEMU_ARGS} -net user -net nic,model=e1000 -kernel $(FW_DIR)/$(TARGET_KERNEL) qemu-${CPU_ARCH}.img'
endif
endif
-ifeq ($(ADK_TARGET_FS),initramfsarchive)
-imageinstall: $(FW_DIR)/$(ROOTFSUSERTARBALL)
+ifeq ($(ADK_HARDWARE_VBOX),y)
@cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
- @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
- @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
+ @echo "Use following command to create a VirtualBox Image:"
+ @echo "./scripts/create.sh -T vdi vbox-${CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
endif
-ifeq ($(ADK_TARGET_FS),usb)
-imageinstall: $(FW_DIR)/$(ROOTFSTARBALL)
- @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
- @echo "To install everything to USB use scripts/install.sh"
endif
ifeq ($(ADK_TARGET_FS),initramfs)
-imageinstall: $(FW_DIR)/$(INITRAMFS)
- @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
+targethelp:
@echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
@echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
-ifeq ($(ADK_TARGET_SYSTEM_QEMU_X86_64),y)
+ifeq ($(ADK_HARDWARE_QEMU),y)
@echo "Start qemu with following command line:"
- @echo 'qemu-system-x86_64 ${ADK_QEMU_ARGS} -net user -net nic,model=e1000 -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
+ @echo 'qemu-system-${QEMU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
endif
endif
-ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
-imageinstall: createinitramfs
- @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
+ifeq ($(ADK_TARGET_FS),initramfs-archive)
+targethelp:
@echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
-ifeq ($(ADK_TARGET_SYSTEM_QEMU_X86_64),y)
+ @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
+endif
+ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
+targethelp:
+ @echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
+ifeq ($(ADK_HARDWARE_QEMU),y)
@echo "Start qemu with following command line:"
- @echo 'qemu-system-x86_64 ${ADK_QEMU_ARGS} -net user -net nic,model=e1000 -kernel $(FW_DIR)/$(TARGET_KERNEL)'
+ @echo 'qemu-system-${QEMU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL)'
endif
endif
ifeq ($(ADK_TARGET_FS),nfsroot)
-imageinstall: $(FW_DIR)/$(ROOTFSUSERTARBALL)
- @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
- @echo 'The linux kernel is here: $(FW_DIR)/$(TARGET_KERNEL)'
+targethelp:
+ @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
@echo 'The nfs root tarball is: ${FW_DIR}/${ROOTFSUSERTARBALL}'
endif
+ifeq ($(ADK_TARGET_FS),usb)
+targethelp:
+ @echo 'The root tarball is: ${FW_DIR}/${ROOTFSTARBALL}'
+ @echo "To install everything to USB use scripts/install.sh"
+endif
+ifeq ($(ADK_TARGET_FS),iso)
+targethelp:
+ @echo 'ISO image is at $<'
+endif
+
+# image creation and kernel install
+kernel-strip:
+ @cp $(KERNEL) $(BUILD_DIR)/$(TARGET_KERNEL)
+
+kernel-install: kernel-strip
+ @cp $(BUILD_DIR)/$(TARGET_KERNEL) $(FW_DIR)/${TARGET_KERNEL}
+
+# filesystem specific targets
+ifeq ($(ADK_TARGET_FS),archive)
+imageinstall: $(FW_DIR)/$(ROOTFSTARBALL) targethelp
+endif
+ifeq ($(ADK_TARGET_FS),initramfs)
+imageinstall: kernel-install $(FW_DIR)/$(INITRAMFS) targethelp
+endif
+ifeq ($(ADK_TARGET_FS),initramfs-archive)
+imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
+endif
+ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
+imageinstall: createinitramfs targethelp
+endif
+ifeq (${ADK_TARGET_FS},iso)
+imageinstall: ${FW_DIR}/${ROOTFSISO} targethelp
+endif
+ifeq ($(ADK_TARGET_FS),nfsroot)
+imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
+endif
+ifeq ($(ADK_TARGET_FS),usb)
+imageinstall: $(FW_DIR)/$(ROOTFSTARBALL) targethelp
+endif