1,深度系统版本
huan@huan-PC:~/Desktop$ uname -a
Linux huan-PC 4.15.0-30deepin-generic #31 SMP Fri Nov 30 04:29:02 UTC 2018 x86_64 GNU/Linux
2,安装Git工具
huan@huan-PC:~/Desktop$ sudo apt-get install git
[sudo] huan 的密码:
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
将会同时安装下列软件:
git-man liberror-perl
建议安装:
git-daemon-run | git-daemon-sysvinit git-doc git-el git-email git-gui gitk gitweb
git-arch git-cvs git-mediawiki git-svn
下列【新】软件包将被安装:
git git-man liberror-perl
升级了 0 个软件包,新安装了 3 个软件包,要卸载 0 个软件包,有 19 个软件包未被升级。
需要下载 5,627 kB 的归档。
解压缩后会消耗 31.1 MB 的额外空间。
您希望继续执行吗? [Y/n] y
获取:1 http://packages.deepin.com/deepin lion/main amd64 liberror-perl all 0.17024-1 [26.9 kB]
获取:2 http://packages.deepin.com/deepin lion/main amd64 git-man all 1:2.11.0-3+deb9u4 [1,433 kB]
获取:3 http://packages.deepin.com/deepin lion/main amd64 git amd64 1:2.11.0-3+deb9u4 [4,167 kB]
已下载 5,627 kB,耗时 9秒 (604 kB/s)
正在选中未选择的软件包 liberror-perl。
(正在读取数据库 ... 系统当前共安装有 190185 个文件和目录。)
正准备解包 .../liberror-perl_0.17024-1_all.deb ...
正在解包 liberror-perl (0.17024-1) ...
正在选中未选择的软件包 git-man。
正准备解包 .../git-man_1%3a2.11.0-3+deb9u4_all.deb ...
正在解包 git-man (1:2.11.0-3+deb9u4) ...
正在选中未选择的软件包 git。
正准备解包 .../git_1%3a2.11.0-3+deb9u4_amd64.deb ...
正在解包 git (1:2.11.0-3+deb9u4) ...
正在设置 git-man (1:2.11.0-3+deb9u4) ...
正在设置 liberror-perl (0.17024-1) ...
正在处理用于 man-db (2.7.6.1-2) 的触发器 ...
正在设置 git (1:2.11.0-3+deb9u4) ...
3,复制tools文件夹到
huan@huan-PC:~$ git clone git://github.com/raspberrypi/tools.git
正克隆到 'tools'...
remote: Enumerating objects: 9, done.
remote: Counting objects: 100% (9/9), done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 25383 (delta 3), reused 8 (delta 3), pack-reused 25374
接收对象中: 100% (25383/25383), 610.88 MiB | 1.20 MiB/s, 完成.
处理 delta 中: 100% (14884/14884), 完成.
正在检出文件: 100% (19059/19059), 完成.
4,复制Linux内核文件
git clone --depth=1 --branch <branch> https://github.com/raspberrypi/linux
5,添加环境变量
64位添加:
PATH=$PATH:/home/huan/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin
PATH=$PATH:/home/huan/tools/arm-bcm2708-linux-gnueabi/bin
32位添加:
PATH=$PATH:/home/huan/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin
PATH=$PATH:/home/huan/tools/arm-bcm2708-linux-gnueabi/bin
6,验证环境变量添加成功
huan@huan-PC:~/Desktop$ arm-linux-gnueabihf-gcc -v
Using built-in specs.
COLLECT_GCC=arm-linux-gnueabihf-gcc
COLLECT_LTO_WRAPPER=/home/huan/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/../libexec/gcc/arm-linux-gnueabihf/4.8.3/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: /home/zhehe01/work/bzr/pi-build/builds/arm-linux-gnueabihf-raspbian-linux/.build/src/gcc-linaro-4.8-2014.03/configure --build=x86_64-build_unknown-linux-gnu --host=x86_64-build_unknown-linux-gnu --target=arm-linux-gnueabihf --prefix=/home/zhehe01/work/bzr/pi-build/builds/arm-linux-gnueabihf-raspbian-linux/install --with-sysroot=/home/zhehe01/work/bzr/pi-build/builds/arm-linux-gnueabihf-raspbian-linux/install/arm-linux-gnueabihf/libc --enable-languages=c,c++,fortran --disable-multilib --enable-multiarch --with-arch=armv6 --with-tune=arm1176jz-s --with-fpu=vfp --with-float=hard --with-pkgversion='crosstool-NG linaro-1.13.1+bzr2650 - Linaro GCC 2014.03' --with-bugurl=https://bugs.launchpad.net/gcc-linaro --enable-__cxa_atexit --enable-libmudflap --enable-libgomp --enable-libssp --with-gmp=/home/zhehe01/work/bzr/pi-build/builds/arm-linux-gnueabihf-raspbian-linux/.build/arm-linux-gnueabihf/build/static --with-mpfr=/home/zhehe01/work/bzr/pi-build/builds/arm-linux-gnueabihf-raspbian-linux/.build/arm-linux-gnueabihf/build/static --with-mpc=/home/zhehe01/work/bzr/pi-build/builds/arm-linux-gnueabihf-raspbian-linux/.build/arm-linux-gnueabihf/build/static --with-isl=/home/zhehe01/work/bzr/pi-build/builds/arm-linux-gnueabihf-raspbian-linux/.build/arm-linux-gnueabihf/build/static --with-cloog=/home/zhehe01/work/bzr/pi-build/builds/arm-linux-gnueabihf-raspbian-linux/.build/arm-linux-gnueabihf/build/static --with-libelf=/home/zhehe01/work/bzr/pi-build/builds/arm-linux-gnueabihf-raspbian-linux/.build/arm-linux-gnueabihf/build/static --enable-threads=posix --disable-libstdcxx-pch --enable-linker-build-id --enable-plugin --enable-gold --with-local-prefix=/home/zhehe01/work/bzr/pi-build/builds/arm-linux-gnueabihf-raspbian-linux/install/arm-linux-gnueabihf/libc --enable-c99 --enable-long-long --with-float=hard
Thread model: posix
gcc version 4.8.3 20140303 (prerelease) (crosstool-NG linaro-1.13.1+bzr2650 - Linaro GCC 2014.03)
本文参考链接:https://blog.csdn.net/iefenghao/article/details/88815093
来源:CSDN
作者:qqcooler
链接:https://blog.csdn.net/qqcooler/article/details/104101455