fs/common.mk: make sure that static devices from packages are created
authorThomas Petazzoni <thomas.petazzoni@bootlin.com>
Mon, 3 Dec 2018 21:05:08 +0000 (22:05 +0100)
committerArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Tue, 4 Dec 2018 20:53:14 +0000 (21:53 +0100)
The static devices defined by packages are currently added to the full
device table when two conditions are met:

 (1) ROOTFS_DEVICE_TABLES is non-empty
 (2) BR2_ROOTFS_DEVICE_CREATION_STATIC=y

(2) is obviously correct. However, depending on (1) is not correct: if
the user doesn't provide any custom permission table and custom device
table, then ROOTFS_DEVICE_TABLES will be empty.

So instead, move the addition of the package-defined static devices
outside of condition (1), and have it only under condition (2).

Reported-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
fs/common.mk

index 077ce8903ee249de60ba2c8ead4862c14123ae52..a560417c6cafcf20614825741264238fb982451c 100644 (file)
@@ -61,10 +61,10 @@ endif
        $(call PRINTF,$(PACKAGES_PERMISSIONS_TABLE)) > $(ROOTFS_FULL_DEVICES_TABLE)
 ifneq ($(ROOTFS_DEVICE_TABLES),)
        cat $(ROOTFS_DEVICE_TABLES) >> $(ROOTFS_FULL_DEVICES_TABLE)
+endif
 ifeq ($(BR2_ROOTFS_DEVICE_CREATION_STATIC),y)
        $(call PRINTF,$(PACKAGES_DEVICES_TABLE)) >> $(ROOTFS_FULL_DEVICES_TABLE)
 endif
-endif
 
 rootfs-common-show-depends:
        @echo $(ROOTFS_COMMON_DEPENDENCIES)