# Linux Port

> [!WARNING]
> This page is very much a work in progress!

A _"linux system"_ comprises a few components:
1. A Kernel
2. A Root filesystem
3. Some utilities/commands

## Building
### Kernel
```
git clone --depth 1 --branch "v6.15" https://github.com/torvalds/linux
cd linux
make ARCH=m68k CROSS_COMPILE=m68k-linux-gnu- tinyconfig
make ARCH=m68k CROSS_COMPILE=m68k-linux-gnu- menuconfig
make ARCH=m68k CROSS_COMPILE=m68k-linux-gnu-
```

### Utilities
I am using BusyBox for a basic set of utilities
```
wget https://busybox.net/downloads/busybox-1.37.0.tar.bz2
tar xvf busybox-1.37.0.tar.bz2
cd busybox-1.37.0
make CROSS_COMPILE=m68k-linux-gnu- menuconfig
make CROSS_COMPILE=m68k-linux-gnu-
```

## Links
- [Helpful Article](https://www.aslak.net/index.php/2022/01/11/porting-linux-to-the-68030-based-maxi030/), and [related code](https://github.com/aslak3/MAXI030).
- [Explanation of the boot process](https://tldp.org/HOWTO/From-PowerUp-To-Bash-Prompt-HOWTO.html)
- [BusyBox](https://busybox.net/)
- https://www.subrat.info/build-kernel-and-userspace/
- https://weeraman.com/building-a-tiny-linux-kernel/
- https://github.com/bluedragon1221/minlinux2
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9