brcm47xx: image: build alternative TRX using less optimized LZMA
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@gmail.com> SVN-Revision: 42205
This commit is contained in:
parent
32b3f9cdc6
commit
09739f8ba5
1 changed files with 8 additions and 0 deletions
|
@ -12,7 +12,12 @@ define Build/Clean
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Image/Prepare
|
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
|
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
|
gzip -nc9 $(KDIR)/vmlinux > $(KDIR)/vmlinux.gz
|
||||||
ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
|
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
|
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 \
|
$(STAGING_DIR_HOST)/bin/trx -o $(BIN_DIR)/$(IMG_PREFIX)-$(1).trx \
|
||||||
-f $(KDIR)/loader.gz -f $(KDIR)/vmlinux.lzma \
|
-f $(KDIR)/loader.gz -f $(KDIR)/vmlinux.lzma \
|
||||||
$(call trxalign/$(1),$(1))
|
$(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 \
|
$(STAGING_DIR_HOST)/bin/trx -o $(BIN_DIR)/$(IMG_PREFIX)-$(1)-gz.trx \
|
||||||
-f $(KDIR)/vmlinux.gz \
|
-f $(KDIR)/vmlinux.gz \
|
||||||
$(call trxalign/$(1),$(1))
|
$(call trxalign/$(1),$(1))
|
||||||
|
|
Loading…
Reference in a new issue