]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
distro_bootcmd: Add support for booting from ubifs
authorRoy Spliet <r.spliet@ultimaker.com>
Thu, 17 Sep 2015 22:46:59 +0000 (18:46 -0400)
committerTom Rini <trini@konsulko.com>
Sat, 24 Oct 2015 17:50:33 +0000 (13:50 -0400)
Under the assumptions of having a UBI volume called boot, containing
a ubifs filesystem.

Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
include/config_distro_bootcmd.h

index d2f49a12c1d9c637507b311236970d36b077b620..66264ce3b4711a610bca600a72419a6d6d672749 100644 (file)
        BOOT_TARGET_DEVICES_references_MMC_without_CONFIG_CMD_MMC
 #endif
 
+#ifdef CONFIG_CMD_UBIFS
+#define BOOTENV_SHARED_UBIFS \
+       "ubifs_boot=" \
+               "if ubi part UBI && ubifsmount ubi${devnum}:boot; then "  \
+                       "setenv devtype ubi; "                            \
+                       "setenv bootpart 0; "                             \
+                       "run scan_dev_for_boot; "                         \
+               "fi\0"
+#define BOOTENV_DEV_UBIFS      BOOTENV_DEV_BLKDEV
+#define BOOTENV_DEV_NAME_UBIFS BOOTENV_DEV_NAME_BLKDEV
+#else
+#define BOOTENV_SHARED_UBIFS
+#define BOOTENV_DEV_UBIFS \
+       BOOT_TARGET_DEVICES_references_UBIFS_without_CONFIG_CMD_UBIFS
+#define BOOTENV_DEV_NAME_UBIFS \
+       BOOT_TARGET_DEVICES_references_UBIFS_without_CONFIG_CMD_UBIFS
+#endif
+
 #ifdef CONFIG_CMD_SATA
 #define BOOTENV_SHARED_SATA    BOOTENV_SHARED_BLKDEV(sata)
 #define BOOTENV_DEV_SATA       BOOTENV_DEV_BLKDEV
        BOOTENV_SHARED_SATA \
        BOOTENV_SHARED_SCSI \
        BOOTENV_SHARED_IDE \
+       BOOTENV_SHARED_UBIFS \
        "boot_prefixes=/ /boot/\0" \
        "boot_scripts=boot.scr.uimg boot.scr\0" \
        "boot_script_dhcp=boot.scr.uimg\0" \