image: use the merged package directory to resolve dependencies for per-device rootfs
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
180465c38f
commit
905e50d2fb
1 changed files with 14 additions and 2 deletions
|
@ -290,17 +290,29 @@ mkfs_packages_add = $(filter-out -%,$(mkfs_packages))
|
||||||
mkfs_packages_remove = $(patsubst -%,%,$(filter -%,$(mkfs_packages)))
|
mkfs_packages_remove = $(patsubst -%,%,$(filter -%,$(mkfs_packages)))
|
||||||
mkfs_cur_target_dir = $(call mkfs_target_dir,pkg=$(target_params))
|
mkfs_cur_target_dir = $(call mkfs_target_dir,pkg=$(target_params))
|
||||||
|
|
||||||
|
opkg_target = \
|
||||||
|
$(call opkg,$(mkfs_cur_target_dir)) \
|
||||||
|
-f $(mkfs_cur_target_dir).conf \
|
||||||
|
-l $(mkfs_cur_target_dir).tmp
|
||||||
|
|
||||||
target-dir-%: FORCE
|
target-dir-%: FORCE
|
||||||
rm -rf $(mkfs_cur_target_dir)
|
rm -rf $(mkfs_cur_target_dir) $(mkfs_cur_target_dir).opkg
|
||||||
$(CP) $(TARGET_DIR) $(mkfs_cur_target_dir)
|
$(CP) $(TARGET_DIR) $(mkfs_cur_target_dir)
|
||||||
|
mv $(mkfs_cur_target_dir)/etc/opkg $(mkfs_cur_target_dir).opkg
|
||||||
|
echo 'src default file://$(PACKAGE_DIR_ALL)' > $(mkfs_cur_target_dir).conf
|
||||||
$(if $(mkfs_packages_add), \
|
$(if $(mkfs_packages_add), \
|
||||||
$(call opkg,$(mkfs_cur_target_dir)) install \
|
$(opkg_target) update && \
|
||||||
|
$(opkg_target) install \
|
||||||
$(call opkg_package_files,$(mkfs_packages_add)))
|
$(call opkg_package_files,$(mkfs_packages_add)))
|
||||||
$(if $(mkfs_packages_remove), \
|
$(if $(mkfs_packages_remove), \
|
||||||
$(call opkg,$(mkfs_cur_target_dir)) remove \
|
$(call opkg,$(mkfs_cur_target_dir)) remove \
|
||||||
$(mkfs_packages_remove))
|
$(mkfs_packages_remove))
|
||||||
$(call Image/mkfs/prepare,$(mkfs_cur_target_dir))
|
$(call Image/mkfs/prepare,$(mkfs_cur_target_dir))
|
||||||
$(call prepare_rootfs,$(mkfs_cur_target_dir))
|
$(call prepare_rootfs,$(mkfs_cur_target_dir))
|
||||||
|
mv $(mkfs_cur_target_dir).opkg $(mkfs_cur_target_dir)/etc/opkg
|
||||||
|
rm -rf \
|
||||||
|
$(mkfs_cur_target_dir).conf \
|
||||||
|
$(mkfs_cur_target_dir).tmp
|
||||||
|
|
||||||
$(KDIR)/root.%: kernel_prepare
|
$(KDIR)/root.%: kernel_prepare
|
||||||
$(call Image/mkfs/$(word 1,$(target_params)),$(target_params))
|
$(call Image/mkfs/$(word 1,$(target_params)),$(target_params))
|
||||||
|
|
Loading…
Reference in a new issue