From 2f4f0320a437fb530a8f35583989cc76715f65e8 Mon Sep 17 00:00:00 2001 From: Riccardo Pittau Date: Fri, 19 Feb 2021 14:54:23 +0100 Subject: [PATCH] Make sure we can create tinyipa isos Verify we're able to build a tinyipa iso. - use bash in build-iso script - account for filenames with branch names in them - Fix isolinux.bin path The correct location is now under bios/core [...]/syslinux-6.03$ find . -name "isolinux.bin" ./bios/core/isolinux.bin Change-Id: Idce5d81ce83df121e521b7d26fd6523a378a0585 --- roles/ipa-build-tinyipa-image/tasks/main.yaml | 2 +- tinyipa/build-iso.sh | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/roles/ipa-build-tinyipa-image/tasks/main.yaml b/roles/ipa-build-tinyipa-image/tasks/main.yaml index 68fdb4b..4e1aaa4 100644 --- a/roles/ipa-build-tinyipa-image/tasks/main.yaml +++ b/roles/ipa-build-tinyipa-image/tasks/main.yaml @@ -1,5 +1,5 @@ - name: Build a TinyIPA image - command: make + command: make all args: chdir: '{{ tinyipa_dir }}' environment: diff --git a/tinyipa/build-iso.sh b/tinyipa/build-iso.sh index 7e76e28..92ae32b 100755 --- a/tinyipa/build-iso.sh +++ b/tinyipa/build-iso.sh @@ -1,18 +1,20 @@ -#!/bin/sh +#!/bin/bash set -ex WORKDIR=$(readlink -f $0 | xargs dirname) SYSLINUX_VERSION="6.03" SYSLINUX_URL="https://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-${SYSLINUX_VERSION}.tar.gz" -cd $WORKDIR/build_files +source ${WORKDIR}/common.sh + +cd ${WORKDIR}/build_files wget -N $SYSLINUX_URL && tar zxf syslinux-${SYSLINUX_VERSION}.tar.gz cd $WORKDIR rm -rf newiso mkdir -p newiso/boot/isolinux -cp build_files/syslinux-${SYSLINUX_VERSION}/core/isolinux.bin newiso/boot/isolinux/. +cp build_files/syslinux-${SYSLINUX_VERSION}/bios/core/isolinux.bin newiso/boot/isolinux/. cp build_files/isolinux.cfg newiso/boot/isolinux/. -cp tinyipa.gz newiso/boot/corepure64.gz -cp tinyipa.vmlinuz newiso/boot/vmlinuz64 +cp tinyipa${BRANCH_EXT}.gz newiso/boot/corepure64.gz +cp tinyipa${BRANCH_EXT}.vmlinuz newiso/boot/vmlinuz64 genisoimage -l -r -J -R -V TC-custom -no-emul-boot -boot-load-size 4 -boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat -o tinyipa.iso newiso