summaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-01-10 21:52:28 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-01-10 21:52:28 +0000
commit7a6a6464971c69fa1026aeaf8fad5c79250230e9 (patch)
treea68bcf07bd0d15b68d1b990877a55002585690b9 /target/linux
parent927fb16abb41cfeeee4e97b4baed2d5ce036ca2e (diff)
downloadmaster-31e0f0ae-7a6a6464971c69fa1026aeaf8fad5c79250230e9.tar.gz
master-31e0f0ae-7a6a6464971c69fa1026aeaf8fad5c79250230e9.tar.bz2
master-31e0f0ae-7a6a6464971c69fa1026aeaf8fad5c79250230e9.zip
Add initial version of the new Image Builder It's still a bit rough in a few places, but it seems to work for Broadcom at least - other targets untested.
SVN-Revision: 6071
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/atheros-2.6/image/Makefile6
-rw-r--r--target/linux/ixp4xx-2.6/image/Makefile3
-rw-r--r--target/linux/magicbox-2.6/image/Makefile5
-rw-r--r--target/linux/rb532-2.6/image/Makefile8
-rw-r--r--target/linux/rdc-2.6/image/Makefile3
-rwxr-xr-xtarget/linux/uml-2.6/image/Makefile6
-rw-r--r--target/linux/x86-2.6/image/Makefile6
7 files changed, 26 insertions, 11 deletions
diff --git a/target/linux/atheros-2.6/image/Makefile b/target/linux/atheros-2.6/image/Makefile
index fb8cf3ced2..80e3335920 100644
--- a/target/linux/atheros-2.6/image/Makefile
+++ b/target/linux/atheros-2.6/image/Makefile
@@ -7,8 +7,12 @@
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
+define Image/Prepare
+ cp $(KDIR)/linux-*/vmlinux $(KDIR)/vmlinux.elf
+endef
+
define Image/BuildKernel
- cp $(KDIR)/linux-*/vmlinux $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinux.elf
+ cp $(KDIR)/vmlinux.elf $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinux.elf
gzip -9 -c $(KDIR)/vmlinux > $(KDIR)/vmlinux.bin.gz
$(STAGING_DIR)/bin/lzma e $(KDIR)/vmlinux $(KDIR)/vmlinux.bin.l7
dd if=$(KDIR)/vmlinux.bin.l7 of=$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinux.lzma bs=65536 conv=sync
diff --git a/target/linux/ixp4xx-2.6/image/Makefile b/target/linux/ixp4xx-2.6/image/Makefile
index 9359c5b11e..cbbb29b6b9 100644
--- a/target/linux/ixp4xx-2.6/image/Makefile
+++ b/target/linux/ixp4xx-2.6/image/Makefile
@@ -24,10 +24,11 @@ define Build/Clean
endef
define Image/Prepare
+ cp $(LINUX_DIR)/arch/arm/boot/zImage $(KDIR)/zImage
endef
define Image/BuildKernel
- cp $(LINUX_DIR)/arch/arm/boot/zImage $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-zImage
+ cp $(KDIR)/zImage $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-zImage
# $(shell BIN_DIR=$(BIN_DIR) $(TOPDIR)/scripts/arm-magic.sh)
BIN_DIR=$(BIN_DIR) $(TOPDIR)/scripts/arm-magic.sh
endef
diff --git a/target/linux/magicbox-2.6/image/Makefile b/target/linux/magicbox-2.6/image/Makefile
index 10f71df2a9..77ff88f521 100644
--- a/target/linux/magicbox-2.6/image/Makefile
+++ b/target/linux/magicbox-2.6/image/Makefile
@@ -11,10 +11,11 @@ define Build/Clean
endef
define Image/Prepare
+ cp $(LINUX_DIR)/arch/ppc/boot/images/uImage $(KDIR)/uImage
endef
define Image/BuildKernel
- cp $(LINUX_DIR)/arch/ppc/boot/images/uImage $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-uImage
+ cp $(KDIR)/uImage $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-uImage
endef
define Image/Build
@@ -23,7 +24,7 @@ endef
define Image/Build/jffs2-64k
( \
- dd if=$(LINUX_DIR)/arch/ppc/boot/images/uImage bs=65536 conv=sync; \
+ dd if=$(KDIR)/uImage bs=65536 conv=sync; \
dd if=$(KDIR)/root.$(1) bs=65536 conv=sync; \
) > $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).img
endef
diff --git a/target/linux/rb532-2.6/image/Makefile b/target/linux/rb532-2.6/image/Makefile
index 4e1c1addd1..706b672e74 100644
--- a/target/linux/rb532-2.6/image/Makefile
+++ b/target/linux/rb532-2.6/image/Makefile
@@ -29,13 +29,13 @@ define Build/Clean
endef
define Image/Prepare
- $(STAGING_DIR)/bin/patch-cmdline $(LINUX_DIR)/vmlinux 'root=/dev/cfa2 '
$(KERNEL_CROSS)objcopy -O binary -R .reginfo -R .note -R .comment -R .mdebug -S $(LINUX_DIR)/vmlinux $(LINUX_KERNEL)
+ cat $(KDIR)/vmlinux | $(STAGING_DIR)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux.lzma
+ $(MAKE) -C $(GENERIC_PLATFORM_DIR)/image/lzma-loader $(LOADER_MAKEOPTS) clean compile
+ cp $(LINUX_DIR)/vmlinux $(KDIR)/vmlinux.elf
endef
define Image/BuildKernel
- cat $(KDIR)/vmlinux | $(STAGING_DIR)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux.lzma
- $(MAKE) -C $(GENERIC_PLATFORM_DIR)/image/lzma-loader $(LOADER_MAKEOPTS) clean compile
$(CP) $(KDIR)/loader.elf $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinux
endef
@@ -52,7 +52,7 @@ root=/dev/cfa2 rootfstype=ext2
endef
define Image/Build
- $(STAGING_DIR)/bin/patch-cmdline $(LINUX_DIR)/vmlinux '$(strip $(call Image/cmdline/$(1))) '
+ $(STAGING_DIR)/bin/patch-cmdline $(KDIR)/vmlinux.elf '$(strip $(call Image/cmdline/$(1))) '
./gen_image.sh $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).bin 4 $(LINUX_DIR)/vmlinux 16 $(KDIR)/root.$(1)
endef
diff --git a/target/linux/rdc-2.6/image/Makefile b/target/linux/rdc-2.6/image/Makefile
index 13c8718430..078e754e10 100644
--- a/target/linux/rdc-2.6/image/Makefile
+++ b/target/linux/rdc-2.6/image/Makefile
@@ -11,11 +11,12 @@ define Build/Clean
endef
define Image/Prepare
+ $(CP) $(LINUX_DIR)/arch/i386/boot/bzImage $(KDIR)/bzImage
endef
define Image/Build
touch $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).img
- $(STAGING_DIR)/bin/airlink -b 0 -j $(LINUX_DIR)/arch/i386/boot/bzImage $(KDIR)/root.$(1) $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).img
+ $(STAGING_DIR)/bin/airlink -b 0 -j $(KDIR)/bzImage $(KDIR)/root.$(1) $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).img
endef
$(eval $(call BuildImage))
diff --git a/target/linux/uml-2.6/image/Makefile b/target/linux/uml-2.6/image/Makefile
index 6af4b8b816..b7bd9e9e65 100755
--- a/target/linux/uml-2.6/image/Makefile
+++ b/target/linux/uml-2.6/image/Makefile
@@ -7,9 +7,13 @@
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
+define Image/Prepare
+ cp $(LINUX_DIR)/linux $(KDIR)/vmlinux.elf
+endef
+
define Image/Build
cp $(KDIR)/root.$(1) $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).img
- cp $(LINUX_DIR)/linux $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinux
+ cp $(KDIR)/vmlinux.elf $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinux
endef
$(eval $(call BuildImage))
diff --git a/target/linux/x86-2.6/image/Makefile b/target/linux/x86-2.6/image/Makefile
index e1425676dd..44c2ff7e3b 100644
--- a/target/linux/x86-2.6/image/Makefile
+++ b/target/linux/x86-2.6/image/Makefile
@@ -49,10 +49,14 @@ ifeq ($(CONFIG_X86_GRUB_IMAGES),y)
endef
endif
+define Image/Prepare
+ cp $(LINUX_DIR)/arch/i386/boot/bzImage $(KDIR)/bzImage
+endef
+
define Image/Build
$(call Image/Build/grub,$(1))
cp $(KDIR)/root.$(1) $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).fs
- cp $(LINUX_DIR)/arch/i386/boot/bzImage $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinuz
+ cp $(KDIR)/bzImage $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinuz
endef
$(eval $(call BuildImage))