2007-07-08 21:22:18 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Make a initramfs_list file to be used by gen_init_cpio
|
2007-08-22 14:35:41 +02:00
|
|
|
# gen_init_cpio is part of the 2.6 linux kernels to build an
|
2007-07-08 21:22:18 +02:00
|
|
|
# initial ramdisk filesystem based on cpio
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
|
2008-12-08 09:15:58 +01:00
|
|
|
ifeq ($(BR2_TARGET_ROOTFS_INITRAMFS),y)
|
2007-07-08 21:22:18 +02:00
|
|
|
INITRAMFS_TARGET:=$(IMAGE).initramfs_list
|
|
|
|
else
|
|
|
|
INITRAMFS_TARGET:= #nothing
|
|
|
|
endif
|
|
|
|
|
2008-12-08 14:42:04 +01:00
|
|
|
TARGETS+=$(INITRAMFS_TARGET)
|
|
|
|
|
2007-07-08 21:22:18 +02:00
|
|
|
$(INITRAMFS_TARGET) initramfs: host-fakeroot makedevs
|
2007-07-18 20:07:19 +02:00
|
|
|
rm -f $(TARGET_DIR)/init
|
|
|
|
ln -s sbin/init $(TARGET_DIR)/init
|
2007-10-01 18:15:31 +02:00
|
|
|
-find $(TARGET_DIR) -type f -perm +111 | xargs $(STRIPCMD) 2>/dev/null || true
|
2007-08-21 16:32:38 +02:00
|
|
|
ifneq ($(BR2_HAVE_MANPAGES),y)
|
2007-07-08 21:22:18 +02:00
|
|
|
rm -rf $(TARGET_DIR)/usr/man
|
2007-08-21 16:32:38 +02:00
|
|
|
endif
|
|
|
|
ifneq ($(BR2_HAVE_INFOPAGES),y)
|
2007-07-08 21:22:18 +02:00
|
|
|
rm -rf $(TARGET_DIR)/usr/info
|
2007-08-21 16:32:38 +02:00
|
|
|
endif
|
2007-08-25 13:13:20 +02:00
|
|
|
$(if $(TARGET_LDCONFIG),test -x $(TARGET_LDCONFIG) && $(TARGET_LDCONFIG) -r $(TARGET_DIR) 2>/dev/null)
|
2007-07-08 21:22:18 +02:00
|
|
|
# Use fakeroot to pretend all target binaries are owned by root
|
2007-08-16 20:19:42 +02:00
|
|
|
rm -f $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(TAR_TARGET))
|
|
|
|
touch $(PROJECT_BUILD_DIR)/.fakeroot.00000
|
|
|
|
cat $(PROJECT_BUILD_DIR)/.fakeroot* > $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(TAR_TARGET))
|
|
|
|
echo "chown -R 0:0 $(TARGET_DIR)" >> $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(TAR_TARGET))
|
2007-07-08 21:22:18 +02:00
|
|
|
# Use fakeroot to pretend to create all needed device nodes
|
|
|
|
echo "$(STAGING_DIR)/bin/makedevs -d $(TARGET_DEVICE_TABLE) $(TARGET_DIR)" \
|
2007-08-16 20:19:42 +02:00
|
|
|
>> $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(TAR_TARGET))
|
2007-08-22 14:35:41 +02:00
|
|
|
# Use fakeroot so gen_initramfs_list.sh believes the previous fakery
|
2009-01-01 22:20:35 +01:00
|
|
|
echo "$(SHELL) target/initramfs/gen_initramfs_list.sh -u 0 -g 0 $(TARGET_DIR) > $(INITRAMFS_TARGET)" \
|
2007-08-16 20:19:42 +02:00
|
|
|
>> $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(TAR_TARGET))
|
|
|
|
chmod a+x $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(TAR_TARGET))
|
|
|
|
$(STAGING_DIR)/usr/bin/fakeroot -- $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(TAR_TARGET))
|
|
|
|
-rm -f $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(TAR_TARGET))
|
2007-07-08 21:22:18 +02:00
|
|
|
|
|
|
|
initramfs-source:
|
|
|
|
|
|
|
|
initramfs-clean:
|
2008-12-08 09:15:58 +01:00
|
|
|
ifeq ($(BR2_TARGET_ROOTFS_INITRAMFS),y)
|
2007-07-08 21:22:18 +02:00
|
|
|
-rm -f $(INITRAMFS_TARGET)
|
|
|
|
endif
|
|
|
|
initramfs-dirclean:
|
|
|
|
|
|
|
|
|