FPGA prototyping: cannot detect sd card 2nd partition

286 views
Skip to first unread message

Nick Lee

unread,
May 21, 2023, 2:55:04 AM5/21/23
to Chipyard
I am booting a br-base workload created with firemarshal. The booting was successful but when I was trying to mount the 2nd partition of my sd card, I found that there is the partition was not detected by buildroot. To be specific, I could not find any mmcblk in /dev. What could go wrong?

Please help.

Nick Lee

unread,
May 21, 2023, 2:59:56 AM5/21/23
to Chipyard
more information is displayed as follow.

I found some "mmc" related information is missing at the end of the booting output. I am not sure if it is related.

# INIT
CMD0
CMD8
ACMD41
CMD58
CMD16
CMD18
LOADING 0x01e00000B PAYLOAD
LOADING
BOOT

OpenSBI v1.2
   ____                    _____ ____ _____
  / __ \                  / ____|  _ \_   _|
 | |  | |_ __   ___ _ __ | (___ | |_) || |
 | |  | | '_ \ / _ \ '_ \ \___ \|  _ < | |
 | |__| | |_) |  __/ | | |____) | |_) || |_
  \____/| .__/ \___|_| |_|_____/|___/_____|
        | |
        |_|

Platform Name             : freechips,rocketchip-unknown
Platform Features         : medeleg
Platform HART Count       : 1
Platform IPI Device       : aclint-mswi
Platform Timer Device     : aclint-mtimer @ 1000000Hz
Platform Console Device   : sifive_uart
Platform HSM Device       : ---
Platform PMU Device       : ---
Platform Reboot Device    : ---
Platform Shutdown Device  : ---
Platform Suspend Device   : ---
Firmware Base             : 0x80000000
Firmware Size             : 232 KB
Firmware RW Offset        : 0x20000
Runtime SBI Version       : 1.0

Domain0 Name              : root
Domain0 Boot HART         : 0
Domain0 HARTs             : 0*
Domain0 Region00          : 0x0000000002000000-0x000000000200ffff M: (I,R,W) S/U: ()
Domain0 Region01          : 0x0000000080000000-0x000000008001ffff M: (R,X) S/U: ()
Domain0 Region02          : 0x0000000080020000-0x000000008003ffff M: (R,W) S/U: ()
Domain0 Region03          : 0x0000000000000000-0xffffffffffffffff M: (R,W,X) S/U: (R,W,X)
Domain0 Next Address      : 0x0000000080200000
Domain0 Next Arg1         : 0x0000000081800000
Domain0 Next Mode         : S-mode
Domain0 SysReset          : yes
Domain0 SysSuspend        : yes

Boot HART ID              : 0
Boot HART Domain          : root
Boot HART Priv Version    : v1.11
Boot HART Base ISA        : rv64imafdcx
Boot HART ISA Extensions  : none
Boot HART PMP Count       : 8
Boot HART PMP Granularity : 4
Boot HART PMP Address Bits: 30
Boot HART MHPM Count      : 0
Boot HART MIDELEG         : 0x0000000000000222
Boot HART MEDELEG         : 0x000000000000b109
[    0.000000] Linux version 6.2.0-297960-g71bece669db2 (lyf@vxserver) (riscv64-unknown-linux-gnu-gcc (g2ee5e430018) 12.2.0, GNU ld (GNU Binutils) 2.39) #1 SMP Sun May 21 12:31:26 HKT 2023
[    0.000000] OF: fdt: Ignoring memory range 0x80000000 - 0x80200000
[    0.000000] Machine model: freechips,rocketchip-unknown
[    0.000000] Forcing kernel command line to: console=ttyS0 console=ttySIF0 earlycon
[    0.000000] Malformed early option 'earlycon'
[    0.000000] efi: UEFI not found.
[    0.000000] Zone ranges:
[    0.000000]   DMA32    [mem 0x0000000080200000-0x00000000ffffffff]
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000080200000-0x00000000ffffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000080200000-0x00000000ffffffff]
[    0.000000] On node 0, zone DMA32: 512 pages in unavailable ranges
[    0.000000] SBI specification v1.0 detected
[    0.000000] SBI implementation ID=0x1 Version=0x10002
[    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 acdefhikmnoprt
[    0.000000] riscv: ELF capabilities acdfim
[    0.000000] percpu: Embedded 18 pages/cpu s33304 r8192 d32232 u73728
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 515592
[    0.000000] Kernel command line: console=ttyS0 console=ttySIF0 earlycon
[    0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[    0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[    0.000000] mem auto-init: stack:all(zero), heap alloc:off, heap free:off
[    0.000000] Virtual kernel memory layout:
[    0.000000]       fixmap : 0xffffffc6fee00000 - 0xffffffc6ff000000   (2048 kB)
[    0.000000]       pci io : 0xffffffc6ff000000 - 0xffffffc700000000   (  16 MB)
[    0.000000]      vmemmap : 0xffffffc700000000 - 0xffffffc800000000   (4096 MB)
[    0.000000]      vmalloc : 0xffffffc800000000 - 0xffffffd800000000   (  64 GB)
[    0.000000]      modules : 0xffffffff0151d000 - 0xffffffff80000000   (2026 MB)
[    0.000000]       lowmem : 0xffffffd800000000 - 0xffffffd87fe00000   (2046 MB)
[    0.000000]       kernel : 0xffffffff80000000 - 0xffffffffffffffff   (2047 MB)
[    0.000000] Memory: 2020164K/2095104K available (4032K kernel code, 3050K rwdata, 2048K rodata, 12062K init, 359K bss, 74940K 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=32 to nr_cpu_ids=1.
[    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 25 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 2 interrupts with 1 handlers for 2 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: 0x1d854df40, max_idle_ns: 3526361616960 ns
[    0.000021] sched_clock: 64 bits at 1000kHz, resolution 1000ns, wraps every 2199023255500ns
[    0.002034] Console: colour dummy device 80x25
[    0.002527] Calibrating delay loop (skipped), value calculated using timer frequency.. 2.00 BogoMIPS (lpj=4000)
[    0.002705] pid_max: default: 32768 minimum: 301
[    0.003935] LSM: initializing lsm=capability,integrity
[    0.005389] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.005975] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.034609] cblist_init_generic: Setting adjustable number of callback queues.
[    0.034727] cblist_init_generic: Setting shift to 0 and lim to 1.
[    0.036583] riscv: ELF compat mode unsupported
[    0.036687] ASID allocator disabled (0 bits)
[    0.038811] rcu: Hierarchical SRCU implementation.
[    0.038878] rcu:     Max phase no-delay instances is 1000.
[    0.043420] EFI services will not be available.
[    0.047933] smp: Bringing up secondary CPUs ...
[    0.048007] smp: Brought up 1 node, 1 CPU
[    0.057721] devtmpfs: initialized
[    0.073943] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.074174] futex hash table entries: 256 (order: 2, 16384 bytes, linear)
[    0.076494] pinctrl core: initialized pinctrl subsystem
[    0.082121] DMA: preallocated 256 KiB GFP_KERNEL pool for atomic allocations
[    0.082571] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.087213] cpuidle: using governor menu
[    0.115283] HugeTLB: registered 2.00 MiB page size, pre-allocated 0 pages
[    0.115382] HugeTLB: 0 KiB vmemmap can be freed for a 2.00 MiB page
[    0.129555] clocksource: Switched to clocksource riscv_clocksource
[    0.290994] workingset: timestamp_bits=46 max_order=19 bucket_order=0
[    0.306615] io scheduler mq-deadline registered
[    0.306719] io scheduler kyber registered
[    1.743085] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    1.763250] SuperH (H)SCI(F) driver initialized
[    1.766865] 64000000.serial: ttySIF0 at MMIO 0x64000000 (irq = 1, base_baud = 6250000) is a SiFive UART v0
[    1.767183] printk: console [ttySIF0] enabled
[    2.995364] loop: module loaded
[    3.002280] sifive_spi 64001000.spi: mapped; irq=2, cs=1
[    3.021494] riscv-pmu-sbi: SBI PMU extension is available
[    3.026650] riscv-pmu-sbi: 16 firmware and 2 hardware counters
[    3.032271] riscv-pmu-sbi: Perf sampling/filtering is not supported as sscof extension is not available
[    3.238669] debug_vm_pgtable: [debug_vm_pgtable         ]: Validating architecture page table helpers
[    3.456307] Freeing unused kernel image (initmem) memory: 12060K
[    3.462293] Run /init as init process
Running FireMarshal nodisk init
Loading FireMarshal platform drivers
Calling distro init
Starting syslogd: OK
Starting klogd: OK
Running sysctl: OK
Starting mdev... OK
Saving random seed: [   14.081708] random: crng init done
OK
Starting network: ip: socket: Function not implemented
ip: socket: Function not implemented
FAIL
launching firemarshal workload run/command
firemarshal workload run/command done

Welcome to Buildroot
buildroot login: root
login[91]: root login on 'console'


# cat devices
Character devices:
  1 mem
  2 pty
  3 ttyp
  4 /dev/vc/0
  4 tty
  4 ttyS
  5 /dev/tty
  5 /dev/console
  5 /dev/ptmx
  7 vcs
 10 misc
 13 input
128 ptm
136 pts
248 ttySIF
249 rtc
250 dax
251 dimmctl
252 ndctl
253 rpmsg_ctrl
254 gpiochip

Block devices:
  7 loop
254 virtblk
259 blkext


my /dev:

autofs           ptys6            tty32            ttyqf
console          ptys7            tty33            ttyr0
cpu_dma_latency  ptys8            tty34            ttyr1
fd               ptys9            tty35            ttyr2
full             ptysa            tty36            ttyr3
hwrng            ptysb            tty37            ttyr4
kmsg             ptysc            tty38            ttyr5
loop-control     ptysd            tty39            ttyr6
loop0            ptyse            tty4             ttyr7
loop1            ptysf            tty40            ttyr8
loop2            ptyt0            tty41            ttyr9
loop3            ptyt1            tty42            ttyra
loop4            ptyt2            tty43            ttyrb
loop5            ptyt3            tty44            ttyrc
loop6            ptyt4            tty45            ttyrd
loop7            ptyt5            tty46            ttyre
mem              ptyt6            tty47            ttyrf
null             ptyt7            tty48            ttys0
ptmx             ptyt8            tty49            ttys1
pts              ptyt9            tty5             ttys2
ptya0            ptyta            tty50            ttys3
ptya1            ptytb            tty51            ttys4
ptya2            ptytc            tty52            ttys5
ptya3            ptytd            tty53            ttys6
ptya4            ptyte            tty54            ttys7
ptya5            ptytf            tty55            ttys8
ptya6            ptyu0            tty56            ttys9
ptya7            ptyu1            tty57            ttysa
ptya8            ptyu2            tty58            ttysb
ptya9            ptyu3            tty59            ttysc
ptyaa            ptyu4            tty6             ttysd
ptyab            ptyu5            tty60            ttyse
ptyac            ptyu6            tty61            ttysf
ptyad            ptyu7            tty62            ttyt0
ptyae            ptyu8            tty63            ttyt1
ptyaf            ptyu9            tty7             ttyt2
ptyb0            ptyua            tty8             ttyt3
ptyb1            ptyub            tty9             ttyt4
ptyb2            ptyuc            ttyS0            ttyt5
ptyb3            ptyud            ttyS1            ttyt6
ptyb4            ptyue            ttyS2            ttyt7
ptyb5            ptyuf            ttyS3            ttyt8
ptyb6            ptyv0            ttySIF0          ttyt9
ptyb7            ptyv1            ttya0            ttyta
ptyb8            ptyv2            ttya1            ttytb
ptyb9            ptyv3            ttya2            ttytc
ptyba            ptyv4            ttya3            ttytd
ptybb            ptyv5            ttya4            ttyte
ptybc            ptyv6            ttya5            ttytf
ptybd            ptyv7            ttya6            ttyu0
ptybe            ptyv8            ttya7            ttyu1
ptybf            ptyv9            ttya8            ttyu2
ptyc0            ptyva            ttya9            ttyu3
ptyc1            ptyvb            ttyaa            ttyu4
ptyc2            ptyvc            ttyab            ttyu5
ptyc3            ptyvd            ttyac            ttyu6
ptyc4            ptyve            ttyad            ttyu7
ptyc5            ptyvf            ttyae            ttyu8
ptyc6            ptyw0            ttyaf            ttyu9
ptyc7            ptyw1            ttyb0            ttyua
ptyc8            ptyw2            ttyb1            ttyub
ptyc9            ptyw3            ttyb2            ttyuc
ptyca            ptyw4            ttyb3            ttyud
ptycb            ptyw5            ttyb4            ttyue
ptycc            ptyw6            ttyb5            ttyuf
ptycd            ptyw7            ttyb6            ttyv0
ptyce            ptyw8            ttyb7            ttyv1
ptycf            ptyw9            ttyb8            ttyv2
ptyd0            ptywa            ttyb9            ttyv3
ptyd1            ptywb            ttyba            ttyv4
ptyd2            ptywc            ttybb            ttyv5
ptyd3            ptywd            ttybc            ttyv6
ptyd4            ptywe            ttybd            ttyv7
ptyd5            ptywf            ttybe            ttyv8
ptyd6            ptyx0            ttybf            ttyv9
ptyd7            ptyx1            ttyc0            ttyva
ptyd8            ptyx2            ttyc1            ttyvb
ptyd9            ptyx3            ttyc2            ttyvc
ptyda            ptyx4            ttyc3            ttyvd
ptydb            ptyx5            ttyc4            ttyve
ptydc            ptyx6            ttyc5            ttyvf
ptydd            ptyx7            ttyc6            ttyw0
ptyde            ptyx8            ttyc7            ttyw1
ptydf            ptyx9            ttyc8            ttyw2
ptye0            ptyxa            ttyc9            ttyw3
ptye1            ptyxb            ttyca            ttyw4
ptye2            ptyxc            ttycb            ttyw5
ptye3            ptyxd            ttycc            ttyw6
ptye4            ptyxe            ttycd            ttyw7
ptye5            ptyxf            ttyce            ttyw8
ptye6            ptyy0            ttycf            ttyw9
ptye7            ptyy1            ttyd0            ttywa
ptye8            ptyy2            ttyd1            ttywb
ptye9            ptyy3            ttyd2            ttywc
ptyea            ptyy4            ttyd3            ttywd
ptyeb            ptyy5            ttyd4            ttywe
ptyec            ptyy6            ttyd5            ttywf
ptyed            ptyy7            ttyd6            ttyx0
ptyee            ptyy8            ttyd7            ttyx1
ptyef            ptyy9            ttyd8            ttyx2
ptyp0            ptyya            ttyd9            ttyx3
ptyp1            ptyyb            ttyda            ttyx4
ptyp2            ptyyc            ttydb            ttyx5
ptyp3            ptyyd            ttydc            ttyx6
ptyp4            ptyye            ttydd            ttyx7
ptyp5            ptyyf            ttyde            ttyx8
ptyp6            ptyz0            ttydf            ttyx9
ptyp7            ptyz1            ttye0            ttyxa
ptyp8            ptyz2            ttye1            ttyxb
ptyp9            ptyz3            ttye2            ttyxc
ptypa            ptyz4            ttye3            ttyxd
ptypb            ptyz5            ttye4            ttyxe
ptypc            ptyz6            ttye5            ttyxf
ptypd            ptyz7            ttye6            ttyy0
ptype            ptyz8            ttye7            ttyy1
ptypf            ptyz9            ttye8            ttyy2
ptyq0            ptyza            ttye9            ttyy3
ptyq1            ptyzb            ttyea            ttyy4
ptyq2            ptyzc            ttyeb            ttyy5
ptyq3            ptyzd            ttyec            ttyy6
ptyq4            ptyze            ttyed            ttyy7
ptyq5            ptyzf            ttyee            ttyy8
ptyq6            random           ttyef            ttyy9
ptyq7            shm              ttyp0            ttyya
ptyq8            stderr           ttyp1            ttyyb
ptyq9            stdin            ttyp2            ttyyc
ptyqa            stdout           ttyp3            ttyyd
ptyqb            tty              ttyp4            ttyye
ptyqc            tty0             ttyp5            ttyyf
ptyqd            tty1             ttyp6            ttyz0
ptyqe            tty10            ttyp7            ttyz1
ptyqf            tty11            ttyp8            ttyz2
ptyr0            tty12            ttyp9            ttyz3
ptyr1            tty13            ttypa            ttyz4
ptyr2            tty14            ttypb            ttyz5
ptyr3            tty15            ttypc            ttyz6
ptyr4            tty16            ttypd            ttyz7
ptyr5            tty17            ttype            ttyz8
ptyr6            tty18            ttypf            ttyz9
ptyr7            tty19            ttyq0            ttyza
ptyr8            tty2             ttyq1            ttyzb
ptyr9            tty20            ttyq2            ttyzc
ptyra            tty21            ttyq3            ttyzd
ptyrb            tty22            ttyq4            ttyze
ptyrc            tty23            ttyq5            ttyzf
ptyrd            tty24            ttyq6            urandom
ptyre            tty25            ttyq7            vcs
ptyrf            tty26            ttyq8            vcs1
ptys0            tty27            ttyq9            vcsa
ptys1            tty28            ttyqa            vcsa1
ptys2            tty29            ttyqb            vcsu
ptys3            tty3             ttyqc            vcsu1
ptys4            tty30            ttyqd            zero
ptys5            tty31            ttyqe

桃子

unread,
Jan 11, 2024, 5:28:53 AM1/11/24
to Chipyard
I have exact same problem, have you be able to fix it ?

정원석

unread,
Feb 27, 2025, 6:21:43 AMFeb 27
to Chipyard
I have same problem also. Please contact me if someone have solved this problem

2024년 1월 11일 목요일 오후 7시 28분 53초 UTC+9에 桃子님이 작성:

jinhui pan

unread,
Jul 7, 2025, 10:20:15 AMJul 7
to Chipyard
I have same problem also. Please contact me if someone have solved this problem.
I add CONFIG_MMC=y, but I can't even get into the linux system. I'm stuck here.
https://private-user-images.githubusercontent.com/141385610/462889832-a8d85da3-5a18-441d-a0d5-ef6774804a66.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NTE4OTgyNzIsIm5iZiI6MTc1MTg5Nzk3MiwicGF0aCI6Ii8xNDEzODU2MTAvNDYyODg5ODMyLWE4ZDg1ZGEzLTVhMTgtNDQxZC1hMGQ1LWVmNjc3NDgwNGE2Ni5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwNzA3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDcwN1QxNDE5MzJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT01M2NlZjVhMjY1NTg2NjE1MmY0MTVmMmVjYTAxYjA5NDNhODUwMDgxMWRlYzE4OTlhMzIyMDE5ZTk0ZjgzOTUxJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.9eNhvHoJcCwwG7ygfjhcdFhNpx4oVcfYPsGwM3QzExs
Reply all
Reply to author
Forward
0 new messages