kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* toolchain name for building linux kernel?
@ 2020-11-17  5:37 ckim
  2020-11-17  6:30 ` Valdis Klētnieks
  0 siblings, 1 reply; 4+ messages in thread
From: ckim @ 2020-11-17  5:37 UTC (permalink / raw)
  To: kernelnewbies


[-- Attachment #1.1: Type: text/plain, Size: 737 bytes --]

Hi,

Some years ago, I used to use sparc-ab-elf- to build linux kernel. 

I thought that tool was for building bare-metal program. (because linux
kernel is a kind of bare-metal program itself)

We had also sparc-ab-linux- that were used for compiling application that
runs on linux.

 

Recently, I found a website that I should use aarch64-linux-gnu tool to
build the kernel. 

I tried following it and it generated vmlinux file. (I can't find the web
page link, but I'm sure I wrote that procedure down when I built vmlinux)

Now I find it strange, because the tool name 'aarch64-linux-gnu-' seems to
be the one for compiling application on linux!

Am I missing something? Could anyone clarify what is wrong with my idea?

 

Chan

 


[-- Attachment #1.2: Type: text/html, Size: 3234 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: toolchain name for building linux kernel?
  2020-11-17  5:37 toolchain name for building linux kernel? ckim
@ 2020-11-17  6:30 ` Valdis Klētnieks
  2020-11-18  5:17   ` ckim
  0 siblings, 1 reply; 4+ messages in thread
From: Valdis Klētnieks @ 2020-11-17  6:30 UTC (permalink / raw)
  To: ckim; +Cc: kernelnewbies


[-- Attachment #1.1: Type: text/plain, Size: 757 bytes --]

On Tue, 17 Nov 2020 14:37:00 +0900, ckim@etri.re.kr said:

> Some years ago, I used to use sparc-ab-elf- to build linux kernel.

That will probably build a kernel for the Sun SPARC architecture...

> Recently, I found a website that I should use aarch64-linux-gnu tool to
> build the kernel.
>
> I tried following it and it generated vmlinux file. (I can't find the web
> page link, but I'm sure I wrote that procedure down when I built vmlinux)

That vmlinux file will only be useful for a 64-bit ARM architecture.

What sort of machine are you going to run the newly built kernel on,
and what sort of machine are you using for the build?

(If you're building on the system you'll be booting it on, the distro's gcc and make
commands should be sufficient)

[-- Attachment #1.2: Type: application/pgp-signature, Size: 832 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: toolchain name for building linux kernel?
  2020-11-17  6:30 ` Valdis Klētnieks
@ 2020-11-18  5:17   ` ckim
  2020-11-19  9:30     ` ckim
  0 siblings, 1 reply; 4+ messages in thread
From: ckim @ 2020-11-18  5:17 UTC (permalink / raw)
  To: 'Valdis Klētnieks'; +Cc: kernelnewbies


Thanks for replying. Yes, at that time, it was sparc and this time it's
aarch64. I'm building the kernel on x86_64 machine.
So target is aarch64, host is x86_64. 
My question is about the end part (elf or linux).
To build linux kernel, shouldn't it be elf? (using libraries for baremetal,
like newlib)
And to build a application that'll run on linux, shouldn't it be
linux?(using libraries for linux)
Please see that last part of https://wiki.osdev.org/Target_Triplet.
I wonder why the toolchain name that I built linux kernel ends with -linux.
Chan

> -----Original Message-----
> From: Valdis Kletnieks <valdis@vt.edu> On Behalf Of Valdis Kl?tnieks
> Sent: Tuesday, November 17, 2020 3:31 PM
> To: ckim@etri.re.kr
> Cc: kernelnewbies@kernelnewbies.org
> Subject: Re: toolchain name for building linux kernel?
> 
> On Tue, 17 Nov 2020 14:37:00 +0900, ckim@etri.re.kr said:
> 
> > Some years ago, I used to use sparc-ab-elf- to build linux kernel.
> 
> That will probably build a kernel for the Sun SPARC architecture...
> 
> > Recently, I found a website that I should use aarch64-linux-gnu tool
> > to build the kernel.
> >
> > I tried following it and it generated vmlinux file. (I can't find the
> > web page link, but I'm sure I wrote that procedure down when I built
> > vmlinux)
> 
> That vmlinux file will only be useful for a 64-bit ARM architecture.
> 
> What sort of machine are you going to run the newly built kernel on, and
> what sort of machine are you using for the build?
> 
> (If you're building on the system you'll be booting it on, the distro's
> gcc and make commands should be sufficient)




_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: toolchain name for building linux kernel?
  2020-11-18  5:17   ` ckim
@ 2020-11-19  9:30     ` ckim
  0 siblings, 0 replies; 4+ messages in thread
From: ckim @ 2020-11-19  9:30 UTC (permalink / raw)
  To: 'Valdis Klētnieks'; +Cc: kernelnewbies


Hi Valdis, and all,

I tried it again, but I had error with aarch-linux-gnu- . 
So I changed it  with

export ARCH=arm64
export CROSS_COMPILE=aarch64-none-elf-

and then, 

make defconfig
make vmlinux

and vmlinux was generated.

So the kernel was built with aarch64-non-elf- toolchain as I thought normal.
Maybe last time there was some mistake..
Thank you!

Chan Kim

> -----Original Message-----
> From: ckim@etri.re.kr <ckim@etri.re.kr>
> Sent: Wednesday, November 18, 2020 2:18 PM
> To: 'Valdis Klētnieks' <valdis.kletnieks@vt.edu>
> Cc: kernelnewbies@kernelnewbies.org
> Subject: RE: toolchain name for building linux kernel?
> 
> 
> Thanks for replying. Yes, at that time, it was sparc and this time it's
> aarch64. I'm building the kernel on x86_64 machine.
> So target is aarch64, host is x86_64.
> My question is about the end part (elf or linux).
> To build linux kernel, shouldn't it be elf? (using libraries for
baremetal,
> like newlib) And to build a application that'll run on linux, shouldn't it
> be linux?(using libraries for linux) Please see that last part of
> https://wiki.osdev.org/Target_Triplet.
> I wonder why the toolchain name that I built linux kernel ends with
-linux.
> Chan
> 
> > -----Original Message-----
> > From: Valdis Kletnieks <valdis@vt.edu> On Behalf Of Valdis Kl?tnieks
> > Sent: Tuesday, November 17, 2020 3:31 PM
> > To: ckim@etri.re.kr
> > Cc: kernelnewbies@kernelnewbies.org
> > Subject: Re: toolchain name for building linux kernel?
> >
> > On Tue, 17 Nov 2020 14:37:00 +0900, ckim@etri.re.kr said:
> >
> > > Some years ago, I used to use sparc-ab-elf- to build linux kernel.
> >
> > That will probably build a kernel for the Sun SPARC architecture...
> >
> > > Recently, I found a website that I should use aarch64-linux-gnu tool
> > > to build the kernel.
> > >
> > > I tried following it and it generated vmlinux file. (I can't find
> > > the web page link, but I'm sure I wrote that procedure down when I
> > > built
> > > vmlinux)
> >
> > That vmlinux file will only be useful for a 64-bit ARM architecture.
> >
> > What sort of machine are you going to run the newly built kernel on,
> > and what sort of machine are you using for the build?
> >
> > (If you're building on the system you'll be booting it on, the
> > distro's gcc and make commands should be sufficient)
> 
> 
> 
> 
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies





_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-11-19  9:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-17  5:37 toolchain name for building linux kernel? ckim
2020-11-17  6:30 ` Valdis Klētnieks
2020-11-18  5:17   ` ckim
2020-11-19  9:30     ` ckim

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).