Cross compiler toolchain

From Linux PARISC Wiki
(Difference between revisions)
Jump to: navigation, search
m (How to build the kernel)
m (How to build the kernel)
 
Line 18: Line 18:
 
   make ARCH=parisc menuconfig
 
   make ARCH=parisc menuconfig
 
   make ARCH=parisc
 
   make ARCH=parisc
 +
 +
Before Kernel v5.17 you need to give CROSS_COMPILE= on the command line when cross-compiling, e.g.:
 +
 +
  make ARCH=parisc CROSS_COMPILE=hppa64-linux-gnu-  # to build a 32- or 64-bit kernel (depending on the value in the .config file)
  
 
Starting with Kernel v5.17 you don't need to give CROSS_COMPILE= on the command line any longer, just run:
 
Starting with Kernel v5.17 you don't need to give CROSS_COMPILE= on the command line any longer, just run:

Latest revision as of 07:12, 24 March 2022

Cross compiling the Linux kernel for PA-RISC is easy nowadays:

Contents

[edit] Debian

 apt install gcc-hppa-linux-gnu gcc-hppa64-linux-gnu

[edit] Fedora

 yum install gcc-hppa64-linux-gnu gcc-hppa-linux-gnu binutils-hppa64-linux-gnu binutils-hppa-linux-gnu

[edit] Download prebuilt cross compilers for PA-RISC

[edit] How to build the kernel

 make ARCH=parisc menuconfig
 make ARCH=parisc

Before Kernel v5.17 you need to give CROSS_COMPILE= on the command line when cross-compiling, e.g.:

 make ARCH=parisc CROSS_COMPILE=hppa64-linux-gnu-   # to build a 32- or 64-bit kernel (depending on the value in the .config file)

Starting with Kernel v5.17 you don't need to give CROSS_COMPILE= on the command line any longer, just run:

 make ARCH=parisc                         # to build a 32-bit kernel
 or
 make ARCH=parisc64                       # to build a 64-bit kernel
Personal tools