N20: Use the correct compiler for the apps in initramfs #25
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build for Apple N20 - iPod nano (6th generation) | |
| on: | |
| push: | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| build-initramfs: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@v6 | |
| - name: Setup initramfs cache so it's restored and saved if modified | |
| id: cache-initramfs-apple-n20 | |
| uses: actions/cache@v5 | |
| with: | |
| path: freemyipod/initramfs-n20.cpio.gz | |
| key: initramfs-${{ hashFiles('freemyipod/initramfs/*') }}-apple-n20 | |
| - name: Build initramfs if cache miss | |
| if: steps.cache-initramfs-apple-n20.outputs.cache-hit != 'true' | |
| run: | | |
| set -e | |
| sudo apt-get update | |
| sudo apt-get install -y gcc-arm-linux-gnueabi | |
| cd freemyipod/initramfs | |
| make BOARD=n20 APP_CROSS_COMPILE=arm-linux-gnueabi- | |
| cp initramfs-n20.cpio.gz .. | |
| - name: Upload initramfs artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: initramfs-apple-n20 | |
| path: freemyipod/initramfs-n20.cpio.gz | |
| build-kernel: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@v6 | |
| - name: Install system dependencies | |
| run: | | |
| set -e | |
| 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 \ | |
| ccache | |
| - name: Install Python dependencies for dtbs_check | |
| run: | | |
| set -e | |
| pip3 install --upgrade pip | |
| pip3 install dtschema yamllint | |
| - name: Restore ccache | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.ccache | |
| key: ccache-kernel-apple-n20 | |
| - name: Setup ccache | |
| run: | | |
| set -e | |
| echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV | |
| ccache --zero-stats | |
| ccache --max-size=256M | |
| echo "CCACHE_DIR=$HOME/.ccache" >> $GITHUB_ENV | |
| echo "CC=ccache arm-none-eabi-gcc" >> $GITHUB_ENV | |
| echo "HOSTCC=ccache gcc" >> $GITHUB_ENV | |
| - name: Configure kernel | |
| run: make ARCH=arm apple_n20_defconfig | |
| - name: Build kernel | |
| run: make ARCH=arm CROSS_COMPILE=arm-none-eabi- -j $(nproc) zImage | |
| # - name: Check DTBs | |
| # run: make ARCH=arm CROSS_COMPILE=arm-none-eabi- dtbs_check | |
| - name: Build DTBs | |
| run: make ARCH=arm CROSS_COMPILE=arm-none-eabi- dtbs | |
| - name: Show ccache stats | |
| run: ccache --show-stats | |
| - name: Copy kernel and DTB to /freemyipod | |
| run: | | |
| cp arch/arm/boot/zImage freemyipod/zImage-n20 | |
| cp arch/arm/boot/dts/samsung/s5l8723-n20.dtb freemyipod/s5l8723-n20.dtb | |
| - name: Upload kernel artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: kernel-dtb-apple-n20 | |
| path: | | |
| freemyipod/zImage-n20 | |
| freemyipod/s5l8723-n20.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-apple-n20 | |
| path: freemyipod | |
| - name: Download kernel artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: kernel-dtb-apple-n20 | |
| path: freemyipod | |
| - name: Install mkimage and dtc | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y u-boot-tools device-tree-compiler | |
| - name: Verify mkimage input files exist | |
| working-directory: freemyipod | |
| run: | | |
| set -e | |
| echo "Checking required files for mkimage..." | |
| required_files=( | |
| "zImage-n20" | |
| "s5l8723-n20.dtb" | |
| "initramfs-n20.cpio.gz" | |
| "kernel_fdt_n20.its" | |
| ) | |
| for file in "${required_files[@]}"; do | |
| if [ ! -f "$file" ]; then | |
| echo "ERROR: Required file '$file' not found!" | |
| ls -la | |
| exit 1 | |
| fi | |
| echo "Found: $file ($(stat -c%s "$file") bytes)" | |
| done | |
| echo "All required files present." | |
| - name: Build final image | |
| working-directory: freemyipod | |
| run: mkimage -f kernel_fdt_n20.its kernel_fdt_n20.itb | |
| - name: Upload final image | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: dfu-image-apple-n20 | |
| path: freemyipod/kernel_fdt_n20.itb |