* tests/util/grub-shell.in: Use escc-ch-a port on ppc.

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2012-06-08 20:29:15 +02:00
parent 8d03d28424
commit ecfc6207d6
2 changed files with 20 additions and 6 deletions

View file

@ -1,3 +1,7 @@
2012-06-08 Vladimir Serbinenko <phcoder@gmail.com>
* tests/util/grub-shell.in: Use escc-ch-a port on ppc.
2012-06-08 Vladimir Serbinenko <phcoder@gmail.com> 2012-06-08 Vladimir Serbinenko <phcoder@gmail.com>
* util/powerpc/ieee1275/grub-mkrescue.in: Handle (and ignore) * util/powerpc/ieee1275/grub-mkrescue.in: Handle (and ignore)

View file

@ -59,7 +59,17 @@ EOF
. "${builddir}/grub-core/modinfo.sh" . "${builddir}/grub-core/modinfo.sh"
qemuopts="${GRUB_QEMU_OPTS}" qemuopts="${GRUB_QEMU_OPTS}"
serial_port=com0
serial_null=
case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
powerpc-ieee1275)
boot=cd
qemu=qemu-system-ppc
console=console
serial_port=escc-ch-a
serial_null="-serial null"
;;
mips-qemu_mips) mips-qemu_mips)
boot=mips_qemu boot=mips_qemu
qemu=qemu-system-mips qemu=qemu-system-mips
@ -179,10 +189,10 @@ cfgfile=`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"` || exit 1
cat <<EOF >${cfgfile} cat <<EOF >${cfgfile}
grubshell=yes grubshell=yes
insmod serial insmod serial
serial serial ${serial_port}
terminfo serial dumb terminfo serial_${serial_port} dumb
terminal_input serial terminal_input serial_${serial_port}
terminal_output serial terminal_output serial_${serial_port}
EOF EOF
trim_head=664cbea8-132f-4770-8aa4-1696d59ac35c trim_head=664cbea8-132f-4770-8aa4-1696d59ac35c
@ -262,9 +272,9 @@ if [ x$boot = xnet ]; then
pkgdatadir="@builddir@" sh "@builddir@/grub-mknetdir" "--grub-mkimage=${builddir}/grub-mkimage" "--directory=${builddir}/grub-core" "--net-directory=$netdir" pkgdatadir="@builddir@" sh "@builddir@/grub-mknetdir" "--grub-mkimage=${builddir}/grub-mkimage" "--directory=${builddir}/grub-core" "--net-directory=$netdir"
cp "${cfgfile}" "$netdir/boot/grub/grub.cfg" cp "${cfgfile}" "$netdir/boot/grub/grub.cfg"
cp "${source}" "$netdir/boot/grub/testcase.cfg" cp "${source}" "$netdir/boot/grub/testcase.cfg"
"${qemu}" ${qemuopts} -nographic -serial file:/dev/stdout -monitor file:/dev/null -boot n -net "user,tftp=$netdir,bootfile=/boot/grub/${grub_modinfo_target_cpu}-${grub_modinfo_platform}/core.0" -net nic | cat | tr -d "\r" | do_trim "${qemu}" ${qemuopts} -nographic ${serial_null} -serial file:/dev/stdout -monitor file:/dev/null -boot n -net "user,tftp=$netdir,bootfile=/boot/grub/${grub_modinfo_target_cpu}-${grub_modinfo_platform}/core.0" -net nic | cat | tr -d "\r" | do_trim
else else
"${qemu}" ${qemuopts} -nographic -serial file:/dev/stdout -monitor file:/dev/null -${device} ${isofile} ${bootdev} | cat | tr -d "\r" | do_trim "${qemu}" ${qemuopts} -nographic ${serial_null} -serial file:/dev/stdout -monitor file:/dev/null -${device} ${isofile} ${bootdev} | cat | tr -d "\r" | do_trim
fi fi
rm -f "${isofile}" "${imgfile}" rm -f "${isofile}" "${imgfile}"
rm -rf "${rom_directory}" rm -rf "${rom_directory}"