Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add kernel support for more ARM64 boards #4

Merged
merged 9 commits into from
Jan 8, 2024
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
run: go install github.com/u-root/u-root@$UROOT_COMMIT

- name: Copy submarine kernel configuration
run: cp configs/kernel.${{ matrix.platform == 'x86_64' && 'x86' || 'mt8183' }} kernel/.config
run: cp configs/kernel.${{ matrix.platform == 'x86_64' && 'x86' || 'a64' }} kernel/.config

- name: Build submarine
run: make CC="ccache gcc" -j$(nproc) ${{ matrix.platform }}
Expand Down
6 changes: 2 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,14 @@ CONFDIR=configs
OUTPUTDIR=images
TMPFILE=/tmp/$(project_name)

# x86 machines use common kernel configuration
CONFIG_X64=kernel.x86
BZIMAGE_X64=bzImage.x86
INITFS_X64=u-root-x86.cpio
INITFSZ_X64=u-root-x86.cpio.xz
KPART_X64=$(project_name)-x86.kpart
IMG_X64=$(project_name)-x86.bin

# The only supported ARM64 platform right now is MediaTek MT8183.
CONFIG_MT8183=kernel.mt8183
CONFIG_A64=kernel.a64
BZIMAGE_A64=bzImage.a64
INITFS_A64=u-root-a64.cpio
INITFSZ_A64=u-root-a64.cpio.xz
Expand Down Expand Up @@ -75,7 +73,7 @@ $(KPART_A64): $(BZIMAGE_A64)
@echo 'Kernel partition binary saved as "$(KPART_A64)" in "images" directory.'

$(BZIMAGE_A64): $(INITFSZ_A64)
cp $(CONFDIR)/$(CONFIG_MT8183) kernel/.config
cp $(CONFDIR)/$(CONFIG_A64) kernel/.config
[ $(shell uname -m) = x86_64 ] && ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make -C kernel || make -C kernel
cp kernel/arch/arm64/boot/Image.gz $(WORKDIR)/$(BZIMAGE_A64)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ sudo dd if=build/submarine.bin of=/dev/sdX
## 🗒️ Todos

- Create kpart on arm
- Clean up mt8183 config
- Clean up kernel configs
Loading