[openwrt/openwrt] bcm4908: append UBI with rootfs to device images
LEDE Commits
lede-commits at lists.infradead.org
Thu Jan 21 07:43:53 EST 2021
rmilecki pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/e78d3e44dddaaa89e101b42574f13bc6aeb6b6ae
commit e78d3e44dddaaa89e101b42574f13bc6aeb6b6ae
Author: Rafał Miłecki <rafal at milecki.pl>
AuthorDate: Thu Jan 21 13:23:56 2021 +0100
bcm4908: append UBI with rootfs to device images
Also enable UBI kernel support.
Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
---
target/linux/bcm4908/config-5.4 | 25 +++++++++++++++++++++++++
target/linux/bcm4908/image/Makefile | 7 ++++---
2 files changed, 29 insertions(+), 3 deletions(-)
diff --git a/target/linux/bcm4908/config-5.4 b/target/linux/bcm4908/config-5.4
index aa2e088756..3dfa7b21dc 100644
--- a/target/linux/bcm4908/config-5.4
+++ b/target/linux/bcm4908/config-5.4
@@ -52,13 +52,19 @@ CONFIG_CMDLINE="earlycon=bcm63xx_uart,0xff800640 console=ttyS0,115200"
CONFIG_CMDLINE_FORCE=y
CONFIG_COMMON_CLK=y
CONFIG_CPU_RMAP=y
+CONFIG_CRC16=y
+CONFIG_CRYPTO_ACOMP2=y
CONFIG_CRYPTO_AEAD=y
CONFIG_CRYPTO_AEAD2=y
+CONFIG_CRYPTO_DEFLATE=y
CONFIG_CRYPTO_HASH2=y
+CONFIG_CRYPTO_HASH_INFO=y
+CONFIG_CRYPTO_LZO=y
CONFIG_CRYPTO_MANAGER=y
CONFIG_CRYPTO_MANAGER2=y
CONFIG_CRYPTO_NULL2=y
CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_ZSTD=y
CONFIG_DCACHE_WORD_ACCESS=y
CONFIG_DMA_DIRECT_REMAP=y
CONFIG_DMA_REMAP=y
@@ -114,10 +120,13 @@ CONFIG_IRQ_DOMAIN=y
CONFIG_IRQ_DOMAIN_HIERARCHY=y
CONFIG_IRQ_FORCED_THREADING=y
CONFIG_IRQ_WORK=y
+# CONFIG_JFFS2_FS is not set
CONFIG_LEDS_GPIO=y
CONFIG_LIBFDT=y
CONFIG_LOCK_DEBUGGING_SUPPORT=y
CONFIG_LOCK_SPIN_ON_OWNER=y
+CONFIG_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
CONFIG_MDIO_BCM_UNIMAC=y
CONFIG_MDIO_BUS=y
CONFIG_MDIO_DEVICE=y
@@ -129,6 +138,11 @@ CONFIG_MTD_NAND_BRCMNAND=y
CONFIG_MTD_NAND_CORE=y
CONFIG_MTD_NAND_ECC_SW_HAMMING=y
CONFIG_MTD_RAW_NAND=y
+CONFIG_MTD_SPLIT_BCM_WFI_FW=y
+CONFIG_MTD_UBI=y
+CONFIG_MTD_UBI_BEB_LIMIT=20
+CONFIG_MTD_UBI_BLOCK=y
+CONFIG_MTD_UBI_WL_THRESHOLD=4096
CONFIG_MUTEX_SPIN_ON_OWNER=y
CONFIG_NEED_DMA_MAP_STATE=y
CONFIG_NEED_SG_DMA_LENGTH=y
@@ -180,6 +194,7 @@ CONFIG_RWSEM_SPIN_ON_OWNER=y
# CONFIG_SERIAL_8250 is not set
CONFIG_SERIAL_BCM63XX=y
CONFIG_SERIAL_BCM63XX_CONSOLE=y
+CONFIG_SGL_ALLOC=y
CONFIG_SMP=y
CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
CONFIG_SPARSE_IRQ=y
@@ -194,8 +209,18 @@ CONFIG_TIMER_OF=y
CONFIG_TIMER_PROBE=y
CONFIG_TREE_RCU=y
CONFIG_TREE_SRCU=y
+CONFIG_UBIFS_FS=y
+# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set
+CONFIG_UBIFS_FS_LZO=y
+CONFIG_UBIFS_FS_ZLIB=y
+CONFIG_UBIFS_FS_ZSTD=y
CONFIG_UNMAP_KERNEL_AT_EL0=y
CONFIG_USB_SUPPORT=y
CONFIG_VMAP_STACK=y
CONFIG_XPS=y
+CONFIG_XXHASH=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_ZLIB_INFLATE=y
CONFIG_ZONE_DMA32=y
+CONFIG_ZSTD_COMPRESS=y
+CONFIG_ZSTD_DECOMPRESS=y
diff --git a/target/linux/bcm4908/image/Makefile b/target/linux/bcm4908/image/Makefile
index afe88e6902..d6b5f07e2a 100644
--- a/target/linux/bcm4908/image/Makefile
+++ b/target/linux/bcm4908/image/Makefile
@@ -23,7 +23,8 @@ define Build/bcm4908img
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
+ $(STAGING_DIR_HOST)/bin/bcm4908img create $@.new -f $@-bootfs.jffs2 -a 0x20000 -f $@
+ mv $@.new $@
endef
define Device/Default
@@ -43,7 +44,7 @@ define Device/asus_gt-ac5300
DEVICE_MODEL := GT-AC5300
DEVICE_DTS := broadcom/bcm4908/bcm4908-asus-gt-ac5300
IMAGES := bin
- IMAGE/bin := bcm4908img
+ IMAGE/bin := append-ubi | bcm4908img
endef
TARGET_DEVICES += asus_gt-ac5300
@@ -52,7 +53,7 @@ define Device/netgear_r8000p
DEVICE_MODEL := R8000P
DEVICE_DTS := broadcom/bcm4908/bcm4906-netgear-r8000p
IMAGES := bin
- IMAGE/bin := bcm4908img
+ IMAGE/bin := append-ubi | bcm4908img
endef
TARGET_DEVICES += netgear_r8000p
More information about the lede-commits
mailing list