Skip to content

Latest commit

 

History

History
107 lines (67 loc) · 3.1 KB

U-boot.adoc

File metadata and controls

107 lines (67 loc) · 3.1 KB

U-Boot

Obtaining an U-Boot image

Required software on the host PC:

Clone U-Boot repository:

$ git clone https://github.com/Freescale/u-boot-fslc.git

Go inside the u-boot-fslc folder, build U-Boot for WaRP7:

$ cd u-boot-fslc/
$ git checkout -b <name_local_branch> origin/2017.11+fslc
$ make mrproper
$ make warp7_secure_defconfig
$ make

This will generate the U-Boot binary called u-boot.imx.

Updating an U-Boot image

Setup WaRP7 for loading U-Boot

  1. Remove the CPU board from the base board then put switch 2 in the upper position

  2. Reconnect the CPU board to the base board

  3. Connect a USB to serial adapter between the host PC and WaRP7 (USB port on the base board)

  4. Connect a USB cable between the OTG WaRP7 port and the host PC (USB port on the CPU board)

Load U-Boot via USB

Copy u-boot.imx to the imx_usb_loader folder.

$ sudo ./imx_usb u-boot.imx

Then U-Boot should start and its messages will appear in the console program.

Open a terminal program such as minicom

Use the default environment variables:

=> env default -f -a
=> saveenv

Run the DFU command:

=> dfu 0 mmc 0

Transfer u-boot.imx that will be flashed into the eMMC:

$ sudo dfu-util -D u-boot.imx -a boot

The following message should be seen on the U-Boot prompt after a successful upgrade:

#DOWNLOAD …​ OK Ctrl+C to exit …​

Remove power from the WaRP7 board.

Put WaRP7 board into normal boot mode (put the switch 2 in the lower position)

Power up the board and the new updated U-Boot should boot from eMMC

Boot partition

It can be the case that the raw partition of your WaRP7 is unlocked. Burning an image that doesn’t contain U-Boot into the eMMC while on this state erases the original U-Boot. To avoid this, the user can run the command below from the U-Boot prompt:

=> mmc partconf 0 1 1 0

This command makes the raw partition read-only and prevents u-boot from being changed.

If you delete U-Boot by mistake and your board does not boot, please load U-boot from your host machine usign imx_usb_loader. Run the command above once you get to the U-boot prompt to prevent U-boot from being deleted again. You can follow the steps in the Load U-Boot via USB section to learn how to boot U-Boot from your host machine.

Inversely if your partition is locked and would like to update U-Boot as described on this chapter, you can unlock the raw partition using the command:

=> mmc partconf 0 1 0 0