-
-
Save FlorianHeigl/bcb8a667372e776cd7032ad8cda9fa89 to your computer and use it in GitHub Desktop.
| # add one entry per port per card | |
| dhcp-host=00:0f:mac1,192.168.236.100,lios1octeth0,12h | |
| dhcp-host=00:0f:mac2,192.168.236.101,lios1octeth1,12h | |
| # match the vendor pattern to a tag | |
| # everything later matches to this tag | |
| dhcp-mac=set:lio,00:0f:b7:*:*:* | |
| # doku zu options: https://blog.abysm.org/2020/06/human-readable-dhcp-options-for-dnsmasq/ | |
| # sntp support etc ermoeglichen | |
| dhcp-option = tag:lio, option:router, 192.168.236.1 | |
| dhcp-option = tag:lio, option:ntp-server, 192.168.236.1 | |
| # aber auch einfach eine uhrzeit hergeben (nicht supported im build | |
| # dhcp-option = tag:lio, option:time-offset | |
| # bootcommand: | |
| # " * Added back NetOurBootCommand environment variable as DHCP option 224." braucht u-boot aus sdk 5.1! | |
| dhcp-option-force=224,"tftp ; bootoctlinux $(loadaddr) numcores=16 ip=dhcp console=ttyS0,115200 console=ttyPCI0 rootwait=10 panic | |
| # bootfile: dieses bootet das embedded rootfs mit 4.9 kernel (this works, but success also depends on the console settings | |
| # having a pci stdout blocks boot | |
| # having no pci stdout means you can't interrupt autoboot | |
| # you'll figure it out, it just sucks because we don't know how to do it right | |
| dhcp-boot=tag:lio,erfs/vmlinux.64 | |
| # umstellen auf mkimage uboot script | |
| #dhcp-boot = tag:lio, ... | |
| #bootoctlinux ${loadaddr} coremask=f root=/dev/nfs rw console=ttyS0,115200 ip=bootp | |
| #bootoctlinux ${loadaddr} numcores=n root=/dev/ram console=ttyS0,115200 | |
| # file:///u_boot.pdf | |
| # idk what that pdf was, seems I thought it matters. |
| # docs: https://docs.u-boot.org/en/latest/usage/environment.html | |
| export OCTEON_REMOTE_PROTOCOL=PCI:2 | |
| LINES="setenv autoload n | |
| setenv bootdelay -1; setenv baudrate 115200; setenv env_size 2000 | |
| setenv fdtaddr 80000; setenv fileaddr 0x20000000; setenv filesize 2000 | |
| setenv flash_base_addr 1fb00000; setenv flash_size 100000; | |
| setenv liofsize 0x142840; setenv lionicaddr 0x400000; setenv loadaddr 0x20000000 | |
| setenv named_block_addr 0xfffeff80; setenv named_block_size 0x10000 | |
| setenv octeth0_speed 10 | |
| setenv octeth1_speed 25 | |
| setenv qlm4_mode sata" | |
| oct-remote-bootcmd "env default -a" | |
| echo "${LINES}" | \ | |
| while read _line ; do | |
| oct-remote-bootcmd "${_line}" | |
| sleep 3 | |
| done | |
| oct-remote-bootcmd "saveenv" | |
| #setenv bootcmd 'run uefi_bootcmd; sf probe; sf read ${fileaddr} ${lionicaddr} ${liofsize}; bootoct forceboot numcores=${numcores}' | |
| #setenv uefi_bootcmd 'namedalloc __stage2_uefi 0x10000; cp64.b 0x1fb20000 ${named_block_addr} ${named_block_size}' |
| stdout=serial | |
| stderr=serial | |
| stdin=serial,bootcmd | |
| bootdelay=0 | |
| autoboot=0 | |
| autostart=yes | |
| bootretry=100 | |
| octeth0_speed=10 | |
| octeth1_speed=10 |
| bootdelay=10 | |
| autoboot=0 | |
| autostart=yes | |
| bootretry=100 | |
| pci_console_active | |
| serial_console_active=1 | |
| stdin=pci,serial,bootoct | |
| stdout=serial | |
| stderr=serial | |
| octeth0_speed=10 | |
| octeth1_speed=10 | |
| tftpwindowsize=16 | |
| tftpblocksize=1500 | |
| bootcmd=dhcp ; tftp ; bootoctlinux coremask=ffff root=/dev/ram rootwait=5 console=ttyS0,115200 console=ttyPCI0 ip=dhcp reboot=pci rootwait=10 panic=10 numcores=16 mem=8G | |
| saveenv |
| bootdelay=10 | |
| autoboot=0 | |
| pci_console_active=1 | |
| serial_console_active=1 | |
| stdin=pci,serial,bootoct | |
| stdout=serial,pci | |
| stderr=serial,pci | |
| octeth0_speed=10 | |
| octeth1_speed=10 | |
| bootcmd=mmc init; dhcp ; tftp ; bootoctlinux numcores=14 root=/dev/ram rootwait=5 console=ttyS0,115200 ip=dhcp reboot=pci rootwait=10 panic=10 mem=7G | |
| saveenv | |
| [root@lion firmware]# cat env.tftp | |
| bootdelay=10 | |
| autoboot=0 | |
| autostart=yes | |
| bootretry=100 | |
| pci_console_active | |
| serial_console_active=1 | |
| stdin=pci,serial,bootoct | |
| stdout=serial | |
| stderr=serial | |
| octeth0_speed=10 | |
| octeth1_speed=10 | |
| tftpwindowsize=16 | |
| tftpblocksize=1500 | |
| bootcmd=dhcp ; tftp ; bootoctlinux coremask=ffff root=/dev/ram rootwait=5 console=ttyS0,115200 console=ttyPCI0 ip=dhcp reboot=pci rootwait=10 panic=10 numcores=16 mem=8G | |
| saveenv |
| #!/usr/bin/env bash | |
| load_fw(){ | |
| cd /root/firmware | |
| # lade und warte 20s mit dem boot | |
| OCTEON_REMOTE_PROTOCOL=PCI:${1} oct-remote-boot /tftpboot/u-boot-octeon_nic225e.bin --envfile=env.dhcp | |
| #if [ $? != 0 ]; then | |
| # OCTEON_REMOTE_PROTOCOL=PCI:${1} timeout 20 oct-remote-reset | |
| # OCTEON_REMOTE_PROTOCOL=PCI:${1} oct-remote-boot /tftpboot/u-boot-octeon_nic225e.bin --envfile=env.dhcp | |
| #fi | |
| # reset falls sfp xaui problem mit erkennung dac da waere, anderes envfile | |
| } | |
| run_boot(){ | |
| OCTEON_REMOTE_PROTOCOL=PCI:${1} oct-remote-bootcmd "dhcp" | |
| sleep 10 | |
| OCTEON_REMOTE_PROTOCOL=PCI:${1} oct-remote-bootcmd "run NetOurBootCommand" | |
| } | |
| # reihenfolge im treiber entspricht nicht der in den slots | |
| # und kann sich aendern | |
| for _cnt in 0 2 4 6 8 10 12 14 16 18 ; do | |
| #for _cnt in 0; do | |
| sleep 2 | |
| clear | |
| echo "lade auf adapter #${_cnt}" | |
| load_fw ${_cnt} && | |
| echo "geladen auf adapter #${_cnt}" && | |
| sleep 5 | |
| #echo "boote adapter #${_cnt}" && | |
| #run_boot ${_cnt} & | |
| done | |
| # alt | |
| # OCTEON_REMOTE_PROTOCOL=PCI:${1} oct-remote-bootcmd "dhcp ; tftp ; bootoctlinux coremask=ffff root=/dev/ram rootwait=5 console=ttyS0,115200 console=ttyPCI0 ip=dhcp reboot=pci rootwait=10 panic=10 numcores=16 mem=8G" |
if you wana make progress on this, pay attention to and learn about that dhcp option 224 they use to get a uboot bootscript.
the second largest wound is rebooting. so booting, and rebooting both still suck. after that things will get better.
long-term suck is power management, I have some exact power draw with the cards at u-boot prompt and running kernel 4.9. maybe in 6.10+ it finally works
further suck is the port LEDs, not working on 4.9, can be a device tree or a driver issue. no clue
I'll just keep adding to this random gist instead of my issue tracker
zip offloading does not yet work (i left out 2 cores, what else do you need!)
/examples # ./zip abc
CVMX_SHARED: 0x102d0000-0x103b0000
Active coremask = 0x3fff
ERROR: cvmx_fpa3_reserve_aura: node=0 desired aura=5
ERROR: cvmx_fpa3_setup_aura_and_pool: Failed in AURA not available
appmain: ERROR: in ZIP buffer pool
this matters i.e. if you wanted to use zram (gzip compressed on multiple paging devices should be fast and low-lat)
crypto example works but ofc /proc/crypto doesn't indicate any offloading in the rest of the system.
"with an engineering mindset" this is a great state because it's just individual, unconnected small issues which are supposed to be easier to be solved.
let us celebrate, let us all make merry.
everyone!
let's shout!
scream out!
just as an addendum, this is what the original 'hyperscaler' fw looks like with autoboot