makedevs: convert to a more normal way of building packages
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
parent
5faae48690
commit
81cd9d45ff
@ -32,7 +32,7 @@ ROOTFS_DEVICE_TABLE = $(call qstrip,$(BR2_ROOTFS_DEVICE_TABLE))
|
|||||||
|
|
||||||
define ROOTFS_TARGET_INTERNAL
|
define ROOTFS_TARGET_INTERNAL
|
||||||
|
|
||||||
$(BINARIES_DIR)/rootfs.$(1): $(ROOTFS_$(2)_DEPENDENCIES) host-fakeroot makedevs $(if $(BR2_TARGET_ROOTFS_$(2)_LZMA),host-lzma)
|
$(BINARIES_DIR)/rootfs.$(1): $(ROOTFS_$(2)_DEPENDENCIES) host-fakeroot host-makedevs $(if $(BR2_TARGET_ROOTFS_$(2)_LZMA),host-lzma)
|
||||||
@$(call MESSAGE,"Generating root filesystem image rootfs.$(1)")
|
@$(call MESSAGE,"Generating root filesystem image rootfs.$(1)")
|
||||||
$(foreach hook,$(ROOTFS_$(2)_PRE_GEN_HOOKS),$(call $(hook))$(sep))
|
$(foreach hook,$(ROOTFS_$(2)_PRE_GEN_HOOKS),$(call $(hook))$(sep))
|
||||||
rm -f $(FAKEROOT_SCRIPT)
|
rm -f $(FAKEROOT_SCRIPT)
|
||||||
|
@ -175,6 +175,7 @@ source "package/input-tools/Config.in"
|
|||||||
source "package/iostat/Config.in"
|
source "package/iostat/Config.in"
|
||||||
source "package/lm-sensors/Config.in"
|
source "package/lm-sensors/Config.in"
|
||||||
source "package/lvm2/Config.in"
|
source "package/lvm2/Config.in"
|
||||||
|
source "package/makedevs/Config.in"
|
||||||
source "package/mdadm/Config.in"
|
source "package/mdadm/Config.in"
|
||||||
source "package/memtester/Config.in"
|
source "package/memtester/Config.in"
|
||||||
source "package/mtd/Config.in"
|
source "package/mtd/Config.in"
|
||||||
|
5
package/makedevs/Config.in
Normal file
5
package/makedevs/Config.in
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
config BR2_PACKAGE_MAKEDEVS
|
||||||
|
bool "makedevs"
|
||||||
|
help
|
||||||
|
The makedevs utility allows to create a set of device files
|
||||||
|
according to a configuration file.
|
@ -1,30 +1,35 @@
|
|||||||
#############################################################
|
#############################################################
|
||||||
#
|
#
|
||||||
# build makedevs to run on the build system, in order to create
|
# makedevs
|
||||||
# device nodes and whatnot for the target device, in conjunction
|
|
||||||
# with fakeroot.
|
|
||||||
#
|
#
|
||||||
#############################################################
|
#############################################################
|
||||||
MAKEDEVS_DIR=$(BUILD_DIR)/makedevs-host
|
|
||||||
|
|
||||||
$(MAKEDEVS_DIR)/makedevs.c: target/makedevs/makedevs.c
|
MAKEDEVS_DIR=$(BUILD_DIR)/makedevs
|
||||||
|
|
||||||
|
$(MAKEDEVS_DIR)/makedevs.c:
|
||||||
rm -rf $(MAKEDEVS_DIR)
|
rm -rf $(MAKEDEVS_DIR)
|
||||||
mkdir $(MAKEDEVS_DIR)
|
mkdir $(MAKEDEVS_DIR)
|
||||||
cp target/makedevs/makedevs.c $(MAKEDEVS_DIR)
|
cp package/makedevs/makedevs.c $(MAKEDEVS_DIR)
|
||||||
|
|
||||||
$(MAKEDEVS_DIR)/makedevs: $(MAKEDEVS_DIR)/makedevs.c
|
$(MAKEDEVS_DIR)/makedevs: $(MAKEDEVS_DIR)/makedevs.c
|
||||||
$(HOSTCC) -Wall -Werror -O2 $(MAKEDEVS_DIR)/makedevs.c -o $@
|
$(CC) -Wall -Werror -O2 $(MAKEDEVS_DIR)/makedevs.c -o $@
|
||||||
|
|
||||||
$(HOST_DIR)/usr/bin/makedevs: $(MAKEDEVS_DIR)/makedevs
|
$(TARGET_DIR)/usr/bin/makedevs: $(MAKEDEVS_DIR)/makedevs
|
||||||
$(INSTALL) -m 755 $^ $@
|
$(INSTALL) -m 755 $^ $@
|
||||||
|
|
||||||
makedevs: $(HOST_DIR)/usr/bin/makedevs
|
makedevs: $(TARGET_DIR)/usr/bin/makedevs
|
||||||
|
|
||||||
makedevs-source:
|
HOST_MAKEDEVS_DIR=$(BUILD_DIR)/host-makedevs
|
||||||
|
|
||||||
makedevs-clean:
|
$(HOST_MAKEDEVS_DIR)/makedevs.c:
|
||||||
rm -rf $(MAKEDEVS_DIR)/makedevs
|
rm -rf $(HOST_MAKEDEVS_DIR)
|
||||||
|
mkdir $(HOST_MAKEDEVS_DIR)
|
||||||
|
cp package/makedevs/makedevs.c $(HOST_MAKEDEVS_DIR)
|
||||||
|
|
||||||
makedevs-dirclean:
|
$(HOST_MAKEDEVS_DIR)/makedevs: $(HOST_MAKEDEVS_DIR)/makedevs.c
|
||||||
rm -rf $(MAKEDEVS_DIR)
|
$(CC) -Wall -Werror -O2 $(HOST_MAKEDEVS_DIR)/makedevs.c -o $@
|
||||||
|
|
||||||
|
$(HOST_DIR)/usr/bin/makedevs: $(HOST_MAKEDEVS_DIR)/makedevs
|
||||||
|
$(INSTALL) -m 755 $^ $@
|
||||||
|
|
||||||
|
host-makedevs: $(HOST_DIR)/usr/bin/makedevs
|
Loading…
Reference in New Issue
Block a user