Choose Ubuntu12.04.2 System to build the platform. Make the following changes under the original system:
- Set the server used by the update to a domestic "163" server
- Installing software such as Ssh,uboot-mkimage
- Installing the Compiler "ARM-2009Q3" and related library files
- Run the scripts in the JDK to install the JDK
- installing compiler arm-linux-4.4.3 and related library files
1. Click Settings->software&updates in the Ubuntu GUI and select Http://mirrors.163.com/ubuntu from the dropdown menu in the Download form bar.
2. Installing Mkimage Tools
Execute the Make Uimage command under the shell, and if the Mkimage tool is not installed on the system, the following error message appears:
"Mkimage" command not found-u-boot images won't be built
The reason is that the Mkimage tool is not installed in the system.
Workaround: Install the Mkimage tool and execute the following command to install it:
#sudo Apt-get Install Uboot-mkimage
Compile the Uboot source code, after the successful compilation in the Uboot/tools directory will generate Mkimgage tools, mkimage tools to copy to the/usr/bin/directory.
3. Install the compiler arm-2009q3
3.1. Visit the Codesourcery official website to download the latest arm cross-compiler toolchain, currently the latest version is arm-2009q3:
http://www.codesourcery.com/sgpp/lite/arm/portal/package5383/public/arm-none-linux-gnueabi/ ARM-2009Q3-67-ARM-NONE-LINUX-GNUEABI-I686-PC-LINUX-GNU.TAR.BZ2 3.2. Unzip
$ TAR-JXVF arm-2009q3-67-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 3.3. Move to/usr below MV Arm -2009q3/usr/3.4. Setting environment variables $ sudo su # VIM/ETC/BASH.BASHRC in the last add On
Export path= $PATH:/usr/arm-2009q3/bin
Export PATH startup environment variable setting: #source/ROOT/.BASHRC to check if the setting is successful: #e Cho $PATH results:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/arm-2009q3/bin
The instructions are set up well. 3.5. Check if the installation was successful: $ arm-none-linux-gnueabi-gcc-v ==> Using built -in specs.
Target:arm-none-linux-gnueabi
...
GCC version 4.4.1 (sourcery g++ Lite 2009q3-67)
Indicates that the installation was successful. 3.6 If the installation is complete, but an error occurred while viewing the compiler version
[email protected]:/usr/local/arm/arm-2009q3/bin$ ./arm-none-linux-gnueabi-gcc -v
-bash: ./arm-none-linux-gnueabi-gcc: No such file or directoryWorkaround: Install the Compatibility Pack Apt-get install libc6:i386 4, install the JDK detection system to install JDK-related software, the direct Input Java command can also:
#如果提示: Apt-get Install < selected package, the system is not installed by default.
[Email protected]:~$ java-version
Download source code and unzip:
[Email protected]:~ $wget
[Email protected]:~ $sudo MKDIR/USR/LIB/JVM
[Email protected]:~ $tar zvxf jdk-8u20-linux-x64.tar.gz
[Email protected]:~ $sudo MV jdk1.8.0_20//usr/lib/jvm/
Set the JDK environment variable:
[Email protected]:~ $sudo vim ~/.profile
#set JDK Env
Export java_home=/usr/lib/jvm/jdk1.8.0_20/
Export JRE_HOME=/USR/LIB/JVM/JDK1.8.0_20/JRE
Export classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar: $JAVA _home/lib: $JRE _home/lib: $CLASSPATH
Export path= $JAVA _home/bin: $PATH
#保存退出, enter the following command to make it effective immediately.
[Email protected]:~ $source ~/.profile
Verify JDK:
[email protected]:~ $ java-version
Java version "1.8.0_20"
Java (TM) SE Runtime Environment (build 1.8.0_20-b26)
&NBS P Java HotSpot (TM) 64-bit Server VM (build 25.20-b23, mixed mode)
If OPENJDK is already installed in the previous system, follow the steps below to update it:
& nbsp [email protected]:~$ sudo update-alternatives--install/usr/bin/java java/usr/lib/jvm/jdk1.8.0_20/bin/java 300
Update-alternatives:using/usr/lib/jvm/jdk1.8.0_20/bin/java to Provide/usr/bin/java (Java) in auto mode
[email protected]:~$ su Do update-alternatives--install/usr/bin/javac Javac/usr/lib/jvm/jdk1.8.0_20/bin/javac 300
& nbsp update-alternatives:using/usr/lib/jvm/jdk1.8.0_20/bin/javac to provide/usr/ Bin/javac (Javac) in auto mode
[email protected]:~$ sudo update-a Lternatives--config java
[email protected]:~$ sudo Update-alternatives--config Javac
Install JDK7 under ubuntu (with Clojure download) http://www.linuxidc.com/Linux/2012-10/71557.htm
Ubuntu 12.04 under Install JDK1.7 http://www.linuxidc.com/Linux/2012-06/62239.htm
CentOS6.3 Installing the JDK and environment configuration http://www.linuxidc.com/Linux/2012-09/70780.htm
5. Install compiler arm-linux-4.4.1 and related library files
Download arm-linux-gcc-4.4.3.tar.gz
5.1. Create a directory
$ sudo mkdir/usr/local/arm
5.2. Copying files
File arm-linux-gcc-4.4.3.tar.gz, put in the desktop
Go to Desktop
$ CD ~/desktop
$ sudo cp arm-linux-gcc-4.4.3.tar.gz/usr/local/arm
5.3. Extracting files
$ cd/usr/local/arm
$ sudo tar-xzvf arm-linux-gcc-4.4.3.tar.gz
5.4. Add Environment variables
Open the file with Gedit BASH.BASHRC
$ sudo gedit/etc/bash.bashrc
Add "Export Path=/usr/local/arm/opt/friendlyarm/toolschain/4.4.3/bin: $PATH" on the last line to save the file
5.5. Registering Environment variables
Run/ETC/BASH.BASHRC
$ . /etc/bash.bashrc
5.6. Whether the test is successful
View the version number, if any, to succeed
$ arm-linux-gcc-v
5.7 If not successful
No such file or directory
Installing sudo apt-get install Lsb-core solution
The above are I in the construction of the product table when the results obtained from the previous, and some have not entered, only for reference. Thanks to the Daniel who made their own technology public.
Embedded Linux Platform Setup