1. Production of tool chain
1.1 Tools
Software tool: crosstool-ng
Download address: git clone https://github.com/crosstool-ng/crosstool-ng
The crosstool-ng environment requires libncurse5-dev
sudo apt-get install libncurse5-dev
Install autoconf: sudo apt-get install autoconf
Enter the crosstool-ng directory, execute ./bootstrap, and generate the configure execution file
Check the installation environment. If any errors are reported, install the software: ./configure --prefix=`pwd`/crosstool
The required software is:
sudo apt-get install gperf bison flex texinfo help2man gawk
Execute the command make to execute the command:
make install
export PATH="${PATH}:`pwd`/crosstool/bin"
1.2 Start production
1.2.1 Create target folder
Create three folders in the root directory:
mkdir src x-tools crosstool
1.2.2 Environment
Enter the crosstool directory: cd ~/.crosstool
Execution: ct-ng list-samples
Select arm-unknown-linux-gnueabi as the template for the cross-compilation tool chain
Execute the command: ct-ng show-arm-unknown-linux-gnueabi to view the configuration required to compile the cross-compilation tool chain
Download gcc 6.3.0: wget http://ftp.gnu.org/gnu/gcc/gcc-6.3.0/gcc-6.3.0.tar.gz
Execute command: ct-ng arm-unknown-linux-gnueabi
Execute command: ct-ng menuconfig
Select Target options
*** Target optimisations ***
(armv4t) Architecture level: instruction set architecture, exynos4412 is armv7-a architecture, -march=name
(arm920t) Emit assembly for CPU: CPU core type, -mcpu=name
() Tune for CPU : Optimization of CPU, please check the chip manual for details, -mtune=name
The latest version of crosstool-ng only needs to select the first and second projects.
Select toolchain options:
u-boot 2016.01 does not support GCC6, so the GCC version needs to be changed to between GCC5.0 and GCC6.0.
Save and exit.
1.2.3 Compilation
Execute command: ct-ng build
Compiled successfully:
Create environment variables:
vim .bashrc, add the following line
PATH=~/x-tools/arm-s3c2440a-linux-gnueabihf/bin:$PATH/
Execute source .bashrc
Execute arm-s3c2440a-linux-gnueabi-gcc -v
u-boot 2016.01 does not support GCC6, so the GCC version needs to be changed to between GCC5.0 and GCC6.0.
2. Establish u-boot working directory
Download u-boot_2016.01 version and unzip u-boot.
2.1 Board directory modification
2.1.1 Create jz2440 board
View the files in the ../board/samsung/ directory:
In this version, 2440 has been deprecated. Therefore, smdk2410 is selected as the template to create 2440 u-boot.
2.1.2 jz2440 file name modification
Modify file name:
2.1.3 Kconfig modification
Modify the Kconfig and Makefile files and change smdk2410 inside to jz2440, as follows:
Kconfig file:
2.1.4 Makefile modification
2.2 Modify header file
Add content to the header file:
Add support for S3C2440
Find the file containing the header file smdk2410.h:
Nothing needs to be modified
2.3 Modify configuration file
The current new version of u-boot is the same as the Linux source code. Make menuconfig is executed for configuration, so there must be jz2440 configuration in the configs directory.
Configuration in the config directory:
2.5 Modify the configuration file under arch/arm
arch/arm/Kconfig, which adds support for jz2440
2.6 Modify rch/arm/include/asm/mach-types.h
3. Configure .config and compile u-boot
3.1 configuration.config
Execute command: make jz2440_defconfig
Execute command: make menuconfig
Select the target_select item in ARM architecture, and then select jz2440:
Configure the command line prompt of u-boot:
Save and exit configuration.
3.2 Compilation
Compiled successfully:
4. Compilation errors
4.1 Not enough room for program headers
arm-2440-linux-gnueabi-ld.bfd: u-boot: Not enough room for program headers, try linking with -N
arm-2440-linux-gnueabi-ld.bfd: final link failed: Bad value
make: *** [Makefile:1193: u-boot] Error 1
Solution: https://www.mail-archive.com/u-boot@lists.denx.de/msg235861.html
Add the following lines to the Makefile in the root directory:
Previous article:u-boot transplantation (2)---Work before modification: code flow analysis 1
Next article:13. S3C2440 bare metal—initialization code and MMU
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
- Brief Analysis of Automotive Ethernet Test Content and Test Methods
- How haptic technology can enhance driving safety
- Five Experiences in RF Circuit Design
- What is a combined hydraulic cylinder?
- [MYX-1028X] (V) Serial communication Demo
- Overall design of wireless sensor network nodes
- EEWORLD University Hall ---- Fundamentals of Circuit Theory by Zhao Jinquan, Xi'an Jiaotong University
- Anxinke NB-IoT module review - some speculation about the failure of CH340
- Introducing a newly invented bandwidth amplifier circuit: "Angel"
- Embedded Qt-FFmpeg design an RTSP player
- dsp28335 ADC differential sampling
- Book Festival is coming, let me recommend a wave of must-read books on electromagnetic waves and microwave radio frequency