Efinix-Inc / br2-efinix

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

No Linux is loaded after running command minicom -D /dev/ttyUSB2 in Centos 7.9 #3

Closed rohaya2021 closed 1 year ago

rohaya2021 commented 1 year ago

minicom_command

I have followed the instruction to load Linux on ti60f225 but failed. Here is the flow which I used: 1) Generate soc.h using Efinix Sapphire RISC-V SoC flow (efinity version 2022.2). 2) source init.sh in br2-efinix 3) run makefile 4) Combine multiple images files ( soc.hex, fw_jump.bin and u-boot.bin) and program the SPI flash 5) use dd command to flash linux image sdcard.img to a 16g sdcard. 6) run minicom -D /dev/ttyUSB2

hedleyd commented 1 year ago

sudo minicom -D /dev/ttyUSB0 -- worked for me as a sanity check try connecting with teraterm from windows environment , or putty - Baud 115,200

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

On Fri, Dec 23, 2022 at 9:59 AM rohaya2021 @.***> wrote:

[image: minicom_command] https://user-images.githubusercontent.com/90079835/209293645-5f608006-6f4d-4a10-ad0c-c589ee9226d9.jpg

I have followed the instruction to load Linux on ti60f225 but failed. Here is the flow which I used:

  1. Generate soc.h using Efinix Sapphire RISC-V SoC flow (efinity version 2022.2).
  2. source init.sh in br2-efinix
  3. run makefile
  4. Combine multiple images files ( soc.hex, fw_jump.bin and u-boot.bin) and program the SPI flash
  5. use dd command to flash linux image sdcard.img to a 16g sdcard.
  6. run minicom -D /dev/ttyUSB2

— Reply to this email directly, view it on GitHub https://github.com/Efinix-Inc/br2-efinix/issues/3, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB244KVPGLSBP3NRAKMKN6DWOVLRVANCNFSM6AAAAAATHPWE6Y . You are receiving this because you are subscribed to this thread.Message ID: @.***>

rohaya2021 commented 1 year ago

Hi Hedley, I figure out I missed the modify bootloader part. I follow https://github.com/Efinix-Inc/br2-efinix/blob/main/docs/modify_fpga_bootloader.md but couldn’t find file riscv-xpack-toolchain_8.3.0-2.3_linux I didn’t install RISCV SDK because the link said End of Life. I installed efinity-riscv-ide-2022.2.3 instead but couldn’t find riscv-xpack-toolchain_8.3.0-2.3_linux Maybe I need to launch the software and run IP manager from there. Anyway, what is the command to launch efinity-riscv-ide-2022.2.3? Do I create custom SoC Sapphire configuration from efinity-riscv-ide-2022.2.3 or efinity software? Thanks

efxmnalim commented 1 year ago

Please git pull again to get the latest changes from this repo. The efinity-riscv-ide-2022.2.3 already come with RISCV toolchain. The modify_bootloader.sh script will handle the compilation of bootloader.

rohaya2021 commented 1 year ago

I already installed the latest br2-efinix 2021.05.5 i want to run modify_bootloader.sh in br2-efinix/boards/efinix/common but I don't have riscv-xpack-toolchain_8.3.0-2.3_linux Where to get the folder?

efxmnalim commented 1 year ago

no need to give the path of riscv-xpack-toolchain anymore. It replaced with path to efinity-riscv-ide-2022.2.3. For example /home/user/efinity/efinity-riscv-ide-2022.2.3

rohaya2021 commented 1 year ago

I have successfully run modify_bootloader.sh Do I have to run compile bootloader program?

efxmnalim commented 1 year ago

modify_bootloader.sh script already compile the bootloader program. Just recompile the Efinity project

rohaya2021 commented 1 year ago

How to recompile the Efinity project?

efxmnalim commented 1 year ago

Open the Efinity software then load your generated sapphire soc project. After that click the screw button to compile the project.

rohaya2021 commented 1 year ago

I followed the flow until command to run minicom to boot the Linux but failed. How to check what went wrong?

hedleyd commented 1 year ago

I will document all the steps I followed on an excel spreadsheet

With a bit of help from the creator everything worked fine so the process from board out of the box to booting went well.

I made a few silly mistakes which I will include in the doc and post within the next day or two .

Hedley Davidson

@.***

On Wed, Dec 28, 2022 at 6:20 AM rohaya2021 @.***> wrote:

I followed the flow until command to run minicom to boot the Linux but failed. How to check what went wrong?

— Reply to this email directly, view it on GitHub https://github.com/Efinix-Inc/br2-efinix/issues/3#issuecomment-1366356075, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB244KXYIRINXTOWJYUPO4TWPO5TNANCNFSM6AAAAAATHPWE6Y . You are receiving this because you commented.Message ID: @.***>

rohaya2021 commented 1 year ago

I attach here my flow in Word. I tried minicom -D /dev/ttyUSB0 but failed. buildroot_flow_Rev2.docx Next plan is to try on Putty at Windows.

rohaya2021 commented 1 year ago

Error_Message_After_Linux_is_loaded I can get the Linux loaded by pressing Reset button on Ti60F225 board but got error message as shown on attached jpg file.

efxmnalim commented 1 year ago

Could you type mmcinfo at U-boot command prompt

rohaya2021 commented 1 year ago

I can't write anything on the U-boot prompt. I have to exit minicom once it got stucked trying to get the kernel image from sdcard.

efxmnalim commented 1 year ago

Any reason to use these pins assignment for the SPI1?

system_spi_1_io_data_0      Pin=M2 Resource=GPIOL_N_02
system_spi_1_io_data_1      Pin=H4 Resource=GPIOL_N_04
system_spi_1_io_sclk_write  Pin=N2 Resource=GPIOL_P_02
system_spi_1_io_ss          Pin=P2 Resource=GPIOL_P_00

Could you try to use this pin assignment for Ti60F225?

rohaya2021 commented 1 year ago

I got mismatch voltage in I/O standard assignment in bank and instance for all the above pins if I follow the suppose assigned resources.

efxmnalim commented 1 year ago

Use this pin assignment. Just change the I/O bank voltage to 3.3V for TR bank in the Efinity Interface Designer -> Device Settings -> IO Banks. Also change the J5 jumper setting on the Ti60F225 to pin 1 and 2.

rohaya2021 commented 1 year ago

Am I using the correct soc.xml? I open soc.xml from /project/soc/ip/soc1/Ti60F225_devkit folder. There is another soc.xml from folder /project/soc. The later was created when I generate the custom SoC.

rohaya2021 commented 1 year ago

I rerun using configuration pinout for SPI 1. Here is the message I received after running minicom.

couldnot_initialize_timer

rohaya2021 commented 1 year ago

linux_loaded I am able to load linux. Thanks for the flow Hedley. I used soc.h and soc.hex from br2_efinix directory and it worked.

rohaya2021 commented 1 year ago

I tried to reboot linux today but it complained couldn't get the kernel image. I am using the same sdcard last week. Do I need to rerun the whole flow?

efxmnalim commented 1 year ago

It can be the SD card not detected. Try run mmcinfo on U-boot terminal or flash the Linux image again.

rohaya2021 commented 1 year ago

Cant_Read_Image_Jan4 I flash the Linux image again but still it can't get the kernel image.

efxmnalim commented 1 year ago

Try program the board with latest bitstream from the latest release (2021.05.6)

rohaya2021 commented 1 year ago

Please close this issue because I no longer loading Linux on Centos 7.9. I reinstalled my workstation with Ubuntu 18.04