From 61b8a7cdc6c12e05262042b4f1e21ff16bfb47c6 Mon Sep 17 00:00:00 2001 From: blogic Date: Tue, 14 Feb 2012 17:48:04 +0000 Subject: [lantiq] Support booting the Speedport W502V using BRN-BOOT. While the disadvantage is less available flash space, it's easy and safe to flash without opening the device. Going back to the original firmware is also possible. This patch add two firmware utilities, mkbrncmdline and mkbrnboot. mkbrncmdline patches the uncompressed kernel so the registeres a0 to a3 are initialized and the memory size is passed in. mkbrnboot takes the lzma compressed kernel and squashfs images and creates a firmware image that can be flashed using the BRN-BOOT recovery kernel, which is booted by holding both buttons when powering up the device and will listen on http://192.168.2.1. The firmware file from bin/lantiq/ to use is openwrt-lantiq-danube-ARV4525PW-BRNDTW502-brnImage The BRN-BOOT recovery kernel does size-check the image, so if it's too big to fit into flash it will complain accordingly. A second patch is needed to make the wired network interface work since there is no u-boot to pre-initialise it. Signed-off-by: Tobias Diedrich git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30532 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- target/linux/lantiq/image/Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'target/linux/lantiq/image') diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile index 8c607b2151..9ccf45d188 100644 --- a/target/linux/lantiq/image/Makefile +++ b/target/linux/lantiq/image/Makefile @@ -23,6 +23,12 @@ define PatchKernelLzma $(call CompressLzma,$(KDIR)/vmlinux-$(1),$(KDIR)/vmlinux-$(1).lzma) endef +define MkBrnImage + mkbrncmdline -i $(KDIR)/vmlinux-$(4) -o $(KDIR)/vmlinux-$(4)-brn BRN-BOOT $(6) + $(call CompressLzma,$(KDIR)/vmlinux-$(4)-brn,$(KDIR)/vmlinux-$(4)-brn.lzma) + mkbrnimg -s $(1) -m $(2) -o $(3) $(KDIR)/vmlinux-$(4)-brn.lzma $(KDIR)/root.$(5) +endef + define MkImageLzma mkimage -A mips -O linux -T kernel -a 0x80002000 -C lzma \ -e 0x80002000 -n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \ @@ -32,6 +38,7 @@ endef define Image/Build/squashfs cat $(KDIR)/uImage-$(2) $(KDIR)/root.$(1) > $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image $(call prepare_generic_squashfs,$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image) + $(if $(3),$(call MkBrnImage,$(3),$(4),$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(3)-brnImage,$(2),$(1),$(5))) endef define Image/Build/jffs2-64k @@ -109,7 +116,7 @@ define Image/BuildKernel/Profile/ARV4525PW endef define Image/Build/Profile/ARV4525PW - $(call Image/Build/$(1),$(1),ARV4525PW) + $(call Image/Build/$(1),$(1),ARV4525PW,BRNDTW502,0x12345678,memsize=32) endef define Image/BuildKernel/Profile/ARV7525PW -- cgit v1.2.3