|
@@ -4,6 +4,7 @@ include $(TOPDIR)/rules.mk
|
|
include $(INCLUDE_DIR)/image.mk
|
|
include $(INCLUDE_DIR)/image.mk
|
|
|
|
|
|
KERNEL_LOADADDR := 0x80010000 # RAM start + 64K
|
|
KERNEL_LOADADDR := 0x80010000 # RAM start + 64K
|
|
|
|
+UBOOT_ENTRY := 0x81c00000
|
|
LOADER_ENTRY := 0x81000000 # RAM start + 16M, for relocate
|
|
LOADER_ENTRY := 0x81000000 # RAM start + 16M, for relocate
|
|
LZMA_TEXT_START := 0x82000000 # RAM start + 32M
|
|
LZMA_TEXT_START := 0x82000000 # RAM start + 32M
|
|
|
|
|
|
@@ -94,6 +95,21 @@ define Build/cfe-bin
|
|
$(CFE_EXTRAS) $(1)
|
|
$(CFE_EXTRAS) $(1)
|
|
endef
|
|
endef
|
|
|
|
|
|
|
|
+# Build a CFE image with just U-Boot
|
|
|
|
+define Build/cfe-bin-uboot
|
|
|
|
+ cp $(STAGING_DIR_IMAGE)/$(DEVICE_NAME)-u-boot.bin $@
|
|
|
|
+ $(call Build/lzma)
|
|
|
|
+ mv $@ [email protected]
|
|
|
|
+ echo "dummy" > [email protected]
|
|
|
|
+ $(STAGING_DIR_HOST)/bin/imagetag -i [email protected] -f [email protected] \
|
|
|
|
+ --output $@ --boardid $(CFE_BOARD_ID) --chipid $(CHIP_ID) \
|
|
|
|
+ --entry $(UBOOT_ENTRY) --load-addr $(UBOOT_ENTRY) \
|
|
|
|
+ --info1 "$(call ModelNameLimit16,$(DEVICE_NAME))" \
|
|
|
|
+ $(CFE_EXTRAS) $(1)
|
|
|
|
+ rm [email protected]
|
|
|
|
+ rm [email protected]
|
|
|
|
+endef
|
|
|
|
+
|
|
define Build/cfe-jffs2
|
|
define Build/cfe-jffs2
|
|
$(STAGING_DIR_HOST)/bin/mkfs.jffs2 \
|
|
$(STAGING_DIR_HOST)/bin/mkfs.jffs2 \
|
|
--big-endian \
|
|
--big-endian \
|
|
@@ -284,6 +300,21 @@ define Device/bcm63xx-cfe-legacy
|
|
KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma-cfe
|
|
KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma-cfe
|
|
endef
|
|
endef
|
|
|
|
|
|
|
|
+# CFE images with U-Boot in front of the kernel, these will execute
|
|
|
|
+# U-Boot instead of the kernel and U-Boot will then proceed to load
|
|
|
|
+# the kernel. The reason to do this is that CFE is sometimes unable to
|
|
|
|
+# load big kernels even with the lzma loader tricks.
|
|
|
|
+define Device/bcm63xx-cfe-uboot
|
|
|
|
+ $(Device/bcm63xx-cfe)
|
|
|
|
+ KERNEL := kernel-bin | append-dtb | lzma | uImage lzma
|
|
|
|
+ IMAGE/cfe.bin := cfe-bin-uboot | pad-to $$$$$$$$(($$(BLOCKSIZE))) | \
|
|
|
|
+ append-kernel | pad-to $$$$$$$$(($$(BLOCKSIZE))) | \
|
|
|
|
+ append-rootfs $$$$(if $$$$(FLASH_MB),--pad $$$$(shell expr $$$$(FLASH_MB) / 2))
|
|
|
|
+ IMAGE/sysupgrade.bin := cfe-bin-uboot | pad-to $$$$$$$$(($$(BLOCKSIZE))) | \
|
|
|
|
+ append-kernel | pad-to $$$$$$$$(($$(BLOCKSIZE))) | \
|
|
|
|
+ append-rootfs | append-metadata
|
|
|
|
+endef
|
|
|
|
+
|
|
# CFE expects a single JFFS2 partition with cferam and kernel. However,
|
|
# CFE expects a single JFFS2 partition with cferam and kernel. However,
|
|
# it's possible to fool CFE into properly loading both cferam and kernel
|
|
# it's possible to fool CFE into properly loading both cferam and kernel
|
|
# from two different JFFS2 partitions by adding dummy files (see
|
|
# from two different JFFS2 partitions by adding dummy files (see
|