mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg Ungerer <gerg@linux-m68k.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Linux/m68k <linux-m68k@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH 3/3] m68knommu: fix 68000 CPU link with no platform selected
Date: Wed, 18 May 2022 23:18:09 +1000	[thread overview]
Message-ID: <adb0c664-a662-4823-9e54-0daab22932a0@linux-m68k.org> (raw)
In-Reply-To: <CAMuHMdWADK4d-OxKYdnRvbtVsGtbZ_+vF2D70S-5hXNt0rqg9w@mail.gmail.com>

Hi Geert,

On 18/5/22 19:20, Geert Uytterhoeven wrote:
> Hi Greg.
> 
> On Wed, May 18, 2022 at 8:56 AM Greg Ungerer <gerg@linux-m68k.org> wrote:
>> If building for a nommu m68k classic CPU and no platform (board) is
>> selected then the final link fails with:
>>
>>       LD      vmlinux.o
>>     m68k-linux-ld: cannot find arch/m68k/kernel/head.o: No such file or directory
>>     make: *** [Makefile:1158: vmlinux] Error 1
>>
>> Not selecting a platform is ok, that is a generic 68000 system build.
>> All of the platform selections are for 68328 variants.
>>
>> The underlying problem is that the CPU config option (CONFIG_M68000)
>> ends up not being set, it is currently only selected by one of the
>> platform choices.
>>
>> Change CONFIG_M68000 so that it is always enabled for the nommu m68k
>> classic configuration.
>>
>> Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>
> 
> Thanks for your patch!
> 
>> --- a/arch/m68k/Kconfig.cpu
>> +++ b/arch/m68k/Kconfig.cpu
>> @@ -37,7 +37,7 @@ endchoice
>>   if M68KCLASSIC
>>
>>   config M68000
>> -       bool
>> +       def_bool y
> 
> And then the selects can be removed, too, as the symbol is now always
> enabled?

Yes, I think that would be the case.


> I'm wondering how to handle this when another nommu-m68k-classic
> platform shows up (again, cfr. the removed 68360 support) , that
> would need a different head.S?  Of course that's something to be
> solved later...

Yes, indeed. I am kinda kicking that can down the road :-)

It probably doesn't make a lot of sense to be able to select
multiple platform types in this specific nommu m68k classic setup.
The startup config code does not support probing of platform type,
it has hard coded #if conditionals that mean it only supports a
single platform selection anyway.

Anyway, a problem to deal with when we have more choices here.


>>          depends on !MMU
>>          select CPU_HAS_NO_BITFIELDS
>>          select CPU_HAS_NO_CAS
> 
> Note that mmu-m68k-classic (e.g. CONFIG_MMU=y + allnonfig) has the
> same problem.  That config does need other fixes too.  E.g. I have
> a local patch to make sure NR_IRQS is never zero, but never got to
> solve the missing head.o problem in an acceptable way.

Yep, ok.

Regards
Greg



> Gr{oetje,eeting}s,
> 
>                          Geert
> 
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
> 
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
>                                  -- Linus Torvalds

      reply	other threads:[~2022-05-18 13:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-18  6:56 [PATCH 0/3] m68k: build fixes and cleanup Greg Ungerer
2022-05-18  6:56 ` [PATCH 1/3] m68knommu: fix undefined reference to `mach_get_rtc_pll' Greg Ungerer
2022-05-18  8:38   ` Geert Uytterhoeven
2022-05-18 12:26   ` Arnd Bergmann
2022-05-24  7:46   ` Geert Uytterhoeven
2022-05-24  7:49     ` Geert Uytterhoeven
2022-05-24 14:01       ` Greg Ungerer
2022-05-18  6:56 ` [PATCH 2/3] m68k: removed unused "mach_get_ss" Greg Ungerer
2022-05-18  8:39   ` Geert Uytterhoeven
2022-05-18 12:24   ` Arnd Bergmann
2022-05-18  6:56 ` [PATCH 3/3] m68knommu: fix 68000 CPU link with no platform selected Greg Ungerer
2022-05-18  9:20   ` Geert Uytterhoeven
2022-05-18 13:18     ` Greg Ungerer [this message]

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=adb0c664-a662-4823-9e54-0daab22932a0@linux-m68k.org \
    --to=gerg@linux-m68k.org \
    --cc=arnd@arndb.de \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --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

all inboxes | Powered by JetHome®