Skip to content

Add GitHub CI

Add GitHub CI #7

Workflow file for this run

name: Build Kernel + DTB + initramfs + DFU Image (N31)
on:
push:
pull_request:
jobs:
build-initramfs:
runs-on: ubuntu-24.04
outputs:
artifact-path: freemyipod/initramfs.cpio.gz
steps:
- name: Checkout source
uses: actions/checkout@v6
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
qemu-user-static \
systemd-container
- name: Cache initramfs
id: cache
uses: actions/cache@v5
with:
path: freemyipod/initramfs.cpio.gz
key: initramfs-${{ hashFiles('freemyipod/build-initramfs.sh') }}
- name: Build initramfs if cache miss
if: steps.cache.outputs.cache-hit != 'true'
run: |
chmod +x freemyipod/build-initramfs.sh
freemyipod/build-initramfs.sh
echo "Initramfs built successfully at freemyipod/initramfs.cpio.gz"
- name: Upload initramfs artifact
uses: actions/upload-artifact@v7
with:
name: initramfs
path: freemyipod/initramfs.cpio.gz
build-kernel:
runs-on: ubuntu-24.04
outputs:
zimage-path: linux/arch/arm/boot/zImage
dtb-path: linux/arch/arm/boot/dts/samsung/s5l8740-n31.dtb
steps:
- name: Checkout source
uses: actions/checkout@v6
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
gcc-arm-none-eabi \
make \
bc \
bison \
flex \
libssl-dev \
libncurses-dev \
device-tree-compiler \
python3 \
python3-pip
- name: Install Python dependencies for dtbs_check
run: |
pip3 install --upgrade pip
pip3 install dtschema yamllint
- name: Configure kernel
run: |
make ARCH=arm apple_n31_defconfig
- name: Build kernel
run: |
make ARCH=arm CROSS_COMPILE=arm-none-eabi- -j $(nproc) dtbs_check dtbs zImage
- name: Copy kernel and DTB to /freemyipod
run: |
cp arch/arm/boot/zImage freemyipod/zImage
cp arch/arm/boot/dts/samsung/s5l8740-n31.dtb freemyipod/s5l8740-n31.dtb
- name: Upload kernel artifacts
uses: actions/upload-artifact@v7
with:
name: kernel
path: |
freemyipod/zImage
freemyipod/s5l8740-n31.dtb
build-final-image:
runs-on: ubuntu-24.04
needs:
- build-initramfs
- build-kernel
steps:
- name: Checkout source
uses: actions/checkout@v6
- name: Download initramfs artifact
uses: actions/download-artifact@v8
with:
name: initramfs
path: freemyipod
- name: Download kernel artifacts
uses: actions/download-artifact@v8
with:
name: kernel
path: freemyipod
- name: Install mkimage and dtc
run: |
sudo apt-get update
sudo apt-get install -y u-boot-tools device-tree-compiler
- name: Build final image
working-directory: freemyipod
run: |
mkimage -f kernel_fdt.its kernel_fdt.itb
- name: Upload final image
uses: actions/upload-artifact@v7
with:
name: dfu-image
path: freemyipod/kernel_fdt.itb