How to upgrade U-Boot
Yet another manual about upgrading U-Boot on your development board.
With a Boundary Devices i.MX6 SABRE Lite device as an example.
u-boot.nitrogen6qfrom https://boundarydevices.com/u-boot-v2018-07/ (or later).
Copy both files to an SD (or microSD) card:
In some cases files have to be renamed (sometimes it’s upgrade script, sometimes it’s U-Boot binary), and it varies depending on the U-Boot version you have on the device at the moment.
Insert card into device and connect it to your computer (without powering it up) via console cable and find out which
/dev/ttyUSB it is connected to:
$ dmesg | tail [ +5,149685] usb 3-3: new full-speed USB device number 14 using xhci_hcd [ +0,148965] usb 3-3: New USB device found, idVendor=0557, idProduct=2008 [ +0,000005] usb 3-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ +0,000003] usb 3-3: Product: USB-Serial Controller D [ +0,000003] usb 3-3: Manufacturer: Prolific Technology Inc. [ +0,000679] pl2303 3-3:1.0: pl2303 converter detected [ +0,000700] usb 3-3: pl2303 converter now attached to ttyUSB0 $ ls -l /dev/ttyUSB* crw-rw---- 1 root dialout 188, 0 Oct 11 13:54 /dev/ttyUSB0
Regarding console cable: some devices have it right on the board as an additional microUSB port, but some only offer a COM interface, so you’ll need to have a RS232-to-USB/PL2303 converter in case your computer doesn’t have a COM port:
sudo screen /dev/ttyUSB0 115200
Power up the device and interrupt the autoboot:
CPU: Freescale i.MX6Q rev1.2 at 792 MHz Reset cause: POR Board: sabrelite I2C: ready DRAM: 1 GiB MMC: FSL_SDHC: 0, FSL_SDHC: 1 Loading Environment from SPI Flash... SF: Detected sst25vf016b with page size 256 Bytes, erase size 4 KiB, total 2 MiB OK auto-detected panel 1280x720M@60 Display: hdmi:1280x720M@60 (1280x720) In: serial Out: serial Err: serial Net: Micrel ksz9021 at 6 FEC [PRIME], usb_ether Hit any key to stop autoboot: 3
Start the upgrading process:
=> run upgradeu AHCI 0001.0300 32 slots 1 ports 3 Gbps 0x1 impl SATA mode flags: ncq stag pm led clo only pmp pio slum part No port device detected! ** Bad device size - sata 0 ** ** Bad device size - sata 0 ** SATA device 1: unknown device ** Bad device sata 1 ** MMC: no card present MMC: no card present ** Bad device mmc 0 ** switch to partitions #0, OK mmc1 is current device reading /6x_upgrade 3626 bytes read in 16 ms (220.7 KiB/s) ## Executing script at 10008000 SF: Detected SST25VF016B with page size 256 Bytes, erase size 4 KiB, total 2 MiB probed SPI ROM check U-Boot reading u-boot.nitrogen6q 560128 bytes read in 52 ms (10.3 MiB/s) read 88c00 bytes from SD card device 0 offset 0x400, size 0x88c00 SF: 560128 bytes @ 0x400 Read: OK byte at 0x12000425 (0x90) != byte at 0x12400425 (0x0) Total of 37 byte(s) were the same Need U-Boot upgrade Program in 5 seconds 5 4 3 2 1 erasing SF: 786432 bytes @ 0x0 Erased: OK programming device 0 offset 0x800, size 0x88800 SF: 559104 bytes @ 0x800 Written: OK device 0 offset 0x400, size 0x400 SF: 1024 bytes @ 0x400 Written: OK verifying device 0 offset 0x400, size 0x88c00 SF: 560128 bytes @ 0x400 Read: OK Total of 560128 byte(s) were the same ---- U-Boot upgraded. reset
Reboot the device and note the upgraded U-Boot version:
U-Boot 2018.07-35363-gf35ba6c (Oct 02 2018 - 14:44:30 -0700), Build: jenkins-uboot_v2018.07-24
Zuck: Just ask
Zuck: I have over 4,000 emails, pictures, addresses, SNS
smb: What? How'd you manage that one?
Zuck: People just submitted it.
Zuck: I don't know why.
Zuck: They "trust me"
Zuck: Dumb fucks