en:uboot
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
en:uboot [2024/04/07 10:52] – created frank | en:uboot [2024/04/07 13:07] (current) – [U-Boot] frank | ||
---|---|---|---|
Line 4: | Line 4: | ||
it needs a bit of time to add all into this page... | it needs a bit of time to add all into this page... | ||
+ | My U-Boot source (with prebuilt binaries in releases): | ||
+ | |||
+ | https:// | ||
===== board specific pages ===== | ===== board specific pages ===== | ||
Line 13: | Line 16: | ||
* [[.: | * [[.: | ||
- | ===== load files ===== | + | my u-boot have builtin environment created by the uEnv_r*.txt which can be overridden by an uEnv.txt file when kernel-files (r2/r64: bananapi/ |
+ | ===== load/write data ===== | ||
+ | |||
+ | listing | ||
+ | |||
+ | ls mmc 0:5 folder | ||
+ | |||
+ | basicly load works from fat partitions with the following syntax (ext4 should work too, but with [[https:// | ||
+ | |||
+ | loading files (mmc=subsystem, | ||
+ | |||
+ | fatload mmc 0:5 $loadaddr filename | ||
+ | |||
+ | most complete page for writing to a device (including nand/nor) is [[.: | ||
+ | ==== mmc ==== | ||
+ | |||
+ | |||
+ | all BPI-Router boards (R3+R4 have only 1 mmc controller so it is based on hardware switches which is available) | ||
+ | |||
+ | < | ||
+ | U-Boot> mmc list | ||
+ | mmc@11230000: | ||
+ | mmc@11240000: | ||
+ | |||
+ | #set mmc-device | ||
+ | U-Boot> mmc dev 1 | ||
+ | |||
+ | #read current device | ||
+ | U-Boot> mmc dev | ||
+ | switch to partitions #0, OK | ||
+ | mmc1 is current device | ||
+ | |||
+ | U-Boot> mmcinfo | ||
+ | Device: mmc@11240000 | ||
+ | Manufacturer ID: 1b | ||
+ | OEM: 534d | ||
+ | Name: 00000 | ||
+ | Bus Speed: 50000000 | ||
+ | Mode : SD High Speed (50MHz) | ||
+ | Rd Block Len: 512 | ||
+ | SD version 2.0 | ||
+ | High Capacity: Yes | ||
+ | Capacity: 7.6 GiB | ||
+ | Bus Width: 4-bit | ||
+ | Erase Group Size: 512 Bytes | ||
+ | |||
+ | ls mmc 0:1 | ||
+ | </ | ||
+ | |||
+ | loading files (0=device, 5=partition): | ||
+ | |||
+ | fatload mmc 0:5 $loadaddr filename | ||
+ | |||
+ | === eMMC === | ||
+ | |||
+ | < | ||
+ | # | ||
+ | #mmc partconf dev [boot_ack boot_partition partition_access] | ||
+ | # - Show or change the bits of the PARTITION_CONFIG field of the specified device | ||
+ | #example for mode 0x48 (needed for emmc-boot on bpi-r2) | ||
+ | U-Boot> mmc partconf 0 | ||
+ | EXT_CSD[179], | ||
+ | BOOT_ACK: 0x1 | ||
+ | BOOT_PARTITION_ENABLE: | ||
+ | PARTITION_ACCESS: | ||
+ | |||
+ | #set via | ||
+ | U-Boot> mmc partconf 0 1 1 0 | ||
+ | </ | ||
+ | |||
+ | ==== usb ==== | ||
+ | |||
+ | all BPI-Router boards | ||
+ | |||
+ | < | ||
+ | BPI-R2> usb start | ||
+ | starting USB... | ||
+ | Bus usb@1a1c0000: | ||
+ | u2p:1, u3p:1 | ||
+ | Register 200010f NbrPorts 2 | ||
+ | Starting the controller | ||
+ | USB XHCI 0.96 | ||
+ | Bus usb@1a240000: | ||
+ | u2p:1, u3p:1 | ||
+ | Register 200010f NbrPorts 2 | ||
+ | Starting the controller | ||
+ | USB XHCI 0.96 | ||
+ | scanning bus usb@1a1c0000 for devices... 1 USB Device(s) found | ||
+ | scanning bus usb@1a240000 for devices... 2 USB Device(s) found | ||
+ | | ||
+ | BPI-R2> usb tree | ||
+ | USB device tree: | ||
+ | 1 Hub (5 Gb/s, 0mA) | ||
+ | | ||
+ | |||
+ | 1 Hub (5 Gb/s, 0mA) | ||
+ | | U-Boot XHCI Host Controller | ||
+ | | | ||
+ | +-2 Mass Storage (480 Mb/s, 200mA) | ||
+ | | ||
+ | |||
+ | BPI-R2> ls usb 0:1 | ||
+ | efi/ | ||
+ | 4767728 | ||
+ | |||
+ | 1 file(s), 1 dir(s) | ||
+ | </ | ||
+ | |||
+ | loading files: | ||
+ | |||
+ | fatload usb 0:1 $loadaddr filename | ||
+ | ==== sata ==== | ||
+ | |||
+ | BPI-R2, | ||
+ | |||
+ | < | ||
+ | BPI-R2> pci enum | ||
+ | BPI-R2> pci 0 | ||
+ | Scanning PCI devices on bus 0 | ||
+ | BusDevFun | ||
+ | _____________________________________________________________ | ||
+ | 00.00.00 | ||
+ | 00.01.00 | ||
+ | BPI-R2> pci 1 | ||
+ | Scanning PCI devices on bus 1 | ||
+ | BusDevFun | ||
+ | _____________________________________________________________ | ||
+ | 01.00.00 | ||
+ | BPI-R2> pci 2 | ||
+ | Scanning PCI devices on bus 2 | ||
+ | BusDevFun | ||
+ | _____________________________________________________________ | ||
+ | 02.00.00 | ||
+ | BPI-R2> scsi scan | ||
+ | scanning bus for devices... | ||
+ | SATA link 0 timeout. | ||
+ | Target spinup took 0 ms. | ||
+ | AHCI 0001.0200 32 slots 2 ports 6 Gbps 0x3 impl SATA mode | ||
+ | flags: 64bit ncq stag led clo pmp pio slum part ccc sxs | ||
+ | Device 0: (1:0) Vendor: ATA Prod.: ST750LM022 HN-M7 Rev: 2AR1 | ||
+ | Type: Hard Disk | ||
+ | Capacity: 715404.8 MB = 698.6 GB (1465149168 x 512) | ||
+ | BPI-R2> ls scsi 0:1 | ||
+ | </ | ||
+ | ==== nvme ==== | ||
+ | |||
+ | BPI-R3(mini), | ||
+ | |||
+ | < | ||
+ | BPI-R3M> pci enum | ||
+ | drivers/ | ||
+ | set trans table 0: 0x20000000 0x20000000, 0x10000000 | ||
+ | BPI-R3M> nvme scan | ||
+ | BPI-R3M> nvme info | ||
+ | Device 0: Vendor: 0x1c5c Rev: 80002C00 Prod: ND94N163610404F0R | ||
+ | Type: Hard Disk | ||
+ | Capacity: 244198.3 MB = 238.4 GB (500118192 x 512) | ||
+ | BPI-R3M> | ||
+ | </ | ||
+ | |||
+ | ==== tftp ==== | ||
+ | |||
+ | network support is basicly on all boards possible with my uboot | ||
+ | |||
+ | * r2pro only wan-port (mtk switch driver not compatible with rockchip mac driver in uboot, but wan is directly connected to RJ45 jack) | ||
+ | * r3mini only lan-port (only 1 phy can be defined) | ||
+ | * R3/R4 only RJ45 ethernet ports (no SFP) | ||
+ | |||
+ | [[.: | ||
+ | |||
+ | < | ||
+ | printenv ipaddr | ||
+ | setenv ipaddr 192.168.0.19 | ||
+ | |||
+ | tftp ${loadaddr} 192.168.0.10: | ||
+ | </ | ||
+ | |||
+ | IP-adress of server (including the : ) can be omitted, if serverip is set correctly | ||
+ | ===== booting ===== | ||
+ | |||
+ | if the file is at $loadaddr you use it | ||
+ | |||
+ | ==== uboot.bin ==== | ||
+ | |||
+ | go $loadaddr | ||
+ | |||
+ | ==== Kernel-Image | ||
+ | |||
+ | BPI-R2 (armhf) uses uImage with appended devicetree, all other boards are using FIT image | ||
+ | |||
+ | all can be booted with bootm, FIT have bootconfig where 1 can be set as default, so this is optional | ||
+ | |||
+ | |||
+ | bootm $loadaddr# | ||
- | ===== boot files ===== | + | available configs in a FIT can be obtained on host-linux with uboot-tools installed (or look in its file when kernel is self-compiled) |
+ | dumpimage -l bpi-r3.itb |
en/uboot.1712479940.txt.gz · Last modified: 2024/04/07 10:52 by frank