Changes between Version 5 and Version 6 of uboot
- Timestamp:
- 04/19/2024 09:29:33 PM (7 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
uboot
v5 v6 780 780 * https://github.com/Gateworks/u-boot-imx6/blob/gateworks_v2015.04/doc/README.NetConsole 781 781 782 783 [=#split] 782 784 == Installing Large Disk Images on Systems with Limited RAM 783 785 … … 785 787 786 788 === 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:789 Before 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: 788 790 {{{#!bash 789 791 # If the image is compressed, extract it first 790 792 gunzip jammy-venice.img.gz 791 793 792 # Split the image into parts of 500MB each 794 # Split the image into parts of 500MB each named 'jammy-venice.img.part<x>' 793 795 split -d -b 500M jammy-venice.img jammy-venice.img.part 794 796 }}} … … 827 829 setexpr offset ${offset} + ${blkcnt} 828 830 setexpr i ${i} + 1 829 setexpr rem ${i} % 0x10830 itest ${rem} -eq 0x0a && setexpr i ${i} + 6831 # setexpr results in a hex number so convert to dec 832 setexpr rem ${i} % 0x10; itest ${rem} -eq 0x0a && setexpr i ${i} + 6 831 833 else 832 834 echo "Error writing segment ${i} of ${filesize} bytes" … … 844 846 }}} 845 847 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.848 U-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. 847 849 {{{#!bash 848 850 mkimage -A arm64 -T script -C none -d storage_split_update ustorage_split_update … … 853 855 {{{#!bash 854 856 cp storage_split_update your_tftp_server 855 856 857 cp jammy-venice.img.part* your_tftp_server 857 858 }}} … … 874 875 {{{#!bash 875 876 #mmc dev <device#> <hardware_partition#> 877 # hardware partition: 0=user 1=boot0 2=boot1 878 u-boot=> mmc list # show mmc devs 876 879 u-boot=> mmc dev 2 0 877 880 u-boot=> setenv iface mmc … … 880 883 {{{#!bash 881 884 #usb dev <device#> <hardware_partition#> 882 u-boot=> usb stop && usb start && usb storage 885 u-boot=> usb stop && usb start && usb storage # scan and show storage devs 883 886 u-boot=> usb dev 0 0 884 887 u-boot=> setenv iface usb 885 888 }}} 889 **For SATA: 890 {{{#!bash 891 #sata dev <device#> 892 u-boot=> sata init && sata device # scan and show storage devs 893 u-boot=> sata dev 0 894 u-boot=> setenv iface sata 895 }}} 886 896 **For NVMe: 887 897 {{{#!bash 888 898 #nvme dev <device#> 889 u-boot=> pci enum && nvme scan 899 u-boot=> pci enum && nvme scan && nvme info # scan and show storage devs 890 900 u-boot=> nvme dev 0 891 901 u-boot=> setenv iface nvme