aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm4908
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2021-01-20 09:21:21 +0100
committerRafał Miłecki <rafal@milecki.pl>2021-01-21 13:18:42 +0100
commit4e1e18af653da81b07d3f12336925c82a07b0433 (patch)
tree1881241249d55af3757ecc6b99a399f62fb2a5c0 /target/linux/bcm4908
parent095ed5e8e1efd6da509be1064c5c7c9811fa32de (diff)
downloadupstream-4e1e18af653da81b07d3f12336925c82a07b0433.tar.gz
upstream-4e1e18af653da81b07d3f12336925c82a07b0433.tar.bz2
upstream-4e1e18af653da81b07d3f12336925c82a07b0433.zip
bcm4908: build flashable & bootable firmware images
BCM4908 bootloader requires firmware with JFFS2 image containing: 1. cferam.000 2. 94908.dtb 3. vmlinux.lz 4. device custom files cferam.000 can be obtained from the bcm63xx-cfe repository. device custom files are stored in images dir. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'target/linux/bcm4908')
-rw-r--r--target/linux/bcm4908/image/Makefile15
-rw-r--r--target/linux/bcm4908/image/asus_gt-ac5300/rom/etc/image_ident2
-rw-r--r--target/linux/bcm4908/image/asus_gt-ac5300/rom/etc/image_version1
-rw-r--r--target/linux/bcm4908/image/netgear_r8000p/etc/image_ident4
-rw-r--r--target/linux/bcm4908/image/netgear_r8000p/etc/image_version1
5 files changed, 23 insertions, 0 deletions
diff --git a/target/linux/bcm4908/image/Makefile b/target/linux/bcm4908/image/Makefile
index f5db38915d..afe88e6902 100644
--- a/target/linux/bcm4908/image/Makefile
+++ b/target/linux/bcm4908/image/Makefile
@@ -13,6 +13,19 @@ define Build/bcm4908kernel
mv $@.new $@
endef
+define Build/bcm4908img
+ rm -fr $@-bootfs
+ mkdir -p $@-bootfs
+ cp -r $(DEVICE_NAME)/* $@-bootfs/
+ touch $@-bootfs/1-dummy
+ cp $(DTS_DIR)/$(firstword $(DEVICE_DTS)).dtb $@-bootfs/94908.dtb
+ cp $(KDIR)/bcm63xx-cfe/$(subst _,$(comma),$(DEVICE_NAME))/cferam.000 $@-bootfs/
+ cp $(IMAGE_KERNEL) $@-bootfs/vmlinux.lz
+
+ $(STAGING_DIR_HOST)/bin/mkfs.jffs2 --pad --little-endian --squash-uids -v -e 128KiB -o $@-bootfs.jffs2 -d $@-bootfs -m none -n
+ $(STAGING_DIR_HOST)/bin/bcm4908img create $@ -f $@-bootfs.jffs2
+endef
+
define Device/Default
KERNEL := kernel-bin | bcm4908lzma | bcm4908kernel
KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts)
@@ -30,6 +43,7 @@ define Device/asus_gt-ac5300
DEVICE_MODEL := GT-AC5300
DEVICE_DTS := broadcom/bcm4908/bcm4908-asus-gt-ac5300
IMAGES := bin
+ IMAGE/bin := bcm4908img
endef
TARGET_DEVICES += asus_gt-ac5300
@@ -38,6 +52,7 @@ define Device/netgear_r8000p
DEVICE_MODEL := R8000P
DEVICE_DTS := broadcom/bcm4908/bcm4906-netgear-r8000p
IMAGES := bin
+ IMAGE/bin := bcm4908img
endef
TARGET_DEVICES += netgear_r8000p
diff --git a/target/linux/bcm4908/image/asus_gt-ac5300/rom/etc/image_ident b/target/linux/bcm4908/image/asus_gt-ac5300/rom/etc/image_ident
new file mode 100644
index 0000000000..9e73fe74a7
--- /dev/null
+++ b/target/linux/bcm4908/image/asus_gt-ac5300/rom/etc/image_ident
@@ -0,0 +1,2 @@
+@(#) $imageversion: HND1731918 $
+@(#) $imageversion: HND1731918 $
diff --git a/target/linux/bcm4908/image/asus_gt-ac5300/rom/etc/image_version b/target/linux/bcm4908/image/asus_gt-ac5300/rom/etc/image_version
new file mode 100644
index 0000000000..fd67746f78
--- /dev/null
+++ b/target/linux/bcm4908/image/asus_gt-ac5300/rom/etc/image_version
@@ -0,0 +1 @@
+HND1731918
diff --git a/target/linux/bcm4908/image/netgear_r8000p/etc/image_ident b/target/linux/bcm4908/image/netgear_r8000p/etc/image_ident
new file mode 100644
index 0000000000..15cb69d1af
--- /dev/null
+++ b/target/linux/bcm4908/image/netgear_r8000p/etc/image_ident
@@ -0,0 +1,4 @@
+@(#) $imageversion: 5024HNDrc11R8000P2602103 $
+@(#) $imageversion: 5024HNDrc11R8000P2602103 $
+@(#) $changelist: Changelist: REL_502HND04rc11_BISON04T_REL_7_14_170_34Revision: 765096 $
+@(#) $changelist: Changelist: REL_502HND04rc11_BISON04T_REL_7_14_170_34Revision: 765096 $
diff --git a/target/linux/bcm4908/image/netgear_r8000p/etc/image_version b/target/linux/bcm4908/image/netgear_r8000p/etc/image_version
new file mode 100644
index 0000000000..f469dfed31
--- /dev/null
+++ b/target/linux/bcm4908/image/netgear_r8000p/etc/image_version
@@ -0,0 +1 @@
+5024HNDrc11R8000P2602103