I.MX31 ADS Installing Uboot

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

I.MX31 ADS Installing Uboot

I.MX31 ADS Installing Uboot

If you already followed the i.MX31ADS Compiling Uboot steps or got a compiled U-boot image, copy u-boot.bin to /tftpboot:

 $ cp u-boot.bin /tftpboot 

If you have RedBoot on your board follow the "Installing RedBoot using U-Boot", but if you already have been installed U-Boot and are just installing a new version jump to "Installing U-Boot using U-Boot".

Installing U-Boot using RedBoot

Load the U-boot image to board RAM:

 RedBoot> load -v -r -b 0x100000 /tftpboot/u-boot.bin -h 10.29.244.27 

Where:

0x100000 is the memory position where the firmware image will be downloaded;

10.29.244.27 is your host IP which is running the TFTP server.

Erase the Flash:

 RedBoot> fis erase -f 0xA0000000 -l 0x00040000 

To make sure about what area you should erase, perform the fis list command and compare the areas

Write the image to Flash:

 RedBoot> fis write -f 0xA0000000 -b 0x100000 -l 0x00040000 

Reset the board:

 RedBoot> reset 

You should see something like this:

U-Boot 1.3.3 (May 26 2008 - 11:19:43)

CPU: Freescale i.MX31 at 531 MHz

Board: MX31ADS

DRAM: 128 MB

Flash: 32 MB

In: serial

Out: serial

Err: serial

Hit any key to stop autoboot: 0

=>

Installing U-Boot using U-Boot

First upload the U-Boot firmware using Network (Transferring file over network ) or Serial (Transferring File Over Serial)


This is a common serial transfer output:

=> loady

## Ready for binary (ymodem) download to 0x80800000 at 115200 bps...

CCmode, 1359(SOH)/0(STX)/0(CAN) packets, 9 retries

## Total Size = 0x0002a388 = 172936 Bytes

Unprotect the bootloader flash area:

protect off A0000000 A003FFFF 

Erase the flash blocks:

erase A0000000 A003FFFF 

Copy from RAM to Flash: If firmware has been thansfered over serial:

cp.b 80800000 A0000000 2a388 

If firmware has been transfered over tftp:

cp.b 100000 A0000000 2a388

Installing U-Boot using OpenOCD JTAG/GDB

To do that you need to compile U-Boot with this define:

#define CONFIG_SKIP_LOWLEVEL_INIT 1 

Then enter in GDB and execute:

(arm-gdb) restore u-boot.bin binary 0x87f00000

Restoring binary file u-boot.bin into memory (0x87f00000 to 0x87f2c790)

(arm-gdb) set $pc = 0x87f00000

(arm-gdb) c

You will see U-Boot starting in the serial console. Then compile a new U-Boot without the CONFIG_SKIP_LOWLEVEL_INIT and follow the Installing U-Boot using U-Boot to install U-Boot in the flash.

Installing U-Boot using LogicLoader

losh> ifconfig sm0 dhcp 
losh> load raw 0x81000000 115764 /tftp/10.29.244.27:u-boot.bin.lite 
losh> exec 0x81000000 - 


Comments

I'm trying to run U-boot with starting address in middle of DDR RAM, instead of flash ROM.  It starts to run from 0xA0100000 just fine, but somewhere in the relocation code (crt0_64.S) it gets a Sync exception.  I'm going to try the below option tomorrow, hopefully disabling the remap might help.  

#define CONFIG_SKIP_LOWLEVEL_INIT 1 
%3CLINGO-SUB%20id%3D%22lingo-sub-1106624%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EI.MX31%20ADS%20Installing%20Uboot%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1106624%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CDIV%3E%3CP%3EIf%20you%20already%20followed%20the%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Fdocs%2FDOC-1309%22%20target%3D%22_blank%22%3Ei.MX31ADS%20Compiling%20Uboot%3C%2FA%3E%20steps%20%3CSPAN%20style%3D%22font-size%3A%2010pt%3B%20line-height%3A%201.5em%3B%22%3Eor%20got%20a%20compiled%20U-boot%20image%2C%20copy%20u-boot.bin%20to%20%2Ftftpboot%3A%3C%2FSPAN%3E%3C%2FP%3E%3CPRE%20class%3D%22jive-pre%22%3E%20%24%20cp%20u-boot.bin%20%2Ftftpboot%20%3C%2FPRE%3E%3CP%3EIf%20you%20have%20RedBoot%20on%20your%20board%20follow%20the%20%22Installing%20RedBoot%20using%20U-Boot%22%2C%20but%20if%20you%20already%20have%20been%20installed%20U-Boot%20and%20are%20just%20installing%20a%20new%20version%20jump%20to%20%22Installing%20U-Boot%20using%20U-Boot%22.%3C%2FP%3E%3CH3%20id%3D%22toc-hId-1081734131%22%20id%3D%22toc-hId-1081734131%22%20id%3D%22toc-hId-1998758028%22%3E%3CSPAN%20class%3D%22mw-headline%22%3EInstalling%20U-Boot%20using%20RedBoot%20%3C%2FSPAN%3E%3C%2FH3%3E%3CP%3E%3C%2FP%3E%3CP%3ELoad%20the%20U-boot%20image%20to%20board%20RAM%3A%3C%2FP%3E%3CPRE%20class%3D%22jive-pre%22%3E%20RedBoot%26gt%3B%20load%20-v%20-r%20-b%200x100000%20%2Ftftpboot%2Fu-boot.bin%20-h%2010.29.244.27%20%3C%2FPRE%3E%3CP%3EWhere%3A%3C%2FP%3E%3CP%3E0x100000%20is%20the%20memory%20position%20where%20the%20firmware%20image%20will%20be%20downloaded%3B%3C%2FP%3E%3CP%3E10.29.244.27%20is%20your%20host%20IP%20which%20is%20running%20the%20TFTP%20server.%3C%2FP%3E%3CP%3EErase%20the%20Flash%3A%3C%2FP%3E%3CPRE%20class%3D%22jive-pre%22%3E%20RedBoot%26gt%3B%20fis%20erase%20-f%200xA0000000%20-l%200x00040000%20%3C%2FPRE%3E%3CP%3ETo%20make%20sure%20about%20what%20area%20you%20should%20erase%2C%20perform%20the%20fis%20list%20command%20and%20compare%20the%20areas%3C%2FP%3E%3CP%3EWrite%20the%20image%20to%20Flash%3A%3C%2FP%3E%3CPRE%20class%3D%22jive-pre%22%3E%20RedBoot%26gt%3B%20fis%20write%20-f%200xA0000000%20-b%200x100000%20-l%200x00040000%20%3C%2FPRE%3E%3CP%3EReset%20the%20board%3A%3C%2FP%3E%3CPRE%20class%3D%22jive-pre%22%3E%20RedBoot%26gt%3B%20reset%20%3C%2FPRE%3E%3CP%3EYou%20should%20see%20something%20like%20this%3A%3C%2FP%3E%3CBLOCKQUOTE%20class%3D%22jive-quote%22%3E%3CP%3EU-Boot%201.3.3%20(May%2026%202008%20-%2011%3A19%3A43)%3C%2FP%3E%3CP%3ECPU%3A%20Freescale%20i.MX31%20at%20531%20MHz%3C%2FP%3E%3CP%3EBoard%3A%20MX31ADS%3C%2FP%3E%3CP%3EDRAM%3A%20128%20MB%3C%2FP%3E%3CP%3EFlash%3A%2032%20MB%3C%2FP%3E%3CP%3EIn%3A%20serial%3C%2FP%3E%3CP%3EOut%3A%20serial%3C%2FP%3E%3CP%3EErr%3A%20serial%3C%2FP%3E%3CP%3EHit%20any%20key%20to%20stop%20autoboot%3A%200%3C%2FP%3E%3CP%3E%3D%26gt%3B%3C%2FP%3E%3C%2FBLOCKQUOTE%3E%3CH3%20id%3D%22toc-hId--725720332%22%20id%3D%22toc-hId--725720332%22%20id%3D%22toc-hId-191303565%22%3E%3CSPAN%20class%3D%22mw-headline%22%3EInstalling%20U-Boot%20using%20U-Boot%20%3C%2FSPAN%3E%3C%2FH3%3E%3CP%3E%3C%2FP%3E%3CP%3EFirst%20upload%20the%20U-Boot%20firmware%20using%20Network%20(%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Fdocs%2FDOC-1293%22%20target%3D%22_blank%22%3ETransferring%20file%20over%20network%3C%2FA%3E%20)%20or%20Serial%20(%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Fdocs%2FDOC-1292%22%20target%3D%22_blank%22%3ETransferring%20File%20Over%20Serial%3C%2FA%3E)%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E%20This%20is%20a%20common%20serial%20transfer%20output%3A%3C%2FP%3E%3CBLOCKQUOTE%20class%3D%22jive-quote%22%3E%3CP%3E%3D%26gt%3B%20loady%3C%2FP%3E%3CP%3E%23%23%20Ready%20for%20binary%20(ymodem)%20download%20to%200x80800000%20at%20115200%20bps...%3C%2FP%3E%3CP%3ECCmode%2C%201359(SOH)%2F0(STX)%2F0(CAN)%20packets%2C%209%20retries%3C%2FP%3E%3CP%3E%23%23%20Total%20Size%20%3D%200x0002a388%20%3D%20172936%20Bytes%3C%2FP%3E%3C%2FBLOCKQUOTE%3E%3CP%3EUnprotect%20the%20bootloader%20flash%20area%3A%3C%2FP%3E%3CPRE%20class%3D%22jive-pre%22%3Eprotect%20off%20A0000000%20A003FFFF%20%3C%2FPRE%3E%3CP%3EErase%20the%20flash%20blocks%3A%3C%2FP%3E%3CPRE%20class%3D%22jive-pre%22%3Eerase%20A0000000%20A003FFFF%20%3C%2FPRE%3E%3CP%3ECopy%20from%20RAM%20to%20Flash%3A%20If%20firmware%20has%20been%20thansfered%20over%20serial%3A%3C%2FP%3E%3CPRE%20class%3D%22jive-pre%22%3Ecp.b%2080800000%20A0000000%202a388%20%3C%2FPRE%3E%3CP%3EIf%20firmware%20has%20been%20transfered%20over%20tftp%3A%3C%2FP%3E%3CPRE%20class%3D%22jive-pre%22%3Ecp.b%20100000%20A0000000%202a388%3C%2FPRE%3E%3CP%3E%3C%2FP%3E%3CH3%20id%3D%22toc-hId-1761792501%22%20id%3D%22toc-hId-1761792501%22%20id%3D%22toc-hId--1616150898%22%3E%3CSPAN%20class%3D%22mw-headline%22%3EInstalling%20U-Boot%20using%20OpenOCD%20JTAG%2FGDB%20%3C%2FSPAN%3E%3C%2FH3%3E%3CP%3E%3C%2FP%3E%3CP%3ETo%20do%20that%20you%20need%20to%20compile%20U-Boot%20with%20this%20define%3A%3C%2FP%3E%3CPRE%20class%3D%22jive-pre%22%3E%23define%20CONFIG_SKIP_LOWLEVEL_INIT%201%20%3C%2FPRE%3E%3CP%3EThen%20enter%20in%20GDB%20and%20execute%3A%3C%2FP%3E%3CBLOCKQUOTE%20class%3D%22jive-quote%22%3E%3CP%3E(arm-gdb)%20restore%20u-boot.bin%20binary%200x87f00000%3C%2FP%3E%3CP%3ERestoring%20binary%20file%20u-boot.bin%20into%20memory%20(0x87f00000%20to%200x87f2c790)%3C%2FP%3E%3CP%3E(arm-gdb)%20set%20%24pc%20%3D%200x87f00000%3C%2FP%3E%3CP%3E(arm-gdb)%20c%3C%2FP%3E%3C%2FBLOCKQUOTE%3E%3CP%3EYou%20will%20see%20U-Boot%20starting%20in%20the%20serial%20console.%20Then%20compile%20a%20new%20U-Boot%20without%20the%20CONFIG_SKIP_LOWLEVEL_INIT%20and%20follow%20the%20%3CSTRONG%3EInstalling%20U-Boot%20using%20U-Boot%3C%2FSTRONG%3E%20to%20install%20U-Boot%20in%20the%20flash.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CH3%20id%3D%22toc-hId--45661962%22%20id%3D%22toc-hId--45661962%22%20id%3D%22toc-hId-871361935%22%3E%3CSPAN%20class%3D%22mw-headline%22%3EInstalling%20U-Boot%20using%20LogicLoader%20%3C%2FSPAN%3E%3C%2FH3%3E%3CP%3E%3C%2FP%3E%3CPRE%20class%3D%22jive-pre%22%3Elosh%26gt%3B%20ifconfig%20sm0%20dhcp%20%3C%2FPRE%3E%3CPRE%20class%3D%22jive-pre%22%3Elosh%26gt%3B%20load%20raw%200x81000000%20115764%20%2Ftftp%2F10.29.244.27%3Au-boot.bin.lite%20%3C%2FPRE%3E%3CPRE%20class%3D%22jive-pre%22%3Elosh%26gt%3B%20exec%200x81000000%20-%20%3C%2FPRE%3E%3CP%3E%3CSPAN%20class%3D%22mce_paste_marker%22%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1106625%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20I.MX31%20ADS%20Installing%20Uboot%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1106625%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI'm%20trying%20to%20run%20U-boot%20with%20starting%20address%20in%20middle%20of%20DDR%20RAM%2C%20instead%20of%20flash%20ROM.%26nbsp%3B%20It%20starts%20to%20run%20from%200xA0100000%20just%20fine%2C%20but%20somewhere%20in%20the%20relocation%20code%20(crt0_64.S)%20it%20gets%20a%20Sync%20exception.%26nbsp%3B%20I'm%20going%20to%20try%20the%20below%20option%20tomorrow%2C%20hopefully%20disabling%20the%20remap%20might%20help.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22%22%3E%23define%20CONFIG_SKIP_LOWLEVEL_INIT%201%20%3C%2FPRE%3E%3C%2FLINGO-BODY%3E
No ratings
Version history
Last update:
‎09-10-2020 02:00 AM
Updated by: