1. Environment
Target board: mini2440
u-boot version: u-boot-2009.08
Cross compiler: arm-linux-gcc-4.3.2 Download from http://www.linuxidc.com/Linux/2011-04/34049.htm
Operating System: Linux ( Ubuntu -11.10)
U-Boot source code download address http://www.linuxidc.com/Linux/2011-07/38897.htm
2. Purpose
Build the mini2440 target board environment. Before reading this article, it is recommended to read Embedded System Boot Loader Technology Insider See http://www.linuxidc.com/Linux/2011-12/50389.htm
Steps
1. Download source code
-
tar –jxvf u-boot-2009.08.tar.bz2
2. Create mini2440 directory and header file
Before that, you must be familiar with the U-boot directory tree. For example, the board directory is where the root board related files (smdk2410.c, etc.) are stored.
、
Enter the root directory of u-boot
-
cp -r board/samsung/smdk2410/ board/samsung/mini2440
-
mv board/samsung/smdk2410/smdk2410.c board/samsung/mini2440/mini2440.c
-
cp include/configs/smdk2410.h include/configs/mini2440.h
3. Modify the Makefile in the u-boot root directory
U-boot is a good thing, with detailed documentation. Looking at the README [line 227] in the root directory of U-boot, we know that we must configure the target board environment before making.
For all supported boards there areready-to-use default
configurations available; just type"make
Find line 2997 of Makefile, where you can see the configuration for different boards. For example:
-
smdk2410_config : unconfig
-
@$(MKCONFIG) $(@:_config=) arm arm920t smdk2410 samsung s3c24x0
After this, we add the following:
-
mini2440_config : unconfig
-
@$(MKCONFIG) $(@:_config=) arm arm920t mini2440 samsung s3c24x0
The above parameters are described as follows.
unconfig: Dependency on unconfig. Executing unconfig actually performs cleanup work.
unconfig:
@rm–f $(obj)include/config.h$(obj)include/config.mk
$(obj)board/*/config.tmp$(obj)board/*/*/config.tmp
$(obj)include/autoconf.mk$(obj)include/autoconf.mk.dep
ARM CPU architecture (ARCH)
arm920t CPU type, which corresponds to the cpu/arm920t subdirectory
The model of the mini2440 development board (BOARD), which corresponds to the board/samsung/mini2440 directory
Samsung developer/vender. The parent directory of the new development board project directory. If you create a new development board project directory directly under board, this will be NULL.
s3c24x0 System on Chip (S0C)
If the default cross compiler is arm-linux-gcc, you do not need to reset the compilation environment, otherwise you need to add it again.
Find line 161 of the Makefile
-
# set default to nothing for native builds
-
ifeq ($(HOSTARCH),$(ARCH))
-
CROSS_COMPILE ?=
-
endif
Setting up the cross compiler:
-
CROSS_COMPILE = arm-linux-
-
# set default to nothing for native builds
-
ifeq ($(HOSTARCH),$(ARCH))
-
CROSS_COMPILE ?=
-
endif
4. We will start NorFlash first, so there is no need to modify other codes for the time being.
5. Test whether there is any problem with the previous modification. If there is no problem, the u-boot.bin file will be generated after successful compilation.
Return to the u-boot root directory
-
make distclean
-
make mini2440_config
-
make
4. Errors
make -C board/samsung/mini2440/
make[1]: Entering directory `/home/yz019/u-boot/u-boot-2009.08/board/samsung/mini2440'
make[1]: *** No rule to make target '.depend' needed by 'libmini2440.a'. Stop.
make[1]: Leaving directory `/home/yz019/u-boot/u-boot-2009.08/board/samsung/mini2440'
make: ***[board/samsung/mini2440/libmini2440.a] Error 2
Solution:
Check board/Samsung/mini2440/Makefile28
-
COBJS := smdk2410.o flash.o
Modified to
-
COBJS := mini2440.o flash.o
make. I was pleasantly surprised to find the following statement, and it was done~
arm-linux-objcopy -Osrec u-boot u-boot.srec
arm-linux-objcopy--gap-fill=0xff -O binary u-boot u-boot.bin
V. Achievements
Since the clock configuration and other related board-level settings are not made, the serial port cannot output debugging information, so burning the compiled u-boot.bin to NorFlash will not produce any effect.
Previous article:U-Boot 2010.09 supports mini2440
Next article:Some problems encountered when compiling U-Boot-1.1.6 on mini2440
Recommended ReadingLatest update time:2024-11-16 10:29
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Has anyone tried the Litchitang Tang Nano 4K domestic FPGA development board?
- Oscilloscope waveform analysis of carbon canister solenoid valve failure of automobile irregular flameout
- Help, RCD circuit problem of switching power supply
- Found a national replacement for Raspberry Pi, based on Allwinner quad-core H616, priced at 138 yuan
- What are the two MOS tubes used for in the feedback circuit of the Boost circuit?
- Why is there a 4M-6M option in the PLL input frequency selection? Shouldn't it be a fixed value? Why is it a 2M range?
- [Reprint] ADI e-book-the e-book you absolutely deserve
- [National Technology N32G457 Review] 6 GPIO + I2C key interrupt + SSD1306 display
- TI's multi-core heterogeneous SOC platform AM57XX
- 【Xianji HPM6750 Review】Interim (Final) Summary