diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4eb3ce4..e86910f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,7 +39,7 @@ jobs: strategy: fail-fast: false matrix: - board: [pi2, pi3-64, pi4-64] + board: [pi2, pi3-64, pi4-64, cm4-64] steps: - uses: actions/checkout@v3 with: @@ -70,7 +70,13 @@ jobs: done - name: Build - run: make -j BOARD=${{ matrix.board }} + run: | + if [ "${{ matrix.board }}" == "cm4-64" ]; then + make -j BOARD=pi4-64 USE_EMMC=1 + mv kernel8-rpi4.img kernel8-rpi4-emmc.img + else + make -j BOARD=${{ matrix.board }} + fi - name: Upload built kernel uses: actions/upload-artifact@v3 @@ -79,7 +85,14 @@ jobs: path: kernel*.img - name: Build (HDMI console) - run: make clean && make -j BOARD=${{ matrix.board }} HDMI_CONSOLE=1 + run: | + make clean + if [ "${{ matrix.board }}" == "cm4-64" ]; then + make -j BOARD=pi4-64 USE_EMMC=1 HDMI_CONSOLE=1 + mv kernel8-rpi4.img kernel8-rpi4-emmc.img + else + make -j BOARD=${{ matrix.board }} HDMI_CONSOLE=1 + fi - name: Upload built kernel uses: actions/upload-artifact@v3 diff --git a/CHANGELOG.md b/CHANGELOG.md index 31f3a8b..6ca922a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- eMMC-enabled kernel for the non-"lite" version of the Compute Module 4. This is a separate specially-built kernel that you must manually opt into; there is currently no way to automatically detect "lite" versus "non-lite" CM4s. + * To use this kernel, you must manually rename `kernel8-rpi4-emmc.img` to `kernel8-rpi4.img` (replacing the default Pi 4/CM4 "Lite" compatible kernel). + ### Fixed - Memory corruption/crashing caused by faulty ring buffer dequeue implementation. diff --git a/Config.mk b/Config.mk index 6e4eb2f..17cd0cf 100644 --- a/Config.mk +++ b/Config.mk @@ -18,6 +18,9 @@ USERBAUD?=115200 # Enable section garbage collection GC_SECTIONS?=1 +# Enable on-board eMMC for non-"lite" Compute Module models +USE_EMMC?=0 + # Toolchain setup ifeq ($(BOARD), pi2) RASPBERRYPI=2 diff --git a/Makefile b/Makefile index 3b17f5b..9f0f2a1 100644 --- a/Makefile +++ b/Makefile @@ -54,6 +54,11 @@ endif # Enable PWM audio output on GPIO 12/13 for the Pi Zero 2 W @echo "DEFINE += -DUSE_PWM_AUDIO_ON_ZERO" >> $(CIRCLE_CONFIG) +ifeq ($(strip $(USE_EMMC)),1) +# Enable eMMC for non-lite Compute Module + @echo "DEFINE += -DUSE_EMBEDDED_MMC_CM" >> $(CIRCLE_CONFIG) +endif + # # Build circle-stdlib #