aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/rb532-2.6/image/Makefile
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2006-12-06 18:31:28 +0000
committerFelix Fietkau <nbd@openwrt.org>2006-12-06 18:31:28 +0000
commitdecda6f17f46f8828ea38d16a49717d2a77910e7 (patch)
tree90a4c4a25d820e450f23fec4bc08441ffc1ae871 /target/linux/rb532-2.6/image/Makefile
parentede0d279ad9d5bf0cdb696000baa75e3faaec02a (diff)
downloadupstream-decda6f17f46f8828ea38d16a49717d2a77910e7.tar.gz
upstream-decda6f17f46f8828ea38d16a49717d2a77910e7.tar.bz2
upstream-decda6f17f46f8828ea38d16a49717d2a77910e7.zip
replace the ugly rb532 cmdline hack with a cleaner one that does not depend on magic offsets
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@5699 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/rb532-2.6/image/Makefile')
-rw-r--r--target/linux/rb532-2.6/image/Makefile15
1 files changed, 6 insertions, 9 deletions
diff --git a/target/linux/rb532-2.6/image/Makefile b/target/linux/rb532-2.6/image/Makefile
index 27e4357a83..4907214469 100644
--- a/target/linux/rb532-2.6/image/Makefile
+++ b/target/linux/rb532-2.6/image/Makefile
@@ -20,17 +20,16 @@ LOADER_MAKEOPTS= \
RAMSIZE=$(RAMSIZE) \
IMAGE_COPY=$(IMAGE_COPY)
+define Build/Compile
+ $(CC) -o $(STAGING_DIR)/bin/patch-cmdline $(PLATFORM_DIR)/src/patch-cmdline.c
+endef
+
define Build/Clean
$(MAKE) -C ../../generic-2.6/image/lzma-loader $(LOADER_MAKEOPTS) clean
endef
-CMDLINE_SIZE=512
-CMDLINE_OFFSET=4112
-
define Image/Prepare
- echo 'root=/dev/cfa2 ' | \
- dd bs=$(CMDLINE_SIZE) count=1 conv=sync | \
- dd of=$(LINUX_DIR)/vmlinux bs=$(CMDLINE_OFFSET) conv=notrunc seek=1
+ $(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)
endef
@@ -56,9 +55,7 @@ root=/dev/cfa2 rootfstype=ext2
endef
define Image/Build
- echo '$(strip $(call Image/cmdline/$(1))) ' | \
- dd bs=$(CMDLINE_SIZE) count=1 conv=sync | \
- dd of=$(LINUX_DIR)/vmlinux bs=$(CMDLINE_OFFSET) conv=notrunc seek=1
+ $(STAGING_DIR)/bin/patch-cmdline $(LINUX_DIR)/vmlinux '$(strip $(call Image/cmdline/$(1))) '
( \
echo -ne OWRT | dd bs=$$$$((0x1be)) conv=sync; \
( \