buildroot 添加 loongarch 2k1000la uboot kernel 编译问题

本文介绍如何为LoongArch架构编译U-Boot及Linux内核,包括解决编译过程中的时间戳问题,修改Buildroot配置以支持Loongson 2K1000平台,并详细列出所需配置选项。

问题1,2022.07 uboot 编译顺序

$ make loongson2k1000_defconfig
$ make ARCH=loongarch CROSS_COMPILE=loongarch64-linux-gnu- -j4 all
会出现 时间戳问题 **.binman_stamp**

.binman_stamp: FORCE
@touch $@
我将
all: .binman_stamp inputs
改为
all: inputs
删除 .binman_stamp依赖项

问题2,buildroot 添加2k1000la编译 linux 和uboot,
需要修改buildroot/arch/Config.in.loongisa 文件
添加或修改
config BR2_ARCH
default “loongarch32” if !BR2_ARCH_IS_64
default “loongarch” if BR2_ARCH_IS_64 # 将loongarch64 改为loongarch

config BR2_ENDIAN
default “LITTLE”

config BR2_NORMALIZED_ARCH # 添加选项 BR2_NORMALIZED_ARCH
default “loongarch” if BR2_loongisa_g

且修改 buildroot 配置项
Toolchain —>

Toolchain type (External toolchain)  --->
Toolchain (Custom toolchain)  --->
Toolchain origin (Pre-installed toolchain)  --->
(../loongarch_toolchain) Toolchain path
($(ARCH)64-linux-gnu) Toolchain prefix
 External toolchain gcc version (8.x)  --->
 External toolchain kernel headers series (4.19.x)  --->
 External toolchain C library (glibc/eglibc)  ---> 
 [*] Toolchain has SSP support?
 [*]   Toolchain has SSP strong support?
 [*] Toolchain has RPC support? 
 [*] Toolchain has C++ support?
 ...

Kernel —>

	[*] Linux Kernel
	Kernel version (Custom version)  --->
	(2k1000la-4.19.190) Kernel version
	Kernel configuration (Using an in-tree defconfig file)  --->
	(ls2k1000) Defconfig name
	...
	 [*]   Build a Device Tree Blob (DTB)
	 [ ]     DTB is built by kernel itself
	 (loongson/loongson64_2k1000) In-tree Device Tree Source file names
	 ....
	 [*]   Needs host OpenSSL

Bootloaders —>

 [*] U-Boot
 Build system (Kconfig)  --->
 U-Boot Version (Custom version)  --->
 (la-2022.07) U-Boot version
 ...
 U-Boot configuration (Using an in-tree board defconfig file)  --->
 (loongson2k1000) Board defconfig
 ...
 [*]   U-Boot needs dtc
 ...
 [*]   U-Boot needs OpenSSL
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值