What do you use Debian for (in lowrisc)?
by Manuel A. Fernandez Montecelo
Hi,
I was surprised the other day to learn that you run Debian in
lowrisc-based devices, I thought that you would be using buildroot or
some similar embedded distro.
So I got curious... what do you use it for? Just to have a base system
and basic tools, but less basic than buildroot? To run specialised
things on top of that base, like tests, benchmarks or special programs?
To test many areas, e.g. run many software and see impact on performance
or whether the software can run at all and crashes?
Also, if we can do something specific for you to help you with your
tasks, please tell.
Cheers.
--
Manuel A. Fernandez Montecelo <manuel.montezelo(a)gmail.com>
4 years, 9 months
make cpio error
by Dinesh Thirumurthy
Hi,
Following instructions at
https://www.lowrisc.org/docs/download-install-debian/
On running make cpio
I get this error:
sudo tar cJf - -C work/debian-riscv64-chroot . > ../rootfs.tar.xz
rm -rf bin etc dev home lib proc sbin sys tmp usr mnt nfs root run init
mkdir -p bin etc dev home lib proc sbin sys tmp usr mnt nfs root run
usr/bin usr/lib usr/sbin usr/share/perl5 usr/share/udhcpc
lib/riscv64-linux-gnu usr/lib/riscv64-linux-gnu # usr/share/sysvinit
cp -p work/usr-share-udhcpc-default.script usr/share/udhcpc/default.script
cp -p work/debian-riscv64-chroot/sbin/mount.nfs ./sbin
cp: cannot stat 'work/debian-riscv64-chroot/sbin/mount.nfs': No such file
or directory
work/makefile.inc:17: recipe for target 'init' failed
make: *** [init] Error 1
dt@marina:~/l/lowrisc-chip/debian-riscv64$ ls
work/debian-riscv64-chroot/sbin/
agetty cfdisk e2image fsck fsfreeze isosize
mkfs mkfs.minix raw start-stop-daemon.REAL
tune2fs
badblocks chcpu e2label fsck.cramfs fstab-decode killall5
mkfs.bfs mkhomedir_helper resize2fs sulogin
unix_chkpwd
blkdiscard ctrlaltdel e2mmpstatus fsck.ext2 fstrim ldconfig
mkfs.cramfs mkswap runuser swaplabel
unix_update
blkid debugfs e2undo fsck.ext3 getty logsave
mkfs.ext2 pam_tally sfdisk swapoff
wipefs
blkzone dumpe2fs fdisk fsck.ext4 hwclock losetup
mkfs.ext3 pam_tally2 shadowconfig swapon
zramctl
blockdev e2fsck findfs fsck.minix installkernel mke2fs
mkfs.ext4 pivot_root start-stop-daemon switch_root
dt@marina:~/l/lowrisc-chip/debian-riscv64$
How do I fix/overcome this?
Thanks.
Regards,
Dinesh
4 years, 9 months
make mmc error
by Dinesh Thirumurthy
Hi,
Following the instructions at
https://www.lowrisc.org/docs/generate-the-bitstream/
I was able to generated bitstreams for hello, dram, and eth targets.
And run them.
I am unable to 'make mmc'
Output of make hello; make dram; make eth; make mmc at
https://github.com/hakrdinesh/e/blob/master/nexys/mmc.out
The error message for 'make mmc' is
dt@marina:~/l/lowrisc-chip/fpga/board/nexys4_ddr$ make mmc
make: *** No rule to make target 'mmc'. Stop.
dt@marina:~/l/lowrisc-chip/fpga/board/nexys4_ddr$ make --debug mmc
GNU Make 4.1
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html
>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Reading makefiles...
Updating goal targets....
File 'mmc' does not exist.
Must remake target 'mmc'.
make: *** No rule to make target 'mmc'. Stop.
dt@marina:~/l/lowrisc-chip/fpga/board/nexys4_ddr$
Kindly let me know if this target exists or is known by another name?
Thanks.
Regards,
Dinesh
4 years, 9 months
make bitstream error
by Dinesh Thirumurthy
Hi,
While doing
make bitstream
as given in
https://www.lowrisc.org/docs/generate-the-bitstream/
I get the following error:
---------------------------------------------------------------------------------
Start Area Optimization
---------------------------------------------------------------------------------
WARNING: [Synth 8-3332] Sequential element (IOBUF_inst) is unused and will
be removed from module io_buffer_generic__3.
WARNING: [Synth 8-3332] Sequential element (IOBUF_inst) is unused and will
be removed from module io_buffer_generic.
WARNING: [Synth 8-3332] Sequential element (timer_5usec_count_reg[7]) is
unused and will be removed from module ps2_keyboard.
WARNING: [Synth 8-3332] Sequential element (timer_5usec_count_reg[6]) is
unused and will be removed from module ps2_keyboard.
WARNING: [Synth 8-3332] Sequential element (timer_5usec_count_reg[5]) is
unused and will be removed from module ps2_keyboard.
WARNING: [Synth 8-3332] Sequential element (timer_5usec_count_reg[4]) is
unused and will be removed from module ps2_keyboard.
WARNING: [Synth 8-3332] Sequential element (timer_5usec_count_reg[3]) is
unused and will be removed from module ps2_keyboard.
WARNING: [Synth 8-3332] Sequential element (timer_5usec_count_reg[2]) is
unused and will be removed from module ps2_keyboard.
WARNING: [Synth 8-3332] Sequential element (timer_5usec_count_reg[1]) is
unused and will be removed from module ps2_keyboard.
WARNING: [Synth 8-3332] Sequential element (timer_5usec_count_reg[0]) is
unused and will be removed from module ps2_keyboard.
/home/rise/tools/Vivado/Vivado/2016.1/bin/loader: line 164: 6678
Killed "$RDI_PROG" "$@"
Parent process (pid 6678) has died. This helper process will now exit
[Wed Dec 26 15:27:09 2018] synth_1 finished
wait_on_run: Time (s): cpu = 00:04:14 ; elapsed = 00:09:40 . Memory (MB):
peak = 1161.652 ; gain = 3.898 ; free physical = 2757 ; free virtual = 3474
# launch_runs impl_1 -to_step write_bitstream
ERROR: [Common 17-70] Application Exception: Failed to launch run 'impl_1'
due to failures in the following run(s):
synth_1
These failed run(s) need to be reset prior to launching 'impl_1' again.
INFO: [Common 17-206] Exiting Vivado at Wed Dec 26 15:27:25 2018...
Makefile:151: recipe for target
'lowrisc-chip-imp/lowrisc-chip-imp.runs/impl_1/chip_top.bit' failed
make: *** [lowrisc-chip-imp/lowrisc-chip-imp.runs/impl_1/chip_top.bit]
Error 1
dt@m:~/l/lowrisc-chip/fpga/board/nexys4_ddr$
I am using an 4GB RAM Ubuntu 16.04.5
dt@marina:~/l/e/nexys$ lsb_release -a; cat /proc/meminfo | head
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.5 LTS
Release: 16.04
Codename: xenial
MemTotal: 3733908 kB
MemFree: 1683560 kB
MemAvailable: 2417840 kB
Buffers: 23752 kB
Cached: 1087320 kB
SwapCached: 17312 kB
Active: 963596 kB
Inactive: 903124 kB
Active(anon): 749428 kB
Inactive(anon): 201432 kB
Any suggestions on how to overcome this?
This is refresh-v0.6
Thanks.
Regards,
Dinesh
4 years, 9 months
help: nexys4_ddr/src/boot.mem and scripts/cnvmem.v weirdness
by Gabriel L. Somlo
Help, I'm stuck trying to replicate building src/boot.mem in nexys4_ddr.
First off, I'm not sure which of the Makefile targets is responsible
for the version of boot.mem that's currently provided by v0.6 (I'm
assuming it's "make boot" but might be "jump" or "eth" as well)?
Secondly, the current iverilog shipping with my Fedora 28 distro
(version 10, iverilog-10-8.fc28.x86_64) is doing something weird
with scripts/cnvmem.v:
...
begin
$readmemh("cnvmem.mem", mem);
i = 32'h40000000;
while ((i < 32'h42000000) && (1'bx === ^mem[i]))
i=i+16;
first = i;
i = 32'h42000000;
while ((i >= 32'h40000000) && (1'bx === ^mem[i]))
i=i-16;
last = (i+16);
if (last < first + 'H10000)
last = first + 'H10000;
for (i = i+1; i < last; i=i+1)
mem[i] = 0;
$display("First = %X, Last = %X", first, last-1);
for (i = first; i < last; i=i+1)
28: if (1'bx === ^mem[i]) mem[i] = 0; // ##### HERE !!! #####
for (i = first; i < last; i=i+16)
begin
mem2[(i/16)&'hFFF] = {mem[i+15],mem[i+14],mem[i+13],mem[i+12],
mem[i+11],mem[i+10],mem[i+9],mem[i+8],
mem[i+7],mem[i+6],mem[i+5],mem[i+4],
mem[i+3],mem[i+2],mem[i+1],mem[i+0]};
end
fd = $fopen("cnvmem.hex", "w");
for (i = 0; i <= 'hfff; i=i+1)
$fdisplay(fd, "%32x", mem2[i]);
$fclose(fd);
fd = $fopen("cnvmem.coe", "w");
$fdisplay(fd, "memory_initialization_radix=16;");
$fdisplay(fd, "memory_initialization_vector=");
for (i = 0; i <= 'hfff; i=i+1)
$fdisplay(fd, "%32x", mem2[i]);
$fclose(fd);
end
...
On line 28 of the program, the check for "undefined" (8'hxx) bytes
matches against ALL values, so the script will spit out a boot.mem
file consisting ENTIRELY of 0s!
For testing, I want to comment out that line and "post-process" instead
with:
sed -i 's/x/0/g' src/boot.mem
... but I don't know which makefile target I want (see question #1).
Thanks much for any clue and/or hypotheses as to what might be going on.
Cheers,
--Gabriel
4 years, 10 months
additive (non-destructive) rebase to upstream rocket-chip
by Gabriel L. Somlo
Hi Jonathan,
I took a quick detour to teach myself enough Scala and Chisel to
be dangerous, and make the following attempt at rewriting lowRISC's
changes to Rocket in an "additive", upstream-friendly way:
https://github.com/gsomlo/rocket-chip/tree/gls-lowrisc-v02
The names I picked might need a bit of help (xilinx vs. nexys4ddr,
not sure the Xilinx JTAG numbers are the same across multiple
Xilinx boards or specific to each one individually), and maybe my
Chisel/Scala looks amateur (well, it *is* :), but with any luck
some of this stuff might begin being palatable for pushing upstream,
to lower the lowRISC maintenance burden (nothing would preclude
freezing on a certain upstream commit, except they'd have to begin
making their subsequent changes with our stuff in mind :)
One small matching change would be needed against the nexys4_ddr
submodule:
================================================
diff --git a/Makefile b/Makefile
index 82396ed..ded8140 100644
--- a/Makefile
+++ b/Makefile
@@ -22,7 +22,7 @@ example_dir = $(abspath ../../..)/fpga/bare_metal/examples
project_name = lowrisc-chip-imp
BACKEND ?= v
-CONFIG=DefaultConfig
+CONFIG=LowRiscConfig
VIVADO = vivado
@@ -88,8 +88,9 @@ lowrisc_headers = \
verilog_srcs = \
$(top_dir)/src/main/verilog/chip_top.sv \
$(top_dir)/src/main/verilog/spi_wrapper.sv \
- $(top_dir)/vsrc/AsyncResetReg.v \
- $(top_dir)/vsrc/plusarg_reader.v \
+ $(base_dir)/src/main/resources/vsrc/AsyncResetReg.v \
+ $(base_dir)/src/main/resources/vsrc/plusarg_reader.v \
+ $(base_dir)/src/main/resources/vsrc/EICG_wrapper.v \
verilog_headers = \
$(top_dir)/src/main/verilog/config.vh \
@@ -116,7 +117,7 @@ test_cxx_headers = \
#--------------------------------------------------------------------
verilog: $(lowrisc_headers)
- make -C ../../../rocket-chip/vsim verilog
+ make -C $(base_dir)/vsim verilog CONFIG=$(CONFIG)
$(fpga_src):
diff --git a/script/make_project.tcl b/script/make_project.tcl
index 95b569b..f7d99dc 100644
--- a/script/make_project.tcl
+++ b/script/make_project.tcl
@@ -61,8 +61,9 @@ set files [list \
[file normalize $base_dir/src/main/verilog/sd_cmd_serial_host.v] \
[file normalize $base_dir/src/main/verilog/sd_data_serial_host.sv] \
[file normalize $base_dir/src/main/verilog/nasti_channel.sv] \
- [file normalize $base_dir/vsrc/AsyncResetReg.v ] \
- [file normalize $base_dir/vsrc/plusarg_reader.v ] \
+ [file normalize $base_dir/rocket-chip/src/main/resources/vsrc/AsyncResetReg.v ] \
+ [file normalize $base_dir/rocket-chip/src/main/resources/vsrc/plusarg_reader.v ] \
+ [file normalize $base_dir/rocket-chip/src/main/resources/vsrc/EICG_wrapper.v ] \
[file normalize $base_dir/src/main/verilog/ascii_code.v] \
[file normalize $base_dir/src/main/verilog/axis_gmii_rx.v] \
[file normalize $base_dir/src/main/verilog/axis_gmii_tx.v] \
================================================
Anyhow, please let me know what you think.
Thanks,
--Gabriel
4 years, 10 months