mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2024-12-24 23:53:02 +00:00
bcm63xx: nand: support CFE partition tags
Introduce support for generating JFFS2 CFE partition tags. This is used in NAND devices in order to verify the integrity of the JFFS2 partition. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
This commit is contained in:
parent
d90828411a
commit
5998c8f059
@ -168,6 +168,9 @@ define Build/cfe-jffs2-cferam
|
|||||||
# Some devices need padding between CFE RAM and kernel
|
# Some devices need padding between CFE RAM and kernel
|
||||||
$(if $(CFE_RAM_JFFS2_PAD),$(call Build/pad-to,$(CFE_RAM_JFFS2_PAD)))
|
$(if $(CFE_RAM_JFFS2_PAD),$(call Build/pad-to,$(CFE_RAM_JFFS2_PAD)))
|
||||||
|
|
||||||
|
# Add CFE partition tag
|
||||||
|
$(if $(CFE_PART_ID),$(call Build/cfe-part-tag))
|
||||||
|
|
||||||
# Append kernel
|
# Append kernel
|
||||||
dd if=$@.kernel >> $@
|
dd if=$@.kernel >> $@
|
||||||
rm -f $@.kernel
|
rm -f $@.kernel
|
||||||
@ -204,6 +207,22 @@ define Build/cfe-jffs2-kernel
|
|||||||
$(call Build/cfe-jffs2,$@-kernel)
|
$(call Build/cfe-jffs2,$@-kernel)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define Build/cfe-part-tag
|
||||||
|
mv $@ $@.part
|
||||||
|
|
||||||
|
$(TOPDIR)/scripts/cfe-partition-tag.py \
|
||||||
|
--input-file $@.part \
|
||||||
|
--output-file $@ \
|
||||||
|
--flags $(CFE_PART_FLAGS) \
|
||||||
|
--id $(CFE_PART_ID) \
|
||||||
|
--name $(VERSION_CODE) \
|
||||||
|
--version $(DEVICE_NAME)
|
||||||
|
|
||||||
|
$(call Build/pad-to,$(BLOCKSIZE))
|
||||||
|
|
||||||
|
dd if=$@.part >> $@
|
||||||
|
endef
|
||||||
|
|
||||||
define Build/cfe-old-bin
|
define Build/cfe-old-bin
|
||||||
$(TOPDIR)/scripts/brcmImage.pl -t -p \
|
$(TOPDIR)/scripts/brcmImage.pl -t -p \
|
||||||
-o $@ -b $(CFE_BOARD_ID) -c $(CHIP_ID) \
|
-o $@ -b $(CFE_BOARD_ID) -c $(CHIP_ID) \
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
# BCM63XX NAND Profiles
|
# BCM63XX NAND Profiles
|
||||||
#
|
#
|
||||||
|
|
||||||
|
DEVICE_VARS += CFE_PART_FLAGS CFE_PART_ID
|
||||||
DEVICE_VARS += CFE_RAM_FILE
|
DEVICE_VARS += CFE_RAM_FILE
|
||||||
DEVICE_VARS += CFE_RAM_JFFS2_NAME CFE_RAM_JFFS2_PAD
|
DEVICE_VARS += CFE_RAM_JFFS2_NAME CFE_RAM_JFFS2_PAD
|
||||||
DEVICE_VARS += CFE_WFI_CHIP_ID CFE_WFI_FLASH_TYPE
|
DEVICE_VARS += CFE_WFI_CHIP_ID CFE_WFI_FLASH_TYPE
|
||||||
@ -21,6 +22,8 @@ define Device/bcm63xx-nand
|
|||||||
IMAGE/cfe.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | cfe-jffs2-cferam | append-ubi | cfe-wfi-tag
|
IMAGE/cfe.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | cfe-jffs2-cferam | append-ubi | cfe-wfi-tag
|
||||||
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
||||||
KERNEL_SIZE := 5120k
|
KERNEL_SIZE := 5120k
|
||||||
|
CFE_PART_FLAGS :=
|
||||||
|
CFE_PART_ID :=
|
||||||
CFE_RAM_FILE :=
|
CFE_RAM_FILE :=
|
||||||
CFE_RAM_JFFS2_NAME :=
|
CFE_RAM_JFFS2_NAME :=
|
||||||
CFE_RAM_JFFS2_PAD :=
|
CFE_RAM_JFFS2_PAD :=
|
||||||
|
Loading…
Reference in New Issue
Block a user