bcm4908: append UBI with rootfs to device images
authorRafał Miłecki <rafal@milecki.pl>
Thu, 21 Jan 2021 12:23:56 +0000 (13:23 +0100)
committerRafał Miłecki <rafal@milecki.pl>
Thu, 21 Jan 2021 12:25:34 +0000 (13:25 +0100)
Also enable UBI kernel support.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
target/linux/bcm4908/config-5.4
target/linux/bcm4908/image/Makefile

index aa2e0887569c4884ec1c86630e962b95a073f061..3dfa7b21dcceff1bb85211c12b93595f169b5499 100644 (file)
@@ -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
index afe88e6902c44c29b11ed4aa83d59a596ceb1014..d6b5f07e2ac883b3c1cbb8c4e1fc2214d12b5b12 100644 (file)
@@ -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