Coder Social home page Coder Social logo

Comments (6)

gsomlo avatar gsomlo commented on July 23, 2024

from linux-on-litex-rocket.

lapnd avatar lapnd commented on July 23, 2024

from linux-on-litex-rocket.

lapnd avatar lapnd commented on July 23, 2024

I can make it work now.
I'm not sure this is the root cause, but from the message remote fence extension is not available in SBI v0.1, I guest the issue may from SB1 v1.0.
Enable this option on kernel make the linux boot ok
image

        __   _ __      _  __
       / /  (_) /____ | |/_/
      / /__/ / __/ -_)>  <
     /____/_/\__/\__/_/|_|
   Build your hardware, easily!

 (c) Copyright 2012-2022 Enjoy-Digital
 (c) Copyright 2007-2015 M-Labs

 BIOS built on Feb 12 2022 13:27:25
 BIOS CRC passed (54bd8546)

 Migen git sha1: ac70301
 LiteX git sha1: 7cc781f7

--=============== SoC ==================--
CPU:            RocketRV64[imac] @ 50MHz
BUS:            WISHBONE 32-bit @ 4GiB
CSR:            32-bit data
ROM:            128KiB
SRAM:           8KiB
SDRAM:          65536KiB 16-bit @ 50MT/s (CL-2 CWL-2)

--========== Initialization ============--
Ethernet init...
Initializing SDRAM @0x80000000...
Switching SDRAM to software control.
Switching SDRAM to hardware control.
Memtest at 0x80000000 (2.0MiB)...
  Write: 0x80000000-0x80200000 2.0MiB     
   Read: 0x80000000-0x80200000 2.0MiB     
Memtest OK
Memspeed at 0x80000000 (Sequential, 2.0MiB)...
  Write speed: 5.8MiB/s
   Read speed: 9.3MiB/s

--============== Boot ==================--
Booting from serial...
Press Q or ESC to abort boot completely.
sL5DdSMmkekro
Timeout
Booting from network...
Local IP: 192.168.1.50
Remote IP: 192.168.1.100
Booting from boot.json...
Booting from boot.bin...
Copying boot.bin to 0x80000000... (17824296 bytes)
Executing booted program at 0x80000000

--============= Liftoff! ===============--
bbl loader
              vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
                  vvvvvvvvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrr       vvvvvvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrrrrr      vvvvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrrrrrrr    vvvvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrrrrrrr    vvvvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrrrrrrr    vvvvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrrrrr      vvvvvvvvvvvvvvvvvvvvvv  
rrrrrrrrrrrrr       vvvvvvvvvvvvvvvvvvvvvv    
rr                vvvvvvvvvvvvvvvvvvvvvv      
rr            vvvvvvvvvvvvvvvvvvvvvvvv      rr
rrrr      vvvvvvvvvvvvvvvvvvvvvvvvvv      rrrr
rrrrrr      vvvvvvvvvvvvvvvvvvvvvv      rrrrrr
rrrrrrrr      vvvvvvvvvvvvvvvvvv      rrrrrrrr
rrrrrrrrrr      vvvvvvvvvvvvvv      rrrrrrrrrr
rrrrrrrrrrrr      vvvvvvvvvv      rrrrrrrrrrrr
rrrrrrrrrrrrrr      vvvvvv      rrrrrrrrrrrrrr
rrrrrrrrrrrrrrrr      vv      rrrrrrrrrrrrrrrr
rrrrrrrrrrrrrrrrrr          rrrrrrrrrrrrrrrrrr
rrrrrrrrrrrrrrrrrrrr      rrrrrrrrrrrrrrrrrrrr
rrrrrrrrrrrrrrrrrrrrrr  rrrrrrrrrrrrrrrrrrrrrr

       INSTRUCTION SETS WANT TO BE FREE
[    0.000000] Linux version 5.17.0-rc3-g9416933b8c5f (administrator@sm06) (riscv64-unknown-linux-gnu-gcc (GCC) 10.2.0, GNU ld (GNU Binutils) 2.36.1) #8 SMP Sat Feb 12 14:10:33 UTC 2022
[    0.000000] OF: fdt: Ignoring memory range 0x80000000 - 0x80200000
[    0.000000] Machine model: freechips,rocketchip-unknown
[    0.000000] earlycon: liteuart0 at I/O port 0x0 (options '')
[    0.000000] Malformed early option 'console'
[    0.000000] earlycon: liteuart0 at MMIO 0x0000000012003000 (options '')
[    0.000000] printk: bootconsole [liteuart0] enabled
[    0.000000] efi: UEFI not found.
[    0.000000] Zone ranges:
[    0.000000]   DMA32    [mem 0x0000000080200000-0x0000000083ffffff]
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000080200000-0x0000000083ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000080200000-0x0000000083ffffff]
[    0.000000] SBI specification v0.1 detected
[    0.000000] riscv: ISA extensions acdfim
[    0.000000] riscv: ELF capabilities acdfim
[    0.000000] percpu: Embedded 13 pages/cpu s24088 r0 d29160 u53248
[    0.000000] pcpu-alloc: s24088 r0 d29160 u53248 alloc=13*4096
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 15624
[    0.000000] Kernel command line: console=liteuart earlycon=liteuart,0x12003000 swiotlb=noforce
[    0.000000] Dentry cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.000000] Inode-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 45900K/63488K available (4456K kernel code, 4160K rwdata, 2048K rodata, 2711K init, 290K bss, 17588K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[    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=1
[    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 8 interrupts with 1 handlers for 2 contexts.
[    0.000000] random: get_random_bytes called from start_kernel+0x4d2/0x6c2 with crng_init=0
[    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.000212] sched_clock: 64 bits at 500kHz, resolution 2000ns, wraps every 4398046511000ns
[    0.026782] Console: colour dummy device 128x32
[    0.038478] Calibrating delay loop (skipped), value calculated using timer frequency.. 1.00 BogoMIPS (lpj=5000)
[    0.054212] pid_max: default: 32768 minimum: 301
[    0.093540] LSM: Security Framework initializing
[    0.118384] Mount-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.131374] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.565868] cblist_init_generic: Setting adjustable number of callback queues.
[    0.574786] cblist_init_generic: Setting shift to 0 and lim to 1.
[    0.622070] ASID allocator disabled (0 bits)
[    0.669942] rcu: Hierarchical SRCU implementation.
[    0.752388] EFI services will not be available.
[    0.801336] smp: Bringing up secondary CPUs ...
[    0.806874] smp: Brought up 1 node, 1 CPU
[    0.906226] devtmpfs: initialized
[    1.285146] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    1.301032] futex hash table entries: 256 (order: 2, 16384 bytes, linear)
[    1.471906] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    3.735036] pps_core: LinuxPPS API ver. 1 registered
[    3.741152] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <[email protected]>
[    3.762362] PTP clock support registered
[    3.963138] clocksource: Switched to clocksource riscv_clocksource
[    6.493222] NET: Registered PF_INET protocol family
[    6.527318] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    6.640860] tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 4096 bytes, linear)
[    6.660720] TCP established hash table entries: 512 (order: 0, 4096 bytes, linear)
[    6.678662] TCP bind hash table entries: 512 (order: 1, 8192 bytes, linear)
[    6.692624] TCP: Hash tables configured (established 512 bind 512)
[    6.731198] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    6.749454] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    6.799224] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    7.571636] workingset: timestamp_bits=46 max_order=14 bucket_order=0
[   16.580154] LiteX SoC Controller driver initialized
[   32.479270] 12003000.serial: ttyLXU0 at MMIO 0x0 (irq = 0, base_baud = 0) is a liteuart
[   32.502872] printk: console [liteuart0] enabled
[   32.502872] printk: console [liteuart0] enabled
[   32.519442] printk: bootconsole [liteuart0] disabled
[   32.519442] printk: bootconsole [liteuart0] disabled
[   34.277182] loop: module loaded
[   38.113612] liteeth 12000800.mac: error -ENXIO: IRQ index 0 not found
[   38.130100] liteeth 12000800.mac: Failed to get IRQ, using polling
[   38.299362] liteeth 12000800.mac eth0: irq 0 slots: tx 2 rx 2 size 2048
[   38.663754] NET: Registered PF_INET6 protocol family
[   39.008108] Segment Routing with IPv6
[   39.021624] In-situ OAM (IOAM) with IPv6
[   39.050544] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[   39.250182] NET: Registered PF_PACKET protocol family
[   39.763178] Warning: unable to open an initial console.
[   40.553822] Freeing unused kernel image (initmem) memory: 2708K
[   40.599206] Run /init as init process
[   40.603954]   with arguments:
[   40.610538]     /init
[   40.613552]   with environment:
[   40.620356]     HOME=/
[   40.623542]     TERM=linux
# ls
bin      etc      init     linuxrc  nfs      root     sys      usr
dev      home     lib      mnt      proc     sbin     tmp
# ifconfig eth0 192.168.1.50
# ping 192.168.1.100
192.168.1.100 is alive!
# ifconfig eth0
ifconfig: no support for status display
# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
# ping 192.168.1.100
192.168.1.100 is alive!

from linux-on-litex-rocket.

gsomlo avatar gsomlo commented on July 23, 2024

from linux-on-litex-rocket.

lapnd avatar lapnd commented on July 23, 2024

The HDL compilation was ok and not related to kernel. The fpga bitstream was loaded to the board successfully without nay issue.
I was having issue on booting boot.bin. If boot.bin that was built without RISCV_SBI_V01, then the booting is hang.
And you are right, RISCV_SBI_V01 is being deprecated. I need to figure out the real issue that make the boot process hang.

from linux-on-litex-rocket.

troibe avatar troibe commented on July 23, 2024

Thanks @lapnd I recently tried recompiling the kernel and I ran into the same issue.
For me it would hang after Timer extension is not available in SBI v0.1.
Adding CONFIG_RISCV_SBI_V01=y to the defconfig like you suggested did the trick.

from linux-on-litex-rocket.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.