summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/Config.in20
-rw-r--r--fs/common.mk10
2 files changed, 20 insertions, 10 deletions
diff --git a/fs/Config.in b/fs/Config.in
index 9ac3accd8..6f0f82ba2 100644
--- a/fs/Config.in
+++ b/fs/Config.in
@@ -36,13 +36,21 @@ config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
endchoice
config BR2_ROOTFS_DEVICE_TABLE
- string "Path to the device table"
- depends on BR2_ROOTFS_DEVICE_CREATION_STATIC
- default "target/generic/device_table.txt"
+ string "Path to the device tables"
+ default "target/generic/device_table.txt target/generic/device_table_dev.txt" \
+ if BR2_ROOTFS_DEVICE_CREATION_STATIC
+ default "target/generic/device_table.txt" \
+ if (BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV || \
+ BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV || \
+ BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS)
help
- Specify the location of a device table, that will be passed
- to the makedevs utility to create all the special device
- files in the target filesystem.
+ Specify a space-separated list of device table locations,
+ that will be passed to the makedevs utility to create all
+ the special device files and assign correct owners and
+ permissions on various files in the target filesystem.
+
+ See package/makedevs/README for details on the usage and
+ syntax of these files.
choice
prompt "Root FS skeleton"
diff --git a/fs/common.mk b/fs/common.mk
index 92be00cc0..4d5051460 100644
--- a/fs/common.mk
+++ b/fs/common.mk
@@ -32,7 +32,8 @@
# macro will automatically generate a compressed filesystem image.
FAKEROOT_SCRIPT = $(BUILD_DIR)/_fakeroot.fs
-ROOTFS_DEVICE_TABLE = $(call qstrip,$(BR2_ROOTFS_DEVICE_TABLE))
+FULL_DEVICE_TABLE = $(BUILD_DIR)/_device_table.txt
+ROOTFS_DEVICE_TABLES = $(call qstrip,$(BR2_ROOTFS_DEVICE_TABLE))
define ROOTFS_TARGET_INTERNAL
@@ -46,13 +47,14 @@ $(BINARIES_DIR)/rootfs.$(1): $(ROOTFS_$(2)_DEPENDENCIES)
touch $(BUILD_DIR)/.fakeroot.00000
cat $(BUILD_DIR)/.fakeroot* > $(FAKEROOT_SCRIPT)
echo "chown -R 0:0 $(TARGET_DIR)" >> $(FAKEROOT_SCRIPT)
-ifneq ($(ROOTFS_DEVICE_TABLE),)
- echo "$(HOST_DIR)/usr/bin/makedevs -d $(ROOTFS_DEVICE_TABLE) $(TARGET_DIR)" >> $(FAKEROOT_SCRIPT)
+ifneq ($(ROOTFS_DEVICE_TABLES),)
+ cat $(ROOTFS_DEVICE_TABLES) > $(FULL_DEVICE_TABLE)
+ echo "$(HOST_DIR)/usr/bin/makedevs -d $(FULL_DEVICE_TABLE) $(TARGET_DIR)" >> $(FAKEROOT_SCRIPT)
endif
echo "$(ROOTFS_$(2)_CMD)" >> $(FAKEROOT_SCRIPT)
chmod a+x $(FAKEROOT_SCRIPT)
$(HOST_DIR)/usr/bin/fakeroot -- $(FAKEROOT_SCRIPT)
- -@rm -f $(FAKEROOT_SCRIPT)
+ -@rm -f $(FAKEROOT_SCRIPT) $(FULL_DEVICE_TABLE)
$(foreach hook,$(ROOTFS_$(2)_POST_GEN_HOOKS),$(call $(hook))$(sep))
ifeq ($$(BR2_TARGET_ROOTFS_$(2)_GZIP),y)
gzip -9 -c $$@ > $$@.gz