Changes between Version 5 and Version 6 of uboot


Ignore:
Timestamp:
04/19/2024 09:29:33 PM (3 weeks ago)
Author:
Tim Harvey
Comment:

add additional comments to installation of split media

Legend:

Unmodified
Added
Removed
Modified
  • uboot

    v5 v6  
    780780 * https://github.com/Gateworks/u-boot-imx6/blob/gateworks_v2015.04/doc/README.NetConsole
    781781
     782
     783[=#split]
    782784== Installing Large Disk Images on Systems with Limited RAM
    783785
     
    785787
    786788=== Spliting the Disk Image Into Segments
    787 Before proceeding with the update process, the disk image needs to be split into smaller parts. This can be achieved using the Linux's split command, making sure to decompress the image if it's compressed. The key requirement for the process outlined here is that the file must be divided into segments that are evenly divisible by 512-byte blocks. This ensures that the subsequent calculation of block count, as demonstrated in the script in the following section. Here are the steps to split our BSP disk image as an example:
     789Before proceeding with the update process, the disk image needs to be split into smaller parts. This can be achieved using the Linux {{{split}}} command, making sure to decompress the image if it's compressed. The key requirement for the process outlined here is that the file must be divided into segments that are evenly divisible by 512-byte blocks (so any multiple of KB or MB is fine). This ensures that the subsequent calculation of block count, as demonstrated in the script in the following section. Here are the steps to split our BSP disk image as an example:
    788790{{{#!bash
    789791# If the image is compressed, extract it first
    790792gunzip jammy-venice.img.gz
    791793
    792 # Split the image into parts of 500MB each
     794# Split the image into parts of 500MB each named 'jammy-venice.img.part<x>'
    793795split -d -b 500M jammy-venice.img jammy-venice.img.part
    794796}}}
     
    827829            setexpr offset ${offset} + ${blkcnt}
    828830            setexpr i ${i} + 1
    829             setexpr rem ${i} % 0x10
    830             itest ${rem} -eq 0x0a && setexpr i ${i} + 6
     831            # setexpr results in a hex number so convert to dec
     832            setexpr rem ${i} % 0x10; itest ${rem} -eq 0x0a && setexpr i ${i} + 6
    831833        else
    832834            echo "Error writing segment ${i} of ${filesize} bytes"
     
    844846}}}
    845847
    846 U-Boot requires scripts to be in a specific binary format for execution. To compile the script into this format, we use the mkimage tool, which is provided as part of the U-Boot distribution.
     848U-Boot requires scripts to be in a specific binary format for execution with the {{{source}}} command. To compile the script into this format, we use the mkimage tool, which is provided as part of the U-Boot distribution.
    847849{{{#!bash
    848850mkimage -A arm64 -T script -C none -d storage_split_update ustorage_split_update
     
    853855{{{#!bash
    854856cp storage_split_update your_tftp_server
    855 
    856857cp jammy-venice.img.part* your_tftp_server
    857858}}}
     
    874875{{{#!bash
    875876#mmc dev <device#> <hardware_partition#>
     877# hardware partition: 0=user 1=boot0 2=boot1
     878u-boot=> mmc list # show mmc devs
    876879u-boot=> mmc dev 2 0
    877880u-boot=> setenv iface mmc
     
    880883{{{#!bash
    881884#usb dev <device#> <hardware_partition#>
    882 u-boot=> usb stop && usb start && usb storage
     885u-boot=> usb stop && usb start && usb storage # scan and show storage devs
    883886u-boot=> usb dev 0 0
    884887u-boot=> setenv iface usb
    885888}}}
     889**For SATA:
     890{{{#!bash
     891#sata dev <device#>
     892u-boot=> sata init && sata device # scan and show storage devs
     893u-boot=> sata dev 0
     894u-boot=> setenv iface sata
     895}}}
    886896**For NVMe:
    887897{{{#!bash
    888898#nvme dev <device#>
    889 u-boot=> pci enum && nvme scan
     899u-boot=> pci enum && nvme scan && nvme info # scan and show storage devs
    890900u-boot=> nvme dev 0
    891901u-boot=> setenv iface nvme