sb_loader question

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

sb_loader question

Jump to solution
4,748 Views
EdSutter
Senior Contributor II

Is there any documentation on the sb_loader tool that comes with the mfgtools stuff?

I've been building on Linux and using the tool from boundary-devices (imx_usb) to pump my board,

but I also need to build my bootloader on a Windows host, so I'd like to be able to pump my board from

windows as well (unfortunately imx_usb doesn't work on windows).

I know I could use the MFGTools GUI, but I'd prefer to have a command line hook so I can just throw

the command into my makefile.  Anyway, I found sb_loader and just run "sb_loader -f BINFILE" to load

my board (imx6SDB).  It *basically* works; however, I noticed that some of the data area is not what it

should be.  I went back to the Linux setup and used imx_usb to download the exact same file and it

worked fine (no noticeable data corruption).

So, I see in other posts that folks use sb_loader -f filename.sb.  What is an ".sb" file?

Note that I just passed sb_loader my binary image; which *basically* works; except

for some strange reason some data area is munged.

Thanks for any pointers to sb_loader documentation or any other hints!!

Ed

Labels (1)
Tags (1)
0 Kudos
1 Solution
1,223 Views
Yuri
NXP Employee
NXP Employee

The only available information (in addition to sb_loader internal help) is the User Guide below :

The tool is used to download an image to target platform to run. At present, the tool supports mx23/28/508 platforms.

Please run the tool in a command line environment:

1. Open a command window

2. Enter the dir in which sb_loader.exe locates

3. Copy your image to the same dir

For mx28, the command is like this:

sb_loader -f xxx.sb

For mx23, the command is like this:

sb_loader -f xxx.sb

For mx508, the command is more complicated:

If only one image needs to be downloaded, then just use below command:

sb_loader -f xxx.xxx

If you need to download multiple images and run them, then a bunch of commands must be executed one by one to finish the whole work, Let's give an example to explain this:

sb_loader -nojump -f eboot.nb0

sb_loader -trans 0x70200000 -f nk.nb0

sb_loader -exec 0x70041800

In this example, eboot.nb0 and nk.nb0 are downloaded and run from address 0x70041800.

First command: the command is used to extract plugin from image eboot.nb0 and run the plugin. Parameter "nojump" indicates ROM will not jump into eboot.nb0 and and run it.

Second command: the command is used to transfer an image to RAM of target platform. Parameter "0x70200000" is the starting physical address of the image is stored in RAM, change it according to your image setting. Parameter "nk.nb0" is the name of your image.The command can be executed for multiple times if you have multiple images need to be downloaded.

Last command: the command is used to run an image in RAM.  Parameter "0x70041800" is the physical address of the first instruct of the image where ROM will jump and run in RAM.

Also note, recent sb_loader release supports i.MX6.

Some information about .sb (secure boot) may be found in i.MX28 Reference Manual.
( section 12.8 Constructing Boot Image (SB Files) to Be Loaded by ROM).

http://cache.freescale.com/files/dsp/doc/ref_manual/MCIMX28RM.pdf?fpsp=1

View solution in original post

0 Kudos
2 Replies
1,223 Views
tommalnar
Contributor III

Is there an updated version of the tool to support i.MX6QP? 

I get the following error using the tool on i.MX6QP:

...

Reg 0x21b0040 is initialized.

Reg 0x21b0000 is initialized.

Failed to initialize memory!

  Failed to run plugin images\2015_07_15001\u-boot.nitrogen6qp_max to the device.

I suspect the tool doesn't properly support the i.MX6QP memory?

0 Kudos
1,224 Views
Yuri
NXP Employee
NXP Employee

The only available information (in addition to sb_loader internal help) is the User Guide below :

The tool is used to download an image to target platform to run. At present, the tool supports mx23/28/508 platforms.

Please run the tool in a command line environment:

1. Open a command window

2. Enter the dir in which sb_loader.exe locates

3. Copy your image to the same dir

For mx28, the command is like this:

sb_loader -f xxx.sb

For mx23, the command is like this:

sb_loader -f xxx.sb

For mx508, the command is more complicated:

If only one image needs to be downloaded, then just use below command:

sb_loader -f xxx.xxx

If you need to download multiple images and run them, then a bunch of commands must be executed one by one to finish the whole work, Let's give an example to explain this:

sb_loader -nojump -f eboot.nb0

sb_loader -trans 0x70200000 -f nk.nb0

sb_loader -exec 0x70041800

In this example, eboot.nb0 and nk.nb0 are downloaded and run from address 0x70041800.

First command: the command is used to extract plugin from image eboot.nb0 and run the plugin. Parameter "nojump" indicates ROM will not jump into eboot.nb0 and and run it.

Second command: the command is used to transfer an image to RAM of target platform. Parameter "0x70200000" is the starting physical address of the image is stored in RAM, change it according to your image setting. Parameter "nk.nb0" is the name of your image.The command can be executed for multiple times if you have multiple images need to be downloaded.

Last command: the command is used to run an image in RAM.  Parameter "0x70041800" is the physical address of the first instruct of the image where ROM will jump and run in RAM.

Also note, recent sb_loader release supports i.MX6.

Some information about .sb (secure boot) may be found in i.MX28 Reference Manual.
( section 12.8 Constructing Boot Image (SB Files) to Be Loaded by ROM).

http://cache.freescale.com/files/dsp/doc/ref_manual/MCIMX28RM.pdf?fpsp=1

0 Kudos