5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, see <http://www.gnu.org/licenses/>.
18 # Copyright (C) 2011 Red Hat, Inc.
19 # Authors: Alex Williamson <alex.williamson@redhat.com>
21 # Usage: Run from root of qemu tree
22 # ./scripts/refresh-pxe-roms.sh
27 LOCAL_CONFIG
="src/config/local/general.h"
31 if [ -n "$SAVED_CONFIG" ]; then
32 cp "$SAVED_CONFIG" "$BUILD_DIR"/"$LOCAL_CONFIG"
45 make bin
/"$1".rom
> "$BUILD_LOG" 2>&1
48 tail --lines=100 "$BUILD_LOG"
55 cp bin
/"$1".rom
"$QEMU_DIR"/"$ROM_DIR"/"$2"
60 if [ ! -d "$QEMU_DIR"/"$ROM_DIR" ]; then
61 echo "error: can't find $ROM_DIR directory," \
62 "run me from the root of the qemu tree"
66 if [ ! -d "$BUILD_DIR"/src
]; then
67 echo "error: $BUILD_DIR not populated, try:"
68 echo " git submodule init $BUILD_DIR"
69 echo " git submodule update $BUILD_DIR"
73 if [ -e "$BUILD_DIR"/"$LOCAL_CONFIG" ]; then
74 SAVED_CONFIG
=$
(mktemp
)
75 cp "$BUILD_DIR"/"$LOCAL_CONFIG" "$SAVED_CONFIG"
78 echo "#undef BANNER_TIMEOUT" > "$BUILD_DIR"/"$LOCAL_CONFIG"
79 echo "#define BANNER_TIMEOUT 0" >> "$BUILD_DIR"/"$LOCAL_CONFIG"
81 IPXE_VERSION
=$
(cd "$BUILD_DIR" && git describe
--tags)
82 if [ -z "$IPXE_VERSION" ]; then
83 echo "error: unable to retrieve git version"
88 echo "#undef PRODUCT_NAME" >> "$BUILD_DIR"/"$LOCAL_CONFIG"
89 echo "#define PRODUCT_NAME \"iPXE $IPXE_VERSION\"" >> "$BUILD_DIR"/"$LOCAL_CONFIG"
91 make_rom
8086100e pxe-e1000.rom
92 make_rom
80861209 pxe-eepro100.rom
93 make_rom
10500940 pxe-ne2k_pci.rom
94 make_rom
10222000 pxe-pcnet.rom
95 make_rom
10ec8139 pxe-rtl8139.rom
96 make_rom
1af41000 pxe-virtio.rom