From 2444085bdc3b2931c4826e455b938ce75d10821c Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Wed, 11 Jan 2012 18:53:38 +0100 Subject: [PATCH] Add support for package-declared devices 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 Acked-by: Thomas De Schampheleire Acked-by: Arnout Vandecappelle (Essensium/Mind) Signed-off-by: Peter Korsgaard --- fs/common.mk | 4 ++++ package/Makefile.package.in | 2 ++ 2 files changed, 6 insertions(+) diff --git a/fs/common.mk b/fs/common.mk index f793ff962b..d426f37966 100644 --- a/fs/common.mk +++ b/fs/common.mk @@ -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) diff --git a/package/Makefile.package.in b/package/Makefile.package.in index e57bfed1b6..31f5ab6465 100644 --- a/package/Makefile.package.in +++ b/package/Makefile.package.in @@ -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 -- 2.30.2