diff --git a/ChangeLog b/ChangeLog index 0d62509d1..c137b5f06 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2013-04-11 Vladimir Serbinenko + + Support i386-ieee1275 grub-mkrescue and make check on it. + 2013-04-11 Vladimir Serbinenko Merge powerpc grub-mkrescue flavour with common. Use xorriso HFS+ diff --git a/Makefile.util.def b/Makefile.util.def index bd286fc55..373c25b8b 100644 --- a/Makefile.util.def +++ b/Makefile.util.def @@ -470,6 +470,7 @@ script = { enable = i386_qemu; enable = i386_multiboot; enable = i386_coreboot; + enable = i386_ieee1275; enable = mips_qemu_mips; enable = mips_loongson; enable = ia64_efi; diff --git a/grub-core/tests/boot/qemu-shutdown-x86.S b/grub-core/tests/boot/qemu-shutdown-x86.S index 8f794fc4b..9f8bc4051 100644 --- a/grub-core/tests/boot/qemu-shutdown-x86.S +++ b/grub-core/tests/boot/qemu-shutdown-x86.S @@ -1,3 +1,12 @@ + movl $0x80000b80, %eax + movw $0xcf8, %dx + outl %eax, %dx + movl $0x1001, %eax + movw $0xcfc, %dx + inb %al, %dx + orb $1, %al + outb %al, %dx + movl $0x80000b40, %eax movw $0xcf8, %dx outl %eax, %dx diff --git a/tests/grub_script_expansion.in b/tests/grub_script_expansion.in index c4763907c..03dc510a2 100644 --- a/tests/grub_script_expansion.in +++ b/tests/grub_script_expansion.in @@ -35,7 +35,7 @@ done other=`echo insmod regexp\; echo '(*)' | @builddir@/grub-shell` for d in $disks; do - if ! echo "$other" | grep "$d" >/dev/null; then + if ! echo "$other" | grep -F "$d" >/dev/null; then echo "$d missing from (*) expansion" >&2 exit 1 fi diff --git a/tests/partmap_test.in b/tests/partmap_test.in index 150722026..a0beb2a4c 100644 --- a/tests/partmap_test.in +++ b/tests/partmap_test.in @@ -49,7 +49,7 @@ list_parts () { outfile="$1" shift - echo ls | "${grubshell}" --qemu-opts="-hda ${imgfile}" \ + echo ls | "${grubshell}" --qemu-opts="-$qemudisk ${imgfile}" \ --modules=$mod | tr -d "\n\r" > "${outfile}" cat "${outfile}" echo @@ -58,12 +58,18 @@ list_parts () { case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in mips-qemu_mips | mipsel-qemu_mips | i386-qemu | i386-multiboot | i386-coreboot | mipsel-loongson) disk=ata0 + qemudisk=hda ;; powerpc-ieee1275) disk=ieee1275//pci@80000000/mac-io@4/ata-3@20000/disk@0 + qemudisk=hda # QEMU firmware has bugs which prevent it from accessing hard disk. exit 0 ;; + i386-ieee1275) + disk=ieee1275/d + qemudisk=hdb + ;; *) disk=hd0 ;; diff --git a/tests/util/grub-shell.in b/tests/util/grub-shell.in index 04e64daa0..c6d1cd783 100644 --- a/tests/util/grub-shell.in +++ b/tests/util/grub-shell.in @@ -100,10 +100,11 @@ case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in console=vga_text;; i386-ieee1275) - boot=cd + boot=hd qemu=qemu-system-i386 - console=console;; - + console=console + trim=1 + ;; i386-qemu) boot=qemu qemu=qemu-system-i386 diff --git a/util/grub-mkrescue.in b/util/grub-mkrescue.in index a6e4de676..510d95fb7 100644 --- a/util/grub-mkrescue.in +++ b/util/grub-mkrescue.in @@ -40,6 +40,7 @@ mipsel_qemu_dir="${libdir}/@PACKAGE@/mipsel-qemu_mips" loongson_dir="${libdir}/@PACKAGE@/mipsel-loongson" mips_qemu_dir="${libdir}/@PACKAGE@/mips-qemu_mips" pc_dir="${libdir}/@PACKAGE@/i386-pc" +i386_ieee1275_dir="${libdir}/@PACKAGE@/i386-ieee1275" efi32_dir="${libdir}/@PACKAGE@/i386-efi" efi64_dir="${libdir}/@PACKAGE@/x86_64-efi" ia64_dir="${libdir}/@PACKAGE@/ia64-efi" @@ -256,6 +257,9 @@ if [ "${override_dir}" = "" ] ; then if test -e "${pc_dir}" ; then process_input_dir "${pc_dir}" i386-pc fi + if test -e "${i386_ieee1275_dir}" ; then + process_input_dir "${i386_ieee1275_dir}" i386-ieee1275 + fi if test -e "${efi32_dir}" ; then process_input_dir "${efi32_dir}" i386-efi fi @@ -291,6 +295,7 @@ else mips_qemu_dir= loongson_dir= ppc_dir= + i386_ieee1275_dir= case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in i386-multiboot) multiboot_dir="${override_dir}" ;; i386-coreboot) coreboot_dir="${override_dir}" ;; @@ -303,6 +308,7 @@ else mipsel-loongson) loongson_dir="${override_dir}" ;; mips-qemu_mips) mips_qemu_dir="${override_dir}" ;; powerpc-ieee1275) ppc_dir="${override_dir}" ;; + i386-ieee1275) i386_ieee1275_dir="${override_dir}" ;; esac fi @@ -336,6 +342,8 @@ fi # build multiboot core.img make_image "${multiboot_dir}" i386-multiboot "${iso9660_dir}/boot/multiboot.img" "pata ahci at_keyboard" +make_image "${i386_ieee1275_dir}" i386-ieee1275 "${iso9660_dir}/boot/ofwx86.elf" "" + if test -e "${efi64_dir}" || test -e "${efi32_dir}" || test -e "${ia64_dir}"; then efi_dir=`mktemp -d "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"` || exit 1 mkdir -p "${efi_dir}/efi/boot"