Required software on the host PC:
-
imx_usb_loader: https://github.com/boundarydevices/imx_usb_loader
-
dfu-util: http://dfu-util.sourceforge.net/releases/ (if you are in a Debian distribution then you can get it via libdfu-dev package)
-
libusb: http://libusb.org/ (if you are in a Debian distribution then you can get it via libusb-dev and libusb-1.0-0-dev)
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.
-
Remove the CPU board from the base board then put switch 2 in the upper position
-
Reconnect the CPU board to the base board
-
Connect a USB to serial adapter between the host PC and WaRP7 (USB port on the base board)
-
Connect a USB cable between the OTG WaRP7 port and the host PC (USB port on the CPU board)
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
Content based on: http://git.denx.de/?p=u-boot.git;a=blob;f=board/warp7/README
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