mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-08-07 10:27:42 +00:00
cramfs: convert to ROOTFS_TARGET infrastructure
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
parent
9bda87be1b
commit
5e530b7b95
@ -13,31 +13,10 @@ ifneq ($(TARGET_DEVICE_TABLE),)
|
|||||||
CRAMFS_OPTS += -D $(TARGET_DEVICE_TABLE)
|
CRAMFS_OPTS += -D $(TARGET_DEVICE_TABLE)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CRAMFS_TARGET=$(IMAGE).cramfs
|
define ROOTFS_CRAMFS_CMD
|
||||||
|
$(HOST_DIR)/usr/bin/mkcramfs -q $(CRAMFS_OPTS) $(TARGET_DIR) $$@
|
||||||
|
endef
|
||||||
|
|
||||||
cramfsroot: host-fakeroot host-cramfs makedevs
|
ROOTFS_CRAMFS_DEPENDENCIES = host-cramfs
|
||||||
# Use fakeroot to pretend all target binaries are owned by root
|
|
||||||
rm -f $(BUILD_DIR)/_fakeroot.$(notdir $(CRAMFS_TARGET))
|
|
||||||
touch $(BUILD_DIR)/.fakeroot.00000
|
|
||||||
cat $(BUILD_DIR)/.fakeroot* > $(BUILD_DIR)/_fakeroot.$(notdir $(CRAMFS_TARGET))
|
|
||||||
echo "chown -R 0:0 $(TARGET_DIR)" >> $(BUILD_DIR)/_fakeroot.$(notdir $(CRAMFS_TARGET))
|
|
||||||
ifneq ($(TARGET_DEVICE_TABLE),)
|
|
||||||
# Use fakeroot to pretend to create all needed device nodes
|
|
||||||
echo "$(HOST_DIR)/usr/bin/makedevs -d $(TARGET_DEVICE_TABLE) $(TARGET_DIR)" \
|
|
||||||
>> $(BUILD_DIR)/_fakeroot.$(notdir $(CRAMFS_TARGET))
|
|
||||||
endif
|
|
||||||
# Use fakeroot so mkcramfs believes the previous fakery
|
|
||||||
echo "$(HOST_DIR)/usr/bin/mkcramfs -q $(CRAMFS_OPTS) " \
|
|
||||||
"$(TARGET_DIR) $(CRAMFS_TARGET)" >> $(BUILD_DIR)/_fakeroot.$(notdir $(CRAMFS_TARGET))
|
|
||||||
chmod a+x $(BUILD_DIR)/_fakeroot.$(notdir $(CRAMFS_TARGET))
|
|
||||||
$(HOST_DIR)/usr/bin/fakeroot -- $(BUILD_DIR)/_fakeroot.$(notdir $(CRAMFS_TARGET))
|
|
||||||
-@rm -f $(BUILD_DIR)/_fakeroot.$(notdir $(CRAMFS_TARGET))
|
|
||||||
|
|
||||||
#############################################################
|
$(eval $(call ROOTFS_TARGET,cramfs))
|
||||||
#
|
|
||||||
# Toplevel Makefile options
|
|
||||||
#
|
|
||||||
#############################################################
|
|
||||||
ifeq ($(BR2_TARGET_ROOTFS_CRAMFS),y)
|
|
||||||
TARGETS+=cramfsroot
|
|
||||||
endif
|
|
Loading…
x
Reference in New Issue
Block a user