Add support for package-declared devices
authorMaxime Ripard <maxime.ripard@free-electrons.com>
Wed, 11 Jan 2012 17:53:38 +0000 (18:53 +0100)
committerPeter Korsgaard <jacmet@sunsite.dk>
Wed, 1 Feb 2012 21:55:49 +0000 (22:55 +0100)
Add a way for packages to declare files they need instead of relying
only on device tables, which creates files no matter if the package is
indeed enabled, as we can see for busybox.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
fs/common.mk
package/Makefile.package.in

index f793ff962bf6d5ae4b65d587f10fbb4a3f80d8d8..d426f3796654add8422148a1c09b5bd725a7f5a4 100644 (file)
@@ -50,6 +50,10 @@ $(BINARIES_DIR)/rootfs.$(1): $(ROOTFS_$(2)_DEPENDENCIES)
        echo "chown -R 0:0 $(TARGET_DIR)" >> $(FAKEROOT_SCRIPT)
 ifneq ($(ROOTFS_DEVICE_TABLES),)
        cat $(ROOTFS_DEVICE_TABLES) > $(FULL_DEVICE_TABLE)
+ifeq ($(BR2_ROOTFS_DEVICE_CREATION_STATIC),y)
+       echo -e '$(subst $(sep),\n,$(PACKAGES_DEVICES_TABLE))' >> $(FULL_DEVICE_TABLE)
+endif
+       echo -e '$(subst $(sep),\n,$(PACKAGES_PERMISSIONS_TABLE))' >> $(FULL_DEVICE_TABLE)
        echo "$(HOST_DIR)/usr/bin/makedevs -d $(FULL_DEVICE_TABLE) $(TARGET_DIR)" >> $(FAKEROOT_SCRIPT)
 endif
        echo "$(ROOTFS_$(2)_CMD)" >> $(FAKEROOT_SCRIPT)
index e57bfed1b61522ccd7abd6ccf9e7d055d0094ed5..31f5ab64658b97e56426ea37c404f093ea739cb6 100644 (file)
@@ -714,6 +714,8 @@ endif
 ifeq ($$($$($(2)_KCONFIG_VAR)),y)
 
 TARGETS += $(1)
+PACKAGES_PERMISSIONS_TABLE += $$($(2)_PERMISSIONS)$$(sep)
+PACKAGES_DEVICES_TABLE += $$($(2)_DEVICES)$$(sep)
 
 ifeq ($$($(2)_SITE_METHOD),svn)
 DL_TOOLS_DEPENDENCIES += svn