Efinix-Inc / br2-efinix

Buildroot external tree for building Linux for Efinix RISC-V Sapphire SoC
MIT License
10 stars 4 forks source link

Can not get linux loaded #1

Closed hedleyd closed 1 year ago

hedleyd commented 1 year ago

Firstly thanks for this wonderful project - I have followed the instructions for the t120f324 board , copied the sdcard.img to a 32gb sdcard and get the following - 1. when the sd caard is plugged in nothing happens - when I remove the sd card I get the output shown in the attachment .

Question 2 is - are the plans to , or how could I include ethernet functionality which is essential for our envisaged edge device which would be on a POE+ network linux on efinix stop

cagrimkahraman commented 1 year ago

Flash Linux Image onto SD Card

  1. Check the existing disk on the computer.

    sudo fdisk -l
  2. Insert the SD card into the computer and run this command again to see the detected SD card. Note down the device name. For example /dev/sdx. If in doubt, remove the SD card and run the command again.

    sudo fdisk -l
  3. Copy the sdcard.img to the SD card.

    Warning: There is a significant risk of damage to your filesystem if you use the wrong /dev/sdx. Make sure you get it right!

    sudo dd if=sdcard.img of=/dev/sdx status=progress
  4. Unmount the SD card

    sudo umount /dev/sdx
efxmnalim commented 1 year ago

Could you type mmcinfo at U-boot command prompt. If you see SD card info means that the SD card not flash properly with Linux image.

hedleyd commented 1 year ago

Thanks for suggestions - I put the TI120F324 aside and tried on the T160F225 dev kit that allowed me to get further . I typed in the suggested mmcinfo and got response shown in the first attachment . It then contuniues with the boot and stops at the line Run /sbin/init as init process ti60mmcinfo run to sbininit run to sbininit

hedleyd commented 1 year ago

My setup is - Ti60F225 , USB-C cable connected to host - have tried Sandisk and Sandisk Entreme 32GB cards onto which the sdcard.img is written using balena Etcher. On both dev kits I can not get a reliable boot - has anyone got this working . I have attached the steps I followed. efinix linux setup.xlsx

efxmnalim commented 1 year ago

Could you check the J3 jumper on T120F324 and connect it to 3.3V (pin 1 and 2)

hedleyd commented 1 year ago

I did that and moved the jumper - no change but noticed that when the sd card is inserted, D7 led goes off and when ejected D7 goes on again - I am using the prebuilt soc.hex and have tried both 1 and 4 cores . I tried building the soc from scratch as per instructions , but do get a lot of warnings regarding timing even though as per instructions I did set timing to 3 - so back to the drawing board

Hedley Davidson Managing Director Cynaps Technologies Pty Ltd @.*** 078-458-7476 ( Mobile )

On Wed, Dec 14, 2022 at 10:05 AM efxmnalim @.***> wrote:

Could you check the J3 jumper on T120F324 and connect it to 3.3V.

— Reply to this email directly, view it on GitHub https://github.com/Efinix-Inc/br2-efinix/issues/1#issuecomment-1350590979, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB244KUTGVK35TI63TLDHC3WNF5SFANCNFSM6AAAAAAS2J3UXI . You are receiving this because you authored the thread.Message ID: @.***>

hedleyd commented 1 year ago

There appears to be a lot more in the soc that is covered in the docs - All i'm trying to establish is if anyone has got linux to boot and work reliably on either the T120 or Ti60 based dev kits ? - If so we will try and figure out how to get it to work and then update the docs - I have attached what I/O seems to be in the sample soc vs the few GPIO that the docs suggest are needed which are highlighted with red line . soc for linux

efxmnalim commented 1 year ago

Could you check the PMOD micro sd is connected to J12 port on T120F324 devkit. Led D7 should not turn off when the card is inserted. Also make sure J3 jumper connected to 3.3v.

hedleyd commented 1 year ago

checked and also tried on 2 other t120 boards to eliminate the hardware . I suspect the configuration settings in the soc.hex , or perhaps u-boot . if your system works we will keep going . initial target is a reliable boot of linux , followed by trying to get ethernet and python working .

Thanks for your input and suggestions.

Hedley Davidson Managing Director Cynaps Technologies Pty Ltd @.*** 078-458-7476 ( Mobile )

On Wed, Dec 14, 2022 at 4:30 PM efxmnalim @.***> wrote:

Could you check the PMOD micro sd is connected to J12 port on T120F324 devkit. Led D7 should not turn off when the card is inserted. Also make sure J3 jumper connected to 3.3v.

— Reply to this email directly, view it on GitHub https://github.com/Efinix-Inc/br2-efinix/issues/1#issuecomment-1351500327, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB244KWJKRCOO4IJLIHPGLLWNHKULANCNFSM6AAAAAAS2J3UXI . You are receiving this because you authored the thread.Message ID: @.***>

hedleyd commented 1 year ago

I am very embarrassed to let you know that I had connected the PMOD to the wrong port - Thanks again for your input . I managed to get linux to boot . then did cat /proc/info and the response is Processor:0 hart:0 isa rv32imafd

efxmnalim commented 1 year ago

Great! I will update the docs for the J3 jumper connection to 3.3v on T120F324 devkit.

hedleyd commented 1 year ago

I rebuilt gpio as suggested and all worked perfectly - MANY thanks for prompt reply

efxmnalim commented 1 year ago

Great! I will update the docs for the J3 jumper connection to 3.3v on T120F324 devkit.

https://github.com/Efinix-Inc/br2-efinix/commit/472fceeb53e3077aa08aa71e75c594523f5512bb