linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Ungerer <gerg@linux-m68k.org>
To: Rob Landley <rob@landley.net>, Finn Thain <fthain@linux-m68k.org>
Cc: Daniel Palmer <daniel@0x0f.com>, Arnd Bergmann <arnd@arndb.de>,
	Christoph Hellwig <hch@infradead.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Yoshinori Sato <ysato@users.sourceforge.jp>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-arch <linux-arch@vger.kernel.org>,
	"moderated list:H8/300 ARCHITECTURE" 
	<uclinux-h8-devel@lists.sourceforge.jp>,
	"open list:TENSILICA XTENSA PORT (xtensa)" 
	<linux-xtensa@linux-xtensa.org>,
	Max Filippov <jcmvbkbc@gmail.com>,
	Linux-sh list <linux-sh@vger.kernel.org>,
	linux-m68k <linux-m68k@lists.linux-m68k.org>,
	Damien Le Moal <damien.lemoal@wdc.com>,
	linux-riscv <linux-riscv@lists.infradead.org>
Subject: Re: [RFC PULL] remove arch/h8300
Date: Thu, 14 Apr 2022 10:49:40 +1000	[thread overview]
Message-ID: <7a26156e-1f06-b0b1-2859-432a75e9e0d4@linux-m68k.org> (raw)
In-Reply-To: <ae4125f5-e725-43ed-d05b-b1f88c0cd50c@landley.net>



On 10/4/22 17:26, Rob Landley wrote:
> 
> 
> On 4/8/22 23:18, Greg Ungerer wrote:
>>
>> On 9/4/22 11:59, Finn Thain wrote:
>>> On Fri, 8 Apr 2022, Rob Landley wrote:
>>>
>>>> On 4/5/22 08:07, Greg Ungerer wrote:
>>>>> On 5/4/22 13:23, Daniel Palmer wrote:
>>>>>> On Mon, 4 Apr 2022 at 22:42, Greg Ungerer <gerg@linux-m68k.org> wrote:
>>>>>>> But we could consider the Dragonball support for removal. I keep it
>>>>>>> compiling, but I don't use it and can't test that it actually works.
>>>>>>> Not sure that it has been used for a very long time now. And I
>>>>>>> didn't even realize but its serial driver (68328serial.c) was
>>>>>>> removed in 2015. No one seems too have noticed and complained.
>>>>>>
>>>>>> I noticed this and I am working on fixing it up for a new Dragonball
>>>>>> homebrew machine. I'm trying to add a 68000 machine to QEMU to make
>>>>>> the development easier because I'm currently waiting an hour or more
>>>>>> for a kernel to load over serial. It might be a few months.
>>>>
>>>> I've been booting Linux on qemu-system-m68k -M q800 for a couple years
>>>> now? (The CROSS=m68k target of mkroot in toybox?)
>>>>
>>>> # cat /proc/cpuinfo
>>>> CPU:		68040
>>>> MMU:		68040
>>>> FPU:		68040
>>>> Clocking:	1261.9MHz
>>>> BogoMips:	841.31
>>>> Calibration:	4206592 loops
>>>>
>>>> It certainly THINKS it's got m68000...
>>>>
>>>
>>> Most 68040 processor variants have a built-in MMU and the m68k "nommu"
>>> Linux port doesn't support them. The nommu port covers processors like
>>> 68000, Dragonball etc. whereas the m68k "mmu" port covers 680x0 where x is
>>> one of 2,3,4,6 with MMU.
> 
> In theory you can switch the MMU off. (Or at least give it a NOP page table that
> maps all the physical memory into one big contiguous block 1:1 with the physical
> address and leave it there.)
> 
> Doesn't mean anybody's bothered to implement and add a config option to stub
> that out in the kernel yet. But presumably you could have a bootloader shim do it...
> 
>>>> (I'd love to get an m68k nommu system working but never sat down and
>>>> worked out a kernel .config qemu agreed to run, plus compiler and libc.
>>>> Musl added m68k support but I dunno if that includes coldfire?)
>>>>
>>>
>>> I could never figure out how to boot a coldfire machine in qemu either.
>>> There was no documentation about that back when I attempted it but maybe
>>> things have improved since.
>>
>> FWIW this will do it:
>>
>>       qemu-system-m68k -nographic -machine mcf5208evb -kernel vmlinux
>>
>> That will boot an m5208evb_defconfig generated vmlinux.
>> But you will need a user space to get a full boot to login/shell.
> 
> No FDPIC support. :(
> 
> I had a binflt toolchain working with uClibc in 2015 or so, but I end of lifed
> https://landley.net/aboriginal in 2017 (five years ago now). Multiple reasons,
> but one was the old "last GPLv2 release" toolchain was getting painful to force
> the kernel to build with.
> 
> These days there's articles on lwn.net about yanking a.out support, which fdpic
> is a buggy variant of that didn't actually have a maintained elf2flt repository
> when I was assembling my toolchain. (I vaguely recall I poked enough people that
> somebody picked it up and stuck a repository on github, but Jeff Dionne
> explained some fundamental design flaw that had been introduced having to do
> with register offsets being calculated in the wrong framework or something?
> 
> I don't remember, I lost interest because it's _conceptually_ obsolete. FDPIC is
> ELF with a little extra header info, it's clean and potentially even useful on
> with-MMU systems as extra ASLR. BINFLT is a.out run through a postprocessing
> tool that nominally converts ELF files into the new format but actually needs .o
> files from earlier in the process and is kind of an alternate linker except it
> doesn't replace the linker... It's layers of ugly.

FLAT format has nothing to do with a.out.
Removing a.out support from the kernel will have no impact on binfmt_flat.

Regards
Greg


  parent reply	other threads:[~2022-04-14  0:49 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-08  6:52 [RFC PULL] remove arch/h8300 Christoph Hellwig
2022-03-08  8:19 ` Arnd Bergmann
2022-04-03 12:43   ` Christoph Hellwig
2022-04-04 13:07     ` Arnd Bergmann
2022-04-04 13:09       ` John Paul Adrian Glaubitz
2022-04-04 13:22       ` Geert Uytterhoeven
2022-04-04 23:34         ` Damien Le Moal
2022-04-06 21:25         ` Rob Landley
2022-04-07  7:17           ` Arnd Bergmann
2022-04-07  7:47             ` John Paul Adrian Glaubitz
2022-04-07  7:52               ` Christoph Hellwig
2022-04-07  8:34               ` Finn Thain
2022-04-04 13:41       ` Greg Ungerer
2022-04-05  3:23         ` Daniel Palmer
2022-04-05 13:07           ` Greg Ungerer
2022-04-09  0:24             ` Rob Landley
2022-04-09  1:59               ` Finn Thain
2022-04-09  4:18                 ` Greg Ungerer
2022-04-10  7:26                   ` Rob Landley
2022-04-10  8:08                     ` Rob Landley
2022-04-14  0:49                     ` Greg Ungerer [this message]
2022-04-09  3:37               ` Daniel Palmer
2022-04-10  7:13                 ` Rob Landley
2022-04-09  4:14               ` Greg Ungerer
2022-04-04 17:57       ` Max Filippov
2022-04-04 19:01         ` Arnd Bergmann
2022-04-04 19:14           ` Max Filippov
2022-04-04 19:35             ` Arnd Bergmann
2022-04-04 19:44               ` Arnd Bergmann
2022-04-04 20:56                 ` Max Filippov
2022-04-04 20:48               ` Max Filippov
2022-04-04 23:32       ` Damien Le Moal
2022-04-05 21:26       ` Guenter Roeck
2022-04-05 22:01         ` Arnd Bergmann
2022-04-06  0:12           ` Guenter Roeck
2022-05-06 14:07 ` Geert Uytterhoeven

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=7a26156e-1f06-b0b1-2859-432a75e9e0d4@linux-m68k.org \
    --to=gerg@linux-m68k.org \
    --cc=arnd@arndb.de \
    --cc=damien.lemoal@wdc.com \
    --cc=daniel@0x0f.com \
    --cc=fthain@linux-m68k.org \
    --cc=hch@infradead.org \
    --cc=jcmvbkbc@gmail.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@lists.linux-m68k.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=linux-xtensa@linux-xtensa.org \
    --cc=rob@landley.net \
    --cc=torvalds@linux-foundation.org \
    --cc=uclinux-h8-devel@lists.sourceforge.jp \
    --cc=ysato@users.sourceforge.jp \
    /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).