rmcreyes / cpen391-de1

The DE1-SoC code for our CPEN 391 project.
MIT License
0 stars 0 forks source link

Look into booting Linux from SD card #2

Open rmcreyes opened 3 years ago

rmcreyes commented 3 years ago

Describe what aspect of our project needs to be researched Look into how we can boot Linux on our DE1s with SD cards.

Additional context Perhaps if you manage to get it working, add some documentation in the README for some gist notes of how to get started?

Please close this ticket either by merging some documentation or leaving comments under this ticket.

Zhang-Kevin16 commented 3 years ago

Most of the instructions are found here https://people.ece.cornell.edu/land/courses/ece5760/DE1_SOC/DE1-SoC-UP-Linux/Linux.pdf.

Some things to note:

PS. USB camera is detected with the console. Still need to check if VNC works with the console. Preferably, I can get the Ubuntu version working soon. Also need to figure out how to interact with the FPGA side.

Zhang-Kevin16 commented 3 years ago

So apparently the ON in the previous picture actually doesn't mean ON and actually means 0...

Anyways to load Ubuntu (with GUI) onto the DE1:

  1. Download the image
  2. Make sure every partition is deleted on the SD Card if you previously already wrote an Linux image to the SD card. This can be done by going to Create and Format hard disk partition.
  3. Write Linux image to the SD Card using Win32 Disk Imager.
  4. Put SD Card into DE1.
  5. Flip all the switches in the image to the ON position (it's actually 0). Basically toggle them UP relative to the orientation of the image.
  6. Plug in VGA, mouse, keyboard.
  7. Turn on.
  8. ???
  9. Profit.
Zhang-Kevin16 commented 3 years ago

A couple of notes before I forget.

  1. The Linux image we use right now is loading its own FPGA system so we can't use our own hardware acceleration yet.
  2. We might be able to change the FPGA system by replacing the .rbf file within the FAT32 partition of the SD Card. Haven't tested yet.
  3. Since Linux is using virtual memory we can't write to hardcoded addresses like in the CPEN311 lab. What we can do is use mmap to obtain physical memory to virtual memory mappings according to https://people.ece.cornell.edu/land/courses/ece5760/DE1_SOC/DE1-SoC-UP-Linux/Linux.pdf.
    Again this is theoretical and I haven't tried it yet.