summaryrefslogtreecommitdiffstats
path: root/arch/sandbox/mach-sandbox
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2020-09-14 15:37:48 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2020-09-15 14:42:49 +0200
commita1f6b4dbcdfd85c82e7ccd1e6be82264d16019ee (patch)
tree8464a69c8021c68531241594a499618bef894026 /arch/sandbox/mach-sandbox
parentc8773d5c22a2d6ded9bb3060842f1f62bc5dd945 (diff)
downloadbarebox-a1f6b4dbcdfd85c82e7ccd1e6be82264d16019ee.tar.gz
barebox-a1f6b4dbcdfd85c82e7ccd1e6be82264d16019ee.tar.xz
sandbox: hostfile: support registering images as barebox block devices
While we can mount file systems on cdevs in barebox, partition table parsing only works for block devices. Allow for --image=argument,blkdev to try to mount an image as block device. This will fail for files that aren't of a multiple of the 512 byte block size. Host OS block devices are suitable for use as barebox block devices always, so that's the default unless overridden with a ,cdev suffix. The initcall level has been changed to occur after fs initcall level. This is required, because we can't have automounts without / mounted. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/sandbox/mach-sandbox')
-rw-r--r--arch/sandbox/mach-sandbox/include/mach/hostfile.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/sandbox/mach-sandbox/include/mach/hostfile.h b/arch/sandbox/mach-sandbox/include/mach/hostfile.h
index e2f44c4f7b..c3f9af97c4 100644
--- a/arch/sandbox/mach-sandbox/include/mach/hostfile.h
+++ b/arch/sandbox/mach-sandbox/include/mach/hostfile.h
@@ -7,6 +7,7 @@ struct hf_info {
unsigned long long size;
const char *devname;
const char *filename;
+ unsigned int is_blockdev:1;
};
int barebox_register_filedev(struct hf_info *hf);