嵌入式开发者社区

标题: 编译uboot问题 [打印本页]

作者: underjudas    时间: 2018-8-23 11:37
标题: 编译uboot问题
[attach]3532[/attach]

这个是为啥,gcc已经有了

[attach]3533[/attach][attach]3534[/attach]

作者: Tronlong-陈工    时间: 2018-8-23 14:10
1. 编译uboot前,进行清理和配置2. 错误提示offsets.c文件错误,是否自己更改过
3. 如果所有文件都是我问题提供的,可能文件拷贝过程中信息丢失,可以将uboot源码重新传到ubuntu再重新操作文档。

作者: 梁淑怡-Tronlong    时间: 2018-8-24 09:54
您好,经过验证,根据文档《U-Boot编译方法》清理U-Boot和配置U-Boot后是可以正常编译U-Boot的。您可以确认一下是否以上步骤全部完成,U-Boot源码在拷贝过程中是否有损失。如按照步骤操作还是不行,建议下载最新的U-Boot源码再做一次操作。
作者: 梁淑怡-Tronlong    时间: 2018-8-24 10:22
您好,您的交叉编译环境如果已经安装好了,但是还是出现 "arm-linux-gnueabihf-gcc:not found"这一提示,有可能是权限问题,建议您重新配置环境变量文件“/etc/profile”
作者: underjudas    时间: 2018-8-24 17:27
梁淑怡-Tronlong 发表于 2018-8-24 10:22
您好,您的交叉编译环境如果已经安装好了,但是还是出现 "arm-linux-gnueabihf-gcc:not found"这一提示,有 ...

# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).

if [ "$PS1" ]; then
  if [ "$BASH" ] && [ "$BASH" != "/bin/sh" ]; then
    # The file bash.bashrc already sets the default PS1.
    # PS1='\h:\w\$ '
    if [ -f /etc/bash.bashrc ]; then
      . /etc/bash.bashrc
    fi
  else
    if [ "`id -u`" -eq 0 ]; then
      PS1='# '
    else
      PS1='$ '
    fi
  fi
fi

# The default umask is now handled by pam_umask.
# See pam_umask(8) and /etc/login.defs.

if [ -d /etc/profile.d ]; then
  for i in /etc/profile.d/*.sh; do
    if [ -r $i ]; then
      . $i
    fi
  done
  unset i
fi

export PATH=$PATH:/media/tl437x/ti-processor-sdk-linux-am437x-evm-01.00.00.03/linux-devkit/sysroots/i686-arago-linux/usr/bin






这是我的profile
作者: 梁淑怡-Tronlong    时间: 2018-8-24 18:21
您好,请问您配置好之后有没有重启profile文件,您可以用arm-linux-gnueabihf-gcc -v 查看一下gcc版本,查看gcc版本是否正确。如果还不行,试试执行sudo -s 指令进入su权限再次添加环境变量。
作者: underjudas    时间: 2018-8-29 10:34
我找到问题所在了,解压文件之后更改文件的权限chmod -R 777 /U-boot,
不要处于root用户下编译
作者: 梁淑怡-Tronlong    时间: 2018-8-29 10:41
underjudas 发表于 2018-8-29 10:34
我找到问题所在了,解压文件之后更改文件的权限chmod -R 777 /U-boot,
不要处于root用户下编译 ...

谢谢您的分享。




欢迎光临 嵌入式开发者社区 (https://www.51ele.net/) Powered by Discuz! X3.4