<conchuod>
geertu: Took a while, sorry. I think those numbers are correct docs say it is m-mode software and timer interrupts.
hexdump0815 has joined #riscv
<geertu>
conchuod: OK, so the clint is only usable if CONFIG_RISCV_M_MODE=y
heat has quit [Ping timeout: 248 seconds]
<conchuod>
yea
<geertu>
config RISCV
<geertu>
select CLINT_TIMER if RISCV_M_MODE
<geertu>
But ARCH_MICROCHIP_POLARFIRE has an unconditional select
<geertu>
I'll create some patches...
<geertu>
Oh wait, I enabled that myself in my local tree
Andre_Z has joined #riscv
jacklsw has quit [Quit: Back to the real world]
squelch21 has quit [Ping timeout: 245 seconds]
Andre_Z has quit [Ping timeout: 244 seconds]
Andre_Z has joined #riscv
naoki has quit [Quit: naoki]
Tenkawa has joined #riscv
aredridel has quit [Quit: So long and thanks for all the fish!]
aredridel has joined #riscv
raghavgururajan has quit [Remote host closed the connection]
tusf has quit [Remote host closed the connection]
jakzale has quit [Remote host closed the connection]
nmeum has quit [Remote host closed the connection]
anemofilia has quit [Remote host closed the connection]
shreyasminocha has quit [Remote host closed the connection]
jleightcap has quit [Remote host closed the connection]
pld has quit [Remote host closed the connection]
sm2n has quit [Remote host closed the connection]
kf has quit [Remote host closed the connection]
OctopusET has quit [Remote host closed the connection]
nmeum has joined #riscv
pld has joined #riscv
kf has joined #riscv
shreyasminocha has joined #riscv
jakzale has joined #riscv
raghavgururajan has joined #riscv
OctopusET has joined #riscv
tusf has joined #riscv
sm2n has joined #riscv
jleightcap has joined #riscv
anemofilia has joined #riscv
teiresias has quit [Ping timeout: 260 seconds]
nmeum has quit [Remote host closed the connection]
crabbedhaloablut has quit []
nmeum has joined #riscv
billchenchina has quit [Quit: Leaving]
teiresias has joined #riscv
jacklsw has joined #riscv
jacklsw has joined #riscv
heat has joined #riscv
bjoto has quit [Ping timeout: 248 seconds]
crabbedhaloablut has joined #riscv
Andre_Z has quit [Ping timeout: 260 seconds]
jacklsw has quit [Quit: Back to the real world]
ldevulder has quit [Quit: Leaving]
BootLayer has joined #riscv
Toris has quit [Remote host closed the connection]
Toris has joined #riscv
Starfoxxes has quit [Ping timeout: 244 seconds]
Stat_headcrabbed has quit [Quit: Stat_headcrabbed]
Stat_headcrabbed has joined #riscv
Stat_headcrabbed has quit [Client Quit]
Starfoxxes has joined #riscv
Stat_headcrabbed has joined #riscv
crabbedhaloablut has quit []
cleger has quit [Ping timeout: 252 seconds]
craigo has joined #riscv
psydroid has joined #riscv
crabbedhaloablut has joined #riscv
Stat_headcrabbed has quit [Read error: Connection reset by peer]
Stat_headcrabbe1 has joined #riscv
Stat_headcrabbe1 is now known as Stat_headcrabbed
Stat_headcrabbed has quit [Quit: Stat_headcrabbed]
<teiresias>
I was trying to upgrade the firmware on a starfive visionfive 2 and mistakenly overwrote /dev/mtd0 with u-boot-spl.normal.bin.out. /proc/mtd tells me that /dev/mtd0 is "mtd0: 01000000 00010000 "13010000.spi.0". My u-boot-spl file should've gone to /dev/mtd1 instead, which is labeled "spl" in /proc/mtd.
<teiresias>
The question is, what actually belongs in that spi.0 partition? How do I fix it?
<teiresias>
I *think* that maybe 13010000.spi.0 is reserved / unused so I don't need to care but not sure.
<kepstin>
can you check what /sys/class/mtd/mtd0/offset says?
<teiresias>
kepstin: That file doesn't exist.
<teiresias>
There's mtd1/offset, mtd2/offset, and mtd3/offset but no mtd0/offset
<kepstin>
ok, that means your kernel is configured so that mtd0 is the "partitionless" full device (MTD_PARTITIONED_MASTER is enabled). what is the mtd1/offset?
<teiresias>
kepstin: 0
<kepstin>
ok. so what you did here ended up writing the spl into the correct place - but it would have also had a side-effect of erasing _everything else_ in flash.
<teiresias>
Ok. I did copy the opensbi+uboot (visionfive2_fw_payload.img) to the right place, mtd3. Is there anything else I need to copy? Or am I safe to reboot?
<kepstin>
i'd recommend re-flashing both the spl and opensbi+uboot to the correct partitions (since you have probably erased the opensbi+uboot)
<kepstin>
i assume mtd2 is the uboot env partition? if so, leaving it blank should be fine, uboot will use the default env.
tux3_ has quit [Ping timeout: 252 seconds]
<teiresias>
kepstin: Correct, mtd2 is uboot-env. Awesome, thank you.
tux3 has joined #riscv
robertkeizer has quit [Ping timeout: 248 seconds]
<kepstin>
note that in the worst case, there is a way to switch this board to UART boot and use a recovery image that will rewrite the bootloader: https://github.com/starfive-tech/Tools - but this shouldn't be necessary here since you were able to fix the flash from within linux.
<mps>
it is also possible to boot from sd card in case something goes wrong with flash
bjdooks has quit [Ping timeout: 272 seconds]
bjdooks has joined #riscv
robertkeizer has joined #riscv
robertkeizer is now known as Guest562
<teiresias>
mps: FWIW I'm using your Alpine image.
andyc has joined #riscv
crabbedhaloablut has quit []
BootLayer has quit [Quit: Leaving]
crabbedhaloablut has joined #riscv
<mps>
teiresias: oh, nice
<mps>
teiresias: sorry, I've got cold and can't now boot my VF2 to check these you wrote above
<mps>
but from memory, spl should be 'dd'-ed to mtd0 u-boot.itb to mtd3
<Tenkawa>
teiresias: in a pinch you can use uart + xmodem to redo the spi + bootcode... I do it frequently
<Tenkawa>
it is a menu driven int to load the spl and payload
<mps>
also 'screen' and xmodem 'lsx' works to flash over serial
<teiresias>
Hah nice. I may be needing that soon, since the board refused to boot from mmc when I rebooted. "run mmc_boot" gives "card did not respond to voltage select". I also tried "run nvme_boot", and that wasn't even looking in the right partition. Still kind of new to u-boot and have some reading to do I think.
<Tenkawa>
mps: tio too "if vcompiled with xmodem"
<Tenkawa>
a lot of precompiled tio binaries dont have file transfer in them I've discovered
<mps>
teiresias: image I created should boot from sd card if you set boot switches to boot from it