安装SDK下载sdk并上传到虚拟机,解压后执行:
在这对话框中输入想要保存的目录:
在下面的对话框中输入Y:
然后稍等安装完毕: - Extracting SDK.......................................................................................................................................................................................................done
- Setting it up...done
- SDK has been successfully set up and is ready to be used.
- Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.
- $ . /opt/yg2lx/environment-setup-aarch64-poky-linux
- $ . /opt/yg2lx/environment-setup-armv7vet2hf-neon-vfpv4-pokymllib32-linux-gnueabi
复制代码
测试SDK安装完成后,使用以下命令设置环境变量,测试 SDK 是否完成: - lugl@lugl-virtual-machine:~/MYD/sdk$ source /opt/yg2lx/environment-setup-aarch64-poky-linux
- lugl@lugl-virtual-machine:~/MYD/sdk$ $CC -v
- Using built-in specs.
- COLLECT_GCC=aarch64-poky-linux-gcc
- COLLECT_LTO_WRAPPER=/opt/yg2lx/sysroots/x86_64-pokysdk-linux/usr/libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/8.3.0/lto-wrapper
- Target: aarch64-poky-linux
- Configured with: ../../../../../../work-shared/gcc-8.3.0-r0/gcc-8-8.3.0/src/configure --build=x86_64-linux --host=x86_64-pokysdk-linux --target=aarch64-poky-linux --prefix=/usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-pokysdk-linux/usr --exec_prefix=/usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-pokysdk-linux/usr --bindir=/usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux --sbindir=/usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux --libexecdir=/usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-pokysdk-linux/usr/libexec/aarch64-poky-linux --datadir=/usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-pokysdk-linux/usr/share --sysconfdir=/usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-pokysdk-linux/etc --sharedstatedir=/usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-pokysdk-linux/com --localstatedir=/usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-pokysdk-linux/var --libdir=/usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-pokysdk-linux/usr/lib/aarch64-poky-linux --includedir=/usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-pokysdk-linux/usr/include --oldincludedir=/usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-pokysdk-linux/usr/include --infodir=/usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-pokysdk-linux/usr/share/info --mandir=/usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-pokysdk-linux/usr/share/man --disable-silent-rules --disable-dependency-tracking --with-libtool-sysroot=/home/hjx/renesas/new2-yocto/build-myir/tmp/work/x86_64-nativesdk-pokysdk-linux/gcc-cross-canadian-aarch64/8.3.0-r0/recipe-sysroot --with-gnu-ld --enable-shared --enable-languages=c,c++ --enable-threads=posix --enable-multilib --enable-default-pie --enable-c99 --enable-long-long --enable-symvers=gnu --enable-libstdcxx-pch --program-prefix=aarch64-poky-linux- --without-local-prefix --disable-install-libiberty --enable-lto --disable-libssp --enable-libitm --disable-bootstrap --disable-libmudflap --with-system-zlib --with-linker-hash-style=gnu --enable-linker-build-id --with-ppl=no --with-cloog=no --enable-checking=release --enable-cheaders=c_global --without-isl --with-gxx-include-dir=/not/exist/usr/include/c++/8.3.0 --with-build-time-tools=/home/hjx/renesas/new2-yocto/build-myir/tmp/work/x86_64-nativesdk-pokysdk-linux/gcc-cross-canadian-aarch64/8.3.0-r0/recipe-sysroot-native/usr/aarch64-poky-linux/bin --with-sysroot=/not/exist --with-build-sysroot=/home/hjx/renesas/new2-yocto/build-myir/tmp/work/x86_64-nativesdk-pokysdk-linux/gcc-cross-canadian-aarch64/8.3.0-r0/recipe-sysroot --enable-poison-system-directories --disable-static --enable-nls --with-glibc-version=2.28 --enable-initfini-array --enable-__cxa_atexit
- Thread model: posix
- gcc version 8.3.0 (GCC)
复制代码
到此,SDK就安装成功了。 测试用vim编写一个hello.c:
保存后编译:$CC hello.c -o hello 编译后查看hello文件类型: - lugl@lugl-virtual-machine:~/MYD/sdk$ file hello
- hello: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-aarch64.so.1, for GNU/Linux 3.14.0, BuildID[sha1]=5aa9a4ba2a1ff9ca3ef36c5d5508eb448b8f85f1, with debug_info, not stripped
复制代码
成功的输出了hello world,说明SDK安装成功!
|