diff options
author | James Thomas <james.thomas@codethink.co.uk> | 2014-07-22 15:02:43 +0100 |
---|---|---|
committer | James Thomas <james.thomas@codethink.co.uk> | 2014-07-22 15:40:46 +0100 |
commit | c6558e1e91fce87a176a0fc20930f4e5e36b2666 (patch) | |
tree | a9f1afb103a9c7c0a8cc210c3b731695adf61f33 | |
parent | fb290319cd03293460f5dd79a064d07d742611cf (diff) | |
download | u-boot-c6558e1e91fce87a176a0fc20930f4e5e36b2666.tar.gz |
Add btrfs support to cmd_pxe
Build btrfs support for tegra boards
-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_ */ |