linux-m68k.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Landley <rob@landley.net>
To: Finn Thain <fthain@telegraphics.com.au>
Cc: linux-m68k@vger.kernel.org, Laurent Vivier <Laurent@Vivier.EU>
Subject: Re: Running m68k on qemu with external initramfs?
Date: Sun, 12 Apr 2020 07:34:38 -0500	[thread overview]
Message-ID: <786d4659-0b05-4ce0-8eef-ed8d76e2ead7@landley.net> (raw)
In-Reply-To: <alpine.LNX.2.22.394.2004121508200.50@nippy.intranet>

On 4/12/20 12:29 AM, Finn Thain wrote:
>>> It sounds more like a "modify kernel .config" problem. But it could be a 
>>> regression; what versions of qemu and kernel did you try?
>>
>> "Works for me", got it. I'll keep digging.
>>
> 
> If you want to try a kernel binary that works for me, so as to narrow down 
> the problem, you can get one from here:
> https://sourceforge.net/projects/linux-mac68k/files/

You have 4.1 and 4.14 kernels. The last one I had in my old build system (which
works but was uClibc based using gcc 4.2.1) was 4.3:
http://landley.net/aboriginal/downloads/binaries/system-image-m68k.tar.gz

But that was a static initramfs, not an external intitramfs.

>> QEMU is the one Laurent Vivier maintains that's been out of tree for 
>> something like 12 years now, the default branch claims to be "q800-dev" 
>> and the last commit was in december.
> 
> Should be fine. For the last few months I've used mainline QEMU instead.

Oh cool. (My last qemu build apparently just predated the merge, and hadn't had it.)

> That works for me, with a few tweaks:
>
> qemu-system-m68k -M q800 -serial none -serial mon:stdio -nographic 
> -no-reboot -m 256 -kernel vmlinux-4.14.167-mac-backport+ 
> -initrd sysroot.cpio.gz -append console=ttyS0 

Yeah, it's looking like it's something about my userspace build. (A problem
which is unique to m68k because all the other targets are working. Sigh.)

I'll keep digging...

And this makes the segfault go away:

--- a/toys/pending/sh.c
+++ b/toys/pending/sh.c
@@ -2575,7 +2588,7 @@ void cd_main(void)
     if (to-dd>1 && to[-1]=='/') to--;
     *to = 0;
   }
-
+write(1, "", 0);
   if (bad || chdir(dd)) perror_msg("chdir '%s'", dd);
   else {
     if (pwd) {

So that's reassuring. I should run it under gdb to see what the segfault that
heisenbugs acutally _is_ but given it doesn't show up on any other architecture
(32 or 64 bit, big or little endian, sh4 cares about alignment, and I've built
it under glibc musl and bionic), I'm going to throw m68k back on the todo heap
for now.

Rob

  reply	other threads:[~2020-04-12 12:28 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-11  0:50 Running m68k on qemu with external initramfs? Rob Landley
2020-04-11  6:12 ` Finn Thain
2020-04-12  3:36   ` Rob Landley
2020-04-12  5:29     ` Finn Thain
2020-04-12 12:34       ` Rob Landley [this message]
2020-04-12  8:27     ` John Paul Adrian Glaubitz
2020-04-12  8:31       ` Laurent Vivier
2020-04-12 21:48         ` Rob Landley
2020-04-12 23:17           ` Finn Thain
2020-04-11 12:12 ` John Paul Adrian Glaubitz
2020-04-12 12:48   ` Rob Landley
2020-04-12 13:02     ` John Paul Adrian Glaubitz
2020-04-12 21:56       ` Rob Landley
2020-04-12 23:30     ` GCC?, was " Finn Thain
2020-04-13  0:28       ` Rob Landley
2020-04-13  5:17         ` Finn Thain
2020-04-13  7:07           ` Rob Landley
2020-04-13  7:41             ` John Paul Adrian Glaubitz
2020-04-13  8:27             ` Rob Landley
2020-04-13  9:42               ` Geert Uytterhoeven
2020-04-13 23:02                 ` Finn Thain

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=786d4659-0b05-4ce0-8eef-ed8d76e2ead7@landley.net \
    --to=rob@landley.net \
    --cc=Laurent@Vivier.EU \
    --cc=fthain@telegraphics.com.au \
    --cc=linux-m68k@vger.kernel.org \
    /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).