lowRISC / lowrisc-chip

The root repo for lowRISC project and FPGA demos.
http://www.lowrisc.org/
Other
593 stars 149 forks source link

Makefile errors(failed to make nexys4_ddr_rocket with rc2) #175

Closed Leo-Z-Li closed 4 years ago

Leo-Z-Li commented 4 years ago

I noticed that maybe there are some errors in 0.7rc2 makefile commands. I step-by-step followed the intro at https://www.cl.cam.ac.uk/~jrrk2/docs/generate-the-bitstream/ At the step of generate the bitstream, some error occurs. I run the command: make nexys4_ddr_rocket Then, it was running until an error shows:

make fpga/work-fpga/nexys4_ddr_rocket/rocket_xilinx.mcs BOARD="nexys4_ddr" CPU="rocket" BITSIZE=0x400000 XILINX_PART="xc7a100tcsg324-1" XILINX_BOARD="digilentinc.com:nexys4_ddr:part0:1.1" VENDOR="sifive" MEMSIZE="0x8000000" BBL=/home/leo/makess/lowrisc-chip-ariane-v0.7/lowrisc-quickstart/rescue.bin |& tee nexys4_ddr_rocket.log /bin/sh: 1: Syntax error: "&" unexpected Makefile:61: recipe for target 'nexys4_ddr_rocket' failed make: *** [nexys4_ddr_rocket] Error 2

I thought there may be some mistakes in the Makefile, so I deleted the "&" after "|". Then, I run the make nexys4_ddr_rocket again. This time, the |& thing was OK, but another error occurs:

sed -e "s/VENDOR/sifive/" -e "s/CPU/rocket/" -e "s/MEMSIZE/0x8000000/" -e "s/BOARD/nexys4_ddr/" ../generic.dts | dtc -I dts -O dtb -o nexys4_ddr_rocket.dtb

:87.45-90.19: Warning (unique_unit_address): /soc/lowrisc-gpio@44000000: duplicate unit-address (also used in node /soc/lowrisc-rtc@44000000) echo -e .section .dtb \; .align 4,0 \; .globl _dtb \; _dtb: \; .incbin \"nexys4_ddr_rocket.dtb\" | riscv64-buildroot-linux-gnu-gcc -Os -ggdb -march=rv64imafdc -mabi=lp64d -Wall -mcmodel=medany -fno-builtin-printf -fno-builtin-memcpy -fno-builtin -ffreestanding -fshort-wchar -DBITSIZE=0x400000 -c -xassembler - -o nexys4_ddr_rocket.o {standard input}: Assembler messages: {standard input}:1: Error: junk at end of line, first unrecognized character is `-' make[2]: *** [nexys4_ddr_rocket.o] Error 1 Makefile:41: recipe for target 'nexys4_ddr_rocket.o' failed make[2]: Leaving directory '/home/leo/makess/lowrisc-chip-ariane-v0.7/fpga/src/etherboot' make[1]: *** [fpga/src/etherboot/nexys4_ddr_rocket.sv] Error 2 Makefile:41: recipe for target 'fpga/src/etherboot/nexys4_ddr_rocket.sv' failed make[1]: Leaving directory '/home/leo/makess/lowrisc-chip-ariane-v0.7'

It seems that the file: home/leo/makess/lowrisc-chip-ariane-v0.7/fpga/src/etherboot/Makefile has some mistakes around the -xassembler - -o, but I don't know how to fix it.

I also found that the 0.7rc2 repo structure seems very different from the 0.6 one, could you please explain a little bit about it?

Another issue: the binary releases of 0.7rc2 have a problem of don't have an ethernet connection(I step-by-step followed the quickstart guide). While booting, debian says: FAILED TO RAISE NETWORK INTERFACE. And this not just happened to me, my other friend has the same problem, I think it is a general issue. 0.6 doesn't have this issue.

The full (Not that full cuz it was too long) command line echos are in the attachment file. command line echos.txt

jrrk commented 4 years ago

Hi Leo, Thanks for trying LowRISC. The first error is probably because/bin/sh is aliased to dash instead of bash. The second error is more mysterious and may be because a different version of device tree compiler than the one expected is installed. This could be due to running on an OS different to the supported one. To debug, run the assembly stage manually instead of in a pipe.

The third issue with Debian Ethernet, I am not clear if you do not want Ethernet or you have it and it doesn’t work. You can either use buildroot as recommended in the instructions, or chroot into the startup disk on your workstation to disable unwanted services.

Regarding the file layout, this closely follows the Ariane structure which was introduced in this release. It is supposed to reduce the number of independent stages needing to be run.

Sent from my iPhone

On 27 Jun 2020, at 14:41, Leo Levin notifications@github.com wrote:

 I noticed that maybe there are some errors in 0.7rc2 makefile commands. I step-by-step followed the intro at https://www.cl.cam.ac.uk/~jrrk2/docs/generate-the-bitstream/ At the step of generate the bitstream, some error occurs. I run the command: make nexys4_ddr_rocket Then, it was running until an error shows:

make fpga/work-fpga/nexys4_ddr_rocket/rocket_xilinx.mcs BOARD="nexys4_ddr" CPU="rocket" BITSIZE=0x400000 XILINX_PART="xc7a100tcsg324-1" XILINX_BOARD="digilentinc.com:nexys4_ddr:part0:1.1" VENDOR="sifive" MEMSIZE="0x8000000" BBL=/home/leo/makess/lowrisc-chip-ariane-v0.7/lowrisc-quickstart/rescue.bin |& tee nexys4_ddr_rocket.log /bin/sh: 1: Syntax error: "&" unexpected Makefile:61: recipe for target 'nexys4_ddr_rocket' failed make: *** [nexys4_ddr_rocket] Error 2

I thought there may be some mistakes in the Makefile, so I deleted the "&" after "|". Then, I run the make nexys4_ddr_rocket again. This time, the |& thing was OK, but another error occurs:

sed -e "s/VENDOR/sifive/" -e "s/CPU/rocket/" -e "s/MEMSIZE/0x8000000/" -e "s/BOARD/nexys4_ddr/" ../generic.dts | dtc -I dts -O dtb -o nexys4_ddr_rocket.dtb :87.45-90.19: Warning (unique_unit_address): /soc/lowrisc-gpio@44000000: duplicate unit-address (also used in node /soc/lowrisc-rtc@44000000) echo -e .section .dtb ; .align 4,0 ; .globl _dtb ; _dtb: ; .incbin "nexys4_ddr_rocket.dtb" | riscv64-buildroot-linux-gnu-gcc -Os -ggdb -march=rv64imafdc -mabi=lp64d -Wall -mcmodel=medany -fno-builtin-printf -fno-builtin-memcpy -fno-builtin -ffreestanding -fshort-wchar -DBITSIZE=0x400000 -c -xassembler - -o nexys4_ddr_rocket.o {standard input}: Assembler messages: {standard input}:1: Error: junk at end of line, first unrecognized character is `-' make[2]: [nexys4_ddr_rocket.o] Error 1 Makefile:41: recipe for target 'nexys4_ddr_rocket.o' failed make[2]: Leaving directory '/home/leo/makess/lowrisc-chip-ariane-v0.7/fpga/src/etherboot' make[1]: [fpga/src/etherboot/nexys4_ddr_rocket.sv] Error 2 Makefile:41: recipe for target 'fpga/src/etherboot/nexys4_ddr_rocket.sv' failed make[1]: Leaving directory '/home/leo/makess/lowrisc-chip-ariane-v0.7'

It seems that the file: home/leo/makess/lowrisc-chip-ariane-v0.7/fpga/src/etherboot/Makefile has some mistakes around the -xassembler - -o, but I don't know how to fix it.

I also found that the 0.7rc2 repo structure seems very different from the 0.6 one, could you please explain a little bit about it?

Another issue: the binary releases of 0.7rc2 have a problem of don't have an ethernet connection(I step-by-step followed the quickstart guide). While booting, debian says: FAILED TO RAISE NETWORK INTERFACE. And this not just happened to me, my other friend has the same problem, I think it is a general issue. 0.6 doesn't have this issue.

The full (Not that full cuz it was too long) command line echos are in the attachment file. command line echos.txt

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Leo-Z-Li commented 4 years ago

Hi dev Thanks for your patient reply, I shall try to debug following your intro.

About the third issue: Excuse me for didn't explain it clearly. I mean I do want the ethernet, but it does not work on both my nexys4ddr board and my friend's n4ddr board. Firstly, this issue only happens on 0.7rc2. We followed the quickstart intro, and it successfully booted Debian. But while Debian is booting, the error occurred: FAILD TO RAISE NETWORK INTERFACE, the full startup echos are as follows:

Xshell 6 (Build 0197) Copyright (c) 2002 NetSarang Computer, Inc. All rights reserved.

Type `help' to learn how to use Xshell prompt. [C:\~]$

Connecting to COM4... Connected.

Hello World! Setup MAC addr SD boot sd_f: 0x0 dma_f: 0x0 status: resp_vec: 0x0 init_state: 0xa counter: 0x573 init_fsm: 0x1 tran_state: 0x3f tran_fsm: 0x0 sd_f: 0x0 dma_f: 0x0 status: resp_vec: 0x0 init_state: 0xa counter: 0x7260a init_fsm: 0x1 tran_state: 0x3f tran_fsm: 0x0 sd_f: 0x0 dma_f: 0x0 status: resp_vec: 0x0 init_state: 0x14 counter: 0x0 init_fsm: 0x0 tran_state: 0x3f tran_fsm: 0x0 sd_f: 0x0 dma_f: 0x0 status: resp_vec: 0x0 init_state: 0x47 counter: 0x3ab68 init_fsm: 0x1 tran_state: 0x3f tran_fsm: 0x0 sd_f: 0x0 dma_f: 0x0 status: resp_vec: 0x0 init_state: 0x31 counter: 0x0 init_fsm: 0x0 tran_state: 0x3f tran_fsm: 0x0 sd_f: 0x0 dma_f: 0x0 status: REQ_RDY INIT_DONE HCXC resp_vec: 0x0 init_state: 0xf0 counter: 0x0 init_fsm: 0x0 tran_state: 0x0 tran_fsm: 0x0 sd_f: 0x0 dma_f: 0x0 status: REQ_RDY INIT_DONE HCXC resp_vec: 0x0 init_state: 0xf0 counter: 0x0 init_fsm: 0x0 tran_state: 0x0 tran_fsm: 0x0 Load boot.bin into memory load elf to DDR memory Section[0]: elfn(80000000,0x1000,0x8e80); Section[1]: elfn(80009000,0xa000,0x10c0); memset(8000a0c0,0,0x9fc0); Section[2]: elfn(80200000,0x200000,0x754f3c); Boot the loaded program at address $pc=800000bbl loader [ 0.000000] OF: fdt: Ignoring memory range 0x80000000 - 0x80200000 [ 0.000000] Linux version 5.3.18 (jrrk2@brexit.cl.cam.ac.uk) (gcc version 9.2.0 (Buildroot 2019.11.1-00008-g37e845d3fb)) #1 Mon Feb 17 15:51:51 GMT 2020 [ 0.000000] initrd not found or empty - disabling initrd [ 0.000000] Zone ranges: [ 0.000000] DMA32 [mem 0x0000000080200000-0x0000000087ffffff] [ 0.000000] Normal empty [ 0.000000] Movable zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x0000000080200000-0x0000000087ffffff] [ 0.000000] Initmem setup node 0 [mem 0x0000000080200000-0x0000000087ffffff] [ 0.000000] On node 0 totalpages: 32256 [ 0.000000] DMA32 zone: 504 pages used for memmap [ 0.000000] DMA32 zone: 0 pages reserved [ 0.000000] DMA32 zone: 32256 pages, LIFO batch:7 [ 0.000000] software IO TLB: mapped [mem 0x87dfb000-0x87dfb800] (0MB) [ 0.000000] elf_hwcap is 0x112d [ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768 [ 0.000000] pcpu-alloc: [0] 0 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 31752 [ 0.000000] Kernel command line: swiotlb=noforce root=/dev/rda2 [ 0.000000] Dentry cache hash table entries: 16384 (order: 5, 131072 bytes, linear) [ 0.000000] Inode-cache hash table entries: 8192 (order: 4, 65536 bytes, linear) [ 0.000000] Sorting __ex_table... [ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off [ 0.000000] Memory: 119208K/129024K available (5179K kernel code, 323K rwdata, 1487K rodata, 172K init, 329K bss, 9816K reserved, 0K cma-reserved) [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 [ 0.000000] NR_IRQS: 0, nr_irqs: 0, preallocated irqs: 0 [ 0.000000] plic: mapped 5 interrupts with 1 handlers for 2 contexts. [ 0.000000] riscv_timer_init_dt: Registering clocksource cpuid [0] hartid [0] [ 0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x1d854df40, max_idle_ns: 7052723233920 ns [ 0.000110] sched_clock: 64 bits at 500kHz, resolution 2000ns, wraps every 4398046511000ns [ 0.002194] Console: colour dummy device 80x25 [ 0.195628] printk: console [hvc0] enabled [ 0.199980] Calibrating delay loop (skipped), value calculated using timer frequency.. 1.00 BogoMIPS (lpj=5000) [ 0.210274] pid_max: default: 32768 minimum: 301 [ 0.217406] Mount-cache hash table entries: 512 (order: 0, 4096 bytes, linear) [ 0.222692] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes, linear) [ 0.239954] VALIDATE proc [ 0.244120] VALIDATE cgroup1 [ 0.244524] VALIDATE cgroup2 [ 0.261068] devtmpfs: initialized [ 0.276186] random: get_random_u32 called from bucket_table_alloc.isra.0+0x4e/0x15e with crng_init=0 [ 0.282428] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns [ 0.290494] futex hash table entries: 256 (order: 0, 6144 bytes, linear) [ 0.298854] xor: measuring software checksum speed [ 0.402724] 8regs : 79.200 MB/sec [ 0.503250] 8regs_prefetch: 77.200 MB/sec [ 0.603716] 32regs : 85.600 MB/sec [ 0.704216] 32regs_prefetch: 85.200 MB/sec [ 0.704560] xor: using function: 32regs (85.600 MB/sec) [ 0.714180] NET: Registered protocol family 16 [ 1.093800] raid6: int64x8 gen() 16 MB/s [ 1.265262] raid6: int64x8 xor() 10 MB/s [ 1.437964] raid6: int64x4 gen() 16 MB/s [ 1.610586] raid6: int64x4 xor() 11 MB/s [ 1.781378] raid6: int64x2 gen() 12 MB/s [ 1.954294] raid6: int64x2 xor() 10 MB/s [ 2.129918] raid6: int64x1 gen() 6 MB/s [ 2.301696] raid6: int64x1 xor() 6 MB/s [ 2.302034] raid6: using algorithm int64x4 gen() 16 MB/s [ 2.305856] raid6: .... xor() 11 MB/s, rmw enabled [ 2.310936] raid6: using intx1 recovery algorithm [ 2.330626] Bluetooth: Core ver 2.22 [ 2.331890] NET: Registered protocol family 31 [ 2.333232] Bluetooth: HCI device and connection manager initialized [ 2.339892] Bluetooth: HCI socket layer initialized [ 2.345072] Bluetooth: L2CAP socket layer initialized [ 2.350224] Bluetooth: SCO socket layer initialized [ 2.356192] clocksource: Switched to clocksource riscv_clocksource [ 2.484970] NET: Registered protocol family 2 [ 2.495404] tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 4096 bytes, linear) [ 2.499320] TCP established hash table entries: 1024 (order: 1, 8192 bytes, linear) [ 2.506828] TCP bind hash table entries: 1024 (order: 1, 8192 bytes, linear) [ 2.513800] TCP: Hash tables configured (established 1024 bind 1024) [ 2.522690] UDP hash table entries: 256 (order: 1, 8192 bytes, linear) [ 2.527430] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear) [ 2.537300] NET: Registered protocol family 1 [ 2.545506] RPC: Registered named UNIX socket transport module. [ 2.545970] RPC: Registered udp transport module. [ 2.551118] RPC: Registered tcp transport module. [ 2.555636] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 2.575530] Initialise system trusted keyrings [ 2.578434] workingset: timestamp_bits=46 max_order=15 bucket_order=0 [ 2.762118] NFS: Registering the id_resolver key type [ 2.763096] Key type id_resolver registered [ 2.765968] Key type id_legacy registered [ 2.770614] nfs4filelayout_init: NFSv4 File Layout Driver Registering... [ 2.777256] Installing knfsd (copyright (C) 1996 okir@monad.swb.de). [ 3.192190] Key type asymmetric registered [ 3.192580] Asymmetric key parser 'x509' registered [ 3.196908] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253) [ 3.315974] lowrisc_fb: Found device at /soc/lowrisc-fb@45038000, mapped to FFFFFFD004080000 (size=80000) [ 3.325464] Console: switching to colour lowrisc device 128x32 [ 4.098474] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled [ 4.118970] 41000000.uart: ttyS0 at MMIO 0x41000000 (irq = 1, base_baud = 3125000) is a TI16750 [ 4.132804] 46000000.lowrisc-bt: ttyS1 at MMIO 0x46000000 (irq = 4, base_baud = 3125000) is a TI16750 [ 4.223208] loop: module loaded [ 4.224390] physaddr=0x42000000, vstart=ffffffd004010000, vsiz=ffff, irq=2 [ 4.228342] sd_f: 0x0 dma_f: 0x0 status: [ 4.228342] resp_vec: 0x0 init_state: ST_CI_WAIT_POWER counter: 0x20c [ 4.228342] init_fsm: 0x1 tran_state: ST_RST tran_fsm: 0xc000000000 [ 4.228342] driver_status: piton_sd_TASK_IDLE
[ 4.252326] sd_f: 0x0 dma_f: 0x0 status: [ 4.252326] resp_vec: 0x0 init_state: ST_CI_WAIT_POWER counter: 0x1255b0 [ 4.252326] init_fsm: 0x1 tran_state: ST_RST tran_fsm: 0xc000000000 [ 4.252326] driver_status: piton_sd_TASK_IDLE
[ 4.288302] sd_f: 0x0 dma_f: 0x0 status: [ 4.288302] resp_vec: 0x0 init_state: ST_CMD0_WAIT_INT counter: 0x0 [ 4.288302] init_fsm: 0x0 tran_state: ST_RST tran_fsm: 0xc000000000 [ 4.288302] driver_status: piton_sd_TASK_IDLE
[ 4.306888] sd_f: 0x0 dma_f: 0x0 status: HCXC [ 4.306888] resp_vec: 0x0 init_state: ST_ACMD41_WAIT_INTERVAL counter: 0xccb47 [ 4.306888] init_fsm: 0x1 tran_state: ST_RST tran_fsm: 0xc000000000 [ 4.306888] driver_status: piton_sd_TASK_IDLE
[ 4.590112] sd_f: 0x0 dma_f: 0x0 status: HCXC [ 4.590112] resp_vec: 0x0 init_state: ST_ACMD41_CMD55_WAIT_CLR counter: 0x0 [ 4.590112] init_fsm: 0x0 tran_state: ST_RST tran_fsm: 0xc000000000 [ 4.590112] driver_status: piton_sd_TASK_IDLE
[ 4.609862] sd_f: 0x0 dma_f: 0x0 status: REQ_RDY INIT_DONE HCXC [ 4.609862] resp_vec: 0x0 init_state: ST_INIT_DONE counter: 0x0 [ 4.609862] init_fsm: 0x0 tran_state: ST_IDLE tran_fsm: 0x1c000000000 [ 4.609862] driver_status: piton_sd_TASK_IDLE
[ 4.637678] LowRISC_piton_sd physaddr 0x42000000, mapped to 0xffffffd004010000, irq=2 [ 4.656966] rda: rda1 rda2 rda3 rda4 [ 4.659586] rda: p2 size 8355608 extends beyond EOD, enabling native capacity [ 4.663220] rda: rda1 rda2 rda3 rda4 [ 4.666504] native partitions 16 [ 4.666574] rda: p1 start 2048 size 65535 [ 4.669520] rda: p2 start 67584 size 8355608 [ 4.673638] rda: p3 start 8456192 size 1048576 [ 4.678182] rda: p4 start 9504768 size 115230720 [ 4.682584] Inferred capacity 124735488 [ 4.690086] rda: detected capacity change from 4140449280 to 63864569856 [ 4.706934] rda: rda1 rda2 rda3 rda4 [ 4.720104] LowRISC_piton_sd device driver, major=253 [ 4.895056] null: module loaded [ 4.898378] libphy: Fixed MDIO Bus: probed [ 4.905986] lowrisc-digilent-ethernet: Lowrisc ethernet platform (43000000-43007FFF) mapped to ffffffd004030000 [ 4.921232] libphy: GPIO Bitbanged LowRISC: probed [ 4.921642] Probing lowrisc-0:01 (address 1) [ 5.030918] SMSC LAN8710/LAN8720 lowrisc-0:01: attached PHY driver [SMSC LAN8710/LAN8720] (mii_bus:phy_addr=lowrisc-0:01, irq=POLL) [ 5.044064] lowrisc-eth 43000000.lowrisc-eth: Lowrisc Ether100MHz registered [ 5.059152] aoe: AoE v85 initialised. [ 5.062440] mousedev: PS/2 mouse device common for all mice [ 5.064086] hid_keyboard address 45030000, remapped to ffffffd00403c000 [ 5.072882] input: 45030000.lowrisc-keyb as /devices/platform/soc/45030000.lowrisc-keyb/input/input0 [ 5.082136] lowrisc_rtc_probe(ffffffe00769a600) [ 5.084034] physaddr=0x44000000, vstart=ffffffd00400b000, vsiz=fff, irq=0 [ 5.093774] lowrisc-rtc 44000000.lowrisc-rtc: char device (254:0) [ 5.097632] lowrisc-rtc 44000000.lowrisc-rtc: registered as rtc0 [ 5.103468] Feb 17 15:51:51 GMT 2020 [ 5.104620] LowRISC-rtc device driver [ 5.116496] device-mapper: ioctl: 4.40.0-ioctl (2019-01-18) initialised: dm-devel@redhat.com [ 5.119586] Bluetooth: HCI UART driver ver 2.3 [ 5.124128] Bluetooth: HCI UART protocol BCSP registered [ 5.130910] hidraw: raw HID events driver (C) Jiri Kosina [ 5.152660] NET: Registered protocol family 10 [ 5.171894] Segment Routing with IPv6 [ 5.173672] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver [ 5.185946] NET: Registered protocol family 17 [ 5.186936] Bluetooth: HIDP (Human Interface Emulation) ver 1.2 [ 5.191060] Bluetooth: HIDP socket layer initialized [ 5.197022] start plist test [ 5.316302] end plist test [ 5.325244] Loading compiled-in X.509 certificates [ 5.359764] Btrfs loaded, crc32c=crc32c-generic [ 5.362552] Fast-forwarding time to kernel build date: #1 Mon Feb 17 15:51:51 GMT 2020 [ 5.362708] Feb 17 15:51:51 2020 [ 5.367532] lowrisc-rtc 44000000.lowrisc-rtc: setting system clock to 2020-02-17T15:51:51 UTC (1581954711) [ 5.381036] Bluetooth: Starting self testing [ 5.384574] Bluetooth: Finished self testing [ 5.394380] md: Skipping autodetection of RAID arrays. (raid=autodetect will force) [ 5.533658] EXT4-fs (rda2): mounted filesystem with ordered data mode. Opts: (null) [ 5.536904] VFS: Mounted root (ext4 filesystem) readonly on device 253:2. [ 5.614086] devtmpfs: mounted [ 5.619660] Freeing unused kernel memory: 172K [ 5.620026] This architecture does not have kernel memory protection. [ 5.625188] Run /sbin/init as init process [ 6.163456] random: fast init done [ 14.342922] systemd[1]: systemd 244-3 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 -SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=hybrid) [ 14.363014] systemd[1]: Detected architecture riscv64.

Welcome to Debian GNU/Linux bullseye/sid!

[ 14.529744] systemd[1]: Set hostname to . [ 29.728490] systemd[1]: /lib/systemd/system/dbus.socket:5: ListenStream= references a path below legacy directory /var/run/, updating /var/run/dbus/system_bus_socket → /run/dbus/system_bus_socket; please update the unit file accordingly. [ 32.798102] random: systemd: uninitialized urandom read (16 bytes read) [ 32.871664] systemd[1]: Created slice system-getty.slice. [ OK ] Created slice system-getty.slice. [ 32.882808] random: systemd: uninitialized urandom read (16 bytes read) [ 32.915306] systemd[1]: Created slice system-serial\x2dgetty.slice. [ OK ] Created slice system-serial\x2dgetty.slice. [ 32.925750] random: systemd: uninitialized urandom read (16 bytes read) [ 32.959208] systemd[1]: Created slice system-systemd\x2dfsck.slice. [ OK ] Created slice system-systemd\x2dfsck.slice. [ 33.001564] systemd[1]: Created slice User and Session Slice. [ OK ] Created slice User and Session Slice. [ 33.015484] systemd[1]: Started Dispatch Password Requests to Console Directory Watch. [ OK ] Started Dispatch Password …ts to Console Directory Watch. [ 33.033824] systemd[1]: Started Forward Password Requests to Wall Directory Watch. [ OK ] Started Forward Password R…uests to Wall Directory Watch. [ 33.050546] systemd[1]: Condition check resulted in Arbitrary Executable File Formats File System Automount Point being skipped. [ 33.063604] systemd[1]: Reached target Local Encrypted Volumes. [ OK ] Reached target Local Encrypted Volumes. [ 33.076940] systemd[1]: Reached target Paths. [ OK ] Reached target Paths. [ 33.087814] systemd[1]: Reached target Slices. [ OK ] Reached target Slices. [ 33.473574] systemd[1]: Listening on RPCbind Server Activation Socket. [ OK ] Listening on RPCbind Server Activation Socket. [ 33.495246] systemd[1]: Listening on Syslog Socket. [ OK ] Listening on Syslog Socket. [ 33.513458] systemd[1]: Listening on fsck to fsckd communication Socket. [ OK ] Listening on fsck to fsckd communication Socket. [ 33.531062] systemd[1]: Listening on initctl Compatibility Named Pipe. [ OK ] Listening on initctl Compatibility Named Pipe. [ 33.910090] systemd[1]: Condition check resulted in Journal Audit Socket being skipped. [ 33.923526] systemd[1]: Listening on Journal Socket (/dev/log). [ OK ] Listening on Journal Socket (/dev/log). [ 33.944586] systemd[1]: Listening on Journal Socket. [ OK ] Listening on Journal Socket. [ 33.965030] systemd[1]: Listening on udev Control Socket. [ OK ] Listening on udev Control Socket. [ 33.981394] systemd[1]: Listening on udev Kernel Socket. [ OK ] Listening on udev Kernel Socket. [ 34.000926] systemd[1]: Condition check resulted in Huge Pages File System being skipped. [ 34.013034] systemd[1]: Condition check resulted in POSIX Message Queue File System being skipped. [ 34.105142] systemd[1]: Mounting RPC Pipe File System... Mounting RPC Pipe File System... [ 34.152506] systemd[1]: Condition check resulted in FUSE Control File System being skipped. [ 34.405330] systemd[1]: Mounting Kernel Configuration File System... Mounting Kernel Configuration File System... [ 34.864266] systemd[1]: Mounting Kernel Debug File System... Mounting Kernel Debug File System... [ 34.943584] systemd[1]: Condition check resulted in Kernel Module supporting RPCSEC_GSS being skipped. [ 35.020230] systemd[1]: Condition check resulted in Create list of static device nodes for the current kernel being skipped. [ 35.169454] systemd[1]: Condition check resulted in Set Up Additional Binary Formats being skipped. [ 35.422930] systemd[1]: Starting File System Check on Root Device... Starting File System Check on Root Device... [ 35.795962] systemd[1]: Starting Journal Service... Starting Journal Service... [ 36.154192] systemd[1]: Starting Apply Kernel Variables... Starting Apply Kernel Variables... [ 36.609482] systemd[1]: Starting udev Coldplug all Devices... Starting udev Coldplug all Devices... [ 37.441048] systemd[1]: Mounted RPC Pipe File System. [ OK ] Mounted RPC Pipe File System. [ 37.547968] systemd[1]: Mounted Kernel Configuration File System. [ OK ] Mounted Kernel Configuration File System. [ 37.647956] systemd[1]: Mounted Kernel Debug File System. [ OK ] Mounted Kernel Debug File System. [ 39.410234] systemd[1]: Started File System Check Daemon to report status. [ OK ] Started File System Check Daemon to report status. [ 41.187504] systemd[1]: Started Apply Kernel Variables. [ OK ] Started Apply Kernel Variables. [ 42.327510] systemd[1]: Started File System Check on Root Device. [ OK ] Started File System Check on Root Device. [ 42.723326] systemd[1]: Starting Remount Root and Kernel File Systems... Starting Remount Root and Kernel File Systems... [ 43.542672] systemd[1]: Started Journal Service. [ OK ] Started Journal Service. [ 45.239980] EXT4-fs (rda2): re-mounted. Opts: (null) [ OK ] Started Remount Root and Kernel File Systems. Starting Flush Journal to Persistent Storage... Starting Load/Save Random Seed... Starting Create System Users... [ 49.332470] systemd-journald[90]: Received client request to flush runtime journal. [ OK ] Started Flush Journal to Persistent Storage. [ OK ] Started Create System Users. Starting Create Static Device Nodes in /dev... [ OK ] Started Create Static Device Nodes in /dev. [ OK ] Reached target Local File Systems (Pre). Starting udev Kernel Device Manager... [ OK ] Started udev Kernel Device Manager. [ OK ] Started udev Coldplug all Devices. Starting Helper to synchronize boot up for ifupdown... [ OK ] Found device /dev/rda3. [ OK ] Found device /dev/rda4. [ OK ] Found device /dev/rda1. [ OK ] Found device /dev/hvc0. [ OK ] Started Helper to synchronize boot up for ifupdown. Activating swap /dev/rda3... Starting File System Check on /dev/rda1... Starting File System Check on /dev/rda4... [ 141.911500] Adding 524284k swap on /dev/rda3. Priority:-2 extents:1 across:524284k SS [ OK ] Activated swap /dev/rda3. [ OK ] Reached target Swap. [ OK ] Started File System Check Daemon to report status. [ OK ] Started File System Check on /dev/rda1. [ OK ] Started File System Check on /dev/rda4. Mounting /home... Mounting /mnt/dos...ks (100.0% complete) [ 150.138688] EXT4-fs (rda4): mounted filesystem with ordered data mode. Opts: (null) [ OK ] Mounted /home. [ OK ] Mounted /mnt/dos. [ OK ] Reached target Local File Systems. Starting Enable support fo…l executable binary formats... Starting Raise network interfaces... Starting Preprocess NFS configuration... Starting Create Volatile Files and Directories... [ 155.604504] random: crng init done [ 155.604888] random: 7 urandom warning(s) missed due to ratelimiting [ OK ] Started Enable support for…nal executable binary formats. [ OK ] Started Preprocess NFS configuration. [ OK ] Reached target NFS client services. [ OK ] Started Load/Save Random Seed. [ OK ] Started Create Volatile Files and Directories. Starting RPC bind portmap service... Starting Network Time Synchronization... Starting Update UTMP about System Boot/Shutdown... [FAILED] Failed to start Raise network interfaces. See 'systemctl status networking.service' for details. [ OK ] Reached target Network. [ OK ] Reached target Network is Online. Starting ATA over Ethernet discovery... [ OK ] Started RPC bind portmap service. [ OK ] Reached target Remote File Systems (Pre). [ OK ] Reached target Remote File Systems. [ OK ] Reached target RPC Port Mapper. [ OK ] Started ATA over Ethernet discovery. [ OK ] Started Update UTMP about System Boot/Shutdown. [ OK ] Started Network Time Synchronization. [ OK ] Reached target System Initialization. [ OK ] Started Daily Cleanup of Temporary Directories. [ OK ] Reached target System Time Set. [ OK ] Reached target System Time Synchronized. [FAILED] Failed to start Daily apt download activities. See 'systemctl status apt-daily.timer' for details. [FAILED] Failed to start Daily apt upgrade and clean activities. See 'systemctl status apt-daily-upgrade.timer' for details. [ OK ] Started Periodic ext4 Onli…ata Check for All Filesystems. [ OK ] Started Daily exim4-base housekeeping. [ OK ] Started Daily rotation of log files. [FAILED] Failed to start Daily man-db regeneration. See 'systemctl status man-db.timer' for details. [ OK ] Reached target Timers. [ OK ] Listening on D-Bus System Message Bus Socket. [ OK ] Listening on UUID daemon activation socket. [ OK ] Reached target Sockets. [ OK ] Reached target Basic System. Starting The Apache HTTP Server... [ OK ] Started Regular background program processing daemon. [ OK ] Started D-Bus System Message Bus. Starting LSB: exim Mail Transport Agent... Starting System Logging Service...
Starting OpenBSD Secure Shell server... Starting Login Service... Starting Permit User Sessions... [ OK ] Started System Logging Service. [ OK ] Started Permit User Sessions. [ OK ] Started Getty on tty1. [ OK ] Started Serial Getty on hvc0. [ OK ] Reached target Login Prompts.

Debian GNU/Linux bullseye/sid lowrisc hvc0

lowrisc login:

As you can see, it said 'See 'systemctl status networking.service' for details.' Here is the result:

root@lowrisc:~# systemctl status networking.service

  • networking.service - Raise network interfaces Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor pr> Active: failed (Result: exit-code) since Mon 2020-02-17 15:54:31 GMT; 5min> Docs: man:interfaces(5) Process: 149 ExecStart=/sbin/ifup -a --read-environment (code=exited, statu> Main PID: 149 (code=exited, status=1/FAILURE)

Feb 17 15:54:17 lowrisc systemd[1]: Starting Raise network interfaces... Feb 17 15:54:30 lowrisc ifup[172]: No DHCP client software found! Feb 17 15:54:30 lowrisc ifup[149]: ifup: failed to bring up eth0 Feb 17 15:54:31 lowrisc systemd[1]: networking.service: Main process exited, co> Feb 17 15:54:31 lowrisc systemd[1]: networking.service: Failed with result 'exi> Feb 17 15:54:31 lowrisc systemd[1]: Failed to start Raise network interfaces. lines 1-13/13 (END)

But it seems that my router does successfully detect the lowrisc device, and even shows it MAC address. I googled a lot, and tried these:

sudo vi /etc/network/interfaces

then edit:

auto lo iface lo inet loopback auto eth0 iface eth0 inet dhcp

to:

auto lo iface lo inet loopback allow-hotplug eth0 iface eth0 inet dhcp

Reboot. This time, it does successfully raised network interface, but the internet is still down, cannot connect (ping) to any website.

And I noticed that this issue is already submitted in issue comment, but not solved. Pleased see :https://github.com/lowRISC/lowrisc-chip/issues/169

I'm now trying to build it myself, seeing whether this can be solved. But, if possible, I want to know why this could happen. Also, with my feedback, maybe developers will fix this ethernet issue in the next version (rc3), thus making lowRISC a better project.

By the way, is it possible to generate a vivado .xpr project for 0.7rc2 so I can do some analysis with vivado GUI graphs? For 0.6, I can run make_project command to do this, but 0.7 merged all these independent stages and I can't find a way to do this.

Another little suggestion: Maybe the quickstart docs and makefile need to be updated. The quickstart makefile give 2G to Linux partition by default according to the partition table (the original partition table in the makefile is as follows): image But the rootfs.tar.xz of lowrisc 0.7 rc2 is beyond 2G after extraction, so 2G is not enough for 0.7rc2 (but it's enough for 0.6), the makefile needs a little modify. I give 4G for the Linux partition using the following partition table: image I believe that it will be better to correct the Makefile in order to avoid 'No space left on device' error, this will be more friendly to beginners. (Sorry for my poor English, I'm not a native English speaker...)

Thx again!

jrrk2 commented 4 years ago

Hi Leo, The ariane project which the v0.7 release is based on uses the non-project mode of Vivado, so you can't open the GUI to use the usual analysis functions. However some of the functionality is available by opening a checkpoint file in Vivado which is one of the outputs generated during the flow. Well done for spotting that partition overflow, I must admit I haven't really used the Debian image recently and it could have grown in the meantime.

I'm sorry to say I have left the project now, and as the rest of the team have previously migrated to work on OpenTitan, there is not likely to be an RC3 or full release with Debian. Meanwhile the RISCV support in Debian is evolving and this bug could be fixed if you follow the instructions to build Debian from the upstream installer scripts. I get the impression that you are using the canned Debian image from our website at the moment. This procedure has some problems and I don't know if they have been fixed yet. You are probably aware that the RISCV support failed to reach the QA threshold to include in mainline Debian at the Buster release, mainly due to a lack of rust support.

In view of all the above, the decision was taken to concentrate mainly on buildroot support for this release. As far as I know the Ethernet support is working well with the included buildroot image. If not, you can post a follow up. Debian includes a variety of tools to debug network problems. One help would be to connect your board directly to a laptop and setup a static Ethernet connection, using wireshark to monitor the connection for any packet problems. I think you will be able to learn a lot that way and maybe even fix the underlying problem yourself.

Another option to consider is the Fedora rawhide image for RISCV, I cannot go into details though, it is complicated.

Leo-Z-Li commented 4 years ago

Hi dev I'm surprised to know that you have left the project because you are still giving much help in the issue comments. I could say nothing else but thanks, for your patience and specialized answer. Now I'm trying to use buildroot method seeing whether this error disappears. If that works, maybe I could post my bitstreams and Debian image on Github in order to let more beginners have a better experience with LowRISC.

Leo-Z-Li commented 4 years ago

Hi Dev I'm sorry to bother again, but I want to know what is the gcc and g++ version you used in your developing environment. The second 'mysterious' issue may be caused by incompatible gcc\g++ versions according to my investigation. I'm running Ubuntu18.04LTS,gcc\g++ 7.5.0 ,Vivado2018.2.

jrrk commented 4 years ago

The gcc/g++ I was using was the one that comes with Ubuntu18.04LTS. I was not aware that there was anything special about it. It might be difficult to get access to that exact system again.

jrrk2 commented 4 years ago

Just to clarify the above, I assumed you were asking about the native gcc for some reason. The riscv5 gcc that I am using is the one produced by the buildroot environment path, buildroot-2019.11.1-lowrisc/rescuefs/host/bin/riscv64-buildroot-linux-gnu-gcc relative to the repo root. This is more likely to be relevant to whether your firmware build works or not. This is gcc version 9.2.0 (Buildroot 2019.11.1-07125-g37e845d). You can use 'make firmware' as a quick way to execute this step. Obviously one of the benefits of buildroot is taking away from the user the opportunity to use the 'wrong' compiler.

`

make -B -C fpga/src/etherboot BOARD=nexys4_ddr BITSIZE=0x400000 XILINX_PART=xc7a100tcsg324-1 XILINX_BOARD=digilentinc.com:nexys4_ddr:part0:1.1 CPU=rocket VENDOR=sifive MEMSIZE=0x8000000 CLK_PERIOD_NS="20" PATH=/local/scratch/jrrk2/lowrisc-chip-ariane-v0.7/buildroot-2019.11.1-lowrisc/mainfs/host/bin:/usr/local/bin:/usr/bin:/bin make[1]: Entering directory '/local/scratch/jrrk2/lowrisc-chip-ariane-v0.7/fpga/src/etherboot' CC <= src/dhcp-client.c CC <= src/elf.c CC <= src/ethlib.c CC <= src/ff.c CC <= src/hash-md5.c CC <= src/mini-printf.c CC <= src/random.c CC <= src/string.c CC <= src/tftp_c.c CC <= src/uart.c CC <= src/boot.c CC <= src/dram.c CC <= src/cachetest.c CC <= src/hid.c CC <= src/logo.c CC <= src/queryTimeServer.c CC <= src/bt.c CC <= startup.S sed -e "s/VENDOR/sifive/" -e "s/CPU/rocket/" -e "s/MEMSIZE/0x8000000/" -e "s/BOARD/nexys4_ddr/" ../generic.dts | dtc -I dts -O dtb -o nexys4_ddr_rocket.dtb

:87.45-90.19: Warning (unique_unit_address): /soc/lowrisc-gpio@44000000: duplicate unit-address (also used in node /soc/lowrisc-rtc@44000000) echo -e .section .dtb \; .align 4,0 \; .globl _dtb \; _dtb: \; .incbin \"nexys4_ddr_rocket.dtb\" | riscv64-buildroot-linux-gnu-gcc -Os -ggdb -march=rv64imafdc -mabi=lp64d -Wall -mcmodel=medany -fno-builtin-printf -fno-builtin-memcpy -fno-builtin -ffreestanding -fshort-wchar -DBITSIZE=0x400000 -c -xassembler - -o nexys4_ddr_rocket.o riscv64-buildroot-linux-gnu-gcc -Os -ggdb -march=rv64imafdc -mabi=lp64d -Wall -mcmodel=medany -fno-builtin-printf -fno-builtin-memcpy -fno-builtin -ffreestanding -fshort-wchar -DBITSIZE=0x400000 -nostdlib -nodefaultlibs -nostartfiles -Wl,-Map=mapfile -I./ -I./src -Tlinker.lds startup.o nexys4_ddr_rocket.o src/dhcp-client.o src/elf.o src/ethlib.o src/ff.o src/hash-md5.o src/mini-printf.o src/random.o src/string.o src/tftp_c.o src/uart.o src/boot.o src/dram.o src/cachetest.o src/hid.o src/logo.o src/queryTimeServer.o src/bt.o src/main.c -o nexys4_ddr_rocket.elf LD >= nexys4_ddr_rocket.elf riscv64-buildroot-linux-gnu-objcopy -O binary nexys4_ddr_rocket.elf nexys4_ddr_rocket.bin dd if=nexys4_ddr_rocket.bin of=nexys4_ddr_rocket.img bs=128 250+1 records in 250+1 records out 32005 bytes (32 kB, 31 KiB) copied, 0.0011362 s, 28.2 MB/s riscv64-buildroot-linux-gnu-objdump -d -l -S nexys4_ddr_rocket.elf > nexys4_ddr_rocket.dis iverilog ../../scripts/cnvmem.v -o cnvmem riscv64-buildroot-linux-gnu-objcopy -O verilog nexys4_ddr_rocket.elf nexys4_ddr_rocket.vlog ./cnvmem +VLOG=nexys4_ddr_rocket.vlog +MEM=nexys4_ddr_rocket.mem +SV=nexys4_ddr_rocket.sv First = 87fe0000, Last = 87fe7fff ./cnvmem +VLOG=nexys4_ddr_rocket.vlog +MEM=nexys4_ddr_rocket.mem +SV=nexys4_ddr_rocket.sv First = 87fe0000, Last = 87fe7fff zero stage etherboot loader has been compiled! make[1]: Leaving directory '/local/scratch/jrrk2/lowrisc-chip-ariane-v0.7/fpga/src/etherboot' make -B -C fpga/src/etherboot BOARD=nexys4_ddr BITSIZE=0x400000 XILINX_PART=xc7a100tcsg324-1 XILINX_BOARD=digilentinc.com:nexys4_ddr:part0:1.1 CPU=ariane VENDOR=ethz MEMSIZE=0x8000000 CLK_PERIOD_NS="20" PATH=/local/scratch/jrrk2/lowrisc-chip-ariane-v0.7/buildroot-2019.11.1-lowrisc/mainfs/host/bin:/usr/local/bin:/usr/bin:/bin make[1]: Entering directory '/local/scratch/jrrk2/lowrisc-chip-ariane-v0.7/fpga/src/etherboot' CC <= src/dhcp-client.c CC <= src/elf.c CC <= src/ethlib.c CC <= src/ff.c CC <= src/hash-md5.c CC <= src/mini-printf.c CC <= src/random.c CC <= src/string.c CC <= src/tftp_c.c CC <= src/uart.c CC <= src/boot.c CC <= src/dram.c CC <= src/cachetest.c CC <= src/hid.c CC <= src/logo.c CC <= src/queryTimeServer.c CC <= src/bt.c CC <= startup.S sed -e "s/VENDOR/ethz/" -e "s/CPU/ariane/" -e "s/MEMSIZE/0x8000000/" -e "s/BOARD/nexys4_ddr/" ../generic.dts | dtc -I dts -O dtb -o nexys4_ddr_ariane.dtb :87.45-90.19: Warning (unique_unit_address): /soc/lowrisc-gpio@44000000: duplicate unit-address (also used in node /soc/lowrisc-rtc@44000000) echo -e .section .dtb \; .align 4,0 \; .globl _dtb \; _dtb: \; .incbin \"nexys4_ddr_ariane.dtb\" | riscv64-buildroot-linux-gnu-gcc -Os -ggdb -march=rv64imafdc -mabi=lp64d -Wall -mcmodel=medany -fno-builtin-printf -fno-builtin-memcpy -fno-builtin -ffreestanding -fshort-wchar -DBITSIZE=0x400000 -c -xassembler - -o nexys4_ddr_ariane.o riscv64-buildroot-linux-gnu-gcc -Os -ggdb -march=rv64imafdc -mabi=lp64d -Wall -mcmodel=medany -fno-builtin-printf -fno-builtin-memcpy -fno-builtin -ffreestanding -fshort-wchar -DBITSIZE=0x400000 -nostdlib -nodefaultlibs -nostartfiles -Wl,-Map=mapfile -I./ -I./src -Tlinker.lds startup.o nexys4_ddr_ariane.o src/dhcp-client.o src/elf.o src/ethlib.o src/ff.o src/hash-md5.o src/mini-printf.o src/random.o src/string.o src/tftp_c.o src/uart.o src/boot.o src/dram.o src/cachetest.o src/hid.o src/logo.o src/queryTimeServer.o src/bt.o src/main.c -o nexys4_ddr_ariane.elf LD >= nexys4_ddr_ariane.elf riscv64-buildroot-linux-gnu-objcopy -O binary nexys4_ddr_ariane.elf nexys4_ddr_ariane.bin dd if=nexys4_ddr_ariane.bin of=nexys4_ddr_ariane.img bs=128 250+1 records in 250+1 records out 32005 bytes (32 kB, 31 KiB) copied, 0.000606972 s, 52.7 MB/s riscv64-buildroot-linux-gnu-objdump -d -l -S nexys4_ddr_ariane.elf > nexys4_ddr_ariane.dis iverilog ../../scripts/cnvmem.v -o cnvmem riscv64-buildroot-linux-gnu-objcopy -O verilog nexys4_ddr_ariane.elf nexys4_ddr_ariane.vlog ./cnvmem +VLOG=nexys4_ddr_ariane.vlog +MEM=nexys4_ddr_ariane.mem +SV=nexys4_ddr_ariane.sv First = 87fe0000, Last = 87fe7fff ./cnvmem +VLOG=nexys4_ddr_ariane.vlog +MEM=nexys4_ddr_ariane.mem +SV=nexys4_ddr_ariane.sv First = 87fe0000, Last = 87fe7fff zero stage etherboot loader has been compiled! make[1]: Leaving directory '/local/scratch/jrrk2/lowrisc-chip-ariane-v0.7/fpga/src/etherboot' jonathan@jrrk2-iMac:/local/scratch/jrrk2/lowrisc-chip-ariane-v0.7$ `
Leo-Z-Li commented 4 years ago

Thanks a lot, I will continuously dealing with this mysterious behavior.

jrrk2 commented 4 years ago

If you have an older riscv gcc in the path I would remove it and the RISCV environment variable from the path before you start to build.

Leo-Z-Li commented 4 years ago

Thx, I'm working on it.

Leo-Z-Li commented 4 years ago

Dear jrrk Thanks for your help, now I can run "make firmware" successfully. This is how I dealt with it:

  1. For the "|&" issue, I changed all of the "|&" to " 2>&1 | ", then no more errors.
  2. For the 'mysterious' error, I found it could result in the difference between dash and bash. Seems like dash cannot recognize the "echo -e" command. After switching to bash, problem solved.
Leo-Z-Li commented 4 years ago

Dear jrrk Just to report another progress, I successfully fixed the ethernet failure issue on Lowrisc 0.7rc2 prebuild (quickstart) demo. Maybe these contents could be added to the doc so others can solve this also.

It seems like the error 'Failed to raise network interfaces' is caused by the lack of a DHCP client. So I tried the following steps, and it works.

  1. Download these three packages from: https://packages.debian.org/sid/riscv64/allpackages (needed to be manually installed in the following steps):

libisc-export1105_9.11.19+dfsg-1_riscv64.deb libdns-export1110_9.11.19+dfsg-1_riscv64.deb isc-dhcp-client_4.4.1-2.1+b2_riscv64.deb

  1. Make sure the SD-card can boot 0.7rc2 prebuild (quickstart) Debian system. Then plug the sd-card into a PC (or VM) running Linux, such as Ubuntu.18.04 LTS

  2. Enter the system dictionary of lowrisc-Debian, copy the above three .deb packages into a dictionary that you can remember (such as /root)

  3. Plug the SD-Card back to N4DDR board, open it up, login to the system.

  4. Install the above packages using dpkg -i command. Firstly install the libisc, then libdns, then isc-dhcp-client (maybe firstly libdns then libisc then isc-dhcp-client? I can't remember). If the installing sequence of the three packages was wrong, a dependency error will show up.

  5. sudo shutdown -h now. After safely shutdown, reboot it, and the network should work fine (try ping command).

Tips: make sure to use shutdown -h now command on 0.7, don't just turn off the power switch, or you will be unable to load Debian next time. (However, force power-off is fine on 0.6)

jrrk commented 4 years ago

The default startup daemon is systemd which is meant to include DHCP internally from what I understand. Nevertheless this is good detective work, but all your customisations could be done as part of the Debian image preparation (and there is no need to do it live) as part of the bootstrap process, or later automatic customisations.