grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
From: lsorense@csclub.uwaterloo.ca (Lennart Sorensen)
To: The development of GNU GRUB <grub-devel@gnu.org>
Cc: Matthew Whitehead <mwhitehe@redhat.com>
Subject: Re: "Illegal Instruction" error in grub_script_comments
Date: Tue, 18 Oct 2016 15:12:09 -0400	[thread overview]
Message-ID: <20161018191208.GF20428@csclub.uwaterloo.ca> (raw)
In-Reply-To: <CAP8WD_YrGj255VMrU=x_hQwJQ2H67cPAJKOKQfcaCreSjrLN2w@mail.gmail.com>

On Mon, Oct 17, 2016 at 02:34:16PM -0400, tedheadster wrote:
> I am building the older grub2-1.98+20100804 under the similarly old Debian
> 'squeeze' distribution. However, I bet the error persists with newer
> version. This is because I am building it on a true Intel 80486 and I don't
> thing the compiler is building for the correct architecture. Here is the
> output:
> 
> ./config.status --file=-:tests/grub_script_dollar.in | sed -e
> 's,@pkglib_DATA@,efiemu32.o efiemu64.o moddep.lst command.lst fs.lst
> partmap.lst parttool.lst handler.lst vi\
> deo.lst crypto.lst terminal.lst,g' > grub_script_dollar
> chmod +x grub_script_dollar
> 
> ./config.status --file=-:tests/grub_script_comments.in | sed -e
> 's,@pkglib_DATA@,efiemu32.o efiemu64.o moddep.lst command.lst fs.lst
> partmap.lst parttool.lst handler.lst \
> video.lst crypto.lst terminal.lst,g' > grub_script_comments
> chmod +x grub_script_comments
> 
> Illegal instruction
> 
> ./grub_script_echo1: GRUB and BASH outputs did not match (see diff -u
> /tmp/tmp.tP7l8uR3SD /tmp/tmp.wYCFOK2zor)
> make[2]: *** [check] Error 1
> make[2]: Leaving directory `/root/grub2-1.98+20100804/build/grub-pc'
> dh_auto_test: make -j1 check returned exit code 2
> make[1]: *** [build/stamps/build-grub-pc] Error 29
> make[1]: Leaving directory `/root/grub2-1.98+20100804'
> make: *** [build] Error 2
> 
> Is there a file I can modify to pass in -march=i486 or something similar?

Well I tried installing squeeze in a qemu VM emulating a 486.  It worked
fine there.

But qemu is emulating a 486DX4, which supports CPUID.  If your 486 is
older if probably does not have the CPUID instruction.  The place grub
is blowing up appears to be the test suite which uses qemu-system-i386.

So my suspicion is that it is actually qemu crashing, not grub, and
that your best bet would be to just not run the test suite.  The compile
almost certainly worked fine.

Simply uninstalling qemu whould make it not try to run the test based on
the debian/rules file, although debian/control considers qemu a built
dependancy.  So you probably have to use -d with dpkg-builcpackage to
make it ignore the missing dependancy.

Or edit debian/rules and simply set the with_check variable to no.

I can't find anything that says if qemu should run on an older 486,
probably since those usually didn't have enough memory to make that
worth the bother and they are too slow.  Maybe no one had ever tried
it before.

-- 
Len Sorensen


  parent reply	other threads:[~2016-10-18 19:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-17 18:34 "Illegal Instruction" error in grub_script_comments tedheadster
2016-10-17 22:32 ` Colin Watson
2016-10-18 19:12 ` Lennart Sorensen [this message]
2016-10-19 15:32   ` Matthew Whitehead
2016-10-19 19:06     ` Lennart Sorensen
2016-10-19 19:16       ` Matthew Whitehead
2016-10-31  3:17       ` Matthew Whitehead
2016-10-20 17:34     ` Andrei Borzenkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161018191208.GF20428@csclub.uwaterloo.ca \
    --to=lsorense@csclub.uwaterloo.ca \
    --cc=grub-devel@gnu.org \
    --cc=mwhitehe@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).