Tiny4412 development board compilation environment setup [transfer]

Publisher:码农创想家Latest update time:2022-01-13 Source: eefocusKeywords:Tiny4412 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
  1. /****************************************************************************************** 

  2. * Function: Tiny4412 development board compilation environment setup

  3. * Create Date : 2016/04/04 

  4. * Author : NTSK13 

  5. * Email : beijiwei@qq.com 

  6. * Copyright: Everyone is welcome to communicate and learn with me. Please keep the integrity of the article when reprinting. 

  7.                  No organization or individual may use this information for commercial purposes without my written permission.                

  8. ***********************************************************************************************


 

I am using VirtualBox + Ubuntu 

VirtualBox version: 5.0.16 r105871 (use the latest version)

Ubuntu: ubuntu-15.10-desktop-amd64.iso

 

When installing, select English as the installation language. It is not recommended to select Chinese for the convenience of development.

During installation, the virtual machine should not be connected to the Internet.

When configuring the user, set a password, such as 1234.

Remember this password, you will need it when setting up root login later.

It is recommended to choose a space of 70GB or more if there is space available. I have 62GB, and after compiling, there is only about 1GB left.

Here are the configurations:

<1> Log in as root user

 

1. Unlock the root first and set a password for the root user

Open the terminal and enter: sudo passwd root

 

Password: <--- Enter your current user password, which is the password you used to install Ubuntu 1234

Enter new UNIX password: <--- New root user password

Retype new UNIX password: <--- Repeat the new root user password

passwd: Password updated successfully

 

2Set up automatic root login

  sudo gedit /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf

 

The final file content is:

[SeatDefaults]

autologin-user=root #Automatically log in as root after startup

greeter-session=unity-greeter

user-session=ubuntu

After I modified the root permissions and logged in automatically, I found the following prompt when I started the computer:

Error found when loading /root/.profile

stdin: is not a tty

…………

Solution: Use the command gedit /root/.profile in the terminal, open the file and find "mesg n".

Change it to "tty -s && mesg n".

 

<2>Virtual machine window size issue and shared folder settings

 

This requires the installation of Guest Additions (enhancement package). There is this iso in the VirtualBox installation directory

1. Installation: VirtualBoxGuestAddition.iso file

It can be found in the VirtualBox installation directory.

 Simply click "Install Enhancements" on the main menu of the virtual machine, and Ubuntu will automatically mount an iso.

Open the terminal, cd /media/cdrom0 directory, and run sudo ./VBoxLinuxAdditions-x86.run. When the following information appears, it means the installation is successful.

 

Verifying archive integrity... All good.

Uncompressing VirtualBox 3.0.4 Guest Additions for  Linux

 

installation......................................................................................................

..................................................................................................................................

......

VirtualBox 3.0.4 Guest Additions installation

Building the VirtualBox Guest Additions kernel module...

Building the shared folder support kernel module...

Building the drm support kernel module...

Installing the VirtualBox Guest Additions...

Successfully installed the VirtualBox Guest Additions.

You must restart your guest system in order to complete the installation.

 

After the installation is complete and the system is restarted, the mouse can be moved freely between the Host system and the virtual system without pressing the right Ctrl key to switch, and the window of the virtual system can be dragged.

If the location is suitable, the Ubuntu desktop will automatically display in full screen. If clipboard sharing with the host system is enabled, you can also copy/cut and paste between the host system and the virtual system.

 

2. Set up a shared folder

After the restart is complete, click "Device" -> Allocate data space, add a shared folder, and the options Fixed and Temporary refer to whether the folder is persistent.

You can choose any share name you like, such as "vboxshd", and try to use English names.  

 D:Vboxshd, this is the Windows directory, and shared files can be placed in this path in the future.

 

3. Mount the shared folder

 

To use the shared folder feature, you must install Linux  guest additions and install enhanced features. If you don't want to mount manually every time, you can use the following method to execute the mount script when the system starts and successfully mount automatically.

# gedit /etc/rc.local

1. Add the above manual mount command at the end of the file:

mount -t vboxsf vboxshd /mnt/shd // vboxshd is the name of the shared data space

2. cd /mnt/  

      mkdir shd

 Note: Be sure to load the vboxsf module before mounting.

If it is not loaded, a mount error will occur.

/sbin/mount.vboxsf: mounting failed with the error: No such device

 

After Ubuntu starts, it will usually mount the shared folder in the /media/ directory.


<3>Add domestic Ubuntu source

If you don't add it, some of the tools required for Android compilation will fail to install.

cp /etc/apt/sources.list /etc/apt/sources.list_bak

gedit /etc/apt/sources.list

Add at the end:

 

deb http://mirrors.163.com/ubuntu/ wily main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ wily-security main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ wily-updates main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ wily-proposed main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ wily-backports main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ wily main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ wily-security main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ wily-updates main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ wily-proposed main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ wily-backports main restricted universe multiverse


After that, sudo apt-get update

 

The same method applies to adding other domestic sources.


Install the software packages required for compiling Android source code

Ubuntu does not come with software development related components after the default installation, so you need to install a series of software development components first. 
Please make sure that your computer can access the Internet normally.  
        
      The first step is to copy the ubuntu directory under the tools directory from the Tiny4412 CD to tmp.

      The second step is to install jdk6:  
      # cd /tmp/ubuntu/jdk6/  
      # chmod 755 install-sun-java6.sh    
      # ./install-sun-java6.shThe    
        
        
      third step is to install software development related software packages online by executing the install-devel-packages.sh script:  
      # cd /tmp/ubuntu/  
      # chmod 755 install-devel-packages.sh  
      # ./ install-devel-packages.sh.  
      During the process, you will be asked whether to download the software package. Enter Y and press Enter.

 

The last step is to compile Android 5.0.2 using openjdk-7-jdk.

   However, friend didn’t mention this matter officially, what a pitfall…

   apt-get install openjdk-7-jdk

Afterwards: execute ./install-openjdk7,sh

A shell script install-openjdk7.sh is provided to set up Java jdk:

=================================================================================================================================

#!/bin/sh

# Update symbolic links for Java
update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/java-7-openjdk-amd64/bin/java" 1
update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/java-7-openjdk-amd64/bin/javac" 1
update-alternatives --install "/usr/bin/javadoc" "javadoc" "/usr/lib/jvm/java-7-openjdk-amd64/bin/javadoc" 1
update-alternatives --install "/usr/lib/mozilla/plugins/libjavaplugin.so" "mozilla-javaplugin.so" Install
-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/java-7-openjdk-amd64/bin/javaws" 1 update-
alternatives --install "/usr/bin/jar" "jar" "/usr/lib/jvm/java-7-openjdk-amd64/bin/jar" 1

# Choose the  java  you installed as default 
update-alternatives --config java
update-alternatives --config javac
update-alternatives --config javadoc
update-alternatives --config mozilla-javaplugin.so
update-alternatives --config javaws
update-alternatives --config jar

# Verify installed
java -version
javac -version

==============================================================================================================

Install the cross compiler GCC

 

The official arm-linux-gcc-4.5.1 is used (the same as Mini210). It will automatically use the armv7 
instruction set when compiling the kernel and support hard floating-point operations. The following are the detailed steps to install it.  


      Step1: Copy arm-linux-gcc-4.5.1-v6-vfp-YYYYMMDD.tgz in the Android directory of the CD to the /tmp 
directory   , then enter the directory and execute the decompression command:
      #cd /tmp  
      #tar xvzf arm-linux-gcc-4.5.1-v6-vfp-YYYYMMDD.tgz –C /      
      Note: There is a space after C, and C is capitalized. It is the first letter of the English word "Change", which 
means changing the directory.  
      Executing this command will install arm-linux-gcc to the /opt/FriendlyARM/toolschain/4.5.1 directory

 

Step 2: Add the compiler path to the system environment variable. Run the command  
       #gedit ~/.bashrc  
       to edit the ~/.bashrc file. Note that there is a "." before "bashrc". Modify the last line to export  
PATH=$PATH:/opt/FriendlyARM/toolschain/4.5.1/bin. Note that the path must be written correctly, otherwise it will not be effective.  
       Save and exit.  


Re-login to the system to make the above settings take effect. Enter arm-linux-gcc –v in the command line   , and GCC related information will appear, which means that the cross-compilation environment has been successfully installed.

[1] [2]
Keywords:Tiny4412 Reference address:Tiny4412 development board compilation environment setup [transfer]

Previous article:tiny4412 bare metal program 5. Control icache
Next article:tiny4412 bare metal program 6. Relocation code to IRAM+0x8000 [transfer]

Recommended ReadingLatest update time:2024-11-23 18:17

Chapter 10, Tiny4412 U-BOOT transplantation 10 DDR working timing and principle 2
The development of DDR is towards higher data transmission frequency and larger memory capacity. DDR2 achieves higher data transmission frequency, and develops from DDR's 2-bit pretetch to 4-bit pretetch. To expand capacity, in addition to increasing the capacity of each L-Bank, the number of L-Banks is also increased
[Microcontroller]
Chapter 10, Tiny4412 U-BOOT transplantation 10 DDR working timing and principle 2
TINY4412 bare metal program to light up
Circuit According to the circuit diagram, there are 4 LED lights, and the pins are GPM4_0~ GPM4_3. When the IO pin is high level, the LED light is off, and when the IO pin is low level, the LED light is on. Start the process Exynos4412 is a SOC chip released in 2012, which is a relatively new chip with armv7 archi
[Microcontroller]
TINY4412 bare metal program to light up

Recommended posts

【2024 DigiKey Creative Competition】3D Printing Filaments Smart Drying Box - Work Submission
3Dprintingconsumablesintelligentdryingoven Author:ki14 1.Introduction ThesmartdryingovenbasedontheESP32C6developmentboardandtheBME680sensorcandetecttheambienttemperatureandhumidityinrealtime,andautomatically
ki14 DigiKey Technology Zone
ST VCU Solution----Part 3
STVCUSolution--Part1describesST'soverallsolutionforvehiclecontrollers;Part2introduceshowIDHcansupportthedevelopmentoftheentiresystemsolutionbasedonSTVCUsolution;Part3ofthisarticlemainlyintrod
火辣西米秀 Automotive Electronics
[STM32MP135F-DK] Evaluation ③Serial terminal and SSH
Today,let'sreviewtheserialterminalandSSHtoprepareforsubsequentdevelopment. Inthepreviousunboxingarticle,IcanuseaUSBkeyboardandmousetorunaterminaldirectlyonthedevelopmentboard,butitistootroublesometouse
不爱胡萝卜的仓鼠 stm32/stm8
【Ufan Learning】Learning Part 1: Ufan Learning Board Function Test
IopenedtheboardassoonasIreceivedit.Therewasalearningboardandtwo2.0jumpercapsinside.OneofthejumpercapsfelloffbutIfounditback.TheboardismuchsmallerthanIthought,but"smallbutcomplete".
1nnocet- MCU
iMX6Q/PLUS development board burns the Ubuntu system of the device tree kernel
BasedonthethreehardwareversionsofXunwei-iMX6D,iMX6QandiMX6PLUS,thedevicetreeimageburningmethodandtheimagedirectoryandimagenameareallthesame,sotheauthormergedtheburningchapterstogether. Pleasenotethatifyoup
砂舞的玩笑 Embedded System
Wireless Charging Foreign Object Detection FOD
WirelessChargingForeignObjectDetectionFOD
nathanzhang RF/Wirelessly
Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号