1 How to Update U-Boot on Pico-imx6ul board
2 -----------------------------------------
4 Required software on the host PC:
6 - imx_usb_loader: https://github.com/boundarydevices/imx_usb_loader
8 - dfu-util: http://dfu-util.sourceforge.net/releases/
10 Build U-Boot for Pico:
13 $ make pico-imx6ul_defconfig
16 This generates the SPL and u-boot-dtb.img binaries.
18 1. Loading U-Boot via USB Serial Download Protocol
20 Note: This method is convenient for development purposes.
21 If the eMMC has already a U-Boot flashed with DFU support then
22 the user can go to step 2 below in order to update U-Boot.
24 Put pico board in USB download mode (refer to the document
25 http://www.wandboard.org/images/hobbit/hobbitboard-imx6ul-reva1.pdf
28 Connect a USB to serial adapter between the host PC and pico.
30 Connect a USB cable between the OTG pico port and the host PC.
32 Open a terminal program such as minicom.
34 Copy SPL and u-boot-dtb.img to the imx_usb_loader folder.
36 Load the SPL binary via USB:
40 Load the u-boot-dtb.img binary via USB:
42 $ sudo ./imx_usb u-boot-dtb.img
44 Then U-Boot starts and its messages appear in the console program.
46 Use the default environment variables:
51 2. Flashing U-Boot into the eMMC
53 Run the DFU agent so we can flash the new images using dfu-util tool:
57 Flash SPL and u-boot-dtb.img into the eMMC running the following commands on a PC:
59 $ sudo dfu-util -D SPL -a spl
61 $ sudo dfu-util -D u-boot-dtb.img -a u-boot
63 Remove power from the pico board.
65 Put pico board into normal boot mode.
67 Power up the board and the new updated U-Boot should boot from eMMC.
69 Booting in Falcon mode
70 ======================
72 Generate a uImage kernel:
74 $ make imx_v6_v7_defconfig (Using the default imx_v6_v7_defconfig configuration
75 just for an example. In order to boot faster the user should customize the
76 defconfig by only enabling the minimal required drivers).
78 $ make -j4 uImage LOADADDR=0x80008000
80 $ cp arch/arm/boot/uImage /tftpboot
81 $ cp arch/arm/boot/dts/imx6ul-pico-hobbit.dtb /tftpboot
85 Setup the server and board IP addresses:
86 => setenv serverip 192.168.0.10
87 => setenv ipaddr 192.168.0.11
90 => tftp ${fdt_addr} imx6ul-pico-hobbit.dtb
93 => tftp ${loadaddr} uImage
95 Write the kernel at 2MB offset:
96 => mmc write ${loadaddr} 0x1000 0x5000
99 => setenv bootargs 'console=ttymxc5,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait rw'
102 => spl export fdt ${loadaddr} - ${fdt_addr}
103 ## Booting kernel from Legacy Image at 82000000 ...
104 Image Name: Linux-4.19.0-rc2-next-20180905-0
105 Image Type: ARM Linux Kernel Image (uncompressed)
106 Data Size: 8365608 Bytes = 8 MiB
107 Load Address: 80008000
108 Entry Point: 80008000
109 Verifying Checksum ... OK
110 ## Flattened Device Tree blob at 83000000
111 Booting using the fdt blob at 0x83000000
112 Loading Kernel Image ... OK
113 Using Device Tree in place at 83000000, end 83009c63
114 subcommand not supported
115 subcommand not supported
116 Using Device Tree in place at 83000000, end 8300cc63
117 Argument image is now in RAM: 0x83000000
119 Write 1MB of args data (0x800 sectors) to 1MB offset (0x800 sectors):
121 => mmc write ${fdt_addr} 0x800 0x800
123 In order to boot with Falcon mode, activate the CONFIG_SPL_OS_BOOT
124 option in the defconfig
126 --- a/configs/pico-hobbit-imx6ul_defconfig
127 +++ b/configs/pico-hobbit-imx6ul_defconfig
128 @@ -53,3 +53,4 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525
129 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
132 +CONFIG_SPL_OS_BOOT=y
136 $ make pico-hobbit-imx6ul_defconfig
142 Flash the new binaries:
144 $ sudo dd if=SPL of=/dev/sdX bs=1k seek=1; sync
145 $ sudo dd if=u-boot-dtb.img of=/dev/sdX bs=1k seek=69; sync
147 And then SPL binary will load and jump directly to the kernel:
149 U-Boot SPL 2018.09-rc2-00156-g8c46f15-dirty (Sep 05 2018 - 16:24:05 -0300)
150 Trying to boot from MMC1
151 [ 0.000000] Booting Linux on physical CPU 0x0
152 [ 0.000000] Linux version 4.19.0-rc2-next-20180905-00001-gb805e2d (fabio@fabio-Latitude-E5450) (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9)) #533 SMP Wed Sep 5 16:21:03 -03 2018
153 [ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
154 [ 0.000000] CPU: div instructions available: patching division code
155 [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
156 [ 0.000000] OF: fdt: Machine model: Technexion Pico i.MX6UL Board
157 [ 0.000000] Memory policy: Data cache writealloc
158 [ 0.000000] cma: Reserved 64 MiB at 0x8c000000