On 18 October 2026 09:35:15 BST, Josef Schlehofer
<[email protected]> wrote:
>Enable CMD_UBI so that the NOR build can boot a kernel from a UBI volume
>on the NAND. CMD_UBIFS, which defaults to y with it, stays off. A kernel
>inside a UBIFS volume would need it.
>
>Even with LTO, the ubi command does not fit into the 768 KiB NOR image
>next to NVMe and SCSI, so drop those from the NOR build. The SD card
>build keeps both boot targets.
>
>Tested on CZ.NIC Turris 1.1: with the MAX6370 watchdog stopped first,
>the NOR build read the OpenWrt kernel from its UBI volume on the NAND
>and booted OpenWrt.
>
>Signed-off-by: Josef Schlehofer <[email protected]>

Good!

Reviewed-by: Bradley Morgan <[email protected]>


>Reviewed-by: Marek Mojík <[email protected]>
>Cc: Marek Mojík <[email protected]>
>---
>(no changes since v1)
>
>The default environment does not call ubi. The boot above used:
>
>  setenv bootargs ubi.mtd=nand_ubi,2048 rootwait console=ttyS0,115200
>  wdt dev watchdog@2; wdt stop
>  ubi part rootfs 2048; ubi read $kernel_addr_r kernel
>  bootm $kernel_addr_r
>---
> configs/turris_1x_nor_defconfig | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
>diff --git a/configs/turris_1x_nor_defconfig b/configs/turris_1x_nor_defconfig
>index 35df37fbc70..c5aaf55a75c 100644
>--- a/configs/turris_1x_nor_defconfig
>+++ b/configs/turris_1x_nor_defconfig
>@@ -55,6 +55,8 @@ CONFIG_CMD_EXT4=y
> CONFIG_CMD_FAT=y
> CONFIG_CMD_FS_GENERIC=y
> CONFIG_CMD_FS_UUID=y
>+CONFIG_CMD_UBI=y
>+# CONFIG_CMD_UBIFS is not set
> CONFIG_OF_CONTROL=y
> CONFIG_OF_INITIAL_DTB_READONLY=y
> CONFIG_ENV_OVERWRITE=y
>@@ -63,9 +65,6 @@ CONFIG_ENV_RELOC_GD_ENV_ADDR=y
> CONFIG_USE_ETHPRIME=y
> CONFIG_ETHPRIME="eth2"
> # CONFIG_DM_DEVICE_REMOVE is not set
>-CONFIG_AHCI=y
>-CONFIG_SCSI_AHCI=y
>-CONFIG_AHCI_PCI=y
> CONFIG_LBA48=y
> CONFIG_SYS_64BIT_LBA=y
> CONFIG_DDR_CLK_FREQ=66666666
>@@ -101,14 +100,11 @@ CONFIG_SYS_MAX_FLASH_SECT=128
> CONFIG_MTD_RAW_NAND=y
> CONFIG_NAND_FSL_ELBC=y
> CONFIG_NAND_FSL_ELBC_DT=y
>-CONFIG_MTD_UBI=y
> CONFIG_DM_MDIO=y
> CONFIG_MII=y
> CONFIG_TSEC_ENET=y
> CONFIG_PHY_FIXED=y
>-CONFIG_NVME_PCI=y
> CONFIG_PCIE_FSL=y
>-CONFIG_SCSI=y
> CONFIG_SPECIFY_CONSOLE_INDEX=y
> CONFIG_DM_SERIAL=y
> CONFIG_SYS_NS16550=y
>

--- Thanks!
"I'm not a very positive person" - Linus torvalds

Reply via email to