Green Wan | 70415e1 | 2021-05-27 06:52:13 -0700 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0+ |
| 2 | |
| 3 | HiFive Unmatched |
| 4 | ================ |
| 5 | |
| 6 | FU740-C000 RISC-V SoC |
| 7 | --------------------- |
| 8 | The FU740-C000 is a 4+1 64-bit RISC-V core SoC from SiFive. |
| 9 | |
| 10 | The HiFive Unmatched development platform is based on FU740-C000 and capable |
| 11 | of running Linux. |
| 12 | |
| 13 | Mainline support |
| 14 | ---------------- |
| 15 | The support for following drivers are already enabled: |
| 16 | |
| 17 | 1. SiFive UART Driver. |
| 18 | 2. SiFive PRCI Driver for clock. |
| 19 | 3. Cadence MACB ethernet driver for networking support. |
| 20 | 4. SiFive SPI Driver. |
| 21 | 5. MMC SPI Driver for MMC/SD support. |
| 22 | |
Heinrich Schuchardt | ab37fac | 2022-01-27 02:50:28 +0100 | [diff] [blame] | 23 | Booting from micro SD card using U-Boot SPL |
| 24 | ------------------------------------------- |
| 25 | |
| 26 | Booting from an SD card requires that the boot mode selection DIP switches |
| 27 | MSEL[3:0] are set to 1011. |
Green Wan | 70415e1 | 2021-05-27 06:52:13 -0700 | [diff] [blame] | 28 | |
| 29 | Building |
| 30 | -------- |
| 31 | |
| 32 | Before building U-Boot SPL, OpenSBI must be built first. OpenSBI can be |
| 33 | cloned and built for FU740 as below: |
| 34 | |
| 35 | .. code-block:: console |
| 36 | |
| 37 | git clone https://github.com/riscv/opensbi.git |
| 38 | cd opensbi |
| 39 | make PLATFORM=generic |
| 40 | export OPENSBI=<path to opensbi/build/platform/generic/firmware/fw_dynamic.bin> |
| 41 | |
| 42 | Now build the U-Boot SPL and U-Boot proper |
| 43 | |
| 44 | .. code-block:: console |
| 45 | |
| 46 | cd <U-Boot-dir> |
| 47 | make sifive_unmatched_defconfig |
| 48 | make |
| 49 | |
| 50 | This will generate spl/u-boot-spl.bin and u-boot.itb |
| 51 | |
| 52 | |
| 53 | Flashing |
| 54 | -------- |
| 55 | |
| 56 | ZSBL loads the U-Boot SPL (u-boot-spl.bin) from a partition with GUID type |
| 57 | 5B193300-FC78-40CD-8002-E86C45580B47 |
| 58 | |
Heinrich Schuchardt | d1474f5 | 2023-05-01 14:47:52 +0200 | [diff] [blame] | 59 | With the default configuration U-Boot SPL expects u-boot.itb starting at sector |
| 60 | 2082 (CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x822). It is recommended to use a |
| 61 | partition with type GUID 2E54B353-1271-4842-806F-E436D6AF6985 for storing |
| 62 | main U-Boot. |
Green Wan | 70415e1 | 2021-05-27 06:52:13 -0700 | [diff] [blame] | 63 | |
| 64 | u-boot.itb is a combination of fw_dynamic.bin, u-boot-nodtb.bin and |
| 65 | device tree blob (hifive-unmatched-a00.dtb) |
| 66 | |
| 67 | Format the SD card (make sure the disk has GPT, otherwise use gdisk to switch) |
| 68 | |
Heinrich Schuchardt | d7a9749 | 2021-07-28 10:52:53 +0200 | [diff] [blame] | 69 | .. code-block:: bash |
Green Wan | 70415e1 | 2021-05-27 06:52:13 -0700 | [diff] [blame] | 70 | |
Heinrich Schuchardt | d7a9749 | 2021-07-28 10:52:53 +0200 | [diff] [blame] | 71 | sudo sgdisk -g --clear -a 1 \ |
| 72 | --new=1:34:2081 --change-name=1:spl --typecode=1:5B193300-FC78-40CD-8002-E86C45580B47 \ |
| 73 | --new=2:2082:10273 --change-name=2:uboot --typecode=2:2E54B353-1271-4842-806F-E436D6AF6985 \ |
| 74 | --new=3:16384:282623 --change-name=3:boot --typecode=3:0x0700 \ |
| 75 | --new=4:286720:13918207 --change-name=4:root --typecode=4:0x8300 \ |
| 76 | /dev/sdX |
Green Wan | 70415e1 | 2021-05-27 06:52:13 -0700 | [diff] [blame] | 77 | |
| 78 | Copy linux Image.gz and hifive-unmatched-a00.dtb to boot partition |
| 79 | |
Heinrich Schuchardt | d7a9749 | 2021-07-28 10:52:53 +0200 | [diff] [blame] | 80 | .. code-block:: bash |
Green Wan | 70415e1 | 2021-05-27 06:52:13 -0700 | [diff] [blame] | 81 | |
Heinrich Schuchardt | d7a9749 | 2021-07-28 10:52:53 +0200 | [diff] [blame] | 82 | sudo mkfs.vfat /dev/sdX3 |
| 83 | sudo mkfs.ext4 /dev/sdX4 |
Green Wan | 70415e1 | 2021-05-27 06:52:13 -0700 | [diff] [blame] | 84 | |
Heinrich Schuchardt | d7a9749 | 2021-07-28 10:52:53 +0200 | [diff] [blame] | 85 | sudo mount /dev/sdX3 /media/sdX3 |
| 86 | sudo cp Image.gz hifive-unmatched-a00.dtb /media/sdX3/ |
Green Wan | 70415e1 | 2021-05-27 06:52:13 -0700 | [diff] [blame] | 87 | |
| 88 | Program the SD card |
| 89 | |
Heinrich Schuchardt | d7a9749 | 2021-07-28 10:52:53 +0200 | [diff] [blame] | 90 | .. code-block:: bash |
Green Wan | 70415e1 | 2021-05-27 06:52:13 -0700 | [diff] [blame] | 91 | |
Heinrich Schuchardt | d7a9749 | 2021-07-28 10:52:53 +0200 | [diff] [blame] | 92 | sudo dd if=spl/u-boot-spl.bin of=/dev/sdX seek=34 |
| 93 | sudo dd if=u-boot.itb of=/dev/sdX seek=2082 |
Green Wan | 70415e1 | 2021-05-27 06:52:13 -0700 | [diff] [blame] | 94 | |
| 95 | Booting |
| 96 | ------- |
| 97 | Once you plugin the sdcard and power up, you should see the U-Boot prompt. |
| 98 | |
| 99 | |
| 100 | Loading the kernel and dtb |
| 101 | |
| 102 | .. code-block:: none |
| 103 | |
| 104 | fatload mmc 0:3 ${kernel_addr_r} Image.gz |
| 105 | fatload mmc 0:3 ${fdt_addr_r} hifive-unmatched-a00.dtb |
| 106 | booti ${kernel_addr_r} - ${fdt_addr_r} |
| 107 | |
| 108 | |
| 109 | Sample boot log from HiFive Unmatched board |
| 110 | ------------------------------------------- |
| 111 | |
| 112 | .. code-block:: none |
| 113 | |
| 114 | U-Boot SPL 2021.04-rc4-00009-g7d70643cc3-dirty (Mar 16 2021 - 18:03:14 +0800) |
| 115 | Trying to boot from MMC1 |
| 116 | |
| 117 | U-Boot 2021.04-rc4-00009-g7d70643cc3-dirty (Mar 16 2021 - 18:03:14 +0800) |
| 118 | |
| 119 | CPU: rv64imafdc |
| 120 | Model: SiFive HiFive Unmatched A00 |
| 121 | DRAM: 16 GiB |
| 122 | MMC: spi@10050000:mmc@0: 0 |
| 123 | In: serial@10010000 |
| 124 | Out: serial@10010000 |
| 125 | Err: serial@10010000 |
| 126 | Model: SiFive HiFive Unmatched A00 |
| 127 | Net: |
| 128 | Error: ethernet@10090000 address not set. |
| 129 | No ethernet found. |
| 130 | |
| 131 | Hit any key to stop autoboot: 0 |
| 132 | PCIe Link up, Gen1 |
| 133 | |
| 134 | Device 0: Vendor: 0x126f Rev: S1111A0L Prod: AA000000000000001995 |
| 135 | Type: Hard Disk |
| 136 | Capacity: 488386.3 MB = 476.9 GB (1000215216 x 512) |
| 137 | ... is now current device |
| 138 | Scanning nvme 0:1... |
| 139 | libfdt fdt_check_header(): FDT_ERR_BADMAGIC |
| 140 | Scanning disk mmc@0.blk... |
| 141 | ** Unrecognized filesystem type ** |
| 142 | ** Unrecognized filesystem type ** |
| 143 | Scanning disk nvme#0.blk#0... |
| 144 | Found 8 disks |
| 145 | No EFI system partition |
| 146 | |
| 147 | Error: ethernet@10090000 address not set. |
| 148 | BootOrder not defined |
| 149 | EFI boot manager: Cannot load any image |
| 150 | starting USB... |
| 151 | Bus xhci_pci: Register 4000840 NbrPorts 4 |
| 152 | Starting the controller |
| 153 | USB XHCI 1.00 |
| 154 | scanning bus xhci_pci for devices... 3 USB Device(s) found |
| 155 | scanning usb for storage devices... 0 Storage Device(s) found |
| 156 | |
| 157 | Device 0: unknown device |
| 158 | switch to partitions #0, OK |
| 159 | mmc0 is current device |
| 160 | Scanning mmc 0:3... |
| 161 | Found /extlinux/extlinux.conf |
| 162 | Retrieving file: /extlinux/extlinux.conf |
| 163 | 205 bytes read in 9 ms (21.5 KiB/s) |
| 164 | 1: OpenEmbedded-SiFive-HiFive-Unmatched |
| 165 | Retrieving file: /Image.gz |
| 166 | 7225919 bytes read in 4734 ms (1.5 MiB/s) |
| 167 | append: root=/dev/mmcblk0p4 rootfstype=ext4 rootwait console=ttySIF0,115200 earlycon=sbi |
| 168 | Retrieving file: /hifive-unmatched-a00.dtb |
| 169 | 10445 bytes read in 13 ms (784.2 KiB/s) |
| 170 | Uncompressing Kernel Image |
| 171 | Moving Image from 0x84000000 to 0x80200000, end=81629000 |
| 172 | ## Flattened Device Tree blob at 88000000 |
| 173 | Booting using the fdt blob at 0x88000000 |
| 174 | Using Device Tree in place at 0000000088000000, end 00000000880058cc |
| 175 | |
| 176 | Starting kernel ... |
| 177 | |
| 178 | [ 0.000000] Linux version 5.10.15 (oe-user@oe-host) (riscv64-oe-linux-gcc (GCC) 10.2.0, GNU ld (GNU Binutils) 2.35.0.201 |
| 179 | [ 0.000000] OF: fdt: Ignoring memory range 0x80000000 - 0x80200000 |
| 180 | [ 0.000000] earlycon: sbi0 at I/O port 0x0 (options '') |
| 181 | [ 0.000000] printk: bootconsole [sbi0] enabled |
| 182 | [ 0.000000] efi: UEFI not found. |
| 183 | [ 0.000000] Zone ranges: |
| 184 | [ 0.000000] DMA32 [mem 0x0000000080200000-0x00000000ffffffff] |
| 185 | [ 0.000000] Normal [mem 0x0000000100000000-0x000000027fffffff] |
| 186 | [ 0.000000] Movable zone start for each node |
| 187 | [ 0.000000] Early memory node ranges |
| 188 | [ 0.000000] node 0: [mem 0x0000000080200000-0x000000027fffffff] |
| 189 | [ 0.000000] Zeroed struct page in unavailable ranges: 512 pages |
| 190 | [ 0.000000] Initmem setup node 0 [mem 0x0000000080200000-0x000000027fffffff] |
| 191 | [ 0.000000] software IO TLB: mapped [mem 0x00000000fbfff000-0x00000000fffff000] (64MB) |
| 192 | [ 0.000000] SBI specification v0.3 detected |
| 193 | [ 0.000000] SBI implementation ID=0x1 Version=0x9 |
| 194 | [ 0.000000] SBI v0.2 TIME extension detected |
| 195 | [ 0.000000] SBI v0.2 IPI extension detected |
| 196 | [ 0.000000] SBI v0.2 RFENCE extension detected |
| 197 | [ 0.000000] SBI v0.2 HSM extension detected |
| 198 | [ 0.000000] CPU with hartid=0 is not available |
| 199 | [ 0.000000] CPU with hartid=0 is not available |
| 200 | [ 0.000000] riscv: ISA extensions acdfim |
| 201 | [ 0.000000] riscv: ELF capabilities acdfim |
| 202 | [ 0.000000] percpu: Embedded 26 pages/cpu s66904 r8192 d31400 u106496 |
| 203 | [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 2067975 |
| 204 | [ 0.000000] Kernel command line: root=/dev/mmcblk0p4 rootfstype=ext4 rootwait console=ttySIF0,115200 earlycon=sbi |
| 205 | [ 0.000000] Dentry cache hash table entries: 1048576 (order: 11, 8388608 bytes, linear) |
| 206 | [ 0.000000] Inode-cache hash table entries: 524288 (order: 10, 4194304 bytes, linear) |
| 207 | [ 0.000000] Sorting __ex_table... |
| 208 | [ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off |
| 209 | [ 0.000000] Memory: 8155880K/8386560K available (8490K kernel code, 5515K rwdata, 4096K rodata, 285K init, 383K bss, 23) |
| 210 | [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1 |
| 211 | [ 0.000000] rcu: Hierarchical RCU implementation. |
| 212 | [ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4. |
| 213 | [ 0.000000] Tracing variant of Tasks RCU enabled. |
| 214 | [ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies. |
| 215 | [ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4 |
| 216 | [ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0 |
| 217 | [ 0.000000] CPU with hartid=0 is not available |
| 218 | [ 0.000000] riscv-intc: unable to find hart id for /cpus/cpu@0/interrupt-controller |
| 219 | [ 0.000000] riscv-intc: 64 local interrupts mapped |
| 220 | [ 0.000000] plic: interrupt-controller@c000000: mapped 69 interrupts with 4 handlers for 9 contexts. |
| 221 | [ 0.000000] random: get_random_bytes called from 0xffffffe000002a6a with crng_init=0 |
| 222 | [ 0.000000] riscv_timer_init_dt: Registering clocksource cpuid [0] hartid [1] |
| 223 | [ 0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x1d854df40, max_idle_ns: 352636161696s |
| 224 | [ 0.000007] sched_clock: 64 bits at 1000kHz, resolution 1000ns, wraps every 2199023255500ns |
| 225 | [ 0.008626] Console: colour dummy device 80x25 |
| 226 | [ 0.013049] Calibrating delay loop (skipped), value calculated using timer frequency.. 2.00 BogoMIPS (lpj=4000) |
| 227 | [ 0.023115] pid_max: default: 32768 minimum: 301 |
| 228 | [ 0.028423] Mount-cache hash table entries: 16384 (order: 5, 131072 bytes, linear) |
| 229 | [ 0.035919] Mountpoint-cache hash table entries: 16384 (order: 5, 131072 bytes, linear) |
| 230 | [ 0.045957] rcu: Hierarchical SRCU implementation. |
| 231 | [ 0.050393] EFI services will not be available. |
| 232 | [ 0.055132] smp: Bringing up secondary CPUs ... |
| 233 | [ 0.061824] smp: Brought up 1 node, 4 CPUs |
| 234 | [ 0.067458] devtmpfs: initialized |
| 235 | [ 0.072700] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns |
| 236 | [ 0.081789] futex hash table entries: 1024 (order: 4, 65536 bytes, linear) |
| 237 | [ 0.089738] NET: Registered protocol family 16 |
| 238 | [ 0.093999] thermal_sys: Registered thermal governor 'step_wise' |
| 239 | [ 0.109208] iommu: Default domain type: Translated |
| 240 | [ 0.119694] vgaarb: loaded |
| 241 | [ 0.122571] SCSI subsystem initialized |
| 242 | [ 0.126499] usbcore: registered new interface driver usbfs |
| 243 | [ 0.131686] usbcore: registered new interface driver hub |
| 244 | [ 0.137071] usbcore: registered new device driver usb |
| 245 | [ 0.142286] EDAC MC: Ver: 3.0.0 |
| 246 | [ 0.145760] Advanced Linux Sound Architecture Driver Initialized. |
| 247 | [ 0.152205] clocksource: Switched to clocksource riscv_clocksource |
| 248 | [ 1.046286] VFS: Disk quotas dquot_6.6.0 |
| 249 | [ 1.049651] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes) |
| 250 | [ 1.062844] NET: Registered protocol family 2 |
| 251 | [ 1.067172] tcp_listen_portaddr_hash hash table entries: 4096 (order: 4, 65536 bytes, linear) |
| 252 | [ 1.075455] TCP established hash table entries: 65536 (order: 7, 524288 bytes, linear) |
| 253 | [ 1.085428] TCP bind hash table entries: 65536 (order: 8, 1048576 bytes, linear) |
| 254 | [ 1.096548] TCP: Hash tables configured (established 65536 bind 65536) |
| 255 | [ 1.103043] UDP hash table entries: 4096 (order: 5, 131072 bytes, linear) |
| 256 | [ 1.109879] UDP-Lite hash table entries: 4096 (order: 5, 131072 bytes, linear) |
| 257 | [ 1.117413] NET: Registered protocol family 1 |
| 258 | [ 1.121881] RPC: Registered named UNIX socket transport module. |
| 259 | [ 1.127139] RPC: Registered udp transport module. |
| 260 | [ 1.131901] RPC: Registered tcp transport module. |
| 261 | [ 1.136677] RPC: Registered tcp NFSv4.1 backchannel transport module. |
| 262 | [ 1.143194] PCI: CLS 0 bytes, default 64 |
| 263 | [ 1.148359] Initialise system trusted keyrings |
| 264 | [ 1.152364] workingset: timestamp_bits=62 max_order=21 bucket_order=0 |
| 265 | [ 1.165382] NFS: Registering the id_resolver key type |
| 266 | [ 1.169781] Key type id_resolver registered |
| 267 | [ 1.174011] Key type id_legacy registered |
| 268 | [ 1.178179] nfs4filelayout_init: NFSv4 File Layout Driver Registering... |
| 269 | [ 1.184874] Installing knfsd (copyright (C) 1996 okir@monad.swb.de). |
| 270 | [ 1.192453] 9p: Installing v9fs 9p2000 file system support |
| 271 | [ 1.198116] NET: Registered protocol family 38 |
| 272 | [ 1.201886] Key type asymmetric registered |
| 273 | [ 1.206046] Asymmetric key parser 'x509' registered |
| 274 | [ 1.211029] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252) |
| 275 | [ 1.218468] io scheduler mq-deadline registered |
| 276 | [ 1.223072] io scheduler kyber registered |
| 277 | [ 1.228803] shpchp: Standard Hot Plug PCI Controller Driver version: 0.4 |
| 278 | [ 1.235017] fu740-pcie e00000000.pcie: FPGA PCIE PROBE |
| 279 | [ 1.281706] fu740-pcie e00000000.pcie: PCIE-PERSTN is GPIO 504 |
| 280 | [ 1.286922] fu740-pcie e00000000.pcie: PWREN is GPIO 501 |
| 281 | [ 1.292377] fu740-pcie e00000000.pcie: host bridge /soc/pcie@e00000000 ranges: |
| 282 | [ 1.299603] fu740-pcie e00000000.pcie: IO 0x0060080000..0x006008ffff -> 0x0060080000 |
| 283 | [ 1.307922] fu740-pcie e00000000.pcie: MEM 0x0060090000..0x0070ffffff -> 0x0060090000 |
| 284 | [ 1.316244] fu740-pcie e00000000.pcie: MEM 0x2000000000..0x3fffffffff -> 0x2000000000 |
| 285 | [ 1.432223] fu740-pcie e00000000.pcie: PWREN enabling |
| 286 | [ 1.436607] fu740-pcie e00000000.pcie: PWREN valid |
| 287 | [ 1.560226] fu740-pcie e00000000.pcie: invalid resource |
| 288 | [ 1.664802] fu740-pcie e00000000.pcie: Link up |
| 289 | [ 1.768582] fu740-pcie e00000000.pcie: Link up |
| 290 | [ 1.872369] fu740-pcie e00000000.pcie: Link up |
| 291 | [ 1.876116] fu740-pcie e00000000.pcie: Link up, Gen3 |
| 292 | [ 1.881352] fu740-pcie e00000000.pcie: PCI host bridge to bus 0000:00 |
| 293 | [ 1.887700] pci_bus 0000:00: root bus resource [bus 00-ff] |
| 294 | [ 1.893247] pci_bus 0000:00: root bus resource [io 0x0000-0xffff] (bus address [0x60080000-0x6008ffff]) |
| 295 | [ 1.902807] pci_bus 0000:00: root bus resource [mem 0x60090000-0x70ffffff] |
| 296 | [ 1.909748] pci_bus 0000:00: root bus resource [mem 0x2000000000-0x3fffffffff pref] |
| 297 | [ 1.917517] pci 0000:00:00.0: [f15e:0000] type 01 class 0x060400 |
| 298 | [ 1.923569] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x000fffff] |
| 299 | [ 1.929902] pci 0000:00:00.0: reg 0x38: [mem 0x00000000-0x0000ffff pref] |
| 300 | [ 1.936723] pci 0000:00:00.0: supports D1 |
| 301 | [ 1.940755] pci 0000:00:00.0: PME# supported from D0 D1 D3hot |
| 302 | [ 1.947619] pci 0000:01:00.0: [1b21:2824] type 01 class 0x060400 |
| 303 | [ 1.953052] pci 0000:01:00.0: enabling Extended Tags |
| 304 | [ 1.958165] pci 0000:01:00.0: PME# supported from D0 D3hot D3cold |
| 305 | [ 1.976890] pci 0000:01:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring |
| 306 | [ 1.984425] pci 0000:02:00.0: [1b21:2824] type 01 class 0x060400 |
| 307 | [ 1.990396] pci 0000:02:00.0: enabling Extended Tags |
| 308 | [ 1.995509] pci 0000:02:00.0: PME# supported from D0 D3hot D3cold |
| 309 | [ 2.001938] pci 0000:02:02.0: [1b21:2824] type 01 class 0x060400 |
| 310 | [ 2.007682] pci 0000:02:02.0: enabling Extended Tags |
| 311 | [ 2.012793] pci 0000:02:02.0: PME# supported from D0 D3hot D3cold |
| 312 | [ 2.019167] pci 0000:02:03.0: [1b21:2824] type 01 class 0x060400 |
| 313 | [ 2.024966] pci 0000:02:03.0: enabling Extended Tags |
| 314 | [ 2.030075] pci 0000:02:03.0: PME# supported from D0 D3hot D3cold |
| 315 | [ 2.036468] pci 0000:02:04.0: [1b21:2824] type 01 class 0x060400 |
| 316 | [ 2.042250] pci 0000:02:04.0: enabling Extended Tags |
| 317 | [ 2.047359] pci 0000:02:04.0: PME# supported from D0 D3hot D3cold |
| 318 | [ 2.053811] pci 0000:02:08.0: [1b21:2824] type 01 class 0x060400 |
| 319 | [ 2.059534] pci 0000:02:08.0: enabling Extended Tags |
| 320 | [ 2.064647] pci 0000:02:08.0: PME# supported from D0 D3hot D3cold |
| 321 | [ 2.071499] pci 0000:02:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring |
| 322 | [ 2.078837] pci 0000:02:02.0: bridge configuration invalid ([bus 00-00]), reconfiguring |
| 323 | [ 2.086911] pci 0000:02:03.0: bridge configuration invalid ([bus 00-00]), reconfiguring |
| 324 | [ 2.094987] pci 0000:02:04.0: bridge configuration invalid ([bus 00-00]), reconfiguring |
| 325 | [ 2.103075] pci 0000:02:08.0: bridge configuration invalid ([bus 00-00]), reconfiguring |
| 326 | [ 2.111901] pci_bus 0000:03: busn_res: [bus 03-ff] end is updated to 03 |
| 327 | [ 2.118031] pci 0000:04:00.0: [1b21:1142] type 00 class 0x0c0330 |
| 328 | [ 2.123968] pci 0000:04:00.0: reg 0x10: [mem 0x00000000-0x00007fff 64bit] |
| 329 | [ 2.131038] pci 0000:04:00.0: PME# supported from D3cold |
| 330 | [ 2.148888] pci_bus 0000:04: busn_res: [bus 04-ff] end is updated to 04 |
| 331 | [ 2.155588] pci_bus 0000:05: busn_res: [bus 05-ff] end is updated to 05 |
| 332 | [ 2.162286] pci_bus 0000:06: busn_res: [bus 06-ff] end is updated to 06 |
| 333 | [ 2.168408] pci 0000:07:00.0: [126f:2263] type 00 class 0x010802 |
| 334 | [ 2.174351] pci 0000:07:00.0: reg 0x10: [mem 0x00000000-0x00003fff 64bit] |
| 335 | [ 2.192890] pci_bus 0000:07: busn_res: [bus 07-ff] end is updated to 07 |
| 336 | [ 2.198837] pci_bus 0000:02: busn_res: [bus 02-ff] end is updated to 07 |
| 337 | [ 2.205522] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 07 |
| 338 | [ 2.212241] pci 0000:00:00.0: BAR 0: assigned [mem 0x60100000-0x601fffff] |
| 339 | [ 2.219067] pci 0000:00:00.0: BAR 14: assigned [mem 0x60200000-0x603fffff] |
| 340 | [ 2.226010] pci 0000:00:00.0: BAR 6: assigned [mem 0x60090000-0x6009ffff pref] |
| 341 | [ 2.233308] pci 0000:01:00.0: BAR 14: assigned [mem 0x60200000-0x603fffff] |
| 342 | [ 2.240259] pci 0000:02:02.0: BAR 14: assigned [mem 0x60200000-0x602fffff] |
| 343 | [ 2.247203] pci 0000:02:08.0: BAR 14: assigned [mem 0x60300000-0x603fffff] |
| 344 | [ 2.254150] pci 0000:02:00.0: PCI bridge to [bus 03] |
| 345 | [ 2.259217] pci 0000:04:00.0: BAR 0: assigned [mem 0x60200000-0x60207fff 64bit] |
| 346 | [ 2.266594] pci 0000:02:02.0: PCI bridge to [bus 04] |
| 347 | [ 2.271615] pci 0000:02:02.0: bridge window [mem 0x60200000-0x602fffff] |
| 348 | [ 2.278485] pci 0000:02:03.0: PCI bridge to [bus 05] |
| 349 | [ 2.283529] pci 0000:02:04.0: PCI bridge to [bus 06] |
| 350 | [ 2.288572] pci 0000:07:00.0: BAR 0: assigned [mem 0x60300000-0x60303fff 64bit] |
| 351 | [ 2.295952] pci 0000:02:08.0: PCI bridge to [bus 07] |
| 352 | [ 2.300973] pci 0000:02:08.0: bridge window [mem 0x60300000-0x603fffff] |
| 353 | [ 2.307842] pci 0000:01:00.0: PCI bridge to [bus 02-07] |
| 354 | [ 2.313133] pci 0000:01:00.0: bridge window [mem 0x60200000-0x603fffff] |
| 355 | [ 2.320009] pci 0000:00:00.0: PCI bridge to [bus 01-07] |
| 356 | [ 2.325288] pci 0000:00:00.0: bridge window [mem 0x60200000-0x603fffff] |
| 357 | [ 2.332808] pcieport 0000:00:00.0: AER: enabled with IRQ 51 |
| 358 | [ 2.337946] pcieport 0000:01:00.0: enabling device (0000 -> 0002) |
| 359 | [ 2.344786] pcieport 0000:02:02.0: enabling device (0000 -> 0002) |
| 360 | [ 2.351328] pcieport 0000:02:08.0: enabling device (0000 -> 0002) |
| 361 | [ 2.357091] pci 0000:04:00.0: enabling device (0000 -> 0002) |
| 362 | [ 2.362751] switchtec: loaded. |
| 363 | [ 2.365933] L2CACHE: DataError @ 0x00000003.00964470 |
| 364 | [ 2.365992] L2CACHE: No. of Banks in the cache: 4 |
| 365 | [ 2.375414] L2CACHE: No. of ways per bank: 16 |
| 366 | [ 2.379846] L2CACHE: Sets per bank: 512 |
| 367 | [ 2.383751] L2CACHE: Bytes per cache block: 64 |
| 368 | [ 2.388267] L2CACHE: Index of the largest way enabled: 15 |
| 369 | [ 2.434865] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled |
| 370 | [ 2.441695] 10010000.serial: ttySIF0 at MMIO 0x10010000 (irq = 1, base_baud = 115200) is a SiFive UART v0 |
| 371 | [ 2.450625] printk: console [ttySIF0] enabled |
| 372 | [ 2.450625] printk: console [ttySIF0] enabled |
| 373 | [ 2.459360] printk: bootconsole [sbi0] disabled |
| 374 | [ 2.459360] printk: bootconsole [sbi0] disabled |
| 375 | [ 2.468824] 10011000.serial: ttySIF1 at MMIO 0x10011000 (irq = 2, base_baud = 115200) is a SiFive UART v0 |
| 376 | [ 2.493853] loop: module loaded |
| 377 | [ 2.526475] nvme nvme0: pci function 0000:07:00.0 |
| 378 | [ 2.530852] nvme 0000:07:00.0: enabling device (0000 -> 0002) |
| 379 | [ 2.537716] Rounding down aligned max_sectors from 4294967295 to 4294967288 |
| 380 | [ 2.544470] db_root: cannot open: /etc/target |
| 381 | [ 2.545926] nvme nvme0: allocated 64 MiB host memory buffer. |
| 382 | [ 2.549020] sifive_spi 10040000.spi: mapped; irq=4, cs=1 |
| 383 | [ 2.559941] spi-nor spi0.0: is25wp256 (32768 Kbytes) |
| 384 | [ 2.566431] sifive_spi 10050000.spi: mapped; irq=6, cs=1 |
| 385 | [ 2.566707] nvme nvme0: 4/0/0 default/read/poll queues |
| 386 | [ 2.571935] libphy: Fixed MDIO Bus: probed |
| 387 | [ 2.580950] macb 10090000.ethernet: Registered clk switch 'sifive-gemgxl-mgmt' |
| 388 | [ 2.587536] macb 10090000.ethernet: invalid hw address, using random |
| 389 | [ 2.588100] nvme0n1: p1 p2 |
| 390 | [ 2.593875] BEU: Load or Store TILINK BUS ERR occurred |
| 391 | [ 2.594342] libphy: MACB_mii_bus: probed |
| 392 | [ 2.599312] macb 10090000.ethernet eth0: Cadence GEM rev 0x10070109 at 0x10090000 irq 7 (5e:57:b8:ab:24:4a) |
| 393 | [ 2.615501] e1000e: Intel(R) PRO/1000 Network Driver |
| 394 | [ 2.620251] e1000e: Copyright(c) 1999 - 2015 Intel Corporation. |
| 395 | [ 2.626463] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver |
| 396 | [ 2.632684] ehci-pci: EHCI PCI platform driver |
| 397 | [ 2.637144] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver |
| 398 | [ 2.643273] ohci-pci: OHCI PCI platform driver |
| 399 | [ 2.647731] uhci_hcd: USB Universal Host Controller Interface driver |
| 400 | [ 2.654315] xhci_hcd 0000:04:00.0: xHCI Host Controller |
| 401 | [ 2.659450] xhci_hcd 0000:04:00.0: new USB bus registered, assigned bus number 1 |
| 402 | [ 2.807373] xhci_hcd 0000:04:00.0: hcc params 0x0200e081 hci version 0x100 quirks 0x0000000010000410 |
| 403 | [ 2.816609] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.10 |
| 404 | [ 2.824115] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 |
| 405 | [ 2.831312] usb usb1: Product: xHCI Host Controller |
| 406 | [ 2.836174] usb usb1: Manufacturer: Linux 5.10.15 xhci-hcd |
| 407 | [ 2.841652] usb usb1: SerialNumber: 0000:04:00.0 |
| 408 | [ 2.846639] hub 1-0:1.0: USB hub found |
| 409 | [ 2.850037] hub 1-0:1.0: 2 ports detected |
| 410 | [ 2.854306] xhci_hcd 0000:04:00.0: xHCI Host Controller |
| 411 | [ 2.859335] xhci_hcd 0000:04:00.0: new USB bus registered, assigned bus number 2 |
| 412 | [ 2.866599] xhci_hcd 0000:04:00.0: Host supports USB 3.0 SuperSpeed |
| 413 | [ 2.873638] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM. |
| 414 | [ 2.881074] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.10 |
| 415 | [ 2.889212] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1 |
| 416 | [ 2.896422] usb usb2: Product: xHCI Host Controller |
| 417 | [ 2.901282] usb usb2: Manufacturer: Linux 5.10.15 xhci-hcd |
| 418 | [ 2.906752] usb usb2: SerialNumber: 0000:04:00.0 |
| 419 | [ 2.911671] hub 2-0:1.0: USB hub found |
| 420 | [ 2.915130] hub 2-0:1.0: 2 ports detected |
| 421 | [ 2.919486] usbcore: registered new interface driver usb-storage |
| 422 | [ 2.925212] usbcore: registered new interface driver usbserial_generic |
| 423 | [ 2.931620] usbserial: USB Serial support registered for generic |
| 424 | [ 2.937771] mousedev: PS/2 mouse device common for all mice |
| 425 | [ 2.943220] usbcore: registered new interface driver usbtouchscreen |
| 426 | [ 2.949466] i2c /dev entries driver |
| 427 | [ 2.954218] lm90 0-004c: supply vcc not found, using dummy regulator |
| 428 | [ 2.961629] EDAC DEVICE0: Giving out device to module Sifive ECC Manager controller sifive_edac.0: DEV sifive_edac.0 (I) |
| 429 | [ 2.997874] mmc_spi spi1.0: SD/MMC host mmc0, no DMA, no WP, no poweroff, cd polling |
| 430 | [ 3.005138] ledtrig-cpu: registered to indicate activity on CPUs |
| 431 | [ 3.010980] usbcore: registered new interface driver usbhid |
| 432 | [ 3.016407] usbhid: USB HID core driver |
| 433 | [ 3.020540] usbcore: registered new interface driver snd-usb-audio |
| 434 | [ 3.027209] NET: Registered protocol family 10 |
| 435 | [ 3.031878] Segment Routing with IPv6 |
| 436 | [ 3.034864] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver |
| 437 | [ 3.041232] NET: Registered protocol family 17 |
| 438 | [ 3.045324] 9pnet: Installing 9P2000 support |
| 439 | [ 3.049397] Key type dns_resolver registered |
| 440 | [ 3.053786] Loading compiled-in X.509 certificates |
| 441 | [ 3.059729] ALSA device list: |
| 442 | [ 3.061943] No soundcards found. |
| 443 | [ 3.066057] Waiting for root device /dev/mmcblk0p4... |
| 444 | [ 3.077319] mmc0: host does not support reading read-only switch, assuming write-enable |
| 445 | [ 3.084564] mmc0: new SDHC card on SPI |
| 446 | [ 3.089699] mmcblk0: mmc0:0000 SD32G 29.7 GiB |
| 447 | [ 3.126488] GPT:Primary header thinks Alt. header is not at the end of the disk. |
| 448 | [ 3.133144] GPT:13918241 != 62333951 |
| 449 | [ 3.136679] GPT:Alternate GPT header not at the end of the disk. |
| 450 | [ 3.142673] GPT:13918241 != 62333951 |
| 451 | [ 3.146231] GPT: Use GNU Parted to correct GPT errors. |
| 452 | [ 3.151398] mmcblk0: p1 p2 p3 p4 |
| 453 | [ 3.212226] usb 1-2: new high-speed USB device number 2 using xhci_hcd |
| 454 | [ 3.258310] EXT4-fs (mmcblk0p4): INFO: recovery required on readonly filesystem |
| 455 | [ 3.264855] EXT4-fs (mmcblk0p4): write access will be enabled during recovery |
| 456 | [ 3.458247] usb 1-2: New USB device found, idVendor=174c, idProduct=2074, bcdDevice= 0.01 |
| 457 | [ 3.465662] usb 1-2: New USB device strings: Mfr=2, Product=3, SerialNumber=1 |
| 458 | [ 3.472775] usb 1-2: Product: AS2107 |
| 459 | [ 3.476336] usb 1-2: Manufacturer: ASMedia |
| 460 | [ 3.480419] usb 1-2: SerialNumber: USB2.0 Hub |
| 461 | [ 3.533583] EXT4-fs (mmcblk0p4): recovery complete |
| 462 | [ 3.543756] EXT4-fs (mmcblk0p4): mounted filesystem with ordered data mode. Opts: (null) |
| 463 | [ 3.551132] VFS: Mounted root (ext4 filesystem) readonly on device 179:4. |
| 464 | [ 3.554682] hub 1-2:1.0: USB hub found |
| 465 | [ 3.561105] devtmpfs: mounted |
| 466 | [ 3.561778] hub 1-2:1.0: 4 ports detected |
| 467 | [ 3.565546] Freeing unused kernel memory: 284K |
| 468 | [ 3.572964] Kernel memory protection not selected by kernel config. |
| 469 | [ 3.579225] Run /sbin/init as init process |
| 470 | [ 3.613136] usb 2-2: new SuperSpeed Gen 1 USB device number 2 using xhci_hcd |
| 471 | [ 3.643539] usb 2-2: New USB device found, idVendor=174c, idProduct=3074, bcdDevice= 0.01 |
| 472 | [ 3.650948] usb 2-2: New USB device strings: Mfr=2, Product=3, SerialNumber=1 |
| 473 | [ 3.658072] usb 2-2: Product: AS2107 |
| 474 | [ 3.661630] usb 2-2: Manufacturer: ASMedia |
| 475 | [ 3.665709] usb 2-2: SerialNumber: USB2.0 Hub |
| 476 | [ 3.762380] hub 2-2:1.0: USB hub found |
| 477 | [ 3.766074] hub 2-2:1.0: 4 ports detected |
| 478 | [ 7.487226] systemd[1]: System time before build time, advancing clock. |
| 479 | [ 7.788093] systemd[1]: systemd 247.2+ running in system mode. (+PAM -AUDIT -SELINUX +IMA -APPARMOR -SMACK +SYSVINIT +U) |
| 480 | [ 7.809694] systemd[1]: Detected architecture riscv64. |
| 481 | |
| 482 | Welcome to OpenEmbedded nodistro.0! |
| 483 | |
| 484 | [ 7.832648] systemd[1]: Set hostname to <unmatched>. |
| 485 | [ 9.397499] systemd[1]: Queued start job for default target Multi-User System. |
| 486 | [ 9.408518] random: systemd: uninitialized urandom read (16 bytes read) |
| 487 | [ 9.429329] systemd[1]: Created slice system-getty.slice. |
| 488 | [ OK ] Created slice system-getty.slice. |
| 489 | [ 9.440400] random: systemd: uninitialized urandom read (16 bytes read) |
| 490 | [ 9.447086] systemd[1]: Created slice system-modprobe.slice. |
| 491 | [ OK ] Created slice system-modprobe.slice. |
| 492 | [ 9.458480] random: systemd: uninitialized urandom read (16 bytes read) |
| 493 | [ 9.465436] systemd[1]: Created slice system-serial\x2dgetty.slice. |
| 494 | [ OK ] Created slice system-serial\x2dgetty.slice. |
| 495 | [ 9.478594] systemd[1]: Created slice User and Session Slice. |
| 496 | [ OK ] Created slice User and Session Slice. |
| 497 | [ 9.490225] systemd[1]: Started Dispatch Password Requests to Console Directory Watch. |
| 498 | [ OK ] Started Dispatch Password ��…ts to Console Directory Watch. |
| 499 | [ 9.506407] systemd[1]: Started Forward Password Requests to Wall Directory Watch. |
| 500 | [ OK ] Started Forward Password R��…uests to Wall Directory Watch. |
| 501 | [ 9.522312] systemd[1]: Reached target Paths. |
| 502 | [ OK ] Reached target Paths. |
| 503 | [ 9.531078] systemd[1]: Reached target Remote File Systems. |
| 504 | [ OK ] Reached target Remote File Systems. |
| 505 | [ 9.542855] systemd[1]: Reached target Slices. |
| 506 | [ OK ] Reached target Slices. |
| 507 | [ 9.552712] systemd[1]: Reached target Swap. |
| 508 | [ OK ] Reached target Swap. |
| 509 | [ 9.561566] systemd[1]: Listening on initctl Compatibility Named Pipe. |
| 510 | [ OK ] Listening on initctl Compatibility Named Pipe. |
| 511 | [ 9.578686] systemd[1]: Condition check resulted in Journal Audit Socket being skipped. |
| 512 | [ 9.586545] systemd[1]: Listening on Journal Socket (/dev/log). |
| 513 | [ OK ] Listening on Journal Socket (/dev/log). |
| 514 | |
| 515 | [snip] |
| 516 | |
| 517 | [ OK ] Reached target System Time Synchronized. |
| 518 | [ OK ] Reached target Timers. |
| 519 | [ OK ] Listening on D-Bus System Message Bus Socket. |
| 520 | [ OK ] Reached target Sockets. |
| 521 | [ OK ] Reached target Basic System. |
| 522 | [ OK ] Started D-Bus System Message Bus. |
| 523 | Starting User Login Management... |
| 524 | Starting Permit User Sessions... |
| 525 | [ OK ] Started Xinetd A Powerful Replacement For Inetd. |
| 526 | [ OK ] Finished Permit User Sessions. |
| 527 | [ OK ] Started Getty on tty1. |
| 528 | [ OK ] Started Serial Getty on hvc0. |
| 529 | [ OK ] Started Serial Getty on ttySIF0. |
| 530 | [ OK ] Reached target Login Prompts. |
| 531 | [ OK ] Started User Login Management. |
| 532 | [ OK ] Reached target Multi-User System. |
| 533 | Starting Update UTMP about System Runlevel Changes... |
| 534 | [ OK ] Finished Update UTMP about System Runlevel Changes. |
| 535 | |
| 536 | OpenEmbedded nodistro.0 unmatched hvc0 |
| 537 | |
| 538 | unmatched login: |
| 539 | OpenEmbedded nodistro.0 unmatched ttySIF0 |
| 540 | |
| 541 | unmatched login: |
Thomas Skibo | 6a86389 | 2021-11-24 14:32:09 -0800 | [diff] [blame] | 542 | |
| 543 | |
| 544 | Booting from SPI |
| 545 | ---------------- |
| 546 | |
| 547 | Use Building steps from "Booting from uSD using U-Boot SPL" section. |
| 548 | |
| 549 | Partition the SPI in Linux via mtdblock. The partition types here are |
| 550 | "HiFive Unleashed FSBL", "HiFive Unleashed BBL", and "U-Boot environment" |
| 551 | for partitions one through three respectively. |
| 552 | |
| 553 | .. code-block:: none |
| 554 | |
| 555 | sgdisk --clear -a 1 \ |
| 556 | --new=1:40:2087 --change-name=1:spl --typecode=1:5B193300-FC78-40CD-8002-E86C45580B47 \ |
| 557 | --new=2:2088:10279 --change-name=2:uboot --typecode=2:2E54B353-1271-4842-806F-E436D6AF6985 \ |
| 558 | --new=3:10280:10535 --change-name=3:env --typecode=3:3DE21764-95BD-54BD-A5C3-4ABE786F38A8 \ |
| 559 | /dev/mtdblock0 |
| 560 | |
Michal Simek | 1be82af | 2023-05-17 09:17:16 +0200 | [diff] [blame] | 561 | Write U-Boot SPL and U-Boot to their partitions. |
Thomas Skibo | 6a86389 | 2021-11-24 14:32:09 -0800 | [diff] [blame] | 562 | |
| 563 | .. code-block:: none |
| 564 | |
Heinrich Schuchardt | 007fdb2 | 2022-03-10 11:32:49 +0100 | [diff] [blame] | 565 | dd if=spl/u-boot-spl.bin of=/dev/mtdblock0 bs=4096 seek=5 conv=sync |
Thomas Skibo | 6a86389 | 2021-11-24 14:32:09 -0800 | [diff] [blame] | 566 | dd if=u-boot.itb of=/dev/mtdblock0 bs=4096 seek=261 conv=sync |
| 567 | |
| 568 | Power off the board. |
| 569 | |
| 570 | Change DIP switches MSEL[3:0] to 0110. |
| 571 | |
| 572 | Power up the board. |