From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42484) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VO2nY-00067F-SC for qemu-devel@nongnu.org; Mon, 23 Sep 2013 05:51:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VO2nR-00084w-9H for qemu-devel@nongnu.org; Mon, 23 Sep 2013 05:51:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35374) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VO2nR-00084g-0R for qemu-devel@nongnu.org; Mon, 23 Sep 2013 05:51:13 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r8N9pCnF022525 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 23 Sep 2013 05:51:12 -0400 From: Gerd Hoffmann Date: Mon, 23 Sep 2013 11:50:57 +0200 Message-Id: <1379929859-7854-6-git-send-email-kraxel@redhat.com> In-Reply-To: <1379929859-7854-1-git-send-email-kraxel@redhat.com> References: <1379929859-7854-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 5/7] roms: rewrite scripts/refresh-pxe-roms.sh List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann Just use the Makefile in roms/ Signed-off-by: Gerd Hoffmann --- scripts/refresh-pxe-roms.sh | 80 ++++----------------------------------------- 1 file changed, 6 insertions(+), 74 deletions(-) diff --git a/scripts/refresh-pxe-roms.sh b/scripts/refresh-pxe-roms.sh index 14d5860..90fc0b3 100755 --- a/scripts/refresh-pxe-roms.sh +++ b/scripts/refresh-pxe-roms.sh @@ -21,79 +21,11 @@ # Usage: Run from root of qemu tree # ./scripts/refresh-pxe-roms.sh -QEMU_DIR=$PWD -ROM_DIR="pc-bios" -BUILD_DIR="roms/ipxe" -LOCAL_CONFIG="src/config/local/general.h" - -function cleanup () -{ - if [ -n "$SAVED_CONFIG" ]; then - cp "$SAVED_CONFIG" "$BUILD_DIR"/"$LOCAL_CONFIG" - rm "$SAVED_CONFIG" - fi - cd "$QEMU_DIR" -} - -function make_rom () -{ - cd "$BUILD_DIR"/src - - BUILD_LOG=$(mktemp) - - echo Building "$2"... - make bin/"$1".rom > "$BUILD_LOG" 2>&1 - if [ $? -ne 0 ]; then - echo Build failed - tail --lines=100 "$BUILD_LOG" - rm "$BUILD_LOG" - cleanup - exit 1 - fi - rm "$BUILD_LOG" - - cp bin/"$1".rom "$QEMU_DIR"/"$ROM_DIR"/"$2" - - cd "$QEMU_DIR" -} - -if [ ! -d "$QEMU_DIR"/"$ROM_DIR" ]; then - echo "error: can't find $ROM_DIR directory," \ - "run me from the root of the qemu tree" - exit 1 -fi - -if [ ! -d "$BUILD_DIR"/src ]; then - echo "error: $BUILD_DIR not populated, try:" - echo " git submodule init $BUILD_DIR" - echo " git submodule update $BUILD_DIR" - exit 1 -fi - -if [ -e "$BUILD_DIR"/"$LOCAL_CONFIG" ]; then - SAVED_CONFIG=$(mktemp) - cp "$BUILD_DIR"/"$LOCAL_CONFIG" "$SAVED_CONFIG" -fi - -echo "#undef BANNER_TIMEOUT" > "$BUILD_DIR"/"$LOCAL_CONFIG" -echo "#define BANNER_TIMEOUT 0" >> "$BUILD_DIR"/"$LOCAL_CONFIG" - -IPXE_VERSION=$(cd "$BUILD_DIR" && git describe --tags) -if [ -z "$IPXE_VERSION" ]; then - echo "error: unable to retrieve git version" - cleanup - exit 1 +targets="pxerom" +if test -x "$(which EfiRom 2>/dev/null)"; then + targets="$targets efirom" fi -echo "#undef PRODUCT_NAME" >> "$BUILD_DIR"/"$LOCAL_CONFIG" -echo "#define PRODUCT_NAME \"iPXE $IPXE_VERSION\"" >> "$BUILD_DIR"/"$LOCAL_CONFIG" - -make_rom 8086100e pxe-e1000.rom -make_rom 80861209 pxe-eepro100.rom -make_rom 10500940 pxe-ne2k_pci.rom -make_rom 10222000 pxe-pcnet.rom -make_rom 10ec8139 pxe-rtl8139.rom -make_rom 1af41000 pxe-virtio.rom - -echo done -cleanup +cd roms +make -j4 $targets || exit 1 +make clean -- 1.8.3.1