[1/2] make rootfs rebuild ondemand

Currently it is based on directory dependencies so that not all changes could be detected.
This commit is contained in:
2025-09-08 11:00:46 +08:00
parent 7b3c5764aa
commit 916a41a4c6
2 changed files with 3 additions and 5 deletions

View File

@@ -66,8 +66,6 @@ Build a single rootfs target:
make openEuler-24.03-LTS-SP1-base-rootfs
```
> Once a rootfs target is created, it will never be created again and will be used to build all related BSP targets.
Build all rootfs targets one by one, under a different directory `/tmp/build`:
```shell
@@ -80,7 +78,7 @@ Build all available BSP targets, parallelly:
make -j$(nproc) all_bsp
```
> BSP target will be rebuilt each time
> BSP target will be rebuilt each time even if no configuration is changed
Cleanup:

View File

@@ -97,11 +97,11 @@ $(STAGING_DIR)/$$(DISTRO_NAME)/$$(RELEASE_NAME)/receipes/$$(RECEIPE_NAME): $$(fo
.PHONY: $$(DISTRO_NAME)-$$(RELEASE_NAME)-$$(RECEIPE_NAME)-rootfs
$$(DISTRO_NAME)-$$(RELEASE_NAME)-$$(RECEIPE_NAME)-rootfs: $$($$(DISTRO_NAME)_$$(RELEASE_NAME)_$$(RECEIPE_NAME)_ARTIFACT)
define GENERATE_TAR_TARGET
$$($$(DISTRO_NAME)_$$(RELEASE_NAME)_$$(RECEIPE_NAME)_ARTIFACT): | $(STAGING_DIR)/$$(DISTRO_NAME)/$$(RELEASE_NAME)/receipes/$$(RECEIPE_NAME)
$$($$(DISTRO_NAME)_$$(RELEASE_NAME)_$$(RECEIPE_NAME)_ARTIFACT): $(STAGING_DIR)/$$(DISTRO_NAME)/$$(RELEASE_NAME)/receipes/$$(RECEIPE_NAME)
$$$$(dir_guard)
$(CONTAINER_CMD) run --rm \
-v $(ROOT_DIR)/tools:/image-builder/tools:ro \
-v $$$$|:/image-builder/receipe:ro \
-v $$$$<:/image-builder/receipe:ro \
-v $$$$(dir $$$$@):/image-builder/output \
$(CONTAINER_IMAGE_TAG) \
/bin/sh -c ' \