Yanhong Wang | 6a5a45d | 2023-03-29 11:42:17 +0800 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0+ |
| 2 | |
| 3 | StarFive VisionFive2 |
| 4 | ==================== |
| 5 | |
| 6 | JH7110 RISC-V SoC |
| 7 | --------------------- |
| 8 | The JH7110 is 4+1 64-bit RISC-V SoC from StarFive. |
| 9 | |
| 10 | The StarFive VisionFive2 development platform is based on JH7110 and capable |
| 11 | of running Linux. |
| 12 | |
| 13 | Mainline support |
| 14 | ---------------- |
| 15 | |
| 16 | The support for following drivers are already enabled: |
| 17 | |
| 18 | 1. ns16550 UART Driver. |
| 19 | 2. StarFive JH7110 clock Driver. |
| 20 | 3. StarFive JH7110 reset Driver. |
| 21 | 4. Cadence QSPI controller Driver. |
| 22 | 5. MMC SPI Driver for MMC/SD support. |
| 23 | |
| 24 | Booting from MMC using U-Boot SPL |
| 25 | --------------------------------- |
| 26 | |
| 27 | The current U-Boot port is supported in S-mode only and loaded from DRAM. |
| 28 | |
| 29 | A prior stage M-mode firmware/bootloader (e.g OpenSBI) is required to |
| 30 | boot the u-boot.itb in S-mode and provide M-mode runtime services. |
| 31 | |
| 32 | Currently, the u-boot.itb is used as a dynamic of the OpenSBI FW_DYNAMIC |
| 33 | firmware with the latest. |
| 34 | |
| 35 | Building |
| 36 | ~~~~~~~~ |
| 37 | |
| 38 | 1. Add the RISC-V toolchain to your PATH. |
| 39 | 2. Setup ARCH & cross compilation environment variable: |
| 40 | |
| 41 | .. code-block:: none |
| 42 | |
| 43 | export CROSS_COMPILE=<riscv64 toolchain prefix> |
| 44 | |
| 45 | Before building U-Boot SPL, OpenSBI must be built first. OpenSBI can be |
| 46 | cloned and built for JH7110 as below: |
| 47 | |
| 48 | .. code-block:: console |
| 49 | |
| 50 | git clone https://github.com/riscv/opensbi.git |
| 51 | cd opensbi |
| 52 | make PLATFORM=generic FW_TEXT_START=0x40000000 FW_OPTIONS=0 |
| 53 | |
Heinrich Schuchardt | e71e945 | 2023-04-27 11:56:58 +0200 | [diff] [blame] | 54 | The VisionFive 2 support for OpenSBI was introduced after the v1.2 release. |
| 55 | |
Yanhong Wang | 6a5a45d | 2023-03-29 11:42:17 +0800 | [diff] [blame] | 56 | More detailed description of steps required to build FW_DYNAMIC firmware |
| 57 | is beyond the scope of this document. Please refer OpenSBI documenation. |
| 58 | (Note: OpenSBI git repo is at https://github.com/riscv/opensbi.git) |
| 59 | |
| 60 | Now build the U-Boot SPL and U-Boot proper |
| 61 | |
| 62 | .. code-block:: console |
| 63 | |
| 64 | cd <U-Boot-dir> |
| 65 | make starfive_visionfive2_13b_defconfig |
| 66 | make OPENSBI=$(opensbi_dir)/opensbi/build/platform/generic/firmware/fw_dynamic.bin |
| 67 | |
| 68 | This will generate spl/u-boot-spl.bin and FIT image (u-boot.itb) |
| 69 | |
| 70 | u-boot-spl.bin cannot be used directly on StarFive VisionFive2,we need |
| 71 | to convert the u-boot-spl.bin to u-boot-spl.bin.normal.out with |
| 72 | the below command: |
| 73 | |
| 74 | ./spl_tool -c -f $(Uboot_PATH)/spl/u-boot-spl.bin |
| 75 | |
| 76 | More detailed description of spl_tool,please refer spl_tool documenation. |
| 77 | (Note: spl_tool git repo is at https://github.com/starfive-tech/Tools/tree/master/spl_tool) |
| 78 | |
| 79 | This will generate u-boot-spl.bin.normal.out file. |
| 80 | |
| 81 | Flashing |
| 82 | ~~~~~~~~ |
| 83 | |
Heinrich Schuchardt | b48108a | 2023-05-01 14:20:48 +0200 | [diff] [blame^] | 84 | The device firmware loads U-Boot SPL (u-boot-spl.bin.normal.out) from the |
| 85 | partition with type GUID 2E54B353-1271-4842-806F-E436D6AF6985. You are free |
| 86 | to choose any partition number. |
Yanhong Wang | 6a5a45d | 2023-03-29 11:42:17 +0800 | [diff] [blame] | 87 | |
Heinrich Schuchardt | b48108a | 2023-05-01 14:20:48 +0200 | [diff] [blame^] | 88 | With the default configuration U-Boot SPL loads the U-Boot FIT image |
| 89 | (u-boot.itb) from partition 2 (CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION=0x2). |
| 90 | When formatting it is recommended to use GUID |
| 91 | BC13C2FF-59E6-4262-A352-B275FD6F7172 for this partition. |
Yanhong Wang | 6a5a45d | 2023-03-29 11:42:17 +0800 | [diff] [blame] | 92 | |
Heinrich Schuchardt | b48108a | 2023-05-01 14:20:48 +0200 | [diff] [blame^] | 93 | The FIT image (u-boot.itb) is a combination of OpenSBI's fw_dynamic.bin, |
| 94 | u-boot-nodtb.bin and the device tree blob |
| 95 | (jh7110-starfive-visionfive-2-v1.3b.dtb or |
| 96 | jh7110-starfive-visionfive-2-v1.2a.dtb). |
Yanhong Wang | 6a5a45d | 2023-03-29 11:42:17 +0800 | [diff] [blame] | 97 | |
| 98 | Format the SD card (make sure the disk has GPT, otherwise use gdisk to switch) |
| 99 | |
| 100 | .. code-block:: bash |
| 101 | |
| 102 | sudo sgdisk --clear \ |
| 103 | --set-alignment=2 \ |
| 104 | --new=1:4096:8191 --change-name=1:spl --typecode=1:2E54B353-1271-4842-806F-E436D6AF6985\ |
| 105 | --new=2:8192:16383 --change-name=2:uboot --typecode=2:BC13C2FF-59E6-4262-A352-B275FD6F7172 \ |
| 106 | --new=3:16384:1654784 --change-name=3:system --typecode=3:EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 \ |
| 107 | /dev/sdb |
| 108 | |
| 109 | Program the SD card |
| 110 | |
| 111 | .. code-block:: bash |
| 112 | |
| 113 | sudo dd if=u-boot-spl.bin.normal.out of=/dev/sdb1 |
| 114 | sudo dd if=u-boot.itb of=/dev/sdb2 |
| 115 | |
| 116 | sudo mount /dev/sdb3 /mnt/ |
| 117 | sudo cp u-boot-spl.bin.normal.out /mnt/ |
| 118 | sudo cp u-boot.itb /mnt/ |
| 119 | sudo cp Image.gz /mnt/ |
| 120 | sudo cp initramfs.cpio.gz /mnt/ |
| 121 | sudo cp jh7110-starfive-visionfive-2-v1.3b.dtb /mnt/ |
| 122 | sudo umount /mnt |
| 123 | |
| 124 | Booting |
| 125 | ~~~~~~~ |
| 126 | |
Heinrich Schuchardt | b48108a | 2023-05-01 14:20:48 +0200 | [diff] [blame^] | 127 | The board provides the DIP switches MSEL[1:0] to select the boot device. |
| 128 | To select booting from SD-card set the DIP switches MSEL[1:0] to 10. |
| 129 | |
Yanhong Wang | 6a5a45d | 2023-03-29 11:42:17 +0800 | [diff] [blame] | 130 | Once you plugin the sdcard and power up, you should see the U-Boot prompt. |
| 131 | |
| 132 | Sample boot log from StarFive VisionFive2 board |
| 133 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 134 | |
| 135 | .. code-block:: none |
| 136 | |
| 137 | |
| 138 | U-Boot SPL 2023.04-rc2-00055-gfc43b9c51a-dirty (Mar 02 2023 - 10:51:39 +0800) |
| 139 | DDR version: dc2e84f0. |
| 140 | Trying to boot from MMC2 |
| 141 | |
| 142 | OpenSBI v1.2-80-g4b28afc |
| 143 | ____ _____ ____ _____ |
| 144 | / __ \ / ____| _ \_ _| |
| 145 | | | | |_ __ ___ _ __ | (___ | |_) || | |
| 146 | | | | | '_ \ / _ \ '_ \ \___ \| _ < | | |
| 147 | | |__| | |_) | __/ | | |____) | |_) || |_ |
| 148 | \____/| .__/ \___|_| |_|_____/|___/_____| |
| 149 | | | |
| 150 | |_| |
| 151 | |
| 152 | Platform Name : StarFive VisionFive 2 v1.3B |
| 153 | Platform Features : medeleg |
| 154 | Platform HART Count : 5 |
| 155 | Platform IPI Device : aclint-mswi |
| 156 | Platform Timer Device : aclint-mtimer @ 4000000Hz |
| 157 | Platform Console Device : uart8250 |
| 158 | Platform HSM Device : --- |
| 159 | Platform PMU Device : --- |
| 160 | Platform Reboot Device : --- |
| 161 | Platform Shutdown Device : --- |
| 162 | Platform Suspend Device : --- |
| 163 | Firmware Base : 0x40000000 |
| 164 | Firmware Size : 264 KB |
| 165 | Firmware RW Offset : 0x20000 |
| 166 | Runtime SBI Version : 1.0 |
| 167 | |
| 168 | Domain0 Name : root |
| 169 | Domain0 Boot HART : 2 |
| 170 | Domain0 HARTs : 0*,1*,2*,3*,4* |
| 171 | Domain0 Region00 : 0x0000000002000000-0x000000000200ffff M: (I,R,W) S/U: () |
| 172 | Domain0 Region01 : 0x0000000040000000-0x000000004001ffff M: (R,X) S/U: () |
| 173 | Domain0 Region02 : 0x0000000040000000-0x000000004007ffff M: (R,W) S/U: () |
| 174 | Domain0 Region03 : 0x0000000000000000-0xffffffffffffffff M: (R,W,X) S/U: (R,W,X) |
| 175 | Domain0 Next Address : 0x0000000040200000 |
| 176 | Domain0 Next Arg1 : 0x0000000040287970 |
| 177 | Domain0 Next Mode : S-mode |
| 178 | Domain0 SysReset : yes |
| 179 | Domain0 SysSuspend : yes |
| 180 | |
| 181 | Boot HART ID : 2 |
| 182 | Boot HART Domain : root |
| 183 | Boot HART Priv Version : v1.11 |
| 184 | Boot HART Base ISA : rv64imafdcbx |
| 185 | Boot HART ISA Extensions : none |
| 186 | Boot HART PMP Count : 8 |
| 187 | Boot HART PMP Granularity : 4096 |
| 188 | Boot HART PMP Address Bits: 34 |
| 189 | Boot HART MHPM Count : 2 |
| 190 | Boot HART MIDELEG : 0x0000000000000222 |
| 191 | Boot HART MEDELEG : 0x000000000000b109 |
| 192 | |
| 193 | |
| 194 | U-Boot 2023.04-rc2-00055-gfc43b9c51a-dirty (Mar 02 2023 - 10:51:39 +0800) |
| 195 | |
| 196 | CPU: rv64imac_zba_zbb |
| 197 | Model: StarFive VisionFive 2 v1.3B |
| 198 | DRAM: 8 GiB |
| 199 | Core: 107 devices, 18 uclasses, devicetree: separate |
| 200 | MMC: mmc@16010000: 0, mmc@16020000: 1 |
| 201 | Loading Environment from nowhere... OK |
| 202 | In: serial@10000000 |
| 203 | Out: serial@10000000 |
| 204 | Err: serial@10000000 |
| 205 | Net: No ethernet found. |
| 206 | Working FDT set to ff74a340 |
| 207 | Hit any key to stop autoboot: 0 |
| 208 | StarFive # |
| 209 | StarFive #version |
| 210 | U-Boot 2023.04-rc2-00055-gfc43b9c51a-dirty (Mar 02 2023 - 10:51:39 +0800) |
| 211 | |
| 212 | riscv64-buildroot-linux-gnu-gcc.br_real (Buildroot VF2_515_v1.0.0_rc4) 10.3.0 |
| 213 | GNU ld (GNU Binutils) 2.36.1 |
| 214 | StarFive # |
| 215 | StarFive #mmc dev 1 |
| 216 | switch to partitions #0, OK |
| 217 | mmc1 is current device |
| 218 | StarFive #mmc info |
| 219 | Device: mmc@16020000 |
| 220 | Manufacturer ID: 9f |
| 221 | OEM: 5449 |
| 222 | Name: SD64G |
| 223 | Bus Speed: 50000000 |
| 224 | Mode: SD High Speed (50MHz) |
| 225 | Rd Block Len: 512 |
| 226 | SD version 3.0 |
| 227 | High Capacity: Yes |
| 228 | Capacity: 58.3 GiB |
| 229 | Bus Width: 4-bit |
| 230 | Erase Group Size: 512 Bytes |
| 231 | StarFive # |
| 232 | StarFive #mmc part |
| 233 | |
| 234 | Partition Map for MMC device 1 -- Partition Type: EFI |
| 235 | |
| 236 | Part Start LBA End LBA Name |
| 237 | Attributes |
| 238 | Type GUID |
| 239 | Partition GUID |
| 240 | 1 0x00001000 0x00001fff "spl" |
| 241 | attrs: 0x0000000000000000 |
| 242 | type: 2e54b353-1271-4842-806f-e436d6af6985 |
| 243 | (2e54b353-1271-4842-806f-e436d6af6985) |
| 244 | guid: d5ee2056-3020-475b-9a33-25b4257c9f12 |
| 245 | 2 0x00002000 0x00003fff "uboot" |
| 246 | attrs: 0x0000000000000000 |
| 247 | type: bc13c2ff-59e6-4262-a352-b275fd6f7172 |
| 248 | (bc13c2ff-59e6-4262-a352-b275fd6f7172) |
| 249 | guid: 379ab7fe-fd0c-4149-b758-960c1cbfc0cc |
| 250 | 3 0x00004000 0x00194000 "system" |
| 251 | attrs: 0x0000000000000000 |
| 252 | type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7 |
| 253 | (data) |
| 254 | guid: 539a6df9-4655-4953-8541-733ca36eb1db |
| 255 | StarFive # |
| 256 | StarFive #fatls mmc 1:3 |
| 257 | 6429424 Image.gz |
| 258 | 717705 u-boot.itb |
| 259 | 125437 u-boot-spl.bin.normal.out |
| 260 | 152848495 initramfs.cpio.gz |
| 261 | 11285 jh7110-starfive-visionfive-2-v1.3b.dtb |
| 262 | |
| 263 | 5 file(s), 0 dir(s) |
| 264 | |
| 265 | StarFive #fatload mmc 1:3 ${kernel_addr_r} Image.gz |
| 266 | 6429424 bytes read in 394 ms (15.6 MiB/s) |
| 267 | StarFive #fatload mmc 1:3 ${fdt_addr_r} jh7110-starfive-visionfive-2-v1.3b.dtb |
| 268 | 11285 bytes read in 5 ms (2.2 MiB/s) |
| 269 | StarFive #fatload mmc 1:3 ${ramdisk_addr_r} initramfs.cpio.gz |
| 270 | 152848495 bytes read in 9271 ms (15.7 MiB/s) |
| 271 | StarFive #booti ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r} |
| 272 | Uncompressing Kernel Image |
| 273 | ## Flattened Device Tree blob at 46000000 |
| 274 | Booting using the fdt blob at 0x46000000 |
| 275 | Working FDT set to 46000000 |
| 276 | Loading Ramdisk to f5579000, end fe73d86f ... OK |
| 277 | Loading Device Tree to 00000000f5573000, end 00000000f5578c14 ... OK |
| 278 | Working FDT set to f5573000 |
| 279 | |
| 280 | Starting kernel ... |
| 281 | |
| 282 | |
| 283 | ] Linux version 6.2.0-starfive-00026-g11934a315b67 (wyh@wyh-VirtualBox) (riscv64-linux-gnu-gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0, GNU ld (GNU Binutils for Ubuntu) 2.30) #1 SMP Thu Mar 2 14:51:36 CST 2023 |
| 284 | [ 0.000000] OF: fdt: Ignoring memory range 0x40000000 - 0x40200000 |
| 285 | [ 0.000000] Machine model: StarFive VisionFive 2 v1.3B |
| 286 | [ 0.000000] efi: UEFI not found. |
| 287 | [ 0.000000] Zone ranges: |
| 288 | [ 0.000000] DMA32 [mem 0x0000000040200000-0x00000000ffffffff] |
| 289 | [ 0.000000] Normal [mem 0x0000000100000000-0x000000013fffffff] |
| 290 | [ 0.000000] Movable zone start for each node |
| 291 | [ 0.000000] Early memory node ranges |
| 292 | [ 0.000000] node 0: [mem 0x0000000040200000-0x000000013fffffff] |
| 293 | [ 0.000000] Initmem setup node 0 [mem 0x0000000040200000-0x000000013fffffff] |
| 294 | [ 0.000000] On node 0, zone DMA32: 512 pages in unavailable ranges |
| 295 | [ 0.000000] SBI specification v1.0 detected |
| 296 | [ 0.000000] SBI implementation ID=0x1 Version=0x10002 |
| 297 | [ 0.000000] SBI TIME extension detected |
| 298 | [ 0.000000] SBI IPI extension detected |
| 299 | [ 0.000000] SBI RFENCE extension detected |
| 300 | [ 0.000000] SBI HSM extension detected |
| 301 | [ 0.000000] CPU with hartid=0 is not available |
| 302 | [ 0.000000] CPU with hartid=0 is not available |
| 303 | [ 0.000000] CPU with hartid=0 is not available |
| 304 | [ 0.000000] riscv: base ISA extensions acdfim |
| 305 | [ 0.000000] riscv: ELF capabilities acdfim |
| 306 | [ 0.000000] percpu: Embedded 18 pages/cpu s35960 r8192 d29576 u73728 |
| 307 | [ 0.000000] pcpu-alloc: s35960 r8192 d29576 u73728 alloc=18*4096 |
| 308 | [ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 |
| 309 | [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 1031688 |
| 310 | [ 0.000000] Kernel command line: console=ttyS0,115200 debug rootwait earlycon=sbi |
| 311 | [ 0.000000] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes, linear) |
| 312 | [ 0.000000] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes, linear) |
| 313 | [ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off |
| 314 | [ 0.000000] software IO TLB: area num 4. |
| 315 | [ 0.000000] software IO TLB: mapped [mem 0x00000000f1573000-0x00000000f5573000] (64MB) |
| 316 | [ 0.000000] Virtual kernel memory layout: |
| 317 | [ 0.000000] fixmap : 0xffffffc6fee00000 - 0xffffffc6ff000000 (2048 kB) |
| 318 | [ 0.000000] pci io : 0xffffffc6ff000000 - 0xffffffc700000000 ( 16 MB) |
| 319 | [ 0.000000] vmemmap : 0xffffffc700000000 - 0xffffffc800000000 (4096 MB) |
| 320 | [ 0.000000] vmalloc : 0xffffffc800000000 - 0xffffffd800000000 ( 64 GB) |
| 321 | [ 0.000000] modules : 0xffffffff0136a000 - 0xffffffff80000000 (2028 MB) |
| 322 | [ 0.000000] lowmem : 0xffffffd800000000 - 0xffffffd8ffe00000 (4094 MB) |
| 323 | [ 0.000000] kernel : 0xffffffff80000000 - 0xffffffffffffffff (2047 MB) |
| 324 | [ 0.000000] Memory: 3867604K/4192256K available (8012K kernel code, 4919K rwdata, 4096K rodata, 2190K init, 476K bss, 324652K reserved, 0K cma-reserved) |
| 325 | [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1 |
| 326 | [ 0.000000] rcu: Hierarchical RCU implementation. |
| 327 | [ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=64 to nr_cpu_ids=4. |
| 328 | [ 0.000000] rcu: RCU debug extended QS entry/exit. |
| 329 | [ 0.000000] Tracing variant of Tasks RCU enabled. |
| 330 | [ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies. |
| 331 | [ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4 |
| 332 | [ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0 |
| 333 | [ 0.000000] CPU with hartid=0 is not available |
| 334 | [ 0.000000] riscv-intc: unable to find hart id for /cpus/cpu@0/interrupt-controller |
| 335 | [ 0.000000] riscv-intc: 64 local interrupts mapped |
| 336 | [ 0.000000] plic: interrupt-controller@c000000: mapped 136 interrupts with 4 handlers for 9 contexts. |
| 337 | [ 0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention. |
| 338 | [ 0.000000] riscv-timer: riscv_timer_init_dt: Registering clocksource cpuid [0] hartid [4] |
| 339 | [ 0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x1d854df40, max_idle_ns: 881590404240 ns |
| 340 | [ 0.000003] sched_clock: 64 bits at 4MHz, resolution 250ns, wraps every 2199023255500ns |
| 341 | [ 0.000437] Console: colour dummy device 80x25 |
| 342 | [ 0.000568] Calibrating delay loop (skipped), value calculated using timer frequency.. 8.00 BogoMIPS (lpj=16000) |
| 343 | [ 0.000602] pid_max: default: 32768 minimum: 301 |
| 344 | [ 0.000752] LSM: initializing lsm=capability,integrity |
| 345 | [ 0.001071] Mount-cache hash table entries: 8192 (order: 4, 65536 bytes, linear) |
| 346 | [ 0.001189] Mountpoint-cache hash table entries: 8192 (order: 4, 65536 bytes, linear) |
| 347 | [ 0.004201] CPU node for /cpus/cpu@0 exist but the possible cpu range is :0-3 |
| 348 | [ 0.007426] cblist_init_generic: Setting adjustable number of callback queues. |
| 349 | [ 0.007457] cblist_init_generic: Setting shift to 2 and lim to 1. |
| 350 | [ 0.007875] riscv: ELF compat mode unsupported |
| 351 | [ 0.007902] ASID allocator disabled (0 bits) |
| 352 | [ 0.008405] rcu: Hierarchical SRCU implementation. |
| 353 | [ 0.008426] rcu: Max phase no-delay instances is 1000. |
| 354 | [ 0.009247] EFI services will not be available. |
| 355 | [ 0.010738] smp: Bringing up secondary CPUs ... |
| 356 | [ 0.018358] smp: Brought up 1 node, 4 CPUs |
| 357 | [ 0.021776] devtmpfs: initialized |
| 358 | [ 0.027337] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns |
| 359 | [ 0.027389] futex hash table entries: 1024 (order: 4, 65536 bytes, linear) |
| 360 | [ 0.027888] pinctrl core: initialized pinctrl subsystem |
| 361 | [ 0.029881] NET: Registered PF_NETLINK/PF_ROUTE protocol family |
| 362 | [ 0.030401] audit: initializing netlink subsys (disabled) |
| 363 | [ 0.031041] audit: type=2000 audit(0.028:1): state=initialized audit_enabled=0 res=1 |
| 364 | [ 0.031943] cpuidle: using governor menu |
| 365 | [ 0.043011] HugeTLB: registered 2.00 MiB page size, pre-allocated 0 pages |
| 366 | [ 0.043033] HugeTLB: 0 KiB vmemmap can be freed for a 2.00 MiB page |
| 367 | [ 0.044943] iommu: Default domain type: Translated |
| 368 | [ 0.044965] iommu: DMA domain TLB invalidation policy: strict mode |
| 369 | [ 0.046089] SCSI subsystem initialized |
| 370 | [ 0.046733] libata version 3.00 loaded. |
| 371 | [ 0.047231] usbcore: registered new interface driver usbfs |
| 372 | [ 0.047315] usbcore: registered new interface driver hub |
| 373 | [ 0.047420] usbcore: registered new device driver usb |
| 374 | [ 0.049770] vgaarb: loaded |
| 375 | [ 0.050277] clocksource: Switched to clocksource riscv_clocksource |
| 376 | [ 0.084690] NET: Registered PF_INET protocol family |
| 377 | [ 0.085561] IP idents hash table entries: 65536 (order: 7, 524288 bytes, linear) |
| 378 | [ 0.093010] tcp_listen_portaddr_hash hash table entries: 2048 (order: 4, 65536 bytes, linear) |
| 379 | [ 0.093152] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear) |
| 380 | [ 0.093224] TCP established hash table entries: 32768 (order: 6, 262144 bytes, linear) |
| 381 | [ 0.093821] TCP bind hash table entries: 32768 (order: 9, 2097152 bytes, linear) |
| 382 | [ 0.117880] TCP: Hash tables configured (established 32768 bind 32768) |
| 383 | [ 0.118500] UDP hash table entries: 2048 (order: 5, 196608 bytes, linear) |
| 384 | [ 0.118881] UDP-Lite hash table entries: 2048 (order: 5, 196608 bytes, linear) |
| 385 | [ 0.119675] NET: Registered PF_UNIX/PF_LOCAL protocol family |
| 386 | [ 0.121749] RPC: Registered named UNIX socket transport module. |
| 387 | [ 0.121776] RPC: Registered udp transport module. |
| 388 | [ 0.121784] RPC: Registered tcp transport module. |
| 389 | [ 0.121791] RPC: Registered tcp NFSv4.1 backchannel transport module. |
| 390 | [ 0.121816] PCI: CLS 0 bytes, default 64 |
| 391 | [ 0.124101] Unpacking initramfs... |
| 392 | [ 0.125468] workingset: timestamp_bits=46 max_order=20 bucket_order=0 |
| 393 | [ 0.128372] NFS: Registering the id_resolver key type |
| 394 | [ 0.128498] Key type id_resolver registered |
| 395 | [ 0.128525] Key type id_legacy registered |
| 396 | [ 0.128625] nfs4filelayout_init: NFSv4 File Layout Driver Registering... |
| 397 | [ 0.128649] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering... |
| 398 | [ 0.129358] 9p: Installing v9fs 9p2000 file system support |
| 399 | [ 0.130179] NET: Registered PF_ALG protocol family |
| 400 | [ 0.130499] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247) |
| 401 | [ 0.130544] io scheduler mq-deadline registered |
| 402 | [ 0.130556] io scheduler kyber registered |
| 403 | [ 0.416754] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled |
| 404 | [ 0.420857] SuperH (H)SCI(F) driver initialized |
| 405 | [ 0.443735] loop: module loaded |
| 406 | [ 0.448605] e1000e: Intel(R) PRO/1000 Network Driver |
| 407 | [ 0.448627] e1000e: Copyright(c) 1999 - 2015 Intel Corporation. |
| 408 | [ 0.450716] usbcore: registered new interface driver uas |
| 409 | [ 0.450832] usbcore: registered new interface driver usb-storage |
| 410 | [ 0.451638] mousedev: PS/2 mouse device common for all mice |
| 411 | [ 0.453465] sdhci: Secure Digital Host Controller Interface driver |
| 412 | [ 0.453487] sdhci: Copyright(c) Pierre Ossman |
| 413 | [ 0.453584] sdhci-pltfm: SDHCI platform and OF driver helper |
| 414 | [ 0.454140] usbcore: registered new interface driver usbhid |
| 415 | [ 0.454174] usbhid: USB HID core driver |
| 416 | [ 0.454833] riscv-pmu-sbi: SBI PMU extension is available |
| 417 | [ 0.454920] riscv-pmu-sbi: 16 firmware and 4 hardware counters |
| 418 | [ 0.454942] riscv-pmu-sbi: Perf sampling/filtering is not supported as sscof extension is not available |
| 419 | [ 0.457071] NET: Registered PF_INET6 protocol family |
| 420 | [ 0.460627] Segment Routing with IPv6 |
| 421 | [ 0.460821] In-situ OAM (IOAM) with IPv6 |
| 422 | [ 0.461005] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver |
| 423 | [ 0.462712] NET: Registered PF_PACKET protocol family |
| 424 | [ 0.462933] 9pnet: Installing 9P2000 support |
| 425 | [ 0.463141] Key type dns_resolver registered |
| 426 | [ 0.463168] start plist test |
| 427 | [ 0.469261] end plist test |
| 428 | [ 0.506774] debug_vm_pgtable: [debug_vm_pgtable ]: Validating architecture page table helpers |
| 429 | [ 0.553683] gpio gpiochip0: Static allocation of GPIO base is deprecated, use dynamic allocation. |
| 430 | [ 0.554741] starfive-jh7110-sys-pinctrl 13040000.pinctrl: StarFive GPIO chip registered 64 GPIOs |
| 431 | [ 0.555900] gpio gpiochip1: Static allocation of GPIO base is deprecated, use dynamic allocation. |
| 432 | [ 0.556772] starfive-jh7110-aon-pinctrl 17020000.pinctrl: StarFive GPIO chip registered 4 GPIOs |
| 433 | [ 0.559454] printk: console [ttyS0] disabled |
| 434 | [ 0.579948] 10000000.serial: ttyS0 at MMIO 0x10000000 (irq = 3, base_baud = 1500000) is a 16550A |
| 435 | [ 0.580082] printk: console [ttyS0] enabled |
| 436 | [ 13.642680] Freeing initrd memory: 149264K |
| 437 | [ 13.651051] Freeing unused kernel image (initmem) memory: 2188K |
| 438 | [ 13.666431] Run /init as init process |
| 439 | [ 13.670116] with arguments: |
| 440 | [ 13.673168] /init |
| 441 | [ 13.675488] with environment: |
| 442 | [ 13.678668] HOME=/ |
| 443 | [ 13.681038] TERM=linux |
| 444 | Starting syslogd: OK |
| 445 | Starting klogd: OK |
| 446 | Running sysctl: OK |
| 447 | Populating /dev using udev: [ 14.145944] udevd[93]: starting version 3.2.10 |
| 448 | [ 15.214287] random: crng init done |
| 449 | [ 15.240816] udevd[94]: starting eudev-3.2.10 |
| 450 | done |
| 451 | Saving random seed: OK |
| 452 | Starting system message bus: dbus[122]: Unknown username "pulse" in message bus configuration file |
| 453 | done |
| 454 | Starting rpcbind: OK |
| 455 | Starting iptables: OK |
| 456 | Starting bluetoothd: OK |
| 457 | Starting network: Waiting for interface eth0 to appear............... timeout! |
| 458 | run-parts: /etc/network/if-pre-up.d/wait_iface: exit status 1 |
| 459 | FAIL |
| 460 | Starting dropbear sshd: OK |
| 461 | Starting NFS statd: OK |
| 462 | Starting NFS services: OK |
| 463 | Starting NFS daemon: rpc.nfsd: Unable to access /proc/fs/nfsd errno 2 (No such file or directory). |
| 464 | Please try, as root, 'mount -t nfsd nfsd /proc/fs/nfsd' and then restart rpc.nfsd to correct the problem |
| 465 | FAIL |
| 466 | Starting NFS mountd: OK |
| 467 | Starting DHCP server: FAIL |
| 468 | |
| 469 | Welcome to Buildroot |
| 470 | buildroot login: |
| 471 | |
| 472 | Booting from SPI |
| 473 | ---------------- |
| 474 | |
| 475 | Use Building steps from "Booting from MMC using U-Boot SPL" section. |
| 476 | |
| 477 | Partition the SPI in Linux via mtdblock. (Require to boot the board in |
| 478 | SD boot mode by enabling MTD block in Linux) |
| 479 | |
| 480 | Use prebuilt image from here [1], which support to partition the SPI flash. |
| 481 | |
| 482 | |
| 483 | Program the SPI (Require to boot the board in SD boot mode) |
| 484 | |
| 485 | Execute below steps on U-Boot proper, |
| 486 | |
| 487 | .. code-block:: none |
| 488 | |
| 489 | sf probe |
| 490 | fatload mmc 1:3 $kernel_addr_r u-boot.itb |
| 491 | sf update $kernel_addr_r 0x100000 $filesize |
| 492 | |
| 493 | fatload mmc 1:3 $kernel_addr_r u-boot-spl.bin.normal.out |
| 494 | sf update $kernel_addr_r 0x0 $filesize |
| 495 | |
| 496 | |
| 497 | Power off the board |
| 498 | |
| 499 | Change DIP switches MSEL[1:0] are set to 00, select the boot mode to flash |
| 500 | |
| 501 | Power up the board. |