]> git.ipfire.org Git - thirdparty/u-boot.git/blobdiff - include/config_distro_bootcmd.h
Merge branch 'master' into next
[thirdparty/u-boot.git] / include / config_distro_bootcmd.h
index 2157f3533e5ba6175026f9f157968873fed3fdd5..fcb319a20aee6997b3449132f2dbc63b419be512 100644 (file)
@@ -70,7 +70,7 @@
 #ifdef CONFIG_CMD_UBIFS
 #define BOOTENV_SHARED_UBIFS \
        "ubifs_boot=" \
-               "if ubi part ${bootubipart} && " \
+               "if ubi part ${bootubipart} ${bootubioff} && " \
                        "ubifsmount ubi0:${bootubivol}; " \
                "then " \
                        "devtype=ubi; " \
                        "run scan_dev_for_boot; " \
                        "ubifsumount; " \
                "fi\0"
-#define BOOTENV_DEV_UBIFS(devtypeu, devtypel, instance, bootubipart, bootubivol) \
+#define BOOTENV_DEV_UBIFS_BOOTUBIOFF(off) #off /* type check, throw error when called with more args */
+#define BOOTENV_DEV_UBIFS(devtypeu, devtypel, instance, bootubipart, bootubivol, ...) \
        "bootcmd_ubifs" #instance "=" \
                "bootubipart=" #bootubipart "; " \
                "bootubivol=" #bootubivol "; " \
+               "bootubioff=" BOOTENV_DEV_UBIFS_BOOTUBIOFF(__VA_ARGS__) "; " \
                "run ubifs_boot\0"
-#define BOOTENV_DEV_NAME_UBIFS(devtypeu, devtypel, instance, bootubipart, bootubivol) \
+#define BOOTENV_DEV_NAME_UBIFS(devtypeu, devtypel, instance, ...) \
        #devtypel #instance " "
 #else
 #define BOOTENV_SHARED_UBIFS