Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linux_litex demo stuck on tftp - sometimes #19

Open
CarlFK opened this issue Sep 6, 2024 · 3 comments
Open

linux_litex demo stuck on tftp - sometimes #19

CarlFK opened this issue Sep 6, 2024 · 3 comments
Labels

Comments

@CarlFK
Copy link
Owner

CarlFK commented Sep 6, 2024

following the steps on:

https://github.com/CarlFK/pici/wiki/Getting-Started#linux-litex

Sometimes it works, sometimes it gets stuck at:

Fetching from: UDP/6069
(no ascii spinner)

@CarlFK CarlFK added the f4pga label Sep 6, 2024
@CarlFK CarlFK changed the title linux_litex demo stuck on tftp sometimes linux_litex demo stuck on tftp - sometimes Sep 6, 2024
@mithro
Copy link
Contributor

mithro commented Sep 7, 2024

How do I reproduce this?

@mithro
Copy link
Contributor

mithro commented Sep 7, 2024

Carl says;

  • SSH into one of the machines using the "Linux cheatsheet" -- The random string that appears as you login is the password for the Pi.
  • cd ~/tests/linux_litex_t1
  • ./t1.sh
  • (If you get [01:05:14.664] Error: Device file is locked by another process then someone else is using it.) -- You should get a terminal with the standard Arty bitstream which looks like;
********************************************************
********************************************************
**        Avnet/Digilent Arty Evaluation Board        **
**        LEDs and switches GPIO Demonstration        **
********************************************************
********************************************************
**
Choose Task:
BTN0: Print PWM value.
BTN1: 'Cylon' LED display.
BTN2: Scrolling LED display.
BTN3: Return to this menu.

  • ctrl-t q to exit
  • The script will now try and load litex Linux stuff.

@mithro
Copy link
Contributor

mithro commented Sep 7, 2024

#!/usr/bin/expect

spawn lsusb
expect "Future Technology Devices International"
expect eof
spawn openFPGALoader -b arty --reset --verbose
expect "found 1 devices"
expect eof
wait
spawn tio /dev/ttyUSB1
expect "Avnet/Digilent Arty Evaluation Board"
expect "LEDs and switches GPIO Demonstration"
expect "BTN3: Return to this menu."
close
spawn openFPGALoader -b arty top.bit --verbose
expect "found 1 devices"
expect eof
wait
set timeout 30
spawn tio /dev/ttyUSB1
expect "Memtest OK"
expect "Fetching from: UDP/6069"
expect "Downloaded 4652188 bytes from Image over TFTP to 0xc0000000"
expect "Executing booted program at 0x50000000"
expect "Liftoff!"
expect "*** VexRiscv BIOS ***"
#expect "*** Supervisor ***"
expect "No DTB passed to the kernel"
#expect "Welcome to Buildroot"
expect "ogin:"
send -- "root\r"
expect "root@buildroot"

expect "#"
# ip addr show
send -- "ip addr show\r"
expect "eth0"
expect "#"

# ip addr add 192.168.100.50/24 dev eth0
send -- "ip addr add "
sleep 1
send -- "192.168."
sleep 1
send -- "100.50/24 "
sleep 1
send -- "dev eth0\r"

expect "#"
# ip link set eth0 up
send -- "ip link set "
sleep 1
send -- "eth0 up\r"

expect "#"
# ip addr show
send -- "ip addr show\r"

expect "#"
# ping 192.168.100.100
send -- "ping -c 5 "
sleep 1
send -- "192.168.100.100\r"
expect "#"

interact
wait

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants