I.MX25 PDK U-boot SDCard

Document created by jesseg Employee on Aug 15, 2012Last modified by Jodi Paul on Mar 6, 2013
Version 2Show Document
  • View in full screen mode

Boot Linux from SD Card using u-boot

 

1 - Program u-boot into the SD using the ATK or use a pre-existing bootloader. See i.MX25 PDK Board Flashing SD Card.

 

2 - Run ltib to generate uImage and root file system. uImage will be copied on <Ltib Install path>/rootfs/boot and root file system will be <Ltib Install path>/rootfs/.

 

3 - Copy the uImage to your tftp folder.

sudo cp ./rootfs/boot/uImage /tftpboot/uImage_mx25 

4 - Boot the image programed on Step 1, i.e, boot the SD Card u-boot image.

Personality Board settings: 
             12345678 
SW22 -> 00000000 
SW21 -> 11000000  

Debug Board settings: 
  SW5,6,7,8,9,10 -> OFF  
            
             12345678 
SW4 -> 10000001

Stop at u-boot prompt:

MX25 U-Boot > 

5 - Transfer the uImage to the board:

MX25 U-Boot > setenv serverip 192.168.1.1 
MX25 U-Boot > setenv ipaddr 192.168.1.2

with the Ethernet cable connected:

MX25 U-Boot > tftpboot 0x80100000 uImage_mx25 
smc911x: detected LAN9217 controller 
smc911x: phy initialized 
smc911x: MAC 00:04:9f:00:c3:97 Using 
smc911x-0 device 
TFTP from server 192.168.1.1; our IP address is 192.168.1.2 
Filename 'uImage_mx25'. 
Load address: 0x80100000 
Loading: ################################################################# 
             ################################################################# 
             ################################################################# 
             ################################################################# 
             ################################################################# 
             ################################################################# 
             ##### 
done 
Bytes transferred = 2022396 (1edbfc hex)

6 - Write the uImage to the SD:

MX25 U-Boot > mmc write 0 0x80100000 0x800 0x1000  

MMC write: dev # 0, block # 2048, count 4096 ... 4096 blocks written: OK

7 - Turn off the board and connect SD card to your host. Create partitions and copy the rootfs to the SD as per instructions posted here (See Creating RedBoot kernel partition and Creating the Root File System).

 

8 - Insert the SD on the target board and boot from it again. Stop at u-boot prompt:

MX25 U-Boot > 

9 - Enter the kernel command line on bootargs variable:

MX25 U-Boot > setenv bootargs console=ttymxc0,115200 root=/dev/mmcblk0p2 
MX25 U-Boot > saveenv

10 - Read the kernel previously stored on the SD.

MX25 U-Boot > mmc read 0 0x80100000 0x800 0x1000  

MMC read: dev # 0, block # 2048, count 4096 ... 4096 blocks read: OK

11- Boot it!

MX25 U-Boot > bootm 0x80100000 

12 - You can optionally make a boot script, back on u-boot prompt:

MX25 U-Boot > setenv boot_sd 'mmc read 0 0x80100000 0x800 0x1000; bootm 0x80100000' 
MX25 U-Boot > setenv bootcmd run boot_sd 
MX25 U-Boot > saveenv


Attachments

    Outcomes