This commit is contained in:
Opvolger 2025-03-30 16:15:54 +02:00
parent ddeb548df6
commit 66a4fa5a28
9 changed files with 274 additions and 10 deletions

160
cisco/cisco.md Normal file
View file

@ -0,0 +1,160 @@
# Cisco switch
type: cisco ws-c3650-48ts
Cisco Catalyst 3650-48TS-?
Get current image:
https://community.cisco.com/t5/switching/copying-ios-from-switch-to-usb-drive/td-p/4447090
re-pack:
https://github.com/nccgroup/asafw/tree/master
https://www.ismoothblog.com/2019/07/access-cisco-switch-serial-console-linux.html
9600 rate
https://www.reddit.com/r/Cisco/comments/18jen3k/catalyst_3650_switches_bricked_cisco_wont_honor/
https://community.cisco.com/t5/switching/catalyst-3650-stuck-on-boot-loader/td-p/2804188
Hold the MODE button while you power it on
https://www.lrqa.com/en/cyber-labs/cve-2024-20356-jailbreaking-a-cisco-appliance-to-run-doom/
Crash mode:
https://github.com/Fz3r0/Fz3r0/blob/main/Networking/Knowledge/Troubleshooting/Boot-From-Init-BIN_&_Restore_Device_from_crash.md
```bash
Booting...
Interface GE 0 link down***ERROR: PHY link is down
Reading full image into memory...........................................................................................................................................................................................................................................................................................................................................................................................................done
Bundle Image
--------------------------------------
Kernel Address : 0x5342d674
Kernel Size : 0x365e6a/3563114
Initramfs Address : 0x537934de
Initramfs Size : 0x16dc292/23970450
Compression Format: mzip
Bootable image at @ ram:0x5342d674
Bootable image segment 0 address range [0x81100000, 0x81bffb30] is in range [0x80180000, 0x90000000].
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
File "flash:cat3k_caa-universalk9.16.06.04a.SPA.bin" uncompressed and installed, entry point: 0x816e02d0
Loading Linux kernel with entry point 0x816e02d0 ...
Bootloader: Done loading app on core_mask: 0xf
### Launching Linux Kernel (flags = 0x5)
Inst 0 Get kvaddr 0x80011c00f0000000
If this is not emulator, STOP, check ERS for new asic revid
Inst 0 Get kvaddr 0x80011c00f0000000
Inst 0 Get kvaddr 0x80011c00f0000000
Inst 1 Get kvaddr 0x80011c00f8000000
If this is not emulator, STOP, check ERS for new asic revid
Inst 1 Get kvaddr 0x80011c00f8000000
Inst 1 Get kvaddr 0x80011c00f8000000
oobnd:
/scratch/mcpre/release/BLD-V16_06_04A_FC3/binos/drivers/kernel/obj-mips64_cge7-edison/doppler/oobnd/src/oobnd.c:oobnd_module_init: silent roll checkpoint
/scratch/mcpre/release/BLD-V16_06_04A_FC3/binos/drivers/kernel/obj-mips64_cge7-edison/doppler/oobnd/src/oobhal.c:oobhal_init_module: silent roll checkpoint
contdev.ko loaded. Date Oct 27 2018 00:38:15
Copyright (c) 2011, 2014-2015 by cisco Systems, Inc. All rights reserved
contdev: reg: lsmpi_contdev_register_handlers dereg: lsmpi_contdev_deregister_handlers
contdev: reg: lsmpi_contdev_register_handlers dereg: lsmpi_contdev_deregister_handlers
contdev driver initialized.
ccccccetjid
Waiting for 120 seconds for other switches to boot
Both links down, accelerating discovery and not waiting for other switches
Switch number is 2
Restricted Rights Legend
Use, duplication, or disclosure by the Government is
subject to restrictions as set forth in subparagraph
(c) of the Commercial Computer Software - Restricted
Rights clause at FAR sec. 52.227-19 and subparagraph
(c) (1) (ii) of the Rights in Technical Data and Computer
Software clause at DFARS sec. 252.227-7013.
cisco Systems, Inc.
170 West Tasman Drive
San Jose, California 95134-1706
Cisco IOS Software [Everest], Catalyst L3 Switch Software (CAT3K_CAA-UNIVERSALK9-M), Version 16.6.4a, RELEASE SOFTWARE (fc3)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2018 by Cisco Systems, Inc.
Compiled Fri 26-Oct-18 18:32 by mcpre
Cisco IOS-XE software, Copyright (c) 2005-2018 by cisco Systems, Inc.
All rights reserved. Certain components of Cisco IOS-XE software are licensed under the GNU General Public License ("GPL") Version 2.0. The software code licensed under GPL Version 2.0 is free software that comes with ABSOLUTELY NO WARRANTY. You can redistribute and/or modify such GPL code under the terms of GPL Version 2.0. For more details, see the documentation or "License Notice" file accompanying the IOS-XE software, or the applicable URL provided on the flyer accompanying the IOS-XE software. % Checking backup nvram % No config present. Using default config FIPS: Flash Key Check : Begin FIPS: Flash Key Check : End, Not Found, FIPS Mode Not Enabled This product contains cryptographic features and is subject to United States and local country laws governing import, export, transfer and use. Delivery of Cisco cryptographic products does not imply third-party authority to import, export, distribute or use encryption. Importers, exporters, distributors and users are responsible for compliance with U.S. and local country laws. By using this product you agree to comply with applicable laws and regulations. If you are unable to comply with U.S. and local laws, return this product immediately. A summary of U.S. laws governing Cisco cryptographic products may be found at: http://www.cisco.com/wwl/export/crypto/tool/stqrg.html If you require further assistance please contact us by sending email to export@cisco.com.
.....
Would you like to enter basic management setup? [yes/no]: yes
Configuring global parameters:
Enter host name [Switch]: opvolger
The enable secret is a password used to protect access to
privileged EXEC and configuration modes. This password, after
entered, becomes encrypted in the configuration.
Enter enable secret: ikkehier
The enable password is used when you do not specify an
enable secret password, with some older software versions, and
some boot images.
Enter enable password: ikkehier
% Please choose a password that is different from the enable secret
Enter enable password: Ab12345!
The virtual terminal password is used to protect
access to the router over a network interface.
Enter virtual terminal password: Ab12345!
Setup account for accessing HTTP server? [yes]:
Username [admin]:
Password [cisco]:
Password is UNENCRYPTED.
Configure SNMP Network Management? [no]: yes
Community string [public]:
Current interface summary
Enter interface name used to connect to the management network from the above interface summary: Vlan1
Configuring interface Vlan1:
Configure IP on this interface? [yes]:
IP address for this interface: 192.168.6.1
Subnet mask for this interface [255.255.255.0] :
Class C network is 192.168.6.0, 24 subnet bits; mask is /24
The following configuration command script was created:
hostname opvolger
enable secret 5 $1$sFq.$EQlZMG9kXWikIiaY2UhvJ0
enable password Ab12345!
line vty 0 15
password Ab12345!
username admin privilege 15 password cisco
snmp-server community public
!
no ip routing
!
interface Vlan1
no shutdown
ip address 192.168.6.1 255.255.255.0
!
interface GigabitEthernet0/0
shutdown
no ip address
!
```

View file

@ -23,7 +23,7 @@ genHtml starfiveVisionFive2/UbuntuATIRadeonR9_290 "StarFive VisionFive 2 Ubuntu
genHtml starfiveVisionFive2/UbuntuATIRadeonR9_290_2023_11_20 "StarFive VisionFive 2 Ubuntu 23.10 ATI Radeon R9 290"
genHtml starfiveVisionFive2/OpenSUSEATIRadeonR9_290 "StarFive VisionFive 2 OpenSUSE Tumbleweed ATI Radeon R9 290"
genHtml starfiveVisionFive2/OpenSUSEATIRadeonR9_290_mainline "StarFive VisionFive 2 OpenSUSE Tumbleweed ATI Radeon R9 290 mainline kernel"
genHtml starfiveVisionFive2/Ubuntu2410_outofthebox "StarFive VisionFive 2 Ubuntu 24.10 AMDGPU"
# TODO fix link .md to .html
rsync -a --prune-empty-dirs --include '*/' --include '*.ico' --include '*.html' --include '*.css' --include '*.png' --include '*.jpeg' --exclude '*' ./ ../website

View file

@ -275,3 +275,27 @@ CONFIG_FANOTIFY=y
CONFIG_ZSMALLOC=y
CONFIG_ZRAM=y
```
use docker sdk v2
docker run --privileged -itd --name duodocker -v $(pwd):/home/work milkvtech/milkv-duo:latest /bin/bash
docker exec -it 044 bash
cd /home/work/
./build.sh
cd /home/work/linux_5.10/build/sg2000_milkv_duos_musl_riscv64_sd
export PATH="/home/work/host-tools/gcc/riscv64-linux-musl-x86_64/bin/:$PATH"
make ARCH=riscv CROSS_COMPILE=riscv64-unknown-linux-musl- -j 16
uImage_addr=0x81800000
setenv kernel_comp_addr_r 0x85800000
setenv kernel_comp_size 0x87800000
update_addr=0x9fe00000
load mmc 0:1 ${uImage_addr} Image.gz
load mmc 0:1 ${update_addr} sg2000_milkv_duos_musl_riscv64_sd.dtb
setenv bootargs 'console=ttyS0,115200 root=/dev/mmcblk0p3 rootwait rw earlycon loglevel=7 selinux=0'
booti $uImage_addr - $update_addr

View file

@ -5,6 +5,12 @@ Here I will (if it's worth it) keep track of my projects I've done with the Star
On the day I received the Starfive VisionFive 2, this was early in the evening... I already had Quake2 working late late in evening. (After updating firmware and getting Image-69 working). This was nothing more than a 'make' and remove the *.so files which were not "OpenGL ES3" and it worked. Unfortunately, I couldn't get many other games to work due to the limitation of only having "OpenGL ES 3.0" working on the onboard GPU.
## Ubuntu 24.10 has now kernel 6.11
We can now use the Ubuntu 24.10 kernel, only have to use custom u-boot/opensbi flash-files.
- So this [project](starfiveVisionFive2/Ubuntu2410_outofthebox.md) was born! (Part VI)
## OpenSUSE Tumbleweed with ATI Radeon R9 290 mainline kernel
Mailline kernel is now possible!

View file

@ -1,15 +1,19 @@
# Ubuntu 24.10 on StarFive VisionFive 2 with AMDGPU
---
date: 2025-02-25
author: Bas Magré
---
# Ubuntu 24.10 StarFive VisionFive 2 AMDGPU
Ubuntu 24.10 is using the 6.11 kernel. This has the PCI-e controller of StarFive VisionFive 2 + AMDGPU drivers that are working with RISC-V.
So if you have a m2 to pci-e adapter you can now run Ubuntu with AMDGPU on RISC-V (without building your own kernel with patches etc.)
Ubuntu 24.10 is using the 6.11 kernel. This has the PCI-e controller of JH7110 SoC + AMDGPU drivers that are working with RISC-V.
So if you have a M.2 to pci-e adapter you can now run Ubuntu with AMDGPU on RISC-V (without building your own kernel with patches etc.)
The only problem is now the u-boot that initialize the PCI-e controller to scan for m.2 drivers. Some of my AMDPGU do not like that (fan 100% and not detected anymore in the kernel).
The only problem is now the U-boot that initialize the PCI-e controller to scan for M.2 drivers. Some of my AMDPGU do not like that (fan 100% and not detected anymore in the kernel).
So we need a u-boot (from Ubuntu) without the initialization of the PCI-e controller. I have build that and release the flash-files (u-boot + opensbi) on github.
So we need a U-boot (with the patches from Ubuntu) without the initialization of the PCI-e controller. I have build that and release the flash-files (u-boot + opensbi) on github.
So we can now just flash Ubuntu 24.10 to an eMMC, use the custom flash-files (u-boot + opensbi).
So we can now just flash Ubuntu 24.10 to an eMMC and use the custom flash-files (u-boot + opensbi).
a lot of AMDGPU's worked on this setup:
A lot of my AMDGPU's worked on this setup:
- ATI Radeon HD 5450 (Cedar PRO)
- ATI Radeon HD 5850 (Cypress PRO)
@ -22,6 +26,8 @@ not working:
It is booting, it gives screenoutput (black) and then the system hangs completely
My setup is a SD-card to boot (custom U-boot) and an eMMC for the Ubuntu operation system (default Ubuntu kernel and GNU software)
## Flash Ubuntu 24.10 to eMMC
download from the [site](https://ubuntu.com/download/risc-v) the [image 24.10](https://cdimage.ubuntu.com/releases/24.10/release/ubuntu-24.10-preinstalled-server-riscv64+nezha.img.xz).
@ -36,7 +42,7 @@ So on build we need to set `CONFIG_PCI_INIT_R` and `CONFIG_CMD_PCI` to n (no).
I all ready create this builds and they can be found [here](https://github.com/Opvolger/ansible-riscv-sd-card-creater/releases):
Insert you SD-card in you computer
Insert you SD-card in you computer (this example expect /dev/sdb to be your SD-card)
```bash
wget https://github.com/Opvolger/ansible-riscv-sd-card-creater/releases/download/0.1.0/release.tgz
@ -44,7 +50,7 @@ tar -xvzf release.tgz
# check where your SD-card is with lsblk, in this example it is /dev/sdb
# delete MBR of SD-Card
sudo dd if=/dev/zero of=/dev/sdb bs=512 count=1 conv=notrunc
# we will create the needed partitions to boot from SD-card
# we will create the needed partitions to boot from SD-card (for more information see https://docs.u-boot.org/en/latest/board/starfive/visionfive2.html)
sudo sgdisk --clear \
--set-alignment=2 \
--new=1:4096:8191 --change-name=1:spl --typecode=1:2E54B353-1271-4842-806F-E436D6AF6985 \

View file

@ -173,6 +173,15 @@ mmc part
ext4ls mmc 1:4 # ls for mmc dev 1 part 4
```
```bash
load mmc 1:2 ${kernel_addr_r} /vmlinuz-6.12.7-200.0.riscv64.fc41.riscv64
load mmc 1:2 ${fdt_addr_r} /dtb/starfive/jh7110-starfive-visionfive-2-v1.3b.dtb
load mmc 1:2 ${ramdisk_addr_r} /initramfs-6.12.7-200.0.riscv64.fc41.riscv64.img
setenv bootargs 'root=UUID=3bfb82ed-248a-4621-bd60-5147d280c8a3 rw earlycon rootflags=subvol=root console=tty0 console=ttyS0,115200 rootwait stmmaceth=chain_mode:1 selinux=0'
booti $kernel_addr_r $ramdisk_addr_r:$filesize $fdt_addr_r
```
Boot Ubuntu
```bash

View file

@ -0,0 +1,34 @@
# U-boot & Opensbi
Links:
- https://stijn.tintel.eu/blog/2024/05/19/compiling-uboot-bpi-f3/
- https://doc-en.rvspace.org/VisionFive2/SWTRM/VisionFive2_SW_TRM/compiling_the_u-boot%20-%20vf2.html
- https://docs.banana-pi.org/en/BPI-F3/GettingStarted_BPI-F3#_install_image_to_emmc_2
- https://github.com/xypron/visionfive2-u-boot-build/blob/main/README.rst
- [u-boot/doc/board/starfive/visionfive2.rst](https://github.com/u-boot/u-boot/blob/master/doc/board/starfive/visionfive2.rst)
U-Boot
```bash
git clone https://github.com/u-boot/u-boot.git
cd u-boot
CROSS_COMPILE=riscv64-linux-gnu-
export CROSS_COMPILE
make distclean
make starfive_visionfive2_defconfig
make all
# uboot-2022.10/arch/riscv/dts/m1-x_milkv-jupiter.dtb uboot-2022.10/spl/u-boot-spl.bin and uboot-2022.10/u-boot.bin
# uboot-2022.10/bootinfo_emmc.bin uboot-2022.10/bootinfo_sd.bin uboot-2022.10/bootinfo_spinand.bin uboot-2022.10/bootinfo_spinor.bin
```
OpenSBI
```bash
git clone https://github.com/riscv-software-src/opensbi.git
cd opensbi
U_BOOT_DIR=../u-boot
export U_BOOT_DIR
make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- PLATFORM=generic FW_PAYLOAD_PATH=../u-boot/u-boot.bin FW_FDT_PATH=../u-boot/arch/riscv/dts/jh7110-starfive-visionfive-2.dtb FW_TEXT_START=0x40000000
```

View file

@ -41,6 +41,7 @@
<a class="dropdown-item" href="/starfiveVisionFive2/UbuntuATIRadeonR9_290_2023_11_20.html">Ubuntu 23.10 with ATI Radeon R9 290</a>
<a class="dropdown-item" href="/starfiveVisionFive2/OpenSUSEATIRadeonR9_290.html">OpenSUSE Tumbleweed ATI Radeon R9 290</a>
<a class="dropdown-item" href="/starfiveVisionFive2/OpenSUSEATIRadeonR9_290_mainline.html">OpenSUSE Tumbleweed ATI Radeon R9 290 mainline kernel</a>
<a class="dropdown-item" href="/starfiveVisionFive2/Ubuntu2410_outofthebox.html">StarFive VisionFive 2 Ubuntu 24.10 AMDGPU</a>
<!-- <div class="dropdown-divider"></div>
<a class="dropdown-item" href="#">Something else here</a> -->
</div>

24
wineOnRISCV.md Normal file
View file

@ -0,0 +1,24 @@
# WINE on RISC-V
[link](https://www.jeffgeerling.com/blog/2025/build-box64-box32-x86-emulation-on-risc-v-linux#comments)
```bash
cd ~/Downloads
wget https://github.com/Kron4ek/Wine-Builds/releases/download/10.0/wine-10.0-amd64-wow64.tar.xz
tar -xvf wine-10.0-amd64-wow64.tar.xz
mv wine-10.0-amd64-wow64 wine
sudo ln -s ~/Downloads/wine/bin/wine /usr/local/bin/wine
sudo ln -s ~/Downloads/wine/bin/wineserver /usr/local/bin/wineserver
sudo ln -s ~/Downloads/wine/bine/wineboot /usr/local/bin/wineboot
sudo ln -s ~/Downloads/wine/bin/wine64 /usr/local/bin/wine64
wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
chmod +x winetricks
sudo mv winetricks /usr/bin/winetricks
sudo apt install cabextract
winetricks corefonts dxvk vkd3d
# or ??
box64 winetricks corefonts dxvk vkd3d
```