Revision 40c875d3
Added by Renato Botelho over 8 years ago
tools/builder_common.sh | ||
---|---|---|
1370 | 1370 |
} |
1371 | 1371 |
|
1372 | 1372 |
create_iso_image() { |
1373 |
local _variant="$1" |
|
1374 |
|
|
1373 | 1375 |
LOGFILE=${BUILDER_LOGS}/isoimage.${TARGET} |
1374 | 1376 |
echo ">>> Building bootable ISO image for ${TARGET}" | tee -a ${LOGFILE} |
1375 | 1377 |
if [ -z "${DEFAULT_KERNEL}" ]; then |
... | ... | |
1377 | 1379 |
print_error_pfS |
1378 | 1380 |
fi |
1379 | 1381 |
|
1380 |
customize_stagearea_for_image "iso" |
|
1382 |
local _image_path=${ISOPATH} |
|
1383 |
if [ -n "${_variant}" ]; then |
|
1384 |
_image_path=$(echo "$_image_path" | \ |
|
1385 |
sed "s/${PRODUCT_NAME_SUFFIX}-/&${_variant}-/") |
|
1386 |
VARIANTIMAGES="${VARIANTIMAGES}${VARIANTIMAGES:+ }${_image_path}" |
|
1387 |
fi |
|
1388 |
|
|
1389 |
customize_stagearea_for_image "iso" "" $_variant |
|
1381 | 1390 |
install_default_kernel ${DEFAULT_KERNEL} |
1382 | 1391 |
|
1383 | 1392 |
echo cdrom > $FINAL_CHROOT_DIR/etc/platform |
... | ... | |
1387 | 1396 |
|
1388 | 1397 |
# This check is for supporting create memstick/ova images |
1389 | 1398 |
echo -n ">>> Running command: script -aq $LOGFILE makefs -t cd9660 -o bootimage=\"i386;${FINAL_CHROOT_DIR}/boot/cdboot \"-o no-emul-boot -o rockridge " | tee -a ${LOGFILE} |
1390 |
echo "-o label=${FSLABEL} -o publisher=\"${PRODUCT_NAME} project.\" $ISOPATH ${FINAL_CHROOT_DIR}" | tee -a ${LOGFILE}
|
|
1399 |
echo "-o label=${FSLABEL} -o publisher=\"${PRODUCT_NAME} project.\" $_image_path ${FINAL_CHROOT_DIR}" | tee -a ${LOGFILE}
|
|
1391 | 1400 |
|
1392 | 1401 |
create_distribution_tarball |
1393 | 1402 |
|
... | ... | |
1395 | 1404 |
rm -rf ${FINAL_CHROOT_DIR}/rescue |
1396 | 1405 |
|
1397 | 1406 |
makefs -t cd9660 -o bootimage="i386;${FINAL_CHROOT_DIR}/boot/cdboot" -o no-emul-boot -o rockridge \ |
1398 |
-o label=${FSLABEL} -o publisher="${PRODUCT_NAME} project." $ISOPATH ${FINAL_CHROOT_DIR} 2>&1 >> ${LOGFILE}
|
|
1399 |
if [ $? -ne 0 -o ! -f $ISOPATH ]; then
|
|
1400 |
if [ -f ${ISOPATH} ]; then
|
|
1401 |
rm -f $ISOPATH
|
|
1407 |
-o label=${FSLABEL} -o publisher="${PRODUCT_NAME} project." $_image_path ${FINAL_CHROOT_DIR} 2>&1 >> ${LOGFILE}
|
|
1408 |
if [ $? -ne 0 -o ! -f $_image_path ]; then
|
|
1409 |
if [ -f ${_image_path} ]; then
|
|
1410 |
rm -f $_image_path
|
|
1402 | 1411 |
fi |
1403 | 1412 |
echo ">>> ERROR: Something wrong happened during ISO image creation. STOPPING!" | tee -a ${LOGFILE} |
1404 | 1413 |
print_error_pfS |
1405 | 1414 |
fi |
1406 |
gzip -qf $ISOPATH &
|
|
1415 |
gzip -qf $_image_path &
|
|
1407 | 1416 |
_bg_pids="${_bg_pids}${_bg_pids:+ }$!" |
1408 | 1417 |
|
1409 | 1418 |
echo ">>> ISO created: $(LC_ALL=C date)" | tee -a ${LOGFILE} |
Also available in: Unified diff
Allow to build variant ISO image as done for memstick