Skip to content

Commit

Permalink
Merge pull request #4 from alpernebbi/arm64-more-boards
Browse files Browse the repository at this point in the history
Add kernel support for more ARM64 boards
  • Loading branch information
lleyton committed Jan 8, 2024
2 parents 46f6cb0 + e208239 commit f4dd060
Show file tree
Hide file tree
Showing 4 changed files with 416 additions and 117 deletions.
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

0 comments on commit f4dd060

Please sign in to comment.