Partition 2 identification error in Linux

169 views
Skip to first unread message

Yuxin Yu

unread,
Oct 25, 2022, 5:09:40 AM10/25/22
to Chipyard
Hello, I successfully started the Linux system using arty100t branch and the SD card configuration tutorial in VCU118. But the file system of partition 2 cannot be identified in the system. I searched the media and mnt directories and found none.
In addition, I also tried to format partition 2 as Linux (8300 code is used in gdisk), and the system cannot recognize it also.

Yuxin Yu

unread,
Oct 25, 2022, 5:23:36 AM10/25/22
to Chipyard
This is my boot message:
OpenSBI v0.8                                                                                                                                                
   ____                    _____ ____ _____                                                                                                                
  / __ \                  / ____|  _ \_   _|                                                                                                                
 | |  | |_ __   ___ _ __ | (___ | |_) || |                                                                                                                  
 | |  | | '_ \ / _ \ '_ \ \___ \|  _ < | |                                                                                                                  
 | |__| | |_) |  __/ | | |____) | |_) || |_                                                                                                                
  \____/| .__/ \___|_| |_|_____/|____/_____|                                                                                                                
        | |                                                                                                                                                
        |_|                                                                                                                                                
                                                                                                                                                           
Platform Name       : freechips,rocketchip-unknown                                                                                                          
Platform Features   : timer,mfdeleg                                                                                                                        
Platform HART Count : 1                                                                                                                                    
Boot HART ID        : 0                                                                                                                                    
Boot HART ISA       : rv64imafdcsux                                                                                                                        
BOOT HART Features  : pmp,scounteren,mcounteren                                                                                                            
BOOT HART PMP Count : 16                                                                                                                                    
Firmware Base       : 0x80000000                                                                                                                            
Firmware Size       : 92 KB                                                                                                                                
Runtime SBI Version : 0.2                                                                                                                                  
                                                                                                                                                           
MIDELEG : 0x0000000000000222                                                                                                                                
MEDELEG : 0x000000000000b109                                                                                                                                
PMP0    : 0x0000000080000000-0x000000008001ffff (A)                                                                                                        
PMP1    : 0x0000000000000000-0x00000001ffffffff (A,R,W,X)
[    0.000000] OF: fdt: No chosen node found, continuing without
[    0.000000] OF: fdt: Ignoring memory range 0x80000000 - 0x80200000
[    0.000000] Forcing kernel command line to: console=hvc0 earlycon=sbi
[    0.000000] Linux version 5.7.0-rc3-58539-g5f5fd87 (ICer@IC_EDA) (gcc version 9.2.0 (GCC), GNU ld (GNU Binutils) 2.32) #2 SMP Mon Jul 25 19:02:39 CST 202
2
[    0.000000] earlycon: sbi0 at I/O port 0x0 (options '')
[    0.000000] printk: bootconsole [sbi0] enabled
[    0.000000] initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   DMA32    [mem 0x0000000080200000-0x000000008fffffff]
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000080200000-0x000000008fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000080200000-0x000000008fffffff]
[    0.000000] software IO TLB: mapped [mem 0x8bc7b000-0x8fc7b000] (64MB)
[    0.000000] SBI specification v0.2 detected
[    0.000000] SBI implementation ID=0x1 Version=0x8
[    0.000000] SBI v0.2 TIME extension detected
[    0.000000] SBI v0.2 IPI extension detected
[    0.000000] SBI v0.2 RFENCE extension detected
[    0.000000] SBI v0.2 HSM extension detected
[    0.000000] elf_hwcap is 0x112d
[    0.000000] percpu: Embedded 17 pages/cpu s31976 r8192 d29464 u69632
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 64135
[    0.000000] Kernel command line: console=hvc0 earlycon=sbi
[    0.000000] Dentry cache hash table entries: 32768 (order: 6, 262144 bytes, linear)
[    0.000000] Inode-cache hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.000000] Sorting __ex_table...
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 166804K/260096K available (6544K kernel code, 4152K rwdata, 4096K rodata, 6367K init, 318K bss, 93292K reserved, 0K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]       fixmap : 0xffffffcefee00000 - 0xffffffceff000000   (2048 kB)
[    0.000000]       pci io : 0xffffffceff000000 - 0xffffffcf00000000   (  16 MB)
[    0.000000]      vmemmap : 0xffffffcf00000000 - 0xffffffcfffffffff   (4095 MB)
[    0.000000]      vmalloc : 0xffffffd000000000 - 0xffffffdfffffffff   (65535 MB)
[    0.000000]       lowmem : 0xffffffe000000000 - 0xffffffe00fe00000   ( 254 MB)
[    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] rcu:     RCU debug extended QS entry/exit.
[    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: 0, nr_irqs: 0, preallocated irqs: 0
[    0.000000] plic: mapped 2 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: 3526361616960 ns
[    0.000143] sched_clock: 64 bits at 1000kHz, resolution 1000ns, wraps every 2199023255500ns
[    0.010545] Console: colour dummy device 80x25
[    0.015057] printk: console [hvc0] enabled
[    0.015057] printk: console [hvc0] enabled
[    0.023137] printk: bootconsole [sbi0] disabled
[    0.023137] printk: bootconsole [sbi0] disabled
[    0.032711] Calibrating delay loop (skipped), value calculated using timer frequency.. 2.00 BogoMIPS (lpj=4000)
[    0.042734] pid_max: default: 32768 minimum: 301
[    0.050635] Mount-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.057950] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.104641] rcu: Hierarchical SRCU implementation.
[    0.120288] smp: Bringing up secondary CPUs ...
[    0.124769] smp: Brought up 1 node, 1 CPU
[    0.136607] devtmpfs: initialized
[    0.162782] random: get_random_u32 called from bucket_table_alloc.isra.0+0x4a/0xbe with crng_init=0
[    0.179234] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.189106] futex hash table entries: 256 (order: 2, 16384 bytes, linear)
[    0.207735] NET: Registered protocol family 16
[    0.572667] vgaarb: loaded
[    0.583092] SCSI subsystem initialized
[    0.596992] usbcore: registered new interface driver usbfs
[    0.603461] usbcore: registered new interface driver hub
[    0.609557] usbcore: registered new device driver usb
[    0.635445] clocksource: Switched to clocksource riscv_clocksource
[    0.829434] NET: Registered protocol family 2
[    0.847415] tcp_listen_portaddr_hash hash table entries: 128 (order: 0, 5120 bytes, linear)
[    0.856280] TCP established hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.865016] TCP bind hash table entries: 2048 (order: 4, 65536 bytes, linear)
[    0.875508] TCP: Hash tables configured (established 2048 bind 2048)
[    0.885422] UDP hash table entries: 256 (order: 2, 24576 bytes, linear)
[    0.893436] UDP-Lite hash table entries: 256 (order: 2, 24576 bytes, linear)
[    0.905401] NET: Registered protocol family 1
[    0.924442] RPC: Registered named UNIX socket transport module.
[    0.930681] RPC: Registered udp transport module.
[    0.935280] RPC: Registered tcp transport module.
[    0.940067] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.946696] PCI: CLS 0 bytes, default 64
[    6.963250] workingset: timestamp_bits=62 max_order=16 bucket_order=0
[    7.206018] NFS: Registering the id_resolver key type
[    7.211457] Key type id_resolver registered
[    7.215580] Key type id_legacy registered
[    7.219843] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    7.230031] 9p: Installing v9fs 9p2000 file system support
[    7.244251] NET: Registered protocol family 38
[    7.249460] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    7.256877] io scheduler mq-deadline registered
[    7.261420] io scheduler kyber registered
[    8.597453] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    8.630275] 64000000.serial: ttySIF0 at MMIO 0x64000000 (irq = 1, base_baud = 0) is a SiFive UART v0
[    8.652913] [drm] radeon kernel modesetting enabled.
[    8.895735] loop: module loaded
[    8.912739] sifive_spi 64001000.spi: mapped; irq=2, cs=1
[    8.941485] libphy: Fixed MDIO Bus: probed
[    8.965063] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
[    8.970878] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[    8.979474] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    8.985984] ehci-pci: EHCI PCI platform driver
[    8.991625] ehci-platform: EHCI generic platform driver
[    8.998129] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    9.004658] ohci-pci: OHCI PCI platform driver
[    9.009891] ohci-platform: OHCI generic platform driver
[    9.024842] usbcore: registered new interface driver uas
[    9.031689] usbcore: registered new interface driver usb-storage
[    9.041798] mousedev: PS/2 mouse device common for all mice
[    9.093639] mmc_spi spi0.0: SD/MMC host mmc0, no DMA, no WP, no poweroff, cd polling
[    9.107170] usbcore: registered new interface driver usbhid
[    9.112710] usbhid: USB HID core driver
[    9.136085] NET: Registered protocol family 10
[    9.171057] Segment Routing with IPv6
[    9.176307] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    9.196232] NET: Registered protocol family 17
[    9.205617] 9pnet: Installing 9P2000 support
[    9.211690] Key type dns_resolver registered
[    9.493685] Freeing unused kernel memory: 6364K
[    9.499302] Run /init as init process
[    9.632873] mmc0: host does not support reading read-only switch, assuming write-enable
[    9.641265] mmc0: new SDHC card on SPI
[    9.680985] mmcblk0: mmc0:0000 SD 14.9 GiB
Running FireMarshal nodisk init
[    9.832699] random: fast init done
[   12.115853]  mmcblk0: p1 p2
Loading FireMarshal platform drivers
Calling distro init
Starting syslogd: OK
Starting klogd: OK
Running sysctl: OK
Starting mdev... OK
Initializing random number generator... [   36.649442] random: dd: uninitialized urandom read (512 bytes read)
done.
Starting network: OK
launching firesim workload run/command
firesim workload run/command done

Welcome to Buildroot
buildroot login:

Abraham Gonzalez

unread,
Oct 25, 2022, 12:50:31 PM10/25/22
to chip...@googlegroups.com
Hi,

You need to mount the SD card to see its contents everytime you boot the FPGA prototype. You can use the `mount` command (something like `mount <name of the device> <folder to mount to>`). The name of the device should be `mmcblk0` I think (you might also be able to look it up using `fdisk -l`). Once you are done with the SD card contents you should unmount it (`umount <folder used to mount>`) otherwise it might get corrupted. Hope that helps.

--
You received this message because you are subscribed to the Google Groups "Chipyard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chipyard+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/chipyard/8e36bdb9-d77f-476a-b523-0f679cd0f36en%40googlegroups.com.


--
Abraham J. Gonzalez
Electrical Engineering and Computer Science Ph.D. Student
The University of California at Berkeley

Yuxin Yu

unread,
Oct 25, 2022, 9:30:11 PM10/25/22
to Chipyard

OK, I'll try, thank you bro

Yuxin Yu

unread,
Oct 26, 2022, 6:58:27 AM10/26/22
to Chipyard
I successfully mounted the SD card, but mmcblk0p2 was used because the second partition needs to be mounted. Thank you.

Yuxin Yu

unread,
Oct 28, 2022, 4:11:23 AM10/28/22
to Chipyard
Hello, I found two problems:
First, when writing data to partition 2 of the SD card, I can use the command copy to write data after using the mkfs.hfs command to format each time. However, if I do not use the mkfs.hfs format, when using the copy write command, partition 2 will be displayed as read-only and not writable
Second, after formatting partition 2 and writing the file test, sometimes the file test disappears after I mount partition 2.

Aaraddhya Thakore

unread,
Feb 10, 2023, 2:23:37 PM2/10/23
to Chipyard
Hello! 

Can you please share the command you used? I am unable to get "PrototypeData" to mount on the fpga running linux.

TIA!

Message has been deleted

Aaraddhya Thakore

unread,
Feb 10, 2023, 2:33:26 PM2/10/23
to Chipyard

 mount -o rw /dev/mmcblk0p2 /mnt/

[  271.695342] hfsplus: Filesystem was not cleanly unmounted, running fsck.hfsplus is recommended.  mounting read-only.

This is my error. I am also unable to view the mounted partition on /mnt


Also when I run fsck. I get the following error. 

# fsck /dev/mmcblk0p2

fsck 1.45.2 (27-May-2019)

fsck: fsck.hfsplus: not found

fsck: Error 2 while executing fsck.hfsplus for /dev/mmcblk0p2

Reply all
Reply to author
Forward
0 new messages