1. 安裝centos7,啟動圖像化界面。
參考:https://blog.csdn.net/qq_23014435/article/details/74347925
# systemctl get-default //獲取當前系統啟動模式
更改模式命令:systemctl set-default graphical.target由命令行模式更改為圖形界面模式
systemctl set-default multi-user.target由圖形界面模式更改為命令行模式
重啟機器獲得想要的啟動界面。
2. centos7 安裝samba
參考:https://www.cnblogs.com/hnxxcxg/p/6841778.html
關閉防火牆:systemctl disable firewalld.service
or 添加防火牆規則: firewall-cmd --permanent --zone=public --add-service=samba
firewall-cmd --reload
關閉selinux: vim /etc/selinux/config 設置:SELINUX=disabled
##############################################################
3.安裝arm-linux-gcc
將 壓縮包 tar zxvf xxx.tar -C / 解壓到根目錄下
在 /root/.bashrc 下添加 export PATH=$PATH:/usr/local/arm/x.x.x/bin
source /root/.bashrc
4.安裝arm linux gdb server.
解壓 tar zxvf xxx.tar.gz
cd arm-gdb-x.x
./buildall
##################################################################
第三步第四步,比較老的方式,新的方式參見:GNU MCU Eclipse
####################################################################
https://gnu-mcu-eclipse.github.io/toolchain/arm/install/
3.介紹一下 xpm package manager
https://www.npmjs.com/package/xpm
xpm
is a Node.js CLI application to manage xPacks.
xPacks are general purpose software C/C++ packages, intended to enhance code sharingand reusing during the development of C/C++ libraries and applications, much the same as npm modules do so nicely in the JavaScript ecosystem.
Xpacks類似於 javascript 生態圈的 npm ,旨在提高C/C++ 包管理,代碼分享的效率和代碼的重用性。
4.如何在linux 系統上安裝xpm 包管理工具呢?
首先逃不開的還是要linux系統上安裝npm 包管理工具,然后用npm 去安裝xpm----OMG!!!。
https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-a-centos-7-server
(1) 安裝 node.js
這里我們不用源碼安裝的方式,也不采用預編譯的包的方式 而是采用最簡單的
###############坑########### EPEL Repository 不是最新版本的 nodejs##########
Install a Package from the EPEL Repository
sudo yum install epel-release
sudo yum install nodejs
###############################坑############################改用 預編譯包的形式
下載 LTS 版本的 https://nodejs.org/download/release/latest-dubnium/
sudo tar --strip-components 1 -xzvf node-v* -C /usr/local
檢查nodejs 版本
node --version
v10.14.2
(2)安裝 xpm 參考: https://www.npmjs.com/package/xpm
$ mkdir -p "${HOME}"/Library/npm $ npm config set prefix "${HOME}"/Library/npm $ echo 'export PATH="${HOME}"/Library/npm/bin:${PATH}' >> "${HOME}"/.profile $ source "${HOME}"/.profile
npm install --global xpm
檢查 xpm 版本
xpm --version
0.4.5
(3) 利用xpm 安裝交叉工具鏈
參考:https://gnu-mcu-eclipse.github.io/toolchain/arm/install/
xpm install --global @gnu-mcu-eclipse/arm-none-eabi-gcc
牆內速度比較慢: 參考github主頁 https://github.com/gnu-mcu-eclipse/arm-none-eabi-gcc/releases
去github主頁下載下來手動安裝方法:
GNU/Linux
The GNU/Linux versions of GNU MCU Eclipse ARM Embedded GCC are packed as .tgz archives. Download the latest version named like:
gnu-mcu-eclipse-arm-none-eabi-gcc-7.2.1-1.1-20180401-0515-centos64.tgz
gnu-mcu-eclipse-arm-none-eabi-gcc-7.2.1-1.1-20180401-0515-centos32.tgz
As the name implies, the binaries were created on CentOS, but can be executed on most recent GNU/Linux distributions (they were tested on Debian, Ubuntu, Manjaro, SuSE and Fedora). Select the -centos64
file for 64-bit machines and the -centos32
file for 32-bit machines.
To install the toolchain, unpack the archive and copy it to /${HOME}/opt/gnu-mcu-eclipse/arm-none-eabi-gcc/
:
$ mkdir -p "${HOME}"/opt $ cd "${HOME}"/opt $ tar xf ~/Downloads/gnu-mcu-eclipse-arm-none-eabi-gcc-7.2.1-1.1-20180401-0515-debian64.tgz $ chmod -R -w "${HOME}"/opt/gnu-mcu-eclipse/arm-none-eabi-gcc/7.2.1-1.1-20180401-0515
測試是否安裝成功的方法:
$ "${HOME}"/opt/gnu-mcu-eclipse/arm-none-eabi-gcc/7.2.1-1.1-20180401-0515/bin/arm-none-eabi-gcc --version arm-none-eabi-gcc (GNU MCU Eclipse ARM Embedded GCC, 64-bit)