mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-08-03 16:37:43 +00:00
squashfs: convert to ROOTFS_TARGET infrastructure
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
parent
959ee39bf6
commit
3892493f8d
@ -4,34 +4,10 @@
|
|||||||
#
|
#
|
||||||
#############################################################
|
#############################################################
|
||||||
|
|
||||||
SQUASHFS_TARGET:=$(IMAGE).squashfs
|
ROOTFS_SQUASHFS_DEPENDENCIES = host-squashfs
|
||||||
|
|
||||||
squashfsroot: host-fakeroot host-squashfs makedevs
|
define ROOTFS_SQUASHFS_CMD
|
||||||
# Use fakeroot to pretend all target binaries are owned by root
|
$(HOST_DIR)/usr/bin/mksquashfs $(TARGET_DIR) $$@ -noappend
|
||||||
rm -f $(BUILD_DIR)/_fakeroot.$(notdir $(SQUASHFS_TARGET))
|
endef
|
||||||
touch $(BUILD_DIR)/.fakeroot.00000
|
|
||||||
cat $(BUILD_DIR)/.fakeroot* > $(BUILD_DIR)/_fakeroot.$(notdir $(SQUASHFS_TARGET))
|
|
||||||
echo "chown -R 0:0 $(TARGET_DIR)" >> $(BUILD_DIR)/_fakeroot.$(notdir $(SQUASHFS_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 $(SQUASHFS_TARGET))
|
|
||||||
endif
|
|
||||||
# Use fakeroot so mksquashfs believes the previous fakery
|
|
||||||
echo "$(HOST_DIR)/usr/bin/mksquashfs " \
|
|
||||||
"$(TARGET_DIR) $(SQUASHFS_TARGET) " \
|
|
||||||
"-noappend $(SQUASHFS_ENDIANNESS)" \
|
|
||||||
>> $(BUILD_DIR)/_fakeroot.$(notdir $(SQUASHFS_TARGET))
|
|
||||||
chmod a+x $(BUILD_DIR)/_fakeroot.$(notdir $(SQUASHFS_TARGET))
|
|
||||||
$(HOST_DIR)/usr/bin/fakeroot -- $(BUILD_DIR)/_fakeroot.$(notdir $(SQUASHFS_TARGET))
|
|
||||||
chmod 0644 $(SQUASHFS_TARGET)
|
|
||||||
-@rm -f $(BUILD_DIR)/_fakeroot.$(notdir $(SQUASHFS_TARGET))
|
|
||||||
|
|
||||||
#############################################################
|
$(eval $(call ROOTFS_TARGET,squashfs))
|
||||||
#
|
|
||||||
# Toplevel Makefile options
|
|
||||||
#
|
|
||||||
#############################################################
|
|
||||||
ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS),y)
|
|
||||||
TARGETS+=squashfsroot
|
|
||||||
endif
|
|
Loading…
x
Reference in New Issue
Block a user