ubuntu下编译uboot

1 操作系统:Ubuntu 20.04.6 LTS 64bit

2 从github下载最新代码

git clone https://github.com/u-boot/u-boot.git

  下载比较慢,可以用已经下载好的。

  https://download.csdn.net/download/wyjuan/88506637

3 安装基本工具
  注意:如果有软件包冲突,可以使用aptitude解决冲突。

  sudo apt install aptitude
  sudo apt install gcc
  sudo apt install g++
  sudo apt install make
  sudo apt install python
  sudo apt install perl
  sudo apt install python-setuptools
  sudo apt install python-pip
  sudo apt install swig
  sudo apt install uuid-dev
  sudo apt install libghc-gnutls-dev
  sudo apt install git bc bison flex libssl-dev make libc6-dev libncurses5-dev
  sudo apt install crossbuild-essential-armhf
  sudo apt install crossbuild-essential-arm64

4 开始编译
  进入u-boot目录,打开终端
 
  本地编译测试:

  make sandbox_defconfig all
  ./u-boot


  交叉编译测试:(以树莓派为例)

  export CROSS_COMPILE=aarch64-linux-gnu-
  make rpi_3_defconfig all


本文参考了如下资料:
u-boot/README

如何安装、卸载交叉编译工具链
https://blog.csdn.net/luotuo28/article/details/131070648

Ubuntu20.04下执行Python发现“ModuleNotFoundError: No module named ‘setuptools‘“报错
https://blog.csdn.net/weixin_42683482/article/details/117222876

树莓派官方文档
https://www.raspberrypi.com/documentation/computers/linux_kernel.html#cross-compiling-the-kernel

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

wyjuan

给孩子赚点奶粉钱

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值