我使用的U Boot版本是u boot 2012.10,編譯的步驟為 cd u boot 2012.10 make s5p_goni_config sudo make 然後,就會看到錯誤提示 /bin/bash: arm linux gcc: command not found dirname: m ...
我使用的U-Boot版本是u-boot-2012.10,編譯的步驟為
cd u-boot-2012.10
make s5p_goni_config
sudo make
然後,就會看到錯誤提示
/bin/bash: arm-linux-gcc: command not found
dirname: missing operand
Try 'dirname --help' for more information.
在arm-linux-gcc確認安裝無誤的前提下(可以參照 https://www.cnblogs.com/mfyfymeng/p/11895795.html 來安裝4.5.1版本的arm-linux-gcc),解決方法如下
sudo ln -s /opt/FriendlyARM/toolschain/4.5.1/bin/arm-none-linux-gnueabi-gcc /usr/bin/arm-linux-gcc
這條命令的意思是:為/opt/FriendlyARM/toolschain/4.5.1/bin/下的可執行文件arm-none-linux-gnueabi-gcc建立符號鏈接,鏈接在/usr/bin/下,/usr/bin/也就是/bin/bash所指的目錄。同理,在編譯時只要是這類command not found錯誤,都可以用這種方法來解決。比如
/bin/bash: arm-linux-ld: command not found
那麼對應的解決方法為
sudo ln -s /opt/FriendlyARM/toolschain/4.5.1/bin/arm-none-linux-gnueabi-ld /usr/bin/arm-linux-ld