应用指南|在VisionFive 2上编译和安装OpenWrt

此镜像版本已经通过内部测试,可正常访问ipv4\ipv6,可通过直联或交换机、路由器接入网络,支持实时信息、网络诊断等网络监控功能,可安装各种插件、配置Samba服务器,支持Passwall模块,满足大家不同的开发需求,欢迎各位开发者体验。

以下是关于在VisionFive 2 上编译和安装 OpenWrt 的方法。

下载

  1. 下载代码(建议在 ubuntu20 或以上的版本编译):

git clone https://github.com/starfive-tech/openwrt.git

  1. 输入以下命令,进入 openwrt 目录:

cd openwrt/

  1. 输入以下命令,获取镜像:

git checkout jh71x0-openwrt

配置

1. 输入以下命令进行基本配置

make menuconfig

在配置菜单栏选项中,根据以下步骤选择对应的选项并进入:

a. Target System/Profile 配置:

→ Target System (StarFive JH71x0 (7100/7110))

→ Target Profile (StarFive VisionFive 2 v1.2a) 或 Target Profile (StarFive VisionFive 2 v1.3b)

:昉·星光 2 目前有两个版本,v1.2a 和 v1.3b。

b. Target Image 配置:

2. luci 网页配置

a. 执行以下命令默认安装 luci:

./scripts/feeds update packages luci

./scripts/feeds install -a -p luci

b. 输入以下命令进行 luci 网页配置:

make menuconfig

c. 在配置菜单栏按照以下顺序选择 uhttpd:

→ Network → Web Servers/Proxies → <*> uhttpd

d. 根据以下顺序选择选项进行 Luci 配置:
→ LuCI → 1. Collections → <*> luci

→ LuCI → 2. Modules → Translations → <*> Chinese Simplified (zh_Hans)

→ LuCI → 3. Applications → <* > luci-app-ddns

<* > luci-app-firewall

<* > luci-app-ntpc

<* > luci-app-samba4

<* > luci-app-uhttpd

→ LuCI → 4. Themes ->全选

→ LuCI → 6. Libraries → luci-lib-ipkg

3. 无线配置

由于昉·星光 2 上没有 WiFi 模块,需要购置无线 WiFi 模组。OpenWrt 支持数十种 WiFi

驱动,这里选用较易购置的 RTL8821AE PCI 接口的驱动。昉·星光 2 上有 m.2 的 M key 的接口, 需要再接 nvme m.2 的 M key 转 a/e key 的接口板才能接上 RTL8821AE 模组。

在配置菜单栏按照如下顺序进行无线配置:

a. → Kernel modules → Wireless Driver → <*> kmod-cfg80211

<*> kmod-mac80211

<*> kmod-rtl8821ae

b. → Network → WirelessAPD → <> wpad-basic-mbedtls
<
> hostapd-common
<> wpa-cli
<
> hostapd-utils

4. 执行以下命令,下载需要的软件包

./scripts/feeds update -a

./scripts/feeds install -a

make download V=s

:下载时间可能较长,请耐心等待。下载过程中如出现 download fail 报错,表示软件包没有下载完整,请再次执行下载命令,直到没有分出现 download fail 为止。

5. 编译。

make -j8

:编译过程可能需要 2 个小时。

6. 生成 SD 卡镜像

bin/targets/jh71x0/generic/

openwrt-jh71x0-generic-visionfive2-v1.3b-ext4-sdcard.img.gz

7. 解压该 SD 卡镜像文件

gunzip openwrt-jh71x0-generic-visionfive2-v1.3b-ext4-sdcard.img.gz

8. 将镜像刷写到 SD Card

dd if=openwrt-jh71x0-generic-visionfive2-v1.3b-ext4-sdcard.img of=/dev/sdX bs=1M

oflag=direct

  • Windows 系统可用 balenaEtcher 软件烧写工具。

  • 由于镜像不包括 SPL 和 U-Boot, 所以 Nor Flash 需要已刷写 SPL 和 U-Boot,并且选择 QSPI Nor Flash 模式启动。

  • 使用命令 sudo fdisk –l 查询,根据您的设备替换 X 的值。例如,您的设备为/dev/sdb,则 X 的值应为 b。

9. 启动 OpenWrt

10. 增加 passwall 功能

如果需要增加 passwall 功能, 可以按以下步骤, passwall 功能不在默认的功能里面,需要修改代码和下载包支持。

a. 在 wigori 目录下:

echo "src-git passwall_packages
https://github.com/xiaorouji/openwrt-passwall-packages.git;main" >>"feeds.conf.default"

echo "src-git passwall https://github.com/xiaorouji/openwrt-passwall.git;main" >>"feeds.conf.default"

b. 修改 include/target.mk:

diff --git a/include/target.mk b/include/target.mk

index b5e3e7ff6f..f65e127ecf 100644

--- a/include/target.mk

+++ b/include/target.mk

@@ -53,7 +53,7 @@ DEFAULT_PACKAGES.nas:=\

       mdadm

# For router targets

DEFAULT_PACKAGES.router:=\

-     dnsmasq \

+     dnsmasq-full \

c. 下载并安装 passwall 包:

./scripts/feeds update -a

./scripts/feeds install -a

./scripts/feeds install -a -f -p PWpackages

./scripts/feeds install luci-app-passwall

d. 配置 passwall 和取消配置 dnsmasq:

make menuconfig

配置 passwall:

→ OpenWrt Configuration ->LuCI → 3. Application → luci-app-passwall

取消配置 dnsmaq:

→ OpenWrt Configuration → Base system → < >dnsmasq

→ OpenWrt Configuration → Base system → -*- dnsmasq-full

e. 更新下载软件包:

make download V=s

f. 编译:

方法同第 5 步

2 Likes

牛,支持一下

1 Like

欢迎体验,期待反馈 :wink:

针对 Vision Five 1 尝试编译了一下,粗略测试可用。

我是打算将 WiFi 当 WAN 使用,以太网有线接口暂时不用。
将来打算用手机接 Vision Five 1 的 USB 口,用手机 USB-NET 当 WAN 口。

U-Boot 2022.04-rc2-VisionFive (May 16 2022 - 00:00:00 +0000)StarFive

CPU:   rv64imafdc
Model: StarFive VisionFive V1
DRAM:  8 GiB
Core:  13 devices, 9 uclasses, devicetree: separate
MMC:   mmc@10000000: 0, mmc@10010000: 1
Loading Environment from SPIFlash... cadence_spi spi@11860000: Can't get reset: -524
SF: Detected gd25lq128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

StarFive EEPROM format v1

--------EEPROM INFO--------
Vendor : StarFive Technology Co., Ltd.
Product full SN: VF7100A1-2220-D008E000-00000A13
data version: 0x1
PCB revision: 0x1
BOM revision: A
Ethernet MAC address: 6c:cf:39:00:0a:12
--------EEPROM INFO--------

In:    serial@12440000
Out:   serial@12440000
Err:   serial@12440000
Net:   dwmac.10020000
MMC CD is 0x1, force to True.
MMC CD is 0x1, force to True.
switch to partitions #0, OK
mmc0 is current device
MMC CD is 0x1, force to True.
MMC CD is 0x1, force to True.
Can't set block device
Can't set block device
Autoboot in 2 seconds
dwmac.10020000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
Could not initialize PHY dwmac.10020000
dwmac.10020000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
Could not initialize PHY dwmac.10020000
MMC CD is 0x1, force to True.
MMC CD is 0x1, force to True.
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:3...
Found U-Boot script /boot.scr.uimg
265 bytes read in 20 ms (12.7 KiB/s)
## Executing script at 88100000
19770368 bytes read in 4106 ms (4.6 MiB/s)
22346 bytes read in 27 ms (807.6 KiB/s)
Moving Image from 0x84000000 to 0x80200000, end=81531000
## Flattened Device Tree blob at 88000000
   Booting using the fdt blob at 0x88000000
   Loading Device Tree to 00000000ff6cc000, end 00000000ff6d4749 ... OK

Starting kernel ...

[    0.000000] Linux version 6.1.46 (用户名@主机名) (riscv64-openwrt-linux-musl-gcc (OpenWrt GCC 12.3.0 r23795-fcfb9f211b) 12.3.0, GNU ld (GNU Binutils) 2.40.0) #0 SMP Fri Aug 25 09:30:43 2023
[    0.000000] OF: fdt: Ignoring memory range 0x80000000 - 0x80200000
[    0.000000] Machine model: StarFive VisionFive V1
[    0.000000] earlycon: sbi0 at I/O port 0x0 (options '')
[    0.000000] printk: bootconsole [sbi0] enabled
[    0.000000] efi: UEFI not found.
[    0.000000] Reserved memory: created CMA memory pool at 0x00000000a0000000, size 640 MiB
[    0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[    0.000000] Reserved memory: created DMA memory pool at 0x00000000f9000000, size 16 MiB
[    0.000000] OF: reserved mem: initialized node framebuffer@f9000000, compatible id shared-dma-pool
[    0.000000] Reserved memory: created DMA memory pool at 0x00000000fb000000, size 32 MiB
[    0.000000] OF: reserved mem: initialized node framebuffer@fb000000, compatible id shared-dma-pool
[    0.000000] Zone ranges:
[    0.000000]   DMA32    [mem 0x0000000080200000-0x00000000ffffffff]
[    0.000000]   Normal   [mem 0x0000000100000000-0x000000027fffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000080200000-0x00000000cfffffff]
[    0.000000]   node   0: [mem 0x00000000d0000000-0x00000000f7ffffff]
[    0.000000]   node   0: [mem 0x00000000f8000000-0x00000000f8ffffff]
[    0.000000]   node   0: [mem 0x00000000f9000000-0x00000000f9ffffff]
[    0.000000]   node   0: [mem 0x00000000fa000000-0x00000000faffffff]
[    0.000000]   node   0: [mem 0x00000000fb000000-0x00000000fcffffff]
[    0.000000]   node   0: [mem 0x00000000fd000000-0x000000027fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000080200000-0x000000027fffffff]
[    0.000000] SBI specification v0.3 detected
[    0.000000] SBI implementation ID=0x1 Version=0x10000
[    0.000000] SBI TIME extension detected
[    0.000000] SBI IPI extension detected
[    0.000000] SBI RFENCE extension detected
[    0.000000] SBI HSM extension detected
[    0.000000] riscv: base ISA extensions acdfim
[    0.000000] riscv: ELF capabilities acdfim
[    0.000000] percpu: Embedded 17 pages/cpu s31480 r8192 d29960 u69632
[    0.000000] pcpu-alloc: s31480 r8192 d29960 u69632 alloc=17*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 2063880
[    0.000000] Kernel command line: earlyprintk console=ttyS0,115200 debug rootwait earlycon=sbi root=/dev/mmcblk0p4
[    0.000000] Unknown kernel command line parameters "earlyprintk", will be passed to user space.
[    0.000000] Dentry cache hash table entries: 1048576 (order: 11, 8388608 bytes, linear)
[    0.000000] Inode-cache hash table entries: 524288 (order: 10, 4194304 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] software IO TLB: area num 2.
[    0.000000] software IO TLB: mapped [mem 0x000000009c000000-0x00000000a0000000] (64MB)
[    0.000000] Memory: 6730672K/8386560K available (6166K kernel code, 4847K rwdata, 4096K rodata, 2171K init, 340K bss, 1000528K reserved, 655360K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu: 	RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=2.
[    0.000000] rcu: 	RCU debug extended QS entry/exit.
[    0.000000] 	Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] riscv-intc: 64 local interrupts mapped
[    0.000000] plic: interrupt-controller@c000000: mapped 133 interrupts with 2 handlers for 4 contexts.
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    0.000000] riscv-timer: riscv_timer_init_dt: Registering clocksource cpuid [0] hartid [0]
[    0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x171024e6b, max_idle_ns: 440795202301 ns
[    0.000001] sched_clock: 64 bits at 6MHz, resolution 160ns, wraps every 4398046511040ns
[    0.008248] Calibrating delay loop (skipped), value calculated using timer frequency.. 12.50 BogoMIPS (lpj=62500)
[    0.018428] pid_max: default: 32768 minimum: 301
[    0.024271] Mount-cache hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.032263] Mountpoint-cache hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.044234] cblist_init_generic: Setting adjustable number of callback queues.
[    0.051349] cblist_init_generic: Setting shift to 1 and lim to 1.
[    0.057732] ASID allocator disabled (0 bits)
[    0.062136] rcu: Hierarchical SRCU implementation.
[    0.066822] rcu: 	Max phase no-delay instances is 1000.
[    0.072554] EFI services will not be available.
[    0.077375] smp: Bringing up secondary CPUs ...
[    0.083068] smp: Brought up 1 node, 2 CPUs
[    0.096391] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.106130] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[    0.198110] pinctrl core: initialized pinctrl subsystem
[    0.205438] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.212015] thermal_sys: Registered thermal governor 'step_wise'
[    0.212443] cpuidle: using governor menu
[    0.223226] CCACHE: 2 banks, 16 ways, sets/bank=1024, bytes/block=64
[    0.229472] CCACHE: Index of the largest way enabled: 15
[    0.247701] platform soc:display-encoder: Fixed dependency cycle(s) with /soc/crtc@12000000
[    0.255969] platform soc:display-encoder: Fixed dependency cycle(s) with /soc/i2c@118b0000/tda998x@70
[    0.275776] HugeTLB: registered 1.00 GiB page size, pre-allocated 0 pages
[    0.282485] HugeTLB: 0 KiB vmemmap can be freed for a 1.00 GiB page
[    0.288762] HugeTLB: registered 2.00 MiB page size, pre-allocated 0 pages
[    0.295596] HugeTLB: 0 KiB vmemmap can be freed for a 2.00 MiB page
[    0.304882] SCSI subsystem initialized
[    0.308849] libata version 3.00 loaded.
[    0.312811] usbcore: registered new interface driver usbfs
[    0.318255] usbcore: registered new interface driver hub
[    0.323697] usbcore: registered new device driver usb
[    0.328980] pps_core: LinuxPPS API ver. 1 registered
[    0.333852] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.343017] PTP clock support registered
[    0.348584] clocksource: Switched to clocksource riscv_clocksource
[    0.356618] NET: Registered PF_INET protocol family
[    0.365770] IP idents hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[    0.386957] tcp_listen_portaddr_hash hash table entries: 4096 (order: 5, 131072 bytes, linear)
[    0.396080] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.403779] TCP established hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    0.414458] TCP bind hash table entries: 65536 (order: 10, 4194304 bytes, linear)
[    0.441798] TCP: Hash tables configured (established 65536 bind 65536)
[    0.449034] UDP hash table entries: 4096 (order: 6, 393216 bytes, linear)
[    0.457434] UDP-Lite hash table entries: 4096 (order: 6, 393216 bytes, linear)
[    0.466679] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.472420] PCI: CLS 0 bytes, default 64
[    0.478081] workingset: timestamp_bits=46 max_order=21 bucket_order=0
[    0.492072] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.498012] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.548018] NET: Registered PF_ALG protocol family
[    0.563038] Serial: 8250/16550 driver, 6 ports, IRQ sharing disabled
[    0.573738] vic-rng 118d0000.trng: Initialized
[    0.580111] loop: module loaded
[    0.583773] zram: Added device: zram0
[    0.601705] i2c_dev: i2c /dev entries driver
[    0.614584] Synopsys Designware Multimedia Card Interface Driver
[    0.622175] NET: Registered PF_INET6 protocol family
[    0.630413] Segment Routing with IPv6
[    0.634039] In-situ OAM (IOAM) with IPv6
[    0.638100] NET: Registered PF_PACKET protocol family
[    0.643147] can: controller area network core
[    0.647760] NET: Registered PF_CAN protocol family
[    0.652469] 8021q: 802.1Q VLAN Support v1.8
[    0.656732] Key type dns_resolver registered
[    0.701730] dw_axi_dmac_platform 100b0000.dma-controller: WARN: Device release is not defined so it is not safe to unbind this driver while in use
[    0.715253] dw_axi_dmac_platform 100b0000.dma-controller: DesignWare AXI DMA Controller, 4 channels
[    0.724584] dw_axi_dmac_platform 10500000.dma-controller: WARN: Device release is not defined so it is not safe to unbind this driver while in use
[    0.739158] dw_axi_dmac_platform 10500000.dma-controller: DesignWare AXI DMA Controller, 16 channels
[    0.748992] dw-apb-uart 11870000.serial: detected caps 00000000 should be 00000100
[    0.756455] 11870000.serial: ttyS1 at MMIO 0x11870000 (irq = 12, base_baud = 4640625) is a 16550
[    0.765978] 12440000.serial: ttyS0 at MMIO 0x12440000 (irq = 13, base_baud = 6250000) is a 16550A
[    0.774774] printk: console [ttyS0] enabled
[    0.774774] printk: console [ttyS0] enabled
[    0.783137] printk: bootconsole [sbi0] disabled
[    0.783137] printk: bootconsole [sbi0] disabled
[    0.792951] starfive-dwmac 10020000.ethernet: IRQ eth_lpi not found
[    0.799287] starfive-dwmac 10020000.ethernet: Hash table entries set to unexpected value 0
[    0.808283] starfive-dwmac 10020000.ethernet: User ID: 0x59, Synopsys ID: 0x37
[    0.815511] starfive-dwmac 10020000.ethernet: 	DWMAC1000
[    0.820826] starfive-dwmac 10020000.ethernet: DMA HW capability register supported
[    0.828366] starfive-dwmac 10020000.ethernet: RX Checksum Offload Engine supported
[    0.835915] starfive-dwmac 10020000.ethernet: COE Type 2
[    0.841215] starfive-dwmac 10020000.ethernet: Wake-Up On Lan supported
[    0.847716] starfive-dwmac 10020000.ethernet: Enhanced/Alternate descriptors
[    0.854744] starfive-dwmac 10020000.ethernet: Enabled extended descriptors
[    0.861599] starfive-dwmac 10020000.ethernet: Ring mode enabled
[    0.867492] starfive-dwmac 10020000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[    0.875559] starfive-dwmac 10020000.ethernet: device MAC address 6c:cf:39:00:0a:12
[    0.889555] dw_mmc 10000000.mmc: IDMAC supports 32-bit address mode.
[    0.895930] tps65086 0-005e: Device: TPS650861, OTP: A, Rev: 0
[    0.895997] dw_mmc 10000000.mmc: Using internal DMA controller.
[    0.907708] dw_mmc 10000000.mmc: Version ID is 290a
[    0.909315] dw_mmc 10010000.mmc: IDMAC supports 32-bit address mode.
[    0.912654] dw_mmc 10000000.mmc: DW MMC controller at irq 17,32 bit host data width,32 deep fifo
[    0.918986] dw_mmc 10010000.mmc: Using internal DMA controller.
[    0.927777] mmc_host mmc0: card is polling.
[    0.933568] dw_mmc 10010000.mmc: Version ID is 290a
[    0.942663] dw_mmc 10010000.mmc: DW MMC controller at irq 18,32 bit host data width,32 deep fifo
[    0.948604] mmc_host mmc0: Bus speed (slot 0) = 100000000Hz (slot req 400000Hz, actual 400000HZ div = 125)
[    0.951509] dw_mmc 10010000.mmc: allocated mmc-pwrseq
[    0.966064] mmc_host mmc1: card is non-removable.
[    0.978142] at24 0-0050: supply vcc not found, using dummy regulator
[    0.985404] mmc_host mmc1: Bus speed (slot 0) = 123750000Hz (slot req 400000Hz, actual 399193HZ div = 155)
[    0.995081] at24 0-0050: 512 byte 24c04 EEPROM, writable, 16 bytes/write
[    1.004806] dw-apb-uart 12440000.serial: forbid DMA for kernel console
[    1.011511] Waiting for root device /dev/mmcblk0p4...
[    1.024632] mmc_host mmc0: Bus speed (slot 0) = 100000000Hz (slot req 50000000Hz, actual 50000000HZ div = 1)
[    1.034511] mmc0: new high speed SDHC card at address b368
[    1.042933] mmcblk0: mmc0:b368 00000 7.51 GiB
[    1.054402] Alternate GPT is invalid, using primary GPT.
[    1.059764]  mmcblk0: p1 p2 p3 p4
[    1.086860] EXT4-fs (mmcblk0p4): mounted filesystem without journal. Quota mode: disabled.
[    1.095276] VFS: Mounted root (ext4 filesystem) readonly on device 179:4.
[    1.111143] Freeing unused kernel image (initmem) memory: 2168K
[    1.162378] Checked W+X mappings: passed, no W+X pages found
[    1.168040] rodata_test: all tests were successful
[    1.172857] Run /sbin/init as init process
[    1.176938]   with arguments:
[    1.179911]     /sbin/init
[    1.182606]     earlyprintk
[    1.185387]   with environment:
[    1.188513]     HOME=/
[    1.190876]     TERM=linux
[    1.227174] mmc_host mmc1: Bus speed (slot 0) = 123750000Hz (slot req 50000000Hz, actual 30937500HZ div = 2)
[    1.239233] mmc1: new high speed SDIO card at address 0001
[    1.286333] init: Console is alive
[    1.290197] init: - watchdog -
[    1.735152] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    1.856902] xhci-hcd xhci-hcd.3.auto: xHCI Host Controller
[    1.862452] xhci-hcd xhci-hcd.3.auto: new USB bus registered, assigned bus number 1
[    1.871387] xhci-hcd xhci-hcd.3.auto: hcc params 0x200073c8 hci version 0x100 quirks 0x0000002000018010
[    1.880829] xhci-hcd xhci-hcd.3.auto: irq 21, io mem 0x104d0000
[    1.887198] xhci-hcd xhci-hcd.3.auto: xHCI Host Controller
[    1.892705] xhci-hcd xhci-hcd.3.auto: new USB bus registered, assigned bus number 2
[    1.900397] xhci-hcd xhci-hcd.3.auto: Host supports USB 3.0 SuperSpeed
[    1.907674] hub 1-0:1.0: USB hub found
[    1.911475] hub 1-0:1.0: 1 port detected
[    1.915938] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    1.924514] hub 2-0:1.0: USB hub found
[    1.928283] hub 2-0:1.0: 1 port detected
[    1.934351] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    1.949719] init: - preinit -
[    2.208599] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[    2.393052] hub 1-1:1.0: USB hub found
[    2.401098] hub 1-1:1.0: 4 ports detected
[    2.538732] usb 2-1: new SuperSpeed USB device number 2 using xhci-hcd
[    2.572285] hub 2-1:1.0: USB hub found
[    2.576352] hub 2-1:1.0: 4 ports detected
[    3.598596] random: crng init done
[    3.689272] starfive-dwmac 10020000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0
[    3.703422] starfive-dwmac 10020000.ethernet eth0: PHY [stmmac-0:00] driver [YT8521 Gigabit Ethernet] (irq=POLL)
[    3.718598] dwmac1000: Master AXI performs fixed burst length
[    3.724330] starfive-dwmac 10020000.ethernet eth0: No Safety Features support found
[    3.731995] starfive-dwmac 10020000.ethernet eth0: No MAC Management Counters available
[    3.739988] starfive-dwmac 10020000.ethernet eth0: IEEE 1588-2008 Advanced Timestamp supported
[    3.748806] starfive-dwmac 10020000.ethernet eth0: registered PTP clock
[    3.757507] starfive-dwmac 10020000.ethernet eth0: configuring for phy/rgmii-txid link mode
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[    5.839788] mount_root: mounting /dev/root
[    5.850312] EXT4-fs (mmcblk0p4): re-mounted. Quota mode: disabled.
[    5.865220] urandom-seed: Seeding with /etc/urandom.seed
[    5.905557] procd: - early -
[    5.908547] procd: - watchdog -
[    6.458539] procd: - watchdog -
[    6.463069] procd: - ubus -
[    6.620498] procd: - init -
Please press Enter to activate this console.
[    6.913039] kmodloader: loading kernel modules from /etc/modules.d/*
[    6.950105] GACT probability on
[    6.954879] Mirror/redirect action on
[    6.970248] u32 classifier
[    6.972961]     input device check on
[    6.976607]     Actions configured
[    7.087428] usbcore: registered new interface driver cdc_wdm
[    7.094481] Loading modules backported from Linux version v6.1.24-0-g0102425ac76b
[    7.101956] Backport generated by backports.git v5.15.92-1-44-gd6ea70fafd36
[    7.157018] usbcore: registered new interface driver usbserial_generic
[    7.163657] usbserial: USB Serial support registered for generic
[    7.199722] xt_time: kernel timezone is -0000
[    7.205961] usbcore: registered new interface driver cdc_ether
[    7.215287] usbcore: registered new interface driver cdc_ncm
[    7.318191] urngd: v1.0.2 started.
[    7.503877] usbcore: registered new interface driver ch341
[    7.509462] usbserial: USB Serial support registered for ch341-uart
[    7.517322] usbcore: registered new interface driver huawei_cdc_ncm
[    8.708689] usbcore: registered new interface driver pl2303
[    8.714335] usbserial: USB Serial support registered for pl2303
[    8.721213] usbcore: registered new interface driver plusb
[    8.732617] PPP generic driver version 2.4.2
[    8.737902] NET: Registered PF_PPPOX protocol family
[    8.744378] usbcore: registered new interface driver rndis_host
[    9.143400] mmc_host mmc1: Bus speed (slot 0) = 123750000Hz (slot req 400000Hz, actual 399193HZ div = 155)
[    9.268281] mmc_host mmc1: Bus speed (slot 0) = 123750000Hz (slot req 50000000Hz, actual 30937500HZ div = 2)
[    9.282066] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1
[    9.290958] usbcore: registered new interface driver brcmfmac
[    9.298284] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43430-sdio.starfive,visionfive-v1.bin failed with error -2
[    9.310041] brcmfmac mmc1:0001:1: Falling back to sysfs fallback for: brcm/brcmfmac43430-sdio.starfive,visionfive-v1.bin
[    9.349216] usbcore: registered new interface driver carl9170
[    9.360030] usbcore: registered new interface driver mt76x0u
[    9.371571] kmodloader: done loading kernel modules from /etc/modules.d/*
[    9.557753] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/1 wl0: Aug 16 2022 03:05:14 version 7.45.98.125 (5b7978c CY) FWID 01-f420b81d
[   12.619926] starfive-dwmac 10020000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0
[   12.634465] starfive-dwmac 10020000.ethernet eth0: PHY [stmmac-0:00] driver [YT8521 Gigabit Ethernet] (irq=POLL)
[   12.648727] dwmac1000: Master AXI performs fixed burst length
[   12.654475] starfive-dwmac 10020000.ethernet eth0: No Safety Features support found
[   12.662161] starfive-dwmac 10020000.ethernet eth0: No MAC Management Counters available
[   12.670169] starfive-dwmac 10020000.ethernet eth0: IEEE 1588-2008 Advanced Timestamp supported
[   12.679015] starfive-dwmac 10020000.ethernet eth0: registered PTP clock
[   12.685620] starfive-dwmac 10020000.ethernet eth0: configuring for phy/rgmii-txid link mode
[   12.699228] br-lan: port 1(eth0) entered blocking state
[   12.704445] br-lan: port 1(eth0) entered disabled state
[   12.709979] device eth0 entered promiscuous mode
[   13.125268] brcmfmac mmc1:0001:1 phy0-sta0: renamed from wlan0
[   14.510102] IPv6: ADDRCONF(NETDEV_CHANGE): phy0-sta0: link becomes ready



BusyBox v1.36.1 (2023-08-25 09:30:43 UTC) built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt SNAPSHOT, r23795-fcfb9f211b
 -----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@OpenWrt:/#

2 Likes

能否提供镜像运行静态功耗,网络数据通信时动态功耗;

riscv-vf2-202305

这个branch有人试过吗?

试过可用,按照文档一路下来即可

该教程发布格式已更新为正式官方文档,可点击查看:

1 Like

此部分已更新为:

  1. 下载代码(建议在 ubuntu20 或以上的版本编译):

git clone https://github.com/starfive-tech/openwrt.git

  1. 输入以下命令,进入 openwrt 目录:

cd openwrt/

  1. 输入以下命令,获取镜像:

git checkout jh71x0-openwrt

1 Like


求助,照着文档来的

./scripts/feeds update -a
update了吗?

update了,应该是这个仓库有问题https://github.com/starfive-tech/openwrt.git我用openwrt官方仓库就正常

@cyber https://github.com/starfive-tech/openwrt.git没有问题的,在能正常访问github的前提下(VPN),请check一下软件包更新部分,可以多执行几次,确保软件包能下载下来。


我也遇到这样的问题;我是使用gitee同步starfive-openwrt仓库,下载的openwrt代码