Name |
Date |
Size |
#Lines |
LOC |
||
---|---|---|---|---|---|---|
.. | - | - | ||||
Kconfig | H A D | 25-Apr-2016 | 189 | 16 | 10 | |
MAINTAINERS | H A D | 19-Sep-2018 | 477 | 18 | 15 | |
Makefile | H A D | 19-Sep-2018 | 155 | 6 | 1 | |
README | H A D | 13-Mar-2019 | 4.6 KiB | 160 | 107 | |
imximage.cfg | H A D | 06-May-2018 | 2.4 KiB | 97 | 89 | |
pico-imx6ul.c | H A D | 13-Mar-2019 | 5.3 KiB | 227 | 153 | |
spl.c | H A D | 01-Apr-2019 | 4.1 KiB | 179 | 154 |
README
1 How to Update U-Boot on Pico-imx6ul board 2 ----------------------------------------- 3 4 Required software on the host PC: 5 6 - imx_usb_loader: https://github.com/boundarydevices/imx_usb_loader 7 8 - dfu-util: http://dfu-util.sourceforge.net/releases/ 9 10 Build U-Boot for Pico: 11 12 $ make mrproper 13 $ make pico-imx6ul_defconfig 14 $ make 15 16 This generates the SPL and u-boot-dtb.img binaries. 17 18 1. Loading U-Boot via USB Serial Download Protocol 19 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. 23 24 Put pico board in USB download mode (refer to the document 25 http://www.wandboard.org/images/hobbit/hobbitboard-imx6ul-reva1.pdf 26 page 15). 27 28 Connect a USB to serial adapter between the host PC and pico. 29 30 Connect a USB cable between the OTG pico port and the host PC. 31 32 Open a terminal program such as minicom. 33 34 Copy SPL and u-boot-dtb.img to the imx_usb_loader folder. 35 36 Load the SPL binary via USB: 37 38 $ sudo ./imx_usb SPL 39 40 Load the u-boot-dtb.img binary via USB: 41 42 $ sudo ./imx_usb u-boot-dtb.img 43 44 Then U-Boot starts and its messages appear in the console program. 45 46 Use the default environment variables: 47 48 => env default -f -a 49 => saveenv 50 51 2. Flashing U-Boot into the eMMC 52 53 Run the DFU agent so we can flash the new images using dfu-util tool: 54 55 => dfu 0 mmc 0 56 57 Flash SPL and u-boot-dtb.img into the eMMC running the following commands on a PC: 58 59 $ sudo dfu-util -D SPL -a spl 60 61 $ sudo dfu-util -D u-boot-dtb.img -a u-boot 62 63 Remove power from the pico board. 64 65 Put pico board into normal boot mode. 66 67 Power up the board and the new updated U-Boot should boot from eMMC. 68 69 Booting in Falcon mode 70 ====================== 71 72 Generate a uImage kernel: 73 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). 77 78 $ make -j4 uImage LOADADDR=0x80800000 79 80 $ cp arch/arm/boot/uImage /tftpboot 81 $ cp arch/arm/boot/dts/imx6ul-pico-hobbit.dtb /tftpboot 82 83 In the U-Boot prompt: 84 85 Setup the server and board IP addresses: 86 => setenv serverip 192.168.0.10 87 => setenv ipaddr 192.168.0.11 88 89 Get the dtb file: 90 => tftp ${fdt_addr} imx6ul-pico-hobbit.dtb 91 92 Get the kernel: 93 => tftp ${loadaddr} uImage 94 95 Write the kernel at 2MB offset: 96 => mmc write ${loadaddr} 0x1000 0x4000 97 98 Setup the bootargs: 99 => setenv bootargs 'console=ttymxc5,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait rw' 100 101 Prepare args: 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: 80800000 108 Entry Point: 80800000 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 118 119 Write 1MB of args data (0x800 sectors) to 1MB offset (0x800 sectors): 120 121 => mmc write ${fdt_addr} 0x800 0x800 122 123 In order to boot with Falcon mode, activate the CONFIG_SPL_OS_BOOT 124 option in the defconfig 125 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 130 CONFIG_CI_UDC=y 131 CONFIG_OF_LIBFDT=y 132 +CONFIG_SPL_OS_BOOT=y 133 134 Then rebuild U-Boot: 135 136 $ make pico-hobbit-imx6ul_defconfig 137 $ make -j4 138 139 Launch UMS: 140 => ums 0 mmc 0 141 142 Flash the new binaries: 143 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 146 147 And then SPL binary will load and jump directly to the kernel: 148 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 159 ... 160