#ifdef CONFIG_CMD_UBIFS
#define BOOTENV_SHARED_UBIFS \
"ubifs_boot=" \
- "env exists bootubipart || " \
- "env set bootubipart UBI; " \
- "env exists bootubivol || " \
- "env set bootubivol boot; " \
"if ubi part ${bootubipart} && " \
- "ubifsmount ubi${devnum}:${bootubivol}; " \
+ "ubifsmount ubi0:${bootubivol}; " \
"then " \
"devtype=ubi; " \
+ "devnum=ubi0; " \
+ "bootfstype=ubifs; " \
+ "distro_bootpart=${bootubivol}; " \
"run scan_dev_for_boot; " \
+ "ubifsumount; " \
"fi\0"
-#define BOOTENV_DEV_UBIFS BOOTENV_DEV_BLKDEV
-#define BOOTENV_DEV_NAME_UBIFS BOOTENV_DEV_NAME_BLKDEV
+#define BOOTENV_DEV_UBIFS(devtypeu, devtypel, instance, bootubipart, bootubivol) \
+ "bootcmd_ubifs" #instance "=" \
+ "bootubipart=" #bootubipart "; " \
+ "bootubivol=" #bootubivol "; " \
+ "run ubifs_boot\0"
+#define BOOTENV_DEV_NAME_UBIFS(devtypeu, devtypel, instance, bootubipart, bootubivol) \
+ #devtypel #instance " "
#else
#define BOOTENV_SHARED_UBIFS
#define BOOTENV_DEV_UBIFS \
BOOT_TARGET_DEVICES_references_PXE_without_CONFIG_CMD_DHCP_or_PXE
#endif
-#define BOOTENV_DEV_NAME(devtypeu, devtypel, instance) \
- BOOTENV_DEV_NAME_##devtypeu(devtypeu, devtypel, instance)
+#define BOOTENV_DEV_NAME(devtypeu, devtypel, instance, ...) \
+ BOOTENV_DEV_NAME_##devtypeu(devtypeu, devtypel, instance, ## __VA_ARGS__)
#define BOOTENV_BOOT_TARGETS \
"boot_targets=" BOOT_TARGET_DEVICES(BOOTENV_DEV_NAME) "\0"
-#define BOOTENV_DEV(devtypeu, devtypel, instance) \
- BOOTENV_DEV_##devtypeu(devtypeu, devtypel, instance)
+#define BOOTENV_DEV(devtypeu, devtypel, instance, ...) \
+ BOOTENV_DEV_##devtypeu(devtypeu, devtypel, instance, ## __VA_ARGS__)
#define BOOTENV \
BOOTENV_SHARED_HOST \
BOOTENV_SHARED_MMC \
"ramdisk_addr_r=0x88080000\0" \
#define BOOT_TARGET_DEVICES(func) \
- func(UBIFS, ubifs, 0)
+ func(UBIFS, ubifs, 0, UBI, rootfs)
#define AM335XX_BOARD_FDTFILE "fdtfile=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0"
BOOTENV \
GUARDIAN_DEFAULT_PROD_ENV \
"backlight_brightness=50\0" \
- "bootubivol=rootfs\0" \
"distro_bootcmd=" \
"setenv rootflags \"bulk_read,chk_data_crc\"; " \
"setenv ethact usb_ether; " \
UBI_BOOTCMD \
UBOOT_UPDATE \
"boot_script_dhcp=boot.scr\0" \
- "bootubipart=ubi\0" \
"console=ttymxc0\0" \
"defargs=user_debug=30\0" \
"fdt_board=eval-v3\0" \
UBOOT_UPDATE \
"boot_file=zImage\0" \
"boot_script_dhcp=boot.scr\0" \
- "bootubipart=ubi\0" \
"console=ttymxc0\0" \
"defargs=\0" \
"fdt_board=eval-v3\0" \
#define BOOT_TARGET_DEVICES(func) \
func(MMC, mmc, 1) \
func(MMC, mmc, 0) \
- func(UBIFS, ubifs, 0) \
+ func(UBIFS, ubifs, 0, UBI, boot) \
func(USB, usb, 0) \
func(PXE, pxe, na) \
func(DHCP, dhcp, na)
#define BOOT_TARGET_DEVICES(func) \
func(MMC, mmc, 0) \
- func(UBIFS, ubifs, 0) \
+ func(UBIFS, ubifs, 0, UBI, boot) \
func(PXE, pxe, na) \
func(DHCP, dhcp, na)
#define BOOT_TARGET_DEVICES(func) \
func(MMC, mmc, 0) \
- func(UBIFS, ubifs, 0) \
+ func(UBIFS, ubifs, 0, UBI, boot) \
func(PXE, pxe, na) \
func(DHCP, dhcp, na)
#define BOOT_TARGET_DEVICES(func) \
func(MMC, mmc, 0) \
func(LEGACY_MMC, legacy_mmc, 0) \
- func(UBIFS, ubifs, 0) \
+ func(UBIFS, ubifs, 0, rootfs, rootfs) \
func(NAND, nand, 0)
#else /* !CONFIG_MTD_RAW_NAND */
"bootenv=uEnv.txt\0" \
"bootfile=zImage\0" \
"bootpart=0:2\0" \
- "bootubivol=rootfs\0" \
- "bootubipart=rootfs\0" \
"usbtty=cdc_acm\0" \
"mpurate=auto\0" \
"buddy=none\0" \
#define BOOT_TARGET_DEVICES(func) \
func(MMC, mmc, 0) \
func(LEGACY_MMC, legacy_mmc, 0) \
- func(UBIFS, ubifs, 0) \
+ func(UBIFS, ubifs, 0, rootfs, rootfs) \
func(NAND, nand, 0)
#else /* !CONFIG_MTD_RAW_NAND */
"bootenv=uEnv.txt\0" \
"bootfile=zImage\0" \
"bootpart=0:2\0" \
- "bootubivol=rootfs\0" \
- "bootubipart=rootfs\0" \
"optargs=\0" \
"nandroot=ubi0:rootfs ubi.mtd=rootfs rw noinitrd\0" \
"nandrootfstype=ubifs rootwait\0" \
#define BOOT_TARGET_DEVICES(func) \
func(MMC, mmc, 0) \
- func(UBIFS, ubifs, 0) \
+ func(UBIFS, ubifs, 0, UBI, boot) \
func(PXE, pxe, na) \
func(DHCP, dhcp, na)
#endif
#ifdef CONFIG_CMD_UBIFS
-#define BOOT_TARGET_UBIFS(func) func(UBIFS, ubifs, 0)
+#define BOOT_TARGET_UBIFS(func) func(UBIFS, ubifs, 0, UBI, boot)
#else
#define BOOT_TARGET_UBIFS(func)
#endif
#endif
#ifdef CONFIG_CMD_UBIFS
-#define BOOT_TARGET_DEVICE_UBIFS(func) func(UBIFS, ubifs, 0)
+#define BOOT_TARGET_DEVICE_UBIFS(func) func(UBIFS, ubifs, 0, UBI, boot)
#else
#define BOOT_TARGET_DEVICE_UBIFS(func)
#endif