$(call opkg_package_files,$(mkfs_packages_add)))
-$(CP) -T $(mkfs_cur_target_dir).opkg/ $(mkfs_cur_target_dir)/etc/opkg/
rm -rf $(mkfs_cur_target_dir).opkg $(mkfs_cur_target_dir).conf
- $(call prepare_rootfs,$(mkfs_cur_target_dir))
+ $(call prepare_rootfs,$(mkfs_cur_target_dir),$(TOPDIR)/files)
$(KDIR)/root.%: kernel_prepare
$(call Image/mkfs/$(word 1,$(target_params)),$(target_params))
endif
define prepare_rootfs
- @if [ -d $(TOPDIR)/files ]; then \
- $(call file_copy,$(TOPDIR)/files/.,$(1)); \
- fi
+ $(if $(2),@if [ -d '$(2)' ]; then \
+ $(call file_copy,$(2)/.,$(1)); \
+ fi)
@mkdir -p $(1)/etc/rc.d
@mkdir -p $(1)/var/lock
@( \
$(CP) $(TARGET_DIR) $(TARGET_DIR_ORIG)
- $(call prepare_rootfs,$(TARGET_DIR))
+ $(call prepare_rootfs,$(TARGET_DIR),$(TOPDIR)/files)
$(curdir)/index: FORCE
@echo Generating package index...