Closed notusedanymore2 closed 5 years ago
The vc707 'rom' bootloader needs to be updated to support GPT partitions before the master branch freedom-u-sdk branch will work.
The vc707 'rom' bootloader needs to be updated to support GPT partitions before the master branch freedom-u-sdk branch will work.
Then what should I do? linux_u500vc707devkit_config branch of freedom-u-sdk is broken due to broken buildroot/m4. Should I just patch the resoultion to linux_u500vc707devkit_config branch?
If you don't have the PCIe module, you should comment out the PCIe line as follows before generating the bitstream (note, a target to make this directly with no code edits is being worked on and will be merged in the next few days)
fpga-shells/src/main/scala/shell/xilinx/VC707NewShell.scala line 213 should change from
val pcie = Overlay(PCIeOverlayKey) (new PCIeVC707Overlay (_, _, _))
to
// val pcie = Overlay(PCIeOverlayKey) (new PCIeVC707Overlay (_, _, _))
This is because with this option, the build assumes you will have the pcie, and will use the clock from the oscillator on that board as the main clock, thus, without it the core will remain stuck in reset.
Hi @minmossi. I have been doing the same as making the vc707 boot linux with and without FMC-PCIe board. I am middle up upstreaming with the help from @erikdanie, in these discussion. https://github.com/sifive/freedom/issues/116 https://github.com/sifive/fpga-shells/pull/64 https://github.com/sifive/freedom/pull/118 In the mean time you could try my repo. First download riscv64-elf-gcc-8.2 from here and untar it some place in your home directory.
Generate .mcs/.prm for Programming VC707
$ git clone https://github.com/mcd500/freedom.git
$ cd freedom
$ git checkout vc707-nopcie-switchable-mcd500
$ git submodule update --init --recursive
$ export RISCV=/home/where_is_gcc/riscv64-elf-gcc-8.2
$ export PATH=/where_is_Vivado/2016.4/bin/:/home/where_is_gcc/riscv64-elf-gcc-8.2/bin/:${PATH}
$ make MODEL=VC707BaseShell -f Makefile.vc707-u500devkit verilog -j `nproc`
$ make MODEL=VC707BaseShell -f Makefile.vc707-u500devkit mcs -j `nproc`
And then write the bitstream to vc707.
Generate SD Boot Image
$ git clone https://github.com/mcd500/freedom.git
$ cd freedom-u-sdk
$ git checkout linux_u500vc707devkit_config
$ git submodule update --init --recursive
$ make BOARD=vc707devkit_nopci -j `nproc`
$ sudo make DISK=/dev/sd_card_location vc707-sd-write
Then turn on vc707 with the sd card and see the serial console. It should show up boot message. Please let me know if anything does not work.
I was able to fully synthesizing U500 for VC707 and boot Linux.
If you don't have HMC-PCIe daughter board, like me, you can use mcd500's repository following above, thanks Tsukamoto!
Those who using glibc > 2,28(like the ones who using latest Ubuntu), you need to patch this to work/build_initramfs/build/host-m4-1.4.17 in freedom-u-sdk local repository.
Closing this issue now.
Hi @minmossi, you are most welcome! I have a lot to upstream. I also made freedom-u-sdk on vc707 to read gpt partition of SD card and then making debian rootfs to boot from SD card on vc707. Need to cleanup and finish upstreaming.
Hi @mcd500 , I am very interested in reading GPT partitions and booting debian on VCU118. Did you publish your work for VC707 in the meantime?
Hi @manox, seems like I completely forgotten to upstream to here. But I upstream the sd card partitioning part at here. Reading the GPT partitions and booting on the vcu118 is probably the same. https://github.com/keystone-enclave/keystone/blob/master/KEYSTONE-FPGA.md#prepare-keystone-bootable-sd-card
Currently I have VC707 board only, without any FMC-PCIe board and PCIe switch/device. I'm trying to program VC707 with U500 .mcs file and boot Linux, but I'm not sure I'm doing right.
Generate .mcs/.prm for Programming VC707
Generate SD Boot Image
Programming FPGA with .mcs/.prm
Plug USB Type-A to mini-USB cable to JTAG port on VC707's backplate
Setting SW11 to 11010 on VC707
Power-up VC707
Open Vivado 2016.4
Open Hardware Manager
Create Configuration Memory Device(mt28gu01gaaxle-bpi-x16)
select .mcs/.prm
State of non-config mem I/O pins: Pull-none
Address Range: Configuration File Only
RS Pins: 25:24
Erase: Yes
Blank Check: No
Program: Yes
Verify: Yes
Verify Checksum: No
Prepare to Boot Linux
Insert programmed 16GB SDHC card to VC707 board
Plug USB Type-A to micro-USB cable to UART port on VC707's backplate
$ sudo minicom /dev/ttyUSB0
But I don't have anything printed on minicom screen, also everytime I turn VC707 off the FPGA returns to unprogrammed state or the configuration memory gets deleted.
Any help I would be thankful for.