bcm53xx: image: specify flash type for all devices

This will allow us to add proper support for NAND one day.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 42937
lede-17.01
Rafał Miłecki 2014-10-16 20:44:44 +00:00
parent 299c8c3291
commit 241c098fa1
1 changed files with 22 additions and 13 deletions

View File

@ -13,7 +13,12 @@ define Image/Prepare
$(call prepare_generic_squashfs,$(KDIR)/fs_mark) $(call prepare_generic_squashfs,$(KDIR)/fs_mark)
endef endef
define trx2ndpart/serial
-a 1024 -f $(KDIR)/root.squashfs -a 0x10000 -A $(KDIR)/fs_mark
endef
# $(1): dts filename (also used for the firmware file). # $(1): dts filename (also used for the firmware file).
# $(2): flash type (not used).
define Image/Build/initramfs/DTB define Image/Build/initramfs/DTB
$(call Image/Build/DTB,zImage-initramfs,$(1)) $(call Image/Build/DTB,zImage-initramfs,$(1))
$(STAGING_DIR_HOST)/bin/trx -o $(KDIR)/$(IMG_PREFIX)-$(1)-initramfs.trx \ $(STAGING_DIR_HOST)/bin/trx -o $(KDIR)/$(IMG_PREFIX)-$(1)-initramfs.trx \
@ -21,11 +26,12 @@ define Image/Build/initramfs/DTB
endef endef
# $(1): dts filename (also used for the firmware file). # $(1): dts filename (also used for the firmware file).
# $(2): flash type.
define Image/Build/squashfs/DTB define Image/Build/squashfs/DTB
$(call Image/Build/DTB,zImage,$(1)) $(call Image/Build/DTB,zImage,$(1))
$(STAGING_DIR_HOST)/bin/trx -o $(KDIR)/$(IMG_PREFIX)-$(1)-squashfs.trx \ $(STAGING_DIR_HOST)/bin/trx -o $(KDIR)/$(IMG_PREFIX)-$(1)-squashfs.trx \
-f $(KDIR)/zImage-$(1).lzma \ -f $(KDIR)/zImage-$(1).lzma \
-a 1024 -f $(KDIR)/root.squashfs -a 0x10000 -A $(KDIR)/fs_mark $(call trx2ndpart/$(2))
endef endef
# $(1): kernel (Linux) image file # $(1): kernel (Linux) image file
@ -39,38 +45,41 @@ endef
# $(1): filesystem type (e.g. squashfs, initramfs). # $(1): filesystem type (e.g. squashfs, initramfs).
# $(2): dts filename (also used for the firmware file). # $(2): dts filename (also used for the firmware file).
# $(3): device specific magic. # $(3): flash type.
# $(4): device specific magic.
define Image/Build/AsusTrx define Image/Build/AsusTrx
$(call Image/Build/$(1)/DTB,$(2)) $(call Image/Build/$(1)/DTB,$(2),$(3))
# TODO: Put magic in TRX file # TODO: Put magic in TRX file
cp $(KDIR)/$(IMG_PREFIX)-$(2)-$(1).trx $(BIN_DIR)/ cp $(KDIR)/$(IMG_PREFIX)-$(2)-$(1).trx $(BIN_DIR)/
endef endef
# $(1): filesystem type (e.g. squashfs, initramfs). # $(1): filesystem type (e.g. squashfs, initramfs).
# $(2): dts filename (also used for the firmware file). # $(2): dts filename (also used for the firmware file).
# $(3): flash type.
define Image/Build/Trx define Image/Build/Trx
$(call Image/Build/$(1)/DTB,$(2)) $(call Image/Build/$(1)/DTB,$(2),$(3))
cp $(KDIR)/$(IMG_PREFIX)-$(2)-$(1).trx $(BIN_DIR)/ cp $(KDIR)/$(IMG_PREFIX)-$(2)-$(1).trx $(BIN_DIR)/
endef endef
# $(1): filesystem type (e.g. squashfs, initramfs). # $(1): filesystem type (e.g. squashfs, initramfs).
# $(2): dts filename (also used for the firmware file). # $(2): dts filename (also used for the firmware file).
# $(3): board_id (device specific magic). # $(3): flash type.
# $(4): region. # $(4): board_id (device specific magic).
# $(5): region.
define Image/Build/Chk define Image/Build/Chk
$(call Image/Build/$(1)/DTB,$(2)) $(call Image/Build/$(1)/DTB,$(2),$(3))
$(STAGING_DIR_HOST)/bin/mkchkimg -o $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).chk -k $(KDIR)/$(IMG_PREFIX)-$(2)-$(1).trx -b $(3) -r $(4) $(STAGING_DIR_HOST)/bin/mkchkimg -o $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).chk -k $(KDIR)/$(IMG_PREFIX)-$(2)-$(1).trx -b $(4) -r $(5)
endef endef
# $(1): filesystem type (e.g. squashfs, initramfs). # $(1): filesystem type (e.g. squashfs, initramfs).
define Image/Build define Image/Build
$(call Image/Build/AsusTrx,$(1),bcm47081-asus-rt-n18u,RT-N18U) $(call Image/Build/AsusTrx,$(1),bcm47081-asus-rt-n18u,serial,RT-N18U)
$(call Image/Build/Chk,$(1),bcm4708-netgear-r6250,U12H245T00_NETGEAR,1) $(call Image/Build/Chk,$(1),bcm4708-netgear-r6250,serial,U12H245T00_NETGEAR,1)
$(call Image/Build/Chk,$(1),bcm4708-netgear-r6300-v2,U12H240T00_NETGEAR,1) $(call Image/Build/Chk,$(1),bcm4708-netgear-r6300-v2,serial,U12H240T00_NETGEAR,1)
$(call Image/Build/Trx,$(1),bcm4708-buffalo-wzr-1750dhp) $(call Image/Build/Trx,$(1),bcm4708-buffalo-wzr-1750dhp,serial)
$(call Image/Build/Trx,$(1),bcm47081-buffalo-wzr-600dhp2) $(call Image/Build/Trx,$(1),bcm47081-buffalo-wzr-600dhp2,serial)
endef endef
define Image/Build/Initramfs define Image/Build/Initramfs