配置编译环境
1 | # Debian 12 WSL2下为H88K编译内核为例 |
开始编译内核
1 | # 获取源码 |
制作uInitrd
1 | # 因为是在X86上交叉制作所以需要,启动服务binfmt-support可解决:chroot: failed to run command '/bin/bash': Exec format error |
编译错误解决
- 可能是GCC版本较新的原因导致下面的一系列问题,注释掉
linux-rockchip/scripts/gcc-wrapper.py
第105行来禁用interpret_warning
即可解决
1 | proc = subprocess.Popen(args, stderr=subprocess.PIPE, env=env) |
- 由于当前内核版本不支持MT7916,所以可以通过backport来支持它
1 | # 打补丁来支持MT7916网卡 |
也可用如下最傻瓜的方式一刀切:去掉出错模块
fs/xfs/libxfs/xfs_attr_remote.c: In function '__xfs_attr3_rmt_read_verify':
File systems > < > XFS filesystem support
drivers/acpi/thermal.c: In function 'acpi_thermal_resume':
ACPI (Advanced Configuration and Power Interface) Support > < > Thermal Zone
6.drivers/net/ethernet/huawei/hinic/hinic_rx.c: In function 'rx_add_napi':
Device Drivers > Network device support > Ethernet driver support > [ ] Huawei devices
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c: In function 'stmmac_napi_add':
Device Drivers > Network device support > Ethernet driver support > [ ] STMicroelectronics devices
drivers/net/wireless/ath/ath11k/qmi.c:626:35: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
Device Drivers > Network device support > Wireless LAN > < > Qualcomm Technologies 802.11ax chipset support
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/wl_android.c: In function 'wl_handle_private_cmd':
Device Drivers > Network device support > Wireless LAN > < > Rockchip Wireless LAN support —-
drivers/staging/rtl8192u/r8180_93cx6.c: In function 'eprom_w':
Device Drivers > Staging drivers > < > RealTek RTL8192U Wireless LAN NIC driver
drivers/net/wireless/intel/iwlwifi/fw/pnvm.c:174:12:
Device Drivers > Network device support > Wireless LAN > [ ] Intel devices