Add to build ISO image and apply to Live System image

Add 'ISOIMAGE=true' to config file for target image

Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Change-Id: Ibec11c57ac8c256d8436e70353de72376f8280cd
This commit is contained in:
Dongjin Kim
2021-03-31 16:55:51 +09:00
parent ac136d299e
commit ada20903f5
3 changed files with 10 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
BOARD=odroidc4
BOARD=odroidn2plus
ARCH=arm64
DISTRO=focal
FLAVOUR=server
@@ -6,4 +6,4 @@ TARGET_DEVICE=/srv/workspace/odroid-stamper/binary.img
DEFAULT_USER=odroid
DEFAULT_PASSWD=odroid
ALLOW_ROOT_LOGIN=false
LIVESYSTEM=true
ISOIMAGE=true

View File

@@ -447,7 +447,7 @@ do_flash_bootloader() {
do_finalize_image() {
local disk=${1}
local osimage=${2}
local osimage=${2}.img
[ "x${PUBLISH}" = "xtrue" ] && COMPRESS=true
@@ -462,6 +462,11 @@ do_finalize_image() {
md5sum ${osimage}.xz > ${osimage}.xz.md5sum
fi
if [ "x${ISOIMAGE}" = "xtrue" ]; then
mkisofs -J -no-pad -o ${2}.iso ${boot_mnt}
md5sum ${2}.iso > ${2}.iso.md5sum
fi
sed -i -r "s/ .*\/(.+)/ \1/g" ${osimage}*.md5sum
fi
}
@@ -492,7 +497,7 @@ do_custom_installer() {
disk=${LOOPBACK}
fi
do_flash_bootloader ${disk}
do_finalize_image ${TARGET_DEVICE} ${OUTFILE}.img
do_finalize_image ${TARGET_DEVICE} ${OUTFILE}
if [ "x${PUBLISH}" = "xtrue" ]; then
do_publish "192.168.0.2" \

View File

@@ -31,6 +31,7 @@ fi
. ${DEFAULT_CONFIG}
[ "${RUN_MENU}" = "true" ] && do_menu
[ "x${ISOIMAGE}" = "xtrue" ] && LIVESYSTEM=true
[ "x${IMAGE_FILE}" = "x" ] && IMAGE_FILE=$(image_file ${DISTRO} ${FLAVOUR} ${BOARD})
OUTFILE=${out_dir}/${IMAGE_FILE}