[OpenWrt-Devel] [PATCH] brcm47xx: image: build alternative TRX using less optimized LZMA

Stephen Parry sgparry at mainscreen.com
Sat Aug 23 16:29:28 EDT 2014


I for one second this patch. I have just bricked my router trying to get
the current trx image to work on my WNR3500L. I am not sure why it
worked previously but it does not now, but it was doing just as
described, hanging at "Starting program at 0x80001000". I thought it was
because the MTD command had failed, so I tried from CFE and
inadvertently overwrote my CFE - doh!

Stephen Parry

P.S. Sorry for first post without subject - noob error.

On 18/08/14 22:31, openwrt-devel-request at lists.openwrt.org wrote:
> Message: 2
> Date: Mon, 18 Aug 2014 21:44:46 +0200
> From: Rafa? Mi?ecki <zajec5 at gmail.com>
> To: Hauke Mehrtens <hauke at hauke-m.de>,	openwrt-devel at lists.openwrt.org
> Subject: [OpenWrt-Devel] [PATCH] brcm47xx: image: build alternative
> 	TRX	using less optimized LZMA
> Message-ID: <1408391086-7330-1-git-send-email-zajec5 at gmail.com>
> Content-Type: text/plain; charset=UTF-8
> 
> There is a group of devices that lzma-loader doesn't work with. They
> simply hang at "Starting program at 0x80001000" which is really hard to
> debug and we didn't find any solution for this for years.
> 
> Broadcom doesn't use lzma-loader on these devices anyway. They decided
> to drop lzma-loader and use less optimal LZMA compression that can be
> handled by CFE itself (it doesn't use dictionary).
> 
> So support these devices we will need kernel compressed with different
> parameters and trx without a loader.
> 
> Signed-off-by: Rafa? Mi?ecki <zajec5 at gmail.com>
> ---
>  target/linux/brcm47xx/image/Makefile | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/target/linux/brcm47xx/image/Makefile b/target/linux/brcm47xx/image/Makefile
> index 584bb6c..d19a13e 100644
> --- a/target/linux/brcm47xx/image/Makefile
> +++ b/target/linux/brcm47xx/image/Makefile
> @@ -12,7 +12,12 @@ define Build/Clean
>  endef
>  
>  define Image/Prepare
> +	# Optimized LZMA compression (with dictionary), handled by lzma-loader.
>  	cat $(KDIR)/vmlinux | $(STAGING_DIR_HOST)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux.lzma
> +
> +	# Less optimal LZMA compression (no dictionary), handled by CFE.
> +	$(STAGING_DIR_HOST)/bin/lzma e -so -d16 $(KDIR)/vmlinux > $(KDIR)/vmlinux-nodictionary.lzma
> +
>  	gzip -nc9 $(KDIR)/vmlinux > $(KDIR)/vmlinux.gz
>  ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
>  	cat $(KDIR)/vmlinux-initramfs | $(STAGING_DIR_HOST)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux-initramfs.lzma
> @@ -230,6 +235,9 @@ define Image/Build
>  	$(STAGING_DIR_HOST)/bin/trx -o $(BIN_DIR)/$(IMG_PREFIX)-$(1).trx \
>  		-f $(KDIR)/loader.gz -f $(KDIR)/vmlinux.lzma \
>  		$(call trxalign/$(1),$(1))
> +	$(STAGING_DIR_HOST)/bin/trx -o $(BIN_DIR)/$(IMG_PREFIX)-$(1)-noloader-nodictionary.trx \
> +		-f $(KDIR)/vmlinux-nodictionary.lzma \
> +		$(call trxalign/$(1),$(1))
>  	$(STAGING_DIR_HOST)/bin/trx -o $(BIN_DIR)/$(IMG_PREFIX)-$(1)-gz.trx \
>  		-f $(KDIR)/vmlinux.gz \
>  		$(call trxalign/$(1),$(1))
> -- 1.8.4.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list