1、安裝軟體包時報錯 sudo apt-get install make libc6:i386 lib32z1 lib32stdc++6 zlib1g-dev libncurses5-dev ncurses-term libncursesw5-dev g++ u-boot-tools:i386 te ...
1、安裝軟體包時報錯
sudo apt-get install make libc6:i386 lib32z1 lib32stdc++6 zlib1g-dev libncurses5-dev ncurses-term libncursesw5-dev g++ u-boot-tools:i386 texinfo texlive gawk libssl-dev openssl bc
報錯:
E:u-boot-tools:i386無法定位軟體包
解決:軟體和更新 中添加兩個源,如圖:
deb http://archive.ubuntu.com/ubuntu/ trusty main universe restricted multiverse
deb http://packages.microsoft.com/repos/code stable main
接著更新軟體源,如圖,提示沒有公鑰:
根據提示添加公鑰,再更新軟體源,再安裝,如圖:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys <PUBKEY>
sudo apt-get update
sudo apt install u-boot-tools:i386
2、創建/etc/ld.so.preload 文件 報錯
echo "" > /etc/ld.so.preload
報錯:
bash: /etc/ld.so.preload: 許可權不夠
原因:echo指令屬於root用戶許可權,加個sudo並不能獲得root全部許可權,只能獲得部分
解決:直接使用root用戶,具體指令為:
sudo sh -c 'echo "" > /etc/ld.so.preload'
註意:echo整條指令在單引號裡面
3、mtd-utils2.0.2 依賴於 automake1.15.1,安裝 automake1.15.1報錯
sudo apt-get autoremove automake
提示:
Autoconf 2.65 or better is required.
解決:下載Autoconf 2.65或更高版本安裝(手動安裝):
tar xzf autoconf-2.69.tar.gz
cd autoconf-2.69
./configure --prefix=/usr/local
make
sudo make install
export PATH=/usr/local/bin
又報錯:
解決:先安裝 M4,再安裝autoconf ,然後安裝automake
###安裝m4
wget http://mirrors.kernel.org/gnu/m4/m4-1.4.13.tar.gz
tar -xzvf m4-1.4.13.tar.gz
cd m4-1.4.13
./configure --prefix=/usr/local
make
sudo make install
cd ..
###安裝autoconf
wget http://mirrors.kernel.org/gnu/autoconf/autoconf-2.65.tar.gz
tar -xzvf autoconf-2.65.tar.gz
cd autoconf-2.65
./configure --prefix=/usr/local
make
sudo make install
cd ..
###安裝automake
wget http://mirrors.kernel.org/gnu/automake/automake-1.11.tar.gz
tar xzvf automake-1.11.tar.gz
cd automake-1.11
./configure --prefix=/usr/local
make
sudo make install
cd ..
4、編譯SDK 報錯
cd osdrv
make OSDRV_CROSS=arm-himix100-linux clean
make OSDRV_CROSS=arm-himix100-linux all
報錯
bison:未找到命令
解決:下載bison -- http://ftp.gnu.org/gnu/bison/ 手動安裝
###安裝bison
tar zxvf bison-3.3.1.tar.gz
cd bison-3.3.1/
./configure --prefix=/usr/local
make
sudo make install
cd ..
安裝 Bison
準備編譯 Bison:
./configure --prefix=/usr --docdir=/usr/share/doc/bison-3.0.4
編譯軟體包:
make
用以下命令測試結果(大約 0.5 SBU):
make check
安裝軟體包:
make install
5、編譯SDK報錯
fseterr.c:78:3: error #error "Please port gnulib fseterr.c to your platform! Look at the definitions of ferror and clearerr on your system, then report this to bug-gnulib."
解決:下載gzip-1.10.tar.gz並存放到osdrv/tools/pc/hi_gzip目錄中,然後修改名稱為gzip-1.10.tgz,最後將Makefile中所有“gzip-1.8”修改為“gzip-1.10”
6、編譯SDK報錯
示例一:
mksquashfs.c: In function ‘create_inode’:`
`mksquashfs.c:987:24: error: called object ‘major’ is not a function or function pointer`
`987 | unsigned int major = major(buf->st_rdev);`
`| ^~~~~`
`mksquashfs.c:987:16: note: declared here`
`987 | unsigned int major = major(buf->st_rdev);`
`| ^~~~~`
`mksquashfs.c:988:24: error: called object ‘minor’ is not a function or function pointer`
`988 | unsigned int minor = minor(buf->st_rdev);`
`| ^~~~~`
`mksquashfs.c:988:16: note: declared here`
`988 | unsigned int minor = minor(buf->st_rdev);`
`| ^~~~~`
`mksquashfs.c:1011:24: error: called object ‘major’ is not a function or function pointer`
`1011 | unsigned int major = major(buf->st_rdev);`
x `| ^~~~~`
`mksquashfs.c:1011:16: note: declared here`
`1011 | unsigned int major = major(buf->st_rdev);`
`| ^~~~~`
`mksquashfs.c:1012:24: error: called object ‘minor’ is not a function or function pointer`
`1012 | unsigned int minor = minor(buf->st_rdev);`
`| ^~~~~`
`mksquashfs.c:1012:16: note: declared here`
`1012 | unsigned int minor = minor(buf->st_rdev);
解決:
修改: osdrv/tools/pc/squashfs4.3/Makefile
SQUASHFS := squashfs4.3
改為:
SQUASHFS := squashfs4.4
這裡就是腳本補丁和readme中有差異的地方,為瞭解決這個錯誤,我們使用了squashfs4.4而不是squashfs4.3
示例二:
mksquashfs.c:987:24: error: called object ‘major’ is not a function or function pointer
987 | unsigned int major = major(buf->st_rdev);
解決:下載 squashfs4.4.tar.gz -- https://sourceforge.net/projects/squashfs/files/squashfs/
並存放到 osdrv/tools/pc/squashfs4.3 目錄中,然後修改 Makefile 中 “squashfs4.3” 為 “squashfs4.4”
7、編譯SDK報錯
arm-himix200-linux-gcc: loadlocale.c:130: _nl_intern_locale_data: Assertion `cnt < (sizeof (_nl_value_type_LC_TIME) / sizeof (_nl_value_type_LC_TIME[0]))' failed.
解決:首先 vi ~/.bashrc
然後在最後一行輸入:export LC_CTYPE=C.UTF-8
8、編譯Uboot報錯
報錯:
"mkimage" command not found - U-Boot images will not be built
解決辦法:
sudo apt-get install u-boot-tools