warning: the following paths have collided (e.g. case-sensitive paths on a case-insensitive filesystem) and only one from the same colliding group is in the working tree:
This warning occurs on a case-insensitive filesystem (like macOS’s APFS or Windows’ NTFS) when a Git repository contains files whose names differ only in case. Git detects these as potential conflicts because the filesystem treats them as identical.
1 2 3
git clone --depth=1 https://github.com/raspberrypi/linux.git cd linux apt install bc
1 2 3 4
mkdir build make O=build bcm2711_defconfig bear -- make O=build -j10 Image.gz modules dtbs make O=build modules_install INSTALL_MOD_PATH=.
# 在config.txt中启用新内核 if grep -q "kernel=Image.gz" /boot/firmware/config.txt; then echo"新内核已配置" else # 注释原内核,启用新内核 sudo sed -i 's/^kernel=/#kernel=/' /boot/firmware/config.txt echo"kernel=Image.gz" | sudo tee -a /boot/firmware/config.txt fi
% ssh pi@pi yuanqi@MacBook-Pro-2 Linux pi 6.12.57-v8+ #1 SMP PREEMPT Fri Nov 14 20:56:44 CST 2025 aarch64
The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Sun Dec 7 14:02:19 2025 from 192.168.1.100 pi@pi:~ $ uname -r 6.12.57-v8+
# 3. 设置已验证的函数名(根据 available_filter_functions) echo"__arm64_sys_mmap" | sudo tee -a set_graph_function > /dev/null echo"ksys_mmap_pgoff" | sudo tee -a set_graph_function > /dev/null echo"vm_mmap_pgoff" | sudo tee -a set_graph_function > /dev/null echo"do_mmap" | sudo tee -a set_graph_function > /dev/null echo"mmap_region" | sudo tee -a set_graph_function > /dev/null echo"__mmap_region" | sudo tee -a set_graph_function > /dev/null echo"rpi_gpiomem_mmap" | sudo tee -a set_graph_function > /dev/null echo"rpi_gpiomem_open" | sudo tee -a set_graph_function > /dev/null
# 4. 添加 VMA 相关函数 echo"vm_area_alloc" | sudo tee -a set_graph_function > /dev/null echo"vma_merge_new_range" | sudo tee -a set_graph_function > /dev/null echo"vma_link_file" | sudo tee -a set_graph_function > /dev/null echo"vma_set_page_prot" | sudo tee -a set_graph_function > /dev/null
# 5. 添加内存映射核心函数 echo"remap_pfn_range" | sudo tee -a set_graph_function > /dev/null echo"remap_pfn_range_internal" | sudo tee -a set_graph_function > /dev/null echo"__pte_offset_map_lock" | sudo tee -a set_graph_function > /dev/null
# 6. 配置跟踪选项 echo 1 | sudo tee options/func_stack_trace > /dev/null echo 1 | sudo tee options/sleep-time > /dev/null echo 1 | sudo tee options/graph-time > /dev/null
# 系统调用入口 echo"__arm64_sys_mmap" | sudo tee -a set_graph_function > /dev/null echo"ksys_mmap_pgoff" | sudo tee -a set_graph_function > /dev/null
# 内存管理核心函数 echo"vm_mmap_pgoff" | sudo tee -a set_graph_function > /dev/null echo"do_mmap" | sudo tee -a set_graph_function > /dev/null echo"mmap_region" | sudo tee -a set_graph_function > /dev/null echo"__mmap_region" | sudo tee -a set_graph_function > /dev/null
# VMA 操作函数 echo"vm_area_alloc" | sudo tee -a set_graph_function > /dev/null echo"vma_merge_new_range" | sudo tee -a set_graph_function > /dev/null echo"vma_link_file" | sudo tee -a set_graph_function > /dev/null echo"vma_set_page_prot" | sudo tee -a set_graph_function > /dev/null
# 文件操作相关 echo"fget" | sudo tee -a set_graph_function > /dev/null echo"fput" | sudo tee -a set_graph_function > /dev/null
# 驱动特定函数 echo"rpi_gpiomem_mmap" | sudo tee -a set_graph_function > /dev/null echo"rpi_gpiomem_open" | sudo tee -a set_graph_function > /dev/null
# 页表操作函数 echo"remap_pfn_range" | sudo tee -a set_graph_function > /dev/null echo"remap_pfn_range_internal" | sudo tee -a set_graph_function > /dev/null echo"__pte_offset_map_lock" | sudo tee -a set_graph_function > /dev/null
# 安全相关函数 echo"security_mmap_file" | sudo tee -a set_graph_function > /dev/null echo"security_mmap_addr" | sudo tee -a set_graph_function > /dev/null echo"cap_mmap_file" | sudo tee -a set_graph_function > /dev/null echo"cap_mmap_addr" | sudo tee -a set_graph_function > /dev/null
# 设置跟踪选项 echo 1 | sudo tee options/func_stack_trace > /dev/null echo 1 | sudo tee options/graph-time > /dev/null
```bash Option 1: Disable the tc Applet (Recommended if You Don't Need It) The tc command is for traffic control and may not be essential for your use case. Disabling it avoids the problem without patching code.
Run make menuconfig (or make config for text-based) in your BusyBox source directory. Navigate to Networking Utilities > Disable tc. Save and exit. Re-run make to build BusyBox.
Solution: Patch the Detection Script Edit scripts/kconfig/lxdialog/check-lxdialog.sh to update the test program for compatibility with modern GCC.
Open the file: nano scripts/kconfig/lxdialog/check-lxdialog.sh (or use your preferred editor). Locate the section around lines 49-55 (may vary slightly) that echoes the test code:textecho "#include CURSES_LOC main() {} EOF Change it to:textecho "#include CURSES_LOC int main(void) { return 0; } EOF This adds an explicit int return type and a return statement to satisfy stricter standards. Using void for parameters avoids potential implicit declaration issues.
Save and exit. Optionally, clean up: make clean Retry: make menuconfig
This should now detect ncurses correctly and launch the menuconfig interface.
下载并编译 BusyBox
1 2 3 4 5 6 7 8 9 10 11 12
wget https://busybox.net/downloads/busybox-1.36.1.tar.bz2 tar xf busybox-1.36.1.tar.bz2 cd busybox-1.36.1 make defconfig make menuconfig # 可选:静态编译 Settings → Build static binary (no shared libs) # 2. 用 sed 两行命令完成上述两项修改 sed -i 's/^# CONFIG_STATIC is not set/CONFIG_STATIC=y/' .config sed -i 's|CONFIG_PREFIX=.*|CONFIG_PREFIX="./rootfs"|' .config # 3. 让 Kbuild 自动补齐依赖(重要!) make oldconfig >/dev/null </dev/null make -j$(nproc) make install
这里回到mac宿主机。
创建必要的目录结构
1 2
cd rootfs mkdir -p {etc,dev,proc,sys,tmp,var,usr/bin,usr/sbin,lib,root}
创建基础设备节点
1 2 3 4 5 6 7 8
cd rootfs/dev
# 创建设备文件 sudo mknod console c 5 1 sudo mknod null c 1 3 sudo mknod zero c 1 5 sudo mknod ttyAMA0 c 204 64 sudo chmod 666 console null zero ttyAMA0
> Checking your Emacs version... > Checking for Doom's prerequisites... > Checking for Emacs config conflicts... > Checking for missing Emacs features... > Checking for private config conflicts... > Checking for common environmental issues... > Checking for stale elc files... > Checking for problematic git global settings... > Checking Doom Emacs... ✓ Initialized Doom Emacs 3.0.0-pre ✓ Detected 37 modules ✓ Detected 133 packages > Checking Doom core for irregularities... Found Symbols Nerd Font Mono > Checking for stale elc files in your DOOMDIR... > Checking your enabled modules... Everything seems fine, happy Emacs'ing!