Allow image building to be skipped for stages (#137)
This commit is contained in:
parent
40e5dae819
commit
066eb03d52
3 changed files with 8 additions and 5 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -3,6 +3,7 @@ work/*
|
||||||
config
|
config
|
||||||
postrun.sh
|
postrun.sh
|
||||||
SKIP
|
SKIP
|
||||||
|
SKIP_IMAGES
|
||||||
.pc
|
.pc
|
||||||
*-pc
|
*-pc
|
||||||
apt-cacher-ng/
|
apt-cacher-ng/
|
||||||
|
|
|
@ -228,14 +228,14 @@ replace with your own contents in the same format.
|
||||||
If you're working on a specific stage the recommended development process is as
|
If you're working on a specific stage the recommended development process is as
|
||||||
follows:
|
follows:
|
||||||
|
|
||||||
* Remove the EXPORT_IMAGE and EXPORT_NOOBS files until you're ready to actually
|
* Add a file called SKIP_IMAGES into the directories containing EXPORT_* files
|
||||||
generate an image
|
(currently stage2, stage4 and stage5)
|
||||||
* Add SKIP files to the stages you don't want to build. For example, if you're
|
* Add SKIP files to the stages you don't want to build. For example, if you're
|
||||||
basing your image on the lite image you would add these to stages 3, 4 and 5.
|
basing your image on the lite image you would add these to stages 3, 4 and 5.
|
||||||
* Run build.sh to build all stages
|
* Run build.sh to build all stages
|
||||||
* Add SKIP files to the earlier successfully built stages
|
* Add SKIP files to the earlier successfully built stages
|
||||||
* Modify the last stage
|
* Modify the last stage
|
||||||
* Rebuild just the last stage using ```sudo CLEAN=1 ./build.sh```
|
* Rebuild just the last stage using ```sudo CLEAN=1 ./build.sh```
|
||||||
* Once you're happy with the image you can add the EXPORT files back in and
|
* Once you're happy with the image you can remove the SKIP_IMAGES files and
|
||||||
export your image to test
|
export your image to test
|
||||||
|
|
||||||
|
|
2
build.sh
2
build.sh
|
@ -85,9 +85,11 @@ run_stage(){
|
||||||
unmount ${WORK_DIR}/${STAGE}
|
unmount ${WORK_DIR}/${STAGE}
|
||||||
STAGE_WORK_DIR=${WORK_DIR}/${STAGE}
|
STAGE_WORK_DIR=${WORK_DIR}/${STAGE}
|
||||||
ROOTFS_DIR=${STAGE_WORK_DIR}/rootfs
|
ROOTFS_DIR=${STAGE_WORK_DIR}/rootfs
|
||||||
|
if [ ! -f SKIP_IMAGES ]; then
|
||||||
if [ -f ${STAGE_DIR}/EXPORT_IMAGE ]; then
|
if [ -f ${STAGE_DIR}/EXPORT_IMAGE ]; then
|
||||||
EXPORT_DIRS="${EXPORT_DIRS} ${STAGE_DIR}"
|
EXPORT_DIRS="${EXPORT_DIRS} ${STAGE_DIR}"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
if [ ! -f SKIP ]; then
|
if [ ! -f SKIP ]; then
|
||||||
if [ "${CLEAN}" = "1" ]; then
|
if [ "${CLEAN}" = "1" ]; then
|
||||||
if [ -d ${ROOTFS_DIR} ]; then
|
if [ -d ${ROOTFS_DIR} ]; then
|
||||||
|
|
Loading…
Reference in a new issue