Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated fesvr-zynq in uramdisk.image.gz #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

heidecjj
Copy link

@heidecjj heidecjj commented Feb 1, 2019

Previous build of fesvr-zynq wouldn't recognize block devices with linux built from firesim-software@023ef56. New build works with firesim-software and the prebuilt linux included in uramdisk.image.gz. Below are outputs from booting a rocket chip built with fpga-zynq@726eb97:

Prebuilt Linux from this repo

root@zynq:~# ./fesvr-zynq +blkdev=buildroot.rootfs.ext2 bbl
              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] OF: fdt: Ignoring memory range 0x80000000 - 0x80200000
[    0.000000] Linux version 4.15.0-rc6-01961-gc48c452-dirty (zhemao@a6) (gcc version 7.1.1 20170509 (GCC)) #231 SMP Wed Jan 24 13:31:10 PST 2018
[    0.000000] bootconsole [early0] enabled
[    0.000000] Zone ranges:
[    0.000000]   DMA      [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] elf_hwcap is 0x112d
[    0.000000] percpu: Embedded 14 pages/cpu @        (ptrval) s28632 r0 d28712 u57344
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 64135
[    0.000000] Kernel command line: root=/dev/generic-blkdev rw
[    0.000000] Dentry cache hash table entries: 32768 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 16384 (order: 5, 131072 bytes)
[    0.000000] Sorting __ex_table...
[    0.000000] Memory: 251760K/260096K available (2593K kernel code, 168K rwdata, 608K rodata, 143K init, 770K bss, 8336K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  RCU event tracing is enabled.
[    0.000000]  RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[    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] riscv,cpu_intc,0: 64l local interrupts mapped
[    0.000000] riscv,plic0,c000000: mapped 3 interrupts to 1/2 handlers
[    0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x1d854df40, max_idle_ns: 3526361616960 ns
[    0.000000] console [hvc0] enabled
[    0.000000] console [hvc0] enabled
[    0.000000] bootconsole [early0] disabled
[    0.000000] bootconsole [early0] disabled
[    0.000000] Calibrating delay loop (skipped), value calculated using timer frequency.. 2.00 BogoMIPS (lpj=10000)
[    0.000000] pid_max: default: 32768 minimum: 301
[    0.000000] Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
[    0.000000] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes)
[    0.010000] Hierarchical SRCU implementation.
[    0.020000] smp: Bringing up secondary CPUs ...
[    0.020000] smp: Brought up 1 node, 1 CPU
[    0.020000] devtmpfs: initialized
[    0.030000] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.030000] futex hash table entries: 256 (order: 2, 16384 bytes)
[    0.040000] random: get_random_u32 called from bucket_table_alloc+0xf6/0x29a with crng_init=0
[    0.040000] NET: Registered protocol family 16
[    0.070000] vgaarb: loaded
[    0.070000] SCSI subsystem initialized
[    0.070000] pps_core: LinuxPPS API ver. 1 registered
[    0.070000] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <[email protected]>
[    0.080000] PTP clock support registered
[    0.080000] clocksource: Switched to clocksource riscv_clocksource
[    0.090000] NET: Registered protocol family 2
[    0.090000] TCP established hash table entries: 2048 (order: 2, 16384 bytes)
[    0.090000] TCP bind hash table entries: 2048 (order: 3, 32768 bytes)
[    0.100000] TCP: Hash tables configured (established 2048 bind 2048)
[    0.100000] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.100000] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.100000] NET: Registered protocol family 1
[    0.110000] workingset: timestamp_bits=62 max_order=16 bucket_order=0
[    0.180000] random: fast init done
[    0.210000] Key type asymmetric registered
[    0.210000] Asymmetric key parser 'x509' registered
[    0.210000] io scheduler noop registered
[    0.210000] io scheduler cfq registered (default)
[    0.220000] io scheduler mq-deadline registered
[    0.220000] io scheduler kyber registered
[    0.640000] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    0.660000] disk [generic-blkdev] of loaded; 122880 sectors, 2 tags, 16 max request length
[    0.660000] NET: Registered protocol family 17
[    0.670000] EXT4-fs (generic-blkdev): couldn't mount as ext3 due to feature incompatibilities
[    0.680000] EXT4-fs (generic-blkdev): mounting ext2 file system using the ext4 subsystem
[    0.690000] EXT4-fs (generic-blkdev): mounted filesystem without journal. Opts: (null)
[    0.690000] VFS: Mounted root (ext2 filesystem) on device 254:0.
[    0.700000] devtmpfs: mounted
[    0.710000] Freeing unused kernel memory: 140K
[    0.710000] This architecture does not have kernel memory protection.
[    1.020000] EXT4-fs (generic-blkdev): re-mounted. Opts: block_validity,barrier,user_xattr,errors=remount-ro
Starting logging: OK
Starting mdev...
modprobe: can't change directory to '/lib/modules': No such file or directory
Initializing random number generator... done.
Starting network...
ip: can't find device 'eth0'
ip: SIOCGIFFLAGS: No such device
Starting dropbear sshd: OK

Welcome to Buildroot
buildroot login:

Linux built from firesim-software

root@zynq:~# ./fesvr-zynq +blkdev=/mnt/boot/net/br-disk.img /mnt/boot/net/br-disk-bin
[    0.000000] OF: fdt: Ignoring memory range 0x80000000 - 0x80200000
[    0.000000] Linux version 4.15.0-rc6-31587-gcae6324ee357 (rose@b367fff5b04c) (gcc version 7.2.0 (GCC)) #8 SMP Fri Feb 1 04:48:30 UTC 2019
[    0.000000] bootconsole [early0] enabled
[    0.000000] Zone ranges:
[    0.000000]   DMA      [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] elf_hwcap is 0x112d
[    0.000000] percpu: Embedded 14 pages/cpu @        (ptrval) s24664 r0 d32680 u57344
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 64135
[    0.000000] Kernel command line: root=/dev/generic-blkdev rw
[    0.000000] Dentry cache hash table entries: 32768 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 16384 (order: 5, 131072 bytes)
[    0.000000] Sorting __ex_table...
[    0.000000] Memory: 251356K/260096K available (3038K kernel code, 162K rwdata, 582K rodata, 148K init, 762K bss, 8740K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[    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] riscv,cpu_intc,0: 64l local interrupts mapped
[    0.000000] riscv,plic0,c000000: mapped 3 interrupts to 1/2 handlers
[    0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x1d854df40, max_idle_ns: 3526361616960 ns
[    0.000000] console [hvc0] enabled
[    0.000000] console [hvc0] enabled
[    0.000000] bootconsole [early0] disabled
[    0.000000] bootconsole [early0] disabled
[    0.000000] Calibrating delay loop (skipped), value calculated using timer frequency.. 2.00 BogoMIPS (lpj=4000)
[    0.004000] pid_max: default: 32768 minimum: 301
[    0.004000] Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
[    0.004000] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes)
[    0.016000] Hierarchical SRCU implementation.
[    0.020000] smp: Bringing up secondary CPUs ...
[    0.020000] smp: Brought up 1 node, 1 CPU
[    0.024000] devtmpfs: initialized
[    0.028000] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.032000] futex hash table entries: 256 (order: 2, 16384 bytes)
[    0.032000] random: get_random_u32 called from bucket_table_alloc+0x12c/0x3a8 with crng_init=0
[    0.036000] NET: Registered protocol family 16
[    0.048000] vgaarb: loaded
[    0.048000] clocksource: Switched to clocksource riscv_clocksource
[    0.056000] NET: Registered protocol family 2
[    0.064000] TCP established hash table entries: 2048 (order: 2, 16384 bytes)
[    0.064000] TCP bind hash table entries: 2048 (order: 3, 32768 bytes)
[    0.068000] TCP: Hash tables configured (established 2048 bind 2048)
[    0.068000] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.068000] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.072000] NET: Registered protocol family 1
[    0.076000] workingset: timestamp_bits=62 max_order=16 bucket_order=0
[    0.084000] random: fast init done
[    0.116000] io scheduler noop registered
[    0.116000] io scheduler cfq registered (default)
[    0.116000] io scheduler mq-deadline registered
[    0.120000] io scheduler kyber registered
[    0.464000] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    0.476000] disk [generic-blkdev] of loaded; 3800800 sectors, 2 tags, 16 max request length
[    0.496000] VFS: Mounted root (ext2 filesystem) on device 253:0.
[    0.500000] devtmpfs: mounted
[    0.504000] Freeing unused kernel memory: 148K
[    0.504000] This architecture does not have kernel memory protection.
mount: mounting sysfs on /sys failed: No such device
Starting logging: OK
Starting mdev...
mdev: /sys/dev: No such file or directory
modprobe: can't change directory to '/lib/modules': No such file or directory
Initializing random number generator... done.
Starting network: ip: SIOCGIFFLAGS: No such device
ip: can't find device 'eth0'
FAIL
Starting dropbear sshd: OK

Welcome to Buildroot
buildroot login:

@greenhandbob
Copy link

we successfully build the RISC-V based linux with the files you updated, however ,we cannot log in cuz we do not know the username as well as passwd, do you know why?

@heidecjj
Copy link
Author

@greenhandbob try

user: root
password: firesim

@greenhandbob
Copy link

sorry to bother you again,but that username and password is not correct

@heidecjj
Copy link
Author

@greenhandbob how about

user: root
password: root

@greenhandbob
Copy link

is not correct

@heidecjj
Copy link
Author

Are you able to login to linux with the uramdisk.image.gz from ucb-bar:master? The creds should not have changed on my branch. I only updated /home/root/fesvr-zynq and /usr/local/lib/libfesvr.so in the uramdisk.image.gz filesystem. You can perform the following to verify those were the only files I changed:

Download uramdisk.image.gz from ucb-bar:master branch and rename to ucb-bar-uramdisk.image.gz. Download the same file from heidecjj:master branch and rename to heidecjj-uramdisk.image.gz

mkdir ucb-bar
mkdir heidecjj

cd ucb-bar
dd if=../ucb-bar-uramdisk.image.gz bs=64 skip=1 | gunzip -c | cpio -i
cd ../heidecjj
dd if=../heidecjj-uramdisk.image.gz bs=64 skip=1 | gunzip -c | cpio -i
cd ..
diff -r --no-dereference heidecjj/ ucb-bar/

@greenhandbob
Copy link

Maybe nobody knows the original passwd actually, however, there is one post has toturial to help us to change passwd in the armdisk.gz
ucb-bar/fpga-zynq#105
thanks, anyway

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants