Das U-Boot - the Universal Boot Loader wiki website is the main entry point for this bootloader / debugging tool available on several processors. It is of course available for AT91 ARM processors.
Das U-Boot - the Universal Boot Loader wiki website는 여러 processors에서 사용할 수 있는 bootloader/debugging tool을 위한 main entry point이다. AT91 ARM processor에서도 사용 가능하다.
U-boot documentation is very rich ; in addition to the official u-boot website, several others are dealing with u-boot getting started or configuration. An article from http://www.linuxdevices.com also gives a good introduction to u-boot. Note however that a detailed documentation is simply available in the source code package as the README file. Thematic documentation is also available in the doc/
directory.
U-boot은 매우 풍부한 문서를 제공하며, 게다가 공식 u-boot website, 여러개의 자료는 u-boot getting started 또는 confiuration과 관계를 가지고 있다.
http://www.linuxdevices.com 로부터의 기사에는 u-boot을 좋게 소개하고 있다. 그러나 세부적인 문서화는 README 파일에서 처럼 source code package에서 간단하게 사용할 수 있다. 주제화된 문서화 또한 doc/ directory에서 사용할 수 있다.
U-boot takes place in the Linux demo as a second stage bootloader. It is responsible of configuring main interfaces and launching a Linux system. Note however that it is possible to avoid this step and to directly boot Linux from AT91Bootstrap, in a production phase for instance.
U-boot은 Linux demo에서 second stage bootloader로 동작한다. 그것은 main interface의 configuring과 Linux system의 launching을 책임지고 있다. 그러나 이러한 과정을 거치지 않고 직접 AT91Bootstrap로부터 Linux를 boot할 수 있다.
The u-boot Application note & flash prog on http://www.atmel.com describes the use of u-boot with the AT91rm9200 chip. The using of u-boot with SAM9 products is a bit different as AT91Bootstrap and the SAM-BA ISP are introduced for these devices.
http://www.atmel.com의 u-boot Application note & flash prog 는 AT91rm9200 chip에서 u-boot의 사용방법에 대하여 설명하고 있다. SAM9 제품군에서 u-boot을 사용하는 것은 AT91Bootstrap에 약간의 차이가 있고 SAMBA ISP는 이러한 devices를 위해 소개 되었다.
A revision of u-boot for AT91 boards is built from the official u-boot website and a patch against this revision of u-boot.
This patch is regularly updated.
AT91 boards를 위한 u-boot의 revision은 공식적으로 u-boot website로부터 build 되었고 u-boot의 revision별로 patch도 build 되었다. 이 patch는 정기적으로 updated 되었다.
The u-boot environment is a little read/write persistent space that stores variables needed by the bootloader to configure itself properly and to adapt to its environment (network configuration, boot arguments, storage location, etc.). It is located in the same media that it has booted from. Check Boot capabilities matrix to know where the u-boot environment is located for the pre-built binary.
u-boot environment 은 조그마한 real/write 가능한 지속적인 공간이다. 이것은 그 자체를 알맞게 configure하고 그것의 환경(network configuration, boot arguments, storage location, etc.)에 적응하기 위해 bootloader에 의해 필요한 변수를 저장하는 공간이다. 그것은 booted되는 같은 media에 위치된다. pre-built binary를 위해 어디에 u-boot environment이 위치하는지 알기 위해 Boot capabilities matrix를 확인해라.
Board | Description | Binary |
---|---|---|
at91sam9260ek | u-boot binary with environment in Dataflash chip (SPI 0 CS 1) | u-boot-1.3.4-exp.3-at91sam9260ek-dataflash_cs1.bin |
at91sam9xeek | u-boot binary with environment in Dataflash chip (SPI 0 CS 1) | u-boot-1.3.4-exp.3-at91sam9xeek-dataflash_cs1.bin |
at91sam9261ek | u-boot binary with environment in Dataflash chip (SPI 0 CS 0) | u-boot-1.3.4-exp.3-at91sam9261ek-dataflash_cs0.bin |
at91sam9263ek | u-boot binary with environment in Dataflash card (SPI 0 CS 0) | u-boot-1.3.4-exp.3-at91sam9263ek-dataflash_cs0.bin |
at91sam9rlek | u-boot binary with environment in Dataflash card (SPI 0 CS 0) | u-boot-1.3.4-exp.3-at91sam9rlek-dataflash_cs0.bin |
at91sam9g20ek | u-boot binary with environment in Dataflash chip (SPI 0 CS 1) | u-boot-1.3.4-exp.3-at91sam9g20ek-dataflash_cs1.bin |
at91sam9g20ek_2mmc | u-boot binary with environment in Dataflash chip (SPI 0 CS 1) | u-boot-1.3.4-exp.3-at91sam9g20ek_2mmc-dataflash_cs1.bin |
at91sam9g10ek | u-boot binary with environment in Dataflash chip (SPI 0 CS 0) | u-boot-1.3.4-exp.3-at91sam9g10ek-dataflash_cs0.bin |
at91sam9g45ekes | u-boot binary with environment in Dataflash chip (SPI 0 CS 0) | u-boot-1.3.4-exp.3-at91sam9g45ekes-dataflash_cs0.bin |
Board | Description | Binary |
---|---|---|
at91sam9260ek | u-boot binary with environment in NandFlash | u-boot-1.3.4-exp.3-at91sam9260ek-nandflash.bin |
at91sam9xeek | u-boot binary with environment in NandFlash | u-boot-1.3.4-exp.3-at91sam9xeek-nandflash.bin |
at91sam9261ek | u-boot binary with environment in NandFlash | u-boot-1.3.4-exp.3-at91sam9261ek-nandflash.bin |
at91sam9263ek | u-boot binary with environment in NandFlash | u-boot-1.3.4-exp.3-at91sam9263ek-nandflash.bin |
at91sam9rlek | u-boot binary with environment in NandFlash | u-boot-1.3.4-exp.3-at91sam9rlek-nandflash.bin |
at91sam9g20ek | u-boot binary with environment in NandFlash | u-boot-1.3.4-exp.3-at91sam9g20ek-nandflash.bin |
at91sam9g20ek_2mmc | u-boot binary with environment in NandFlash | u-boot-1.3.4-exp.3-at91sam9g20ek_2mmc-nandflash.bin |
at91sam9g10ek | u-boot binary with environment in NandFlash | u-boot-1.3.4-exp.3-at91sam9g10ek-nandflash.bin |
at91sam9g45ekes | u-boot binary with environment in NandFlash | u-boot-1.3.4-exp.3-at91sam9g45ekes-nandflash.bin |
Old binaries | U-Boot directory in Linux4sam FTP |
---|
This section describes How to load u-boot into the boot media with SAM-BA.
이 section은 SAM-BA를 가지고 u-boot을 boot media에 load에 load하는 방법에 대하여 설명한다.
AT91SAM9260-EK | AT91SAM9261-EK | AT91SAM9263-EK (RevA) |
---|---|---|
|
|
|
AT91SAM9XE-EK | AT91SAM9RL-EK | AT91SAM9263-EK (RevB) |
|
|
|
AT91SAMG20-EK | AT91SAMG10-EK | AT91SAM9G45-EKES |
|
|
|
1. SAM-BA GUI interface에 알맞은 media tab(DataFlash, NandFlash, etc.) 을 선택한다.
2. Scripts rolling menu에서 Enable action 선택하여 media를 초기화하고 Execute를 누른다.
3. Send File Name Browse button을 누른다.
4. u-boot.bin binary 파일을 선택하고 Open을 누른다.
5. Address text field에서 media의 알맞은 address를 넣는다. GettingStarted#Linux4SAM_DataFlash_demo_Memory 과GettingStarted#Linux4SAM_NandFlash_demo_Memory 에서 각 product의 media map 을 찾을 수 있다.
6. Send File button 을 누른다.
7. AT91SAM9260-EK 또는 AT91SAM9XE-EK에서, booting media를 erased했다면, AT91Bootstrap으로 booting media를 대체해야만 한다.
8. SAM-BA를 close하고 USB 케이블을 제거한다.
Ok, now you must have a running u-boot flashed on your board. To check, you can have a look at the DBGU serial interface once you have reset the board.
보드에서 flashed 된 u-boot을 running해야 한다. 보드를 reset했을 때 DBGU serial interface통해 확인 할 수 있다.
Using a terminal software on your host system, you can connect to u-boot through the DBGU serial interface.
host system에서 terminal software를 사용함으로써, DBGU serial interface를 통해 u-boot가 연결할 수 있다.
Serial communication parameters 115200 8-N-1
:
Baud rate | 115200 |
Data | 8 bits |
Parity | None |
Stop | 1 bit |
Flow control | None |
setenv this command is used to set variables
setenv 이 명령은 variables을 설정할 때 사용된다.
saveenv this command saves variables previously set in the environment permanent storage space
saveenv 이 명령은 영속적인 저장공간의 환경에서 미리 설정한 variables를 저장한다.
printenv this command print the current variables
printenv 이 명령은 현재 variables을 print한다.
The help
command show a brief summary of the built-in commands of u-boot. Here is a selection of useful commands :
help 명령은 u-boot의 built-in command를 간략하게 보여준다. 사용할 명령을 선택한다.
U-Boot> help ? - alias for 'help' boot - boot default, i.e., run 'bootcmd' bootm - boot application image from memory cp - memory copy erase - erase FLASH memory flinfo - print FLASH memory information go - start application at address 'addr' help - print online help md - memory display mm - memory modify (auto-incrementing) nand - NAND sub-system printenv- print environment variables protect - enable or disable FLASH write protection run - run commands in an environment variable saveenv - save environment variables to persistent storage setenv - set environment variables tftpboot- boot image via network using TFTP protocol version - print monitor version U-Boot>
Refer to the u-boot manual page for u-boot command line interface.
u-boot command line interface를 위해 u-boot manual page를 참조한다.
You can create script or complex variables, which prevents you to type commands. Here is a summary of several variables built to make a network loading of linux easier :
type commands를 방지하는 script나 복잡한 variables를 생성할 수 있다. 아래에 더 쉽게 linux를 network loading하게 built하는 여러 variable에 대해 간략하게 설명하고 있다.
setenv boot_addr 0x21400000 setenv linux 'tftp $(boot_addr) linux-2.6.x.img' setenv ramdisk_addr 0x21100000 setenv ramdisk 'tftp $(ramdisk_addr) sam9-ramdisk.gz' setenv go 'run linux; run ramdisk; bootm $(boot_addr)' saveenv
The setenv linux 'tftp $(boot_addr) linux-2.6.x.img'
line is equivalent of typing tftp 0x21400000 linux-2.6.x.img
but combined with others and stored in flash, it allows you to save time, and automate. For executing a Linux kernel bootup, using this snippet, simply type run go
setenv linux 'tftp $(boot_addr) linux-2.6.x.img' line은 tftp 0x21400000 linux-2.6.x.img로 치는 것과 동일하나 다른것과 결합하고 flash에 저장되며 time을 save하고 자동으로 작업을 수행한다. Linux kernel bootup을 실행하기 위해 간단하게 run go라고 치면 된다.
bootcmd when set, this variable content is executed automatically after the boot delay. It enables the u-boot autoboot mode
bootcmd set하면, 이 variable의 내용은 boot delay 후에 자동으로 실행된다. u-boot autoboot mode를 enable한다.
bootargs this variable it used as an exchange area to pass information to the main application started by u-boot (Linux kernel for instance)
bootargs u-boot에 의해 시작되는 main application으로 information을 전달하는 exchange area로서 사용되는 variable.
bootm this command executes an application generated by the mkimage tool
bootm 이 명령은 mkimage tool에 의해 발생되는 application을 실행한다.
This section describes the loading of a Linux kernel and it root file system. Keep in mind useful u-boot commands to setup your u-boot behavior.
이 section은 Linux kernel과 root file system의 loading을 설명한다. u-boot을 setup하기 위해 useful u-boot commands에 유의하라.
U-Boot does not support normal linux kernel images like zImage or Image (arch/arm/boot/), you have to create an uImage file with the mkimage tool which encapsulates kernel image with header information, CRC32 checksum, etc.
U-boot은 zImage나 Imgae와 같은 일반 linux kernel image를 제공하지는 않는다. header iinformation, CRC32 cheksum 등과 함께 kernel image를 encapsulates하는 mkimage tool을 이용하여 uImage를 생성해야 한다.
mkimage comes in source code with U-Boot distribution and it is built during U-Boot compilation (u-boot-source-dir/tools/mkimage), we provide also pre-built static version.
mkimage는 U-Boot 배포판에 source code를 가지고 있고 U-Boot compilation(u-boot-source-dir/tools/mkimage) 동안 built된다. 또한 pre-built static version도 제공한다.
See U-Boot README file for more information.
좀 더 많은 정보는 README 파일을 확인해라.
Command to generate an uncompressed uImage file 2 :
uncompressed uImage file을 생성하는 명령은 다음과 같다.
mkimage -A arm -O linux -C none -T kernel -a 20008000 -e 20008000 -n linux-2.6 -d arch/arm/boot/Image uImage
Commands to generate a compressed uImage file 2 :
compressed uImage file을 생성하는 명령은 다음과 같다.
mkimage -A arm -O linux -C none -T kernel -a 20008000 -e 20008000 -n linux-2.6 -d arch/arm/boot/zImage uImage
On a development system, it is useful to get the kernel and root file system through the network. U-boot provides support for loading binaries from a remote host on the network using the TFTP protocol.
개발 시스템에서, network를 통해 kernel과 root file system을 얻는 것은 유용한 작업이다. U-boot은 TFTP protocol을 이용하여 network에서 remote host로부터 binary를 loading 할 수 있다.
To manage to use TFTP with u-boot, you will have to configure a TFTP server on your host machine. Check your distribution manual or Internet resources to configure a Linux or Windows TFTP server on your host:
u-boot으로 TFTP 사용을 관리하기 위해서는 , host machine에 TFTP server가 configure 되어 있어야 한다. host에 TFTP server를 configure 하기 위해 배포 메뉴얼 또는 internet resource를 을 확인해라.
On the u-boot side, you will have to setup the networking parameters:
u-boot side에서 networking parameters를 setup해야 한다.
setenv ethaddr 3e:36:65:ba:6f:be
setenv ipaddr 10.159.245.180
setenv serverip 10.159.245.186
saveenv
tftp
command (Cf. U-Boot script capability chapter). bootm
or boot
command. 1. Ethernet address(MAC address)를 set-up한다.
알맞은 MAC address 선택하기 위해 this u-boot network BuildRootFAQ entry 를 확인해라.
Build u-boot from sourcesTo build the binary found above, you will have to go through the following steps.
Getting u-boot sourcesDedicated page on u-boot wiki : http://www.denx.de/wiki/U-Boot/SourceCode
To get the u-boot bootloader sources for AT91 product you have to go through the following steps (note that x.x.x and y.y must be replace by the corresponding revision numbers) :
wget ftp://ftp.denx.de/pub/u-boot/u-boot-x.x.x.tar.bz2 tar xvjf u-boot-x.x.x.tar.bz2 cd u-boot-x.x.x
wget http://www.at91.com/linux4sam/pub/Linux4SAM/U-Boot/u-boot-x.x.x-exp.diff # or, depending on u-boot revision, check the FTP directory: wget ftp://www.at91.com/pub/uboot/u-boot-x.x.x-exp/u-boot-x.x.x-exp.diff
cat u-boot-x.x.x-exp.diff | patch -p1 You will have a fresh source copy of the AT91 u-boot.
U-boot 1.3.4 experimental sources
Choosing where the u-boot environment residesAbove, we talked about the location of the u-boot environment. Here is a way to modify it to your needs : To put environment variables in dataflash (default): nandflash에 환경변수를 넣기 위해 다음과 같이 한다. make at91sam9xxxek_nandflash_config Please go to the top-level
Note that Additional information about those variables are availlable in the u-boot README (search "- CFG_ENV_IS_IN_FLASH").
Cross-compiling u-bootOnce the AT91 u-boot sources available, cross-compile u-boot is made in two steps : configuration and compiling. Check the Configuration chapter in u-boot reference manual. Some newer version of make distclean make at91sam9263ek_config make CROSS_COMPILE=<path_to_cross-compiler/cross-compiler-prefix-> path_to_cross-compiler is only needed if it is not in your The result of these operations is a fresh u-boot binary called
Notes 1: If you experience issues with NAND flash accesses,
| ||||||||||||||||||||||||||
Linux4SAM - OpenEmbedded / Angstrom (0) | 2009.11.16 |
---|---|
Linux4SAM - Linux Kernel (0) | 2009.11.16 |
Linux4SAM - AT91Bootstrap (0) | 2009.11.15 |
Linux4SAM - Software Tools (0) | 2009.11.15 |
Linux4SAM - Getting Started (0) | 2009.11.14 |