跳转到内容
View in the app

A better way to browse. Learn more.

彼岸论坛

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
欢迎抵达彼岸 彼岸花开 此处谁在 -彼岸论坛

[Linux] 求熟悉 Linux 内核编译的小伙伴指导以下 rock5b 板子的 Linux 内核编译问题

发表于

问题:我修改 rock5b linux 内核编译配置,修改之后编译也正常,但是新打出来的 deb 包提取的编译配置还是和我设置的对不上,一直无法生效,我提取的是 git 中 linux-rockchip/arch/arm64/configs/rockchip_linux_defconfig 这个配置文件,但是会写之后感觉根本就没使用,我是如下操作的,想请各位老师看看哪里出问题

最近在家研究 rock5b 开发板的 linux 内核,主要是想学习 ebpf 相关的一些知识用于安卓沙箱开发 目前用的 https://github.com/Joshua-Riek/ubuntu-rockchip/blob/main/build.sh 这个项目专门做了 rock5b 开发板适配,我先通过 git 拉取到代码之后进行了一次原版编译 没有任何问题,整个是可以编译下来的

git clone https://github.com/Joshua-Riek/ubuntu-rockchip.git
cd ubuntu-rockchip
sudo ./build.sh --board=rock-5b --suite=noble --flavor=desktop --kernel-only

接下来我修改 build-kernel 中每次拉更新的代码,先将他屏蔽防止覆盖我修改的代码

cat -n scripts/build-kernel.sh
...
22	# Clone the kernel repo
23	#if ! git -C "${KERNEL_CLONE_DIR}" pull; then
24	#    git clone --progress -b "${KERNEL_BRANCH}" "${KERNEL_REPO}" "${KERNEL_CLONE_DIR}" --depth=2
25	#fi
26
27	cd "${KERNEL_CLONE_DIR}"
28	#git checkout "${KERNEL_BRANCH}"

下面是我修改的 ebpf 相关的参考 https://github.com/Joshua-Riek/ubuntu-rockchip/issues/483 这里的相关 config 配置 这里是直接从源代码目录中拷贝配置文件,修改配置选项之后重新生成配置文件回写到源文件,编译一切正常,但是从新的打出来的 deb 提取的 config 和我设置的开关对不上,所以怀疑根本没有生效,我怀疑是没有使用我这个配置,有什么办法可以让他使用我这个配置文件进行内核编译么

sudo cp /home/rock/ebpf/testkernel/ubuntu-rockchip/build/linux-rockchip/arch/arm64/configs/rockchip_linux_defconfig /home/rock/ebpf/testkernel/ubuntu-rockchip/build/linux-rockchip/.config


make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 savedefconfig
cp defconfig arch/arm64/configs/rockchip_linux_defconfig

rm -rf .config

Featured Replies

No posts to show

创建帐户或登录来提出意见

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.