Select Page
  • First, grab an m68k gcc:
peilin@PWN:~/Desktop/linux_mainline$ sudo apt install gcc-m68k-linux-gnu

Now you should have a whole bunch of stuff under your /usr/bin:

peilin@PWN:~/Desktop/linux_mainline$ ls /usr/bin/*m68k*
/usr/bin/m68k-linux-gnu-addr2line /usr/bin/m68k-linux-gnu-gcc /usr/bin/m68k-linux-gnu-gcc-ranlib-9 /usr/bin/m68k-linux-gnu-gprof /usr/bin/m68k-linux-gnu-readelf
/usr/bin/m68k-linux-gnu-ar /usr/bin/m68k-linux-gnu-gcc-9 /usr/bin/m68k-linux-gnu-gcov /usr/bin/m68k-linux-gnu-ld /usr/bin/m68k-linux-gnu-size
/usr/bin/m68k-linux-gnu-as /usr/bin/m68k-linux-gnu-gcc-ar /usr/bin/m68k-linux-gnu-gcov-9 /usr/bin/m68k-linux-gnu-ld.bfd /usr/bin/m68k-linux-gnu-strings
/usr/bin/m68k-linux-gnu-c++filt /usr/bin/m68k-linux-gnu-gcc-ar-9 /usr/bin/m68k-linux-gnu-gcov-dump /usr/bin/m68k-linux-gnu-nm /usr/bin/m68k-linux-gnu-strip
/usr/bin/m68k-linux-gnu-cpp /usr/bin/m68k-linux-gnu-gcc-nm /usr/bin/m68k-linux-gnu-gcov-dump-9 /usr/bin/m68k-linux-gnu-objcopy
/usr/bin/m68k-linux-gnu-cpp-9 /usr/bin/m68k-linux-gnu-gcc-nm-9 /usr/bin/m68k-linux-gnu-gcov-tool /usr/bin/m68k-linux-gnu-objdump
/usr/bin/m68k-linux-gnu-elfedit /usr/bin/m68k-linux-gnu-gcc-ranlib /usr/bin/m68k-linux-gnu-gcov-tool-9 /usr/bin/m68k-linux-gnu-ranlib

Keep that gcc prefix (m68k-linux-gnu- for me) in mind, we’ll use it later.


  • Now, config the kernel. I tried make ARCH=m68k defconfig, but it didn’t build for me. I ended up using atari_defconfig under arch/m68k/configs/.
peilin@PWN:~/Desktop/linux_mainline$ cp arch/m68k/configs/atari_defconfig .config
peilin@PWN:~/Desktop/linux_mainline$
make ARCH=m68k menuconfig

  • Build the kernel. Use that /usr/bin/*gcc prefix for CROSS_COMPILE=:
peilin@PWN:~/Desktop/linux_mainline$ make ARCH=m68k CROSS_COMPILE=m68k-linux-gnu- -j`nproc` all

  • Enjoy your fresh kernel!

Update (2020-10-27): Do sudo apt-get install binutils-hppa64-linux-gnu and sudo apt-get install gcc-7-hppa64-linux-gnu for parisc.