Linux kernels for X1000 and e5500 (X5000/20, X5000/40, Mirari, and QEMU VMs) PowerPC computers.
Older Linux kernels and further downloads for X1000 and X5000 computers:
http://www.supertuxkart-amiga.de/amiga/x1000.html#downloads
Linux kernels for the A1222:
http://www.fun-kart-racer.de/2bb57b2bbf87b668a94c/lxtest.html
User Name: tabor
Password: amigaone
Clone this git repository with branches:
- git clone git@github.com:chzigotzky/kernels.git
- cd kernels
- git branch --track 5_10 origin/5_10
- git branch --track 6_12 origin/6_12
Using the Dockerfile for building the Linux PPC cross compiling image:
Local (You must be in the directory containing the Dockerfile) docker build -t ubuntu_kernel_dev .
From git: docker build -t ubuntu_kernel_dev https://github.com/chzigotzky/kernels.git#main
From git with buildx: docker buildx build -t ubuntu_kernel_dev https://github.com/chzigotzky/kernels.git#main
Using the Dockerfile_kernel_test for the Linux PPC kernel test image:
Local (You must be in the directory containing the Dockerfile) docker build -t ubuntu_kernel_test -f Dockerfile_kernel_test .
From git: docker build -t ubuntu_kernel_test -f Dockerfile_kernel_test https://github.com/chzigotzky/kernels.git#main
From git with buildx: docker buildx build -t ubuntu_kernel_test -f Dockerfile_kernel_test https://github.com/chzigotzky/kernels.git#main
Network between ubuntu_kernel_dev and ubuntu_kernel_test:
- docker network create my-network
- docker run -d -p 9090:8080 --name ubuntu_kernel_dev-container --network my-network -v /kernel_dev:/kernel_dev ubuntu_kernel_dev
- docker run -d -p 9080:3389 -p 9091:8080 --name ubuntu_kernel_test-container --network my-network -v /kernel_dev:/kernel_dev ubuntu_kernel_test
With Docker compose:
- docker compose up -d --build (In the directory where the compose.yaml file is located. --build deletes also the cache)
- docker compose push (Push the images to the local registry)
- curl http://localhost:5000/v2/_catalog (Display the images in the local registry)
Delete the complete local registry volume:
- docker ps -a
- docker stop f352821ed760
- docker inspect f352821ed760 | grep -A5 Mounts
- docker volume ls
- docker rm f352821ed760
- docker volume rm 0a3510ae1c236f3fc856f403b3a411446a7ad4a880da879b25fc3f3b68c2e1b0
Minikube (Kubernetes):
- minikube start
- minikube image load ubuntu_kernel_dev:latest
- minikube image ls
- minikube mount /kernel_dev:/kernel_dev &
- Deployment: kubectl apply -f Kubernetes.yaml
- Check default namespace: kubectl get pods && kubectl get deployments && kubectl get services
- Check all namespaces: kubectl get pods -A && kubectl get deployments -A && kubectl get services -A
- Check LoadBalancer: kubectl get services
- kubectl port-forward 9090:8080 & or kubectl proxy --address='0.0.0.0' --accept-hosts='^.*$' and http://:8001/api/v1/namespaces/default/services/kernel-dev-service:9090/proxy/
- Connect to a pod: kubectl exec -it -- bash
- Delete deployment: kubectl delete deployment kernel-dev
- Delete pod: kubectl delete pod
- Delete service: kubectl delete service kernel-dev-service
- minikube image ls
- minikube image remove image:tag
- minikube dashboard
Dockerfile for building the Linux PPC cross compiling image:
# Base image: Ubuntu 20.04
FROM ubuntu:20.04
# Deactivate interactive inputs
ENV DEBIAN_FRONTEND=noninteractive
# Upgrading the userland and installing the kernel cross compiling environment
RUN apt-get update && apt-get upgrade -y && apt-get install -y \
bash \
vim \
git \
curl \
gcc-9-powerpc-linux-gnu \
g++-9-powerpc-linux-gnu \
build-essential \
libncurses5-dev \
u-boot-tools \
flex \
bison \
libssl-dev \
bc \
linux-firmware \
kmod \
libelf-dev \
neofetch \
wget \
tree \
ncat \
sysstat \
&& update-alternatives --install /usr/bin/powerpc-linux-gnu-gcc powerpc-linux-gnu-gcc /usr/bin/powerpc-linux-gnu-gcc-9 10 \
&& update-alternatives --install /usr/bin/powerpc-linux-gnu-g++ powerpc-linux-gnu-g++ /usr/bin/powerpc-linux-gnu-g++-9 10 \
&& useradd -m -d /home/amigaone -p $(openssl passwd -1 --salt xyz amigaone) amigaone \
&& echo "patch -p0 <" >> /home/amigaone/.bash_history \
&& echo "nproc" >> /home/amigaone/.bash_history \
&& echo "make CROSS_COMPILE=powerpc-linux-gnu- ARCH=powerpc oldconfig" >> /home/amigaone/.bash_history \
&& echo "time make -j$(nproc) CROSS_COMPILE=powerpc-linux-gnu- ARCH=powerpc vmlinux" >> /home/amigaone/.bash_history \
&& echo "make CROSS_COMPILE=powerpc-linux-gnu- ARCH=powerpc zImage" >> /home/amigaone/.bash_history \
&& echo "gzip -9 vmlinux.strip" >> /home/amigaone/.bash_history \
&& echo "time make -j$(nproc) CROSS_COMPILE=powerpc-linux-gnu- ARCH=powerpc modules" >> /home/amigaone/.bash_history \
&& echo "# make CROSS_COMPILE=powerpc-linux-gnu- ARCH=powerpc modules_install" >> /home/amigaone/.bash_history \
&& echo "time make -j$(nproc) CROSS_COMPILE=powerpc-linux-gnu- ARCH=powerpc uImage" >> /home/amigaone/.bash_history \
&& echo "time make -j$(nproc) CROSS_COMPILE=powerpc-linux-gnu- ARCH=powerpc modules" >> /home/amigaone/.bash_history \
&& echo "# make CROSS_COMPILE=powerpc-linux-gnu- ARCH=powerpc modules_install" >> /home/amigaone/.bash_history
# A good directory for the volume mount point in the container
WORKDIR /kernel_dev
# Creating a volume (This has nothing to do with the mount (-v) in docker run.)
# VOLUME ["/kernel_dev"]
COPY firmwares/renesas_usb_fw.mem /lib/firmware/
# Preparing kernel compilation
RUN export KERNEL_SRC_LINK="https://git.kernel.org/torvalds/t/linux-6.19-rc8.tar.gz" \
&& export KERNEL_SRC_FILE="/root/kernel_src.tar.xz" \
&& export KERNEL_SRC_DEST="/root/" \
&& wget -O ${KERNEL_SRC_FILE} ${KERNEL_SRC_LINK} \
&& tar xvf ${KERNEL_SRC_FILE} -C ${KERNEL_SRC_DEST}
CMD ["sh", "-c", "while true; do BODY=\"The Docker container for the cross compiling of A-EON PowerPC Linux kernels works!\n\n$(uname -a)\n\n$(free -m)\n\n$(lscpu | grep Model)\n\n$(LC_ALL=C mpstat -P ALL 1 1 | awk '$0 !~ /Average/ && $0 ~ /[0-9]+/ && $NF ~ /^[0-9.]+$/ { cpu=$(NF-10); if (cpu ~ /^[0-9]+$/) printf \"CPU%s: %.1f%%\\n\", cpu, 100-$NF }')\"; { printf \"HTTP/1.1 200 OK\\r\\nContent-Type: text/plain\\r\\nContent-Length: %s\\r\\nConnection: close\\r\\n\\r\\n%s\" \"${#BODY}\" \"$BODY\"; } | nc -l -p 8080; done"]
# sudo usermod -aG docker $USER
# Local (You must be in the directory containing the Dockerfile) docker build -t ubuntu_kernel_dev .
# From git: docker build -t ubuntu_kernel_dev https://github.com/chzigotzky/kernels.git#main
# From git with buildx: docker buildx build -t ubuntu_kernel_dev https://github.com/chzigotzky/kernels.git#main
# Create a container and start it (Container status: <HOSTNAME/FQDN/IP ADDRESS>:9090): docker run -d -p 9090:8080 --name ubuntu_kernel_dev-container -v /kernel_dev:/kernel_dev ubuntu_kernel_dev
# Volume mount explanation: -v /path/on/host:/path/in/container
# List all Docker containers: docker ps -a
# Connect to a container: docker exec -it ubuntu_kernel_dev-container bash
# Stop a docker container: docker stop <CONTAINER ID> (Changes remain in the image)
# Start a docker container: docker start <CONTAINER ID>
# Delete all Docker containers: docker rm $(docker ps -aq)
# Delete all Docker images: docker rmi $(docker images -q)
#
Building the images with Docker compose:
Monitoring the Docker container while compiling the kernel:
Monitoring the Docker containers while compiling and testing the kernel (Docker Swarm):
Monitoring the Kubernetes pod while compiling the kernel:
Monitoring the Docker containers in Portainer while compiling the kernel for e5500 machines (1600% = 16 CPU cores fully utilized):
Testing the Linux PPC kernel in a Docker container:
