diff options
-rw-r--r-- | common/cmd_pxe.c | 15 | ||||
-rw-r--r-- | include/configs/tegra124-common.h | 3 |
2 files changed, 18 insertions, 0 deletions
diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c index 348332874b..b34675ecb0 100644 --- a/common/cmd_pxe.c +++ b/common/cmd_pxe.c @@ -165,6 +165,19 @@ static int do_get_fat(cmd_tbl_t *cmdtp, const char *file_path, char *file_addr) return -ENOENT; } +static int do_get_btrfs(cmd_tbl_t *cmdtp, const char *file_path, char *file_addr) +{ +#ifdef CONFIG_CMD_BTR + fs_argv[0] = "btrload"; + fs_argv[3] = file_addr; + fs_argv[4] = (void *)file_path; + + if (!do_btr_fsload(cmdtp, 0, 5, fs_argv)) + return 1; +#endif + return -ENOENT; +} + static int do_get_any(cmd_tbl_t *cmdtp, const char *file_path, char *file_addr) { #ifdef CONFIG_CMD_FS_GENERIC @@ -1634,6 +1647,8 @@ int do_sysboot(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) do_getfile = do_get_ext2; else if (strstr(argv[3], "fat")) do_getfile = do_get_fat; + else if (strstr(argv[3], "btrfs")) + do_getfile = do_get_btrfs; else if (strstr(argv[3], "any")) do_getfile = do_get_any; else { diff --git a/include/configs/tegra124-common.h b/include/configs/tegra124-common.h index 9fe04f81de..6b7cf743b6 100644 --- a/include/configs/tegra124-common.h +++ b/include/configs/tegra124-common.h @@ -82,4 +82,7 @@ #define TEGRA_LP0_ALIGN 0x10 #endif +/* For BTRFS Support */ +#define CONFIG_CMD_BTR + #endif /* _TEGRA124_COMMON_H_ */ |