summaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorPhil Sutter <phil.sutter@viprinet.com>2012-01-12 19:36:37 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2012-01-15 11:23:46 +0100
commit6e06191abda82fa771eeec309cb529c1dad26cef (patch)
tree926246a398f4a63559e69482adf4f21eff1a66fd /target
parent51a0c4d0d98e758c9e7d4d06f2580d8e92ed3caf (diff)
mk/image.mk: improve and simplify initramfs generation
Using the kernel tools is a lot better than calling cpio ourselfs, as this way we can have it create device nodes for us. So no need to reopen /dev/console and things like that. While here, fix also initramfs compression (untested), as in my experience the kernel drops all symbols regarding compression from it's .config in the first compile phase. Probably one should make the actual compression algorithm configurable (and ideally depending on what the kernel supports for the given architecture). This is a rough hack based on what I'm using in the custom viprinux build file, so something like this is already running somewhere. ;)
Diffstat (limited to 'target')
-rw-r--r--target/arm/Makefile2
-rw-r--r--target/avr32/Makefile2
-rw-r--r--target/cris/Makefile2
-rw-r--r--target/mips/Makefile2
-rw-r--r--target/native/Makefile2
-rw-r--r--target/ppc/Makefile2
-rw-r--r--target/ppc64/Makefile2
-rw-r--r--target/sh/Makefile2
-rw-r--r--target/sparc/Makefile2
-rw-r--r--target/sparc64/Makefile2
-rw-r--r--target/x86/Makefile2
-rw-r--r--target/x86_64/Makefile2
12 files changed, 12 insertions, 12 deletions
diff --git a/target/arm/Makefile b/target/arm/Makefile
index 9a0fb2459..0da655e9f 100644
--- a/target/arm/Makefile
+++ b/target/arm/Makefile
@@ -74,7 +74,7 @@ ifeq ($(ADK_TARGET_SYSTEM_QEMU_ARM),y)
endif
endif
ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
-imageinstall: ${BUILD_DIR}/${INITRAMFS_PIGGYBACK} createinitramfs
+imageinstall: createinitramfs
@cp $(KERNEL) $(BIN_DIR)/$(TARGET_KERNEL)
@echo 'The kernel+initramfs file is: $(BIN_DIR)/${TARGET_KERNEL}'
ifeq ($(ADK_TARGET_SYSTEM_QEMU_ARM),y)
diff --git a/target/avr32/Makefile b/target/avr32/Makefile
index c1ba25591..f33b0d854 100644
--- a/target/avr32/Makefile
+++ b/target/avr32/Makefile
@@ -22,7 +22,7 @@ imageinstall: $(BIN_DIR)/$(INITRAMFS)
@echo 'The initramfs image is: ${BIN_DIR}/${INITRAMFS}'
endif
ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
-imageinstall: ${BUILD_DIR}/${INITRAMFS_PIGGYBACK} createinitramfs
+imageinstall: createinitramfs
@cp $(KERNEL) $(BIN_DIR)/${TARGET_KERNEL}
@echo 'The kernel+initramfs file is: $(BIN_DIR)/${TARGET_KERNEL}'
endif
diff --git a/target/cris/Makefile b/target/cris/Makefile
index 21cf33c85..34e5ce542 100644
--- a/target/cris/Makefile
+++ b/target/cris/Makefile
@@ -66,7 +66,7 @@ ifeq ($(ADK_TARGET_SYSTEM_QEMU_CRIS),y)
endif
endif
ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
-imageinstall: ${BUILD_DIR}/${INITRAMFS_PIGGYBACK} createinitramfs
+imageinstall: createinitramfs
@cp $(KERNEL) $(BIN_DIR)/${TARGET_KERNEL}
@echo 'The kernel+initramfs file is: $(BIN_DIR)/${TARGET_KERNEL}'
ifeq ($(ADK_TARGET_SYSTEM_QEMU_CRIS),y)
diff --git a/target/mips/Makefile b/target/mips/Makefile
index 215bb8e01..876c39352 100644
--- a/target/mips/Makefile
+++ b/target/mips/Makefile
@@ -131,7 +131,7 @@ ifneq ($(ADK_HARDWARE_QEMU),)
endif
endif
ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
-imageinstall: ${BUILD_DIR}/${INITRAMFS_PIGGYBACK} createinitramfs
+imageinstall: createinitramfs
@cp $(KERNEL) $(BIN_DIR)/$(TARGET_KERNEL)
@echo 'The kernel+initramfs file is: $(BIN_DIR)/${TARGET_KERNEL}'
ifneq ($(ADK_HARDWARE_QEMU),)
diff --git a/target/native/Makefile b/target/native/Makefile
index a36e26bb8..7d267a292 100644
--- a/target/native/Makefile
+++ b/target/native/Makefile
@@ -21,7 +21,7 @@ imageinstall: $(BIN_DIR)/$(INITRAMFS)
@echo 'The initramfs image is: ${BIN_DIR}/${INITRAMFS}'
endif
ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
-imageinstall: ${BUILD_DIR}/${INITRAMFS_PIGGYBACK} createinitramfs
+imageinstall: createinitramfs
@cp $(KERNEL) $(BIN_DIR)/${TARGET_KERNEL}
@echo 'The kernel+initramfs file is: ${BIN_DIR}/${TARGET_KERNEL}'
endif
diff --git a/target/ppc/Makefile b/target/ppc/Makefile
index 47a4b7df1..bbf95008f 100644
--- a/target/ppc/Makefile
+++ b/target/ppc/Makefile
@@ -33,7 +33,7 @@ ifeq ($(ADK_TARGET_SYSTEM_QEMU_PPC),y)
endif
endif
ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
-imageinstall: ${BUILD_DIR}/${INITRAMFS_PIGGYBACK} createinitramfs
+imageinstall: createinitramfs
@cp $(KERNEL) $(BIN_DIR)/${TARGET_KERNEL}
@echo 'The kernel+initramfs file is: $(BIN_DIR)/${TARGET_KERNEL}'
ifeq ($(ADK_TARGET_SYSTEM_QEMU_PPC),y)
diff --git a/target/ppc64/Makefile b/target/ppc64/Makefile
index 0e9ac9547..7f84cbfe4 100644
--- a/target/ppc64/Makefile
+++ b/target/ppc64/Makefile
@@ -26,7 +26,7 @@ ifeq ($(ADK_TARGET_SYSTEM_QEMU_PPC64),y)
endif
endif
ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
-imageinstall: ${BUILD_DIR}/${INITRAMFS_PIGGYBACK} createinitramfs
+imageinstall: createinitramfs
@cp $(KERNEL) $(BIN_DIR)/${TARGET_KERNEL}
@echo 'The kernel+initramfs file is: $(BIN_DIR)/${TARGET_KERNEL}'
ifeq ($(ADK_TARGET_SYSTEM_QEMU_PPC64),y)
diff --git a/target/sh/Makefile b/target/sh/Makefile
index 63a237839..86570eaeb 100644
--- a/target/sh/Makefile
+++ b/target/sh/Makefile
@@ -26,7 +26,7 @@ ifeq ($(ADK_TARGET_SYSTEM_QEMU_SH),y)
endif
endif
ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
-imageinstall: ${BUILD_DIR}/${INITRAMFS_PIGGYBACK} createinitramfs
+imageinstall: createinitramfs
@cp $(KERNEL) $(BIN_DIR)/${TARGET_KERNEL}
@echo 'The kernel+initramfs file is: $(BIN_DIR)/${TARGET_KERNEL}'
ifeq ($(ADK_TARGET_SYSTEM_QEMU_SH),y)
diff --git a/target/sparc/Makefile b/target/sparc/Makefile
index 7a19300b4..010f6e3d7 100644
--- a/target/sparc/Makefile
+++ b/target/sparc/Makefile
@@ -32,7 +32,7 @@ ifeq ($(ADK_TARGET_SYSTEM_QEMU_SPARC),y)
endif
endif
ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
-imageinstall: ${BUILD_DIR}/${INITRAMFS_PIGGYBACK} createinitramfs
+imageinstall: createinitramfs
@cp $(KERNEL) $(BIN_DIR)/${TARGET_KERNEL}
@echo 'The kernel+initramfs file is: $(BIN_DIR)/${TARGET_KERNEL}'
ifeq ($(ADK_TARGET_SYSTEM_QEMU_SPARC),y)
diff --git a/target/sparc64/Makefile b/target/sparc64/Makefile
index d3d46d571..d61633f6a 100644
--- a/target/sparc64/Makefile
+++ b/target/sparc64/Makefile
@@ -32,7 +32,7 @@ ifeq ($(ADK_TARGET_SYSTEM_QEMU_SPARC64),y)
endif
endif
ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
-imageinstall: ${BUILD_DIR}/${INITRAMFS_PIGGYBACK} createinitramfs
+imageinstall: createinitramfs
@cp $(KERNEL) $(BIN_DIR)/${TARGET_KERNEL}
@echo 'The kernel+initramfs file is: $(BIN_DIR)/${TARGET_KERNEL}'
ifeq ($(ADK_TARGET_SYSTEM_QEMU_SPARC64),y)
diff --git a/target/x86/Makefile b/target/x86/Makefile
index dc17f0756..aa5bdc2d7 100644
--- a/target/x86/Makefile
+++ b/target/x86/Makefile
@@ -47,7 +47,7 @@ ifeq ($(ADK_HARDWARE_QEMU),y)
endif
endif
ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
-imageinstall: ${BUILD_DIR}/${INITRAMFS_PIGGYBACK} createinitramfs
+imageinstall: createinitramfs
@cp $(KERNEL) $(BIN_DIR)/${TARGET_KERNEL}
@echo 'The kernel+initramfs file is: $(BIN_DIR)/${TARGET_KERNEL}'
ifeq ($(ADK_HARDWARE_QEMU),y)
diff --git a/target/x86_64/Makefile b/target/x86_64/Makefile
index 9a834219e..c5e488943 100644
--- a/target/x86_64/Makefile
+++ b/target/x86_64/Makefile
@@ -36,7 +36,7 @@ ifeq ($(ADK_TARGET_SYSTEM_QEMU_X86_64),y)
endif
endif
ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
-imageinstall: ${BUILD_DIR}/${INITRAMFS_PIGGYBACK} createinitramfs
+imageinstall: createinitramfs
@cp $(KERNEL) $(BIN_DIR)/$(TARGET_KERNEL)
@echo 'The kernel file is: $(BIN_DIR)/${TARGET_KERNEL}'
ifeq ($(ADK_TARGET_SYSTEM_QEMU_X86_64),y)