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

Upgrade kernel #5

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
echo "GOCACHE=$(go env GOCACHE)" >> $GITHUB_ENV
echo "CCACHE_DIR=$(pwd)/ccache" >> $GITHUB_ENV
echo "UROOT_COMMIT=$(git rev-parse HEAD:u-root)" >> $GITHUB_ENV
echo "KERNEL_COMMIT=$(git rev-parse HEAD:kernel)" >> $GITHUB_ENV
echo "KERNEL_COMMIT=$(git rev-parse HEAD:${{ matrix.platform == 'x86_64' && 'kernel-lts' || 'kernel-mainline' }})" >> $GITHUB_ENV

- name: Setup Go cache
uses: actions/cache@v3
Expand All @@ -50,17 +50,14 @@ jobs:
uses: actions/cache@v3
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-${{ matrix.platform }}-${{ env.KERNEL_COMMIT }}-${{ hashFiles('kernel.config') }}
key: ccache-${{ matrix.platform }}-${{ env.KERNEL_COMMIT }}-${{ matrix.platform == 'x86_64' && hashFiles('configs/kernel.x86') || hashFiles('configs/kernel.mt8183') }}
restore-keys: |
ccache-${{ matrix.platform }}-${{ env.KERNEL_COMMIT }}-
ccache-${{ matrix.platform }}-

- name: Install u-root
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

- name: Build submarine
run: make CC="ccache gcc" -j$(nproc) ${{ matrix.platform }}

Expand Down
8 changes: 6 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
[submodule "u-root"]
path = u-root
url = https://github.com/u-root/u-root.git
[submodule "kernel"]
path = kernel
[submodule "kernel-mainline"]
path = kernel-mainline
url = https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[submodule "kernel-lts"]
path = kernel-lts
url = https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
branch = linux-6.6.y
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ $(KPART_X64): $(BZIMAGE_X64)
@echo 'Kernel partition binary saved as "$(KPART_X64)" in "images" directory.'

$(BZIMAGE_X64): $(INITFSZ_X64)
cp $(CONFDIR)/$(CONFIG_X64) kernel/.config
make -C kernel
cp kernel/arch/x86/boot/bzImage $(WORKDIR)/$(BZIMAGE_X64)
cp $(CONFDIR)/$(CONFIG_X64) kernel-lts/.config
make -C kernel-lts
cp kernel-lts/arch/x86/boot/bzImage $(WORKDIR)/$(BZIMAGE_X64)

$(INITFSZ_X64): $(INITFS_X64)
xz -kf -9 --check=crc32 $(WORKDIR)/$(INITFS_X64)
Expand Down Expand Up @@ -75,9 +75,9 @@ $(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
[ $(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)
cp $(CONFDIR)/$(CONFIG_MT8183) kernel-mainline/.config
[ $(shell uname -m) = x86_64 ] && ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make -C kernel-mainline || make -C kernel-mainline
cp kernel-mainline/arch/arm64/boot/Image.gz $(WORKDIR)/$(BZIMAGE_A64)

$(INITFSZ_A64): $(INITFS_A64)
xz -kf -9 --check=crc32 $(WORKDIR)/$(INITFS_A64)
Expand Down
17 changes: 6 additions & 11 deletions configs/kernel.mt8183
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm64 6.7.0-rc4 Kernel Configuration
# Linux/arm64 6.7.0-rc7 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="aarch64-linux-gnu-gcc (GCC) 13.2.1 20230728 (Red Hat Cross 13.2.1-1)"
CONFIG_CC_VERSION_TEXT="gcc (GCC) 13.2.1 20231205 (Red Hat 13.2.1-6)"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=130201
CONFIG_CLANG_VERSION=0
CONFIG_AS_IS_GNU=y
CONFIG_AS_VERSION=23900
CONFIG_AS_VERSION=24000
CONFIG_LD_IS_BFD=y
CONFIG_LD_VERSION=23900
CONFIG_LD_VERSION=24000
CONFIG_LLD_VERSION=0
CONFIG_CC_CAN_LINK=y
CONFIG_CC_CAN_LINK_STATIC=y
CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y
CONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT=y
CONFIG_CC_HAS_ASM_INLINE=y
Expand Down Expand Up @@ -710,8 +712,6 @@ CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y
# end of GCOV-based kernel profiling

CONFIG_HAVE_GCC_PLUGINS=y
CONFIG_GCC_PLUGINS=y
# CONFIG_GCC_PLUGIN_LATENT_ENTROPY is not set
CONFIG_FUNCTION_ALIGNMENT_4B=y
CONFIG_FUNCTION_ALIGNMENT=4
# end of General architecture-dependent options
Expand Down Expand Up @@ -5044,7 +5044,6 @@ CONFIG_CC_HAS_AUTO_VAR_INIT_ZERO=y
# CONFIG_INIT_STACK_NONE is not set
# CONFIG_INIT_STACK_ALL_PATTERN is not set
CONFIG_INIT_STACK_ALL_ZERO=y
# CONFIG_GCC_PLUGIN_STACKLEAK is not set
CONFIG_INIT_ON_ALLOC_DEFAULT_ON=y
# CONFIG_INIT_ON_FREE_DEFAULT_ON is not set
CONFIG_CC_HAS_ZERO_CALL_USED_REGS=y
Expand All @@ -5059,8 +5058,6 @@ CONFIG_LIST_HARDENED=y
# end of Hardening of kernel data structures

CONFIG_RANDSTRUCT_NONE=y
# CONFIG_RANDSTRUCT_FULL is not set
# CONFIG_RANDSTRUCT_PERFORMANCE is not set
# end of Kernel hardening options
# end of Security options

Expand Down Expand Up @@ -5622,8 +5619,6 @@ CONFIG_DEBUG_LIST=y
# CONFIG_DEBUG_MAPLE_TREE is not set
# end of Debug kernel data structures

CONFIG_DEBUG_CREDENTIALS=y

#
# RCU Debugging
#
Expand Down
15 changes: 5 additions & 10 deletions configs/kernel.x86
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 6.6.3 Kernel Configuration
# Linux/x86 6.6.8 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="gcc (GCC) 13.2.1 20230801"
CONFIG_CC_VERSION_TEXT="gcc (GCC) 13.2.1 20231205 (Red Hat 13.2.1-6)"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=130201
CONFIG_CLANG_VERSION=0
CONFIG_AS_IS_GNU=y
CONFIG_AS_VERSION=24100
CONFIG_AS_VERSION=24000
CONFIG_LD_IS_BFD=y
CONFIG_LD_VERSION=24100
CONFIG_LD_VERSION=24000
CONFIG_LLD_VERSION=0
CONFIG_CC_CAN_LINK=y
CONFIG_CC_CAN_LINK_STATIC=y
Expand All @@ -18,7 +18,7 @@ CONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT=y
CONFIG_TOOLS_SUPPORT_RELR=y
CONFIG_CC_HAS_ASM_INLINE=y
CONFIG_CC_HAS_NO_PROFILE_FN_ATTR=y
CONFIG_PAHOLE_VERSION=125
CONFIG_PAHOLE_VERSION=0
CONFIG_IRQ_WORK=y
CONFIG_BUILDTIME_TABLE_SORT=y
CONFIG_THREAD_INFO_IN_TASK=y
Expand Down Expand Up @@ -632,8 +632,6 @@ CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y
# end of GCOV-based kernel profiling

CONFIG_HAVE_GCC_PLUGINS=y
CONFIG_GCC_PLUGINS=y
CONFIG_GCC_PLUGIN_LATENT_ENTROPY=y
CONFIG_FUNCTION_ALIGNMENT_4B=y
CONFIG_FUNCTION_ALIGNMENT_16B=y
CONFIG_FUNCTION_ALIGNMENT=16
Expand Down Expand Up @@ -2816,7 +2814,6 @@ CONFIG_CC_HAS_AUTO_VAR_INIT_ZERO=y
# CONFIG_INIT_STACK_NONE is not set
# CONFIG_INIT_STACK_ALL_PATTERN is not set
CONFIG_INIT_STACK_ALL_ZERO=y
# CONFIG_GCC_PLUGIN_STACKLEAK is not set
# CONFIG_INIT_ON_ALLOC_DEFAULT_ON is not set
# CONFIG_INIT_ON_FREE_DEFAULT_ON is not set
CONFIG_CC_HAS_ZERO_CALL_USED_REGS=y
Expand All @@ -2831,8 +2828,6 @@ CONFIG_CC_HAS_ZERO_CALL_USED_REGS=y
# end of Hardening of kernel data structures

CONFIG_RANDSTRUCT_NONE=y
# CONFIG_RANDSTRUCT_FULL is not set
# CONFIG_RANDSTRUCT_PERFORMANCE is not set
# end of Kernel hardening options
# end of Security options

Expand Down
1 change: 0 additions & 1 deletion kernel
Submodule kernel deleted from bd3a9e
1 change: 1 addition & 0 deletions kernel-lts
Submodule kernel-lts added at 4c9646
1 change: 1 addition & 0 deletions kernel-mainline
Submodule kernel-mainline added at 453f5d