#include <div64.h>
#include <linux/math64.h>
#include <efi_loader.h>
+#include <squashfs.h>
DECLARE_GLOBAL_DATA_PTR;
.mkdir = fs_mkdir_unsupported,
.ln = fs_ln_unsupported,
},
+#endif
+#if IS_ENABLED(CONFIG_FS_SQUASHFS)
+ {
+ .fstype = FS_TYPE_SQUASHFS,
+ .name = "squashfs",
+ .probe = sqfs_probe,
+ .opendir = sqfs_opendir,
+ .readdir = sqfs_readdir,
+ .ls = fs_ls_generic,
+ .read = sqfs_read,
+ .size = sqfs_size,
+ .close = sqfs_close,
+ .closedir = sqfs_closedir,
+ },
#endif
{
.fstype = FS_TYPE_ANY,
else
pos = 0;
-#ifdef CONFIG_CMD_BOOTEFI
- efi_set_bootdev(argv[1], (argc > 2) ? argv[2] : "",
- (argc > 4) ? argv[4] : "");
-#endif
time = get_timer(0);
ret = _fs_read(filename, addr, pos, bytes, 1, &len_read);
time = get_timer(time);
- if (ret < 0)
+ if (ret < 0) {
+ printf("Failed to load '%s'\n", filename);
return 1;
+ }
+
+ if (IS_ENABLED(CONFIG_CMD_BOOTEFI))
+ efi_set_bootdev(argv[1], (argc > 2) ? argv[2] : "",
+ (argc > 4) ? argv[4] : "");
printf("%llu bytes read in %lu ms", len_read, time);
if (time > 0) {