linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: linux-kbuild <linux-kbuild@vger.kernel.org>,
	"David S . Miller" <davem@davemloft.net>,
	netdev <netdev@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3] net: wan: wanxl: use $(CC68K) instead of $(AS68K) for rebuilding firmware
Date: Wed, 25 Mar 2020 10:12:45 +0100	[thread overview]
Message-ID: <CAMuHMdUMhPg2Du9_EowsKL9b8fpz8ymc_8E2VLybWs7mpN2DDg@mail.gmail.com> (raw)
In-Reply-To: <CAK7LNAST-ygeLAAneKRhr-uMdSW0V_V1s9AvN6VJSqfWfN4Otg@mail.gmail.com>

Hi Yamada-san,

On Wed, Mar 25, 2020 at 10:06 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
> On Wed, Mar 25, 2020 at 4:53 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > On Wed, Mar 25, 2020 at 4:50 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
> > > On Wed, Mar 25, 2020 at 2:47 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > > > On Tue, Mar 24, 2020 at 5:17 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
> > > > > As far as I understood from the Kconfig help text, this build rule is
> > > > > used to rebuild the driver firmware, which runs on the QUICC, m68k-based
> > > > > Motorola 68360.
> > > > >
> > > > > The firmware source, wanxlfw.S, is currently compiled by the combo of
> > > > > $(CPP) and $(AS68K). This is not what we usually do for compiling *.S
> > > > > files. In fact, this is the only user of $(AS) in the kernel build.
> > > > >
> > > > > Moreover, $(CPP) is not likely to be a m68k tool because wanxl.c is a
> > > > > PCI driver, but CONFIG_M68K does not select CONFIG_HAVE_PCI.
> > > > > Instead of combining $(CPP) and (AS) from different tool sets, using
> > > > > single $(CC68K) seems simpler, and saner.
> > > > >
> > > > > After this commit, the firmware rebuild will require cc68k instead of
> > > > > as68k. I do not know how many people care about this, though.
> > > > >
> > > > > I do not have cc68k/ld68k in hand, but I was able to build it by using
> > > > > the kernel.org m68k toolchain. [1]
> > > >
> > > > Would this work with a "standard" m68k-linux-gnu-gcc toolchain, like
> > > > provided by Debian/Ubuntu, too?
> > > >
> > >
> > > Yes, I did 'sudo apt install gcc-8-m68k-linux-gnu'
> > > It successfully compiled this firmware.
> >
> > Thanks for checking!
> >
> > > In my understanding, the difference is that
> > > the kernel.org ones lack libc,
> > > so cannot link userspace programs.
> > >
> > > They do not make much difference for this case.
> >
> > Indeed.
> >
> > So perhaps it makes sense to replace cc68k and ld68k in the Makefile by
> > m68k-linux-gnu-gcc and m68k-linux-gnu-ld, as these are easier to get hold
> > of on a modern system?
>
> If desired, I can do like this:
>
> ifeq ($(ARCH),m68k)
>   CC_M68K = $(CC)
>   LD_M68K = $(LD)
> else
>   CC_M68K = $(CROSS_COMPILE_M68K)gcc
>   LD_M68K = $(CROSS_COMPILE_M68K)ld
> endif

Thanks, that looks good to me.

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:[~2020-03-25  9:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-24 16:15 [PATCH 1/3] net: wan: wanxl: use $(CC68K) instead of $(AS68K) for rebuilding firmware Masahiro Yamada
2020-03-24 16:15 ` [PATCH 2/3] net: wan: wanxl: refactor the firmware rebuild rule Masahiro Yamada
2020-03-24 16:15 ` [PATCH 3/3] kbuild: remove AS variable Masahiro Yamada
2020-03-24 19:38   ` Nick Desaulniers
2020-03-24 19:58     ` Nick Desaulniers
2020-03-26  6:13       ` Masahiro Yamada
2020-03-24 19:43   ` Nathan Chancellor
2020-03-25 21:59   ` kbuild test robot
2020-03-24 17:46 ` [PATCH 1/3] net: wan: wanxl: use $(CC68K) instead of $(AS68K) for rebuilding firmware Geert Uytterhoeven
2020-03-25  3:49   ` Masahiro Yamada
2020-03-25  7:52     ` Geert Uytterhoeven
2020-03-25  9:05       ` Masahiro Yamada
2020-03-25  9:12         ` Geert Uytterhoeven [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=CAMuHMdUMhPg2Du9_EowsKL9b8fpz8ymc_8E2VLybWs7mpN2DDg@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=davem@davemloft.net \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=netdev@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).