li3tuo4 / rc-fpga-zcu

Port fpga-zynq (rocket-chip) to Xilinx ZYNQ Ultrascale+ board (ZCU102)
Other
57 stars 15 forks source link

Hardcoded path in zcu102/soft_config/config file #1

Closed ncppd closed 5 years ago

ncppd commented 5 years ago

Greetings and thanks for porting rocket-chip to ZCU102 board!

There is a problem in zcu102/soft_config/config file with a hardcoded path. Do you know how I can generate my own config file to overcome this and also any other issue that may come up?

https://github.com/li3tuo4/rc-fpga-zcu/blob/585df6b476851355ef2db6ba788cfa460bad8ec6/zcu102/soft_config/config#L231

li3tuo4 commented 5 years ago

Greetings. You are very welcome to use this repo.

Sorry for this mistake. But I am not sure if this line will create any actual problem in kernel creation. It seems to be okay so far with the students (I got no complaints).

If you want to generate your own config, you can use the petalinux tutorial or xilinx reference doc, regarding developing ARM linux on ZCU102, to start a new petalinux project from scratch. You can reuse some files, e.g., dts file, provided in this repo.

The important thing in this config is about SD card, memory space, initramfs, etc.

The generation of RISC-V linux might have troubles about config due to the version change of freedom-u-sdk. I was too busy to refine this. This should be easy to handle. You can just follow the README of freedom-u-sdk, and use normal GUI to configure, in case you find the tutorual provided in this repo does not work. It's less complicated than configuring ARM Linux. The important thing is the initramfs basically, as far as I can remember.

Hope this helps. I will try to refine the scripts soon after I finish the current task.

li3tuo4 commented 5 years ago

Hi @ncppd

I just pushed a commit to fix the issue you mentioned and other issues found by other users. I found that the same issue was mentioned actually by our students before.

You can check with the new quickstart tutorial at https://github.com/li3tuo4/rc-zcu102-tutorial/blob/master/quickstart.pdf, which is updated with this fix.

Sorry for the issues. Hopefully, it will be smooth to use from now on. Please let me know if you meet any issues.

ncppd commented 5 years ago

Thank you very much! I am using a modified version of your repo extensively, so I will notify you if I stumble on any other issue. I have modified some scripts and tcl files and I found out that your flow is also working fine in Vivado 2018.1 with Petalinux 2018.2.

Best regards, Nick

ncppd commented 5 years ago

Sorry to reopen this but I think I have spotted a minor typo in petalinux_bd.sh script:

https://github.com/li3tuo4/rc-fpga-zcu/blob/e0adc1438a831dd37e66631dc6b1ceba8ac8cde8/zcu102/soft_config/petalinux_bd.sh#L19

$gen_config points to file rc-fpga-zcu/zcu102/soft_config/config and not rc-fpga/zcu102/petalinux-proj/project-spec/configs/config so sed command fails. Correct path should be $proj_dir/project-spec/configs/config.

After I fixed that sed command still failed, I suspect because of the slashes contained into string $proj_dir.

So I made the following modifications and it now works fine: sed -i "s@FIXME_PLDIR@$proj_dir@g" $proj_dir/project-spec/configs/config

Thank you, Nick

li3tuo4 commented 5 years ago

Hi @ncppd My mistake! I just pushed your fix.

Many thanks, Tuo