<conchuod>
What are they actually loading with that?
<conchuod>
bt?
<Esmil>
just the 8852bs module it seems
BootLayer has joined #riscv
<conchuod>
Esmil: just the bt - unless there's a "module_usrload" property in the devicetree. I didn't notice that part of it.
<conchuod>
🤐
Stat_headcrabed has joined #riscv
<conchuod>
Esmil: my vf2 still doesn't have a functional eth0
eightthree has quit [Remote host closed the connection]
eightthree has joined #riscv
<conchuod>
iirc there's something silly going on, like I have to boot u-boot with one ethernet port and linux with the other.
eightthree has quit [Remote host closed the connection]
eightthree has joined #riscv
<conchuod>
I can't remember anything about why this is the case, maybe something related to having one of the first batch of boards with mismatched speeds?
eightthree has quit [Remote host closed the connection]
fuel has quit [Ping timeout: 255 seconds]
eightthree has joined #riscv
fuel has joined #riscv
ldevulder has quit [Quit: Leaving]
<Stat_headcrabed>
conchuod: What uboot/sbi/kernel version are you using?
<Stat_headcrabed>
I think it should be fixed on newer version?
<conchuod>
Probably most ancient stuff tbf. I ran the WIP U-Boot patches for it in U-Boot, but went back to the vendor's cos I needed ethernet. I'm on U-Boot 2021.10 (Jan 19 2023 - 04:09:41 +0800), Build: jenkins-github_visionfive2-6.
<conchuod>
But my kernel is as recent as it could possibly be & that's where I have ethernet problems.
<conchuod>
My SPL is U-Boot SPL 2021.10 (Feb 27 2023 - 21:59:07 +0800) and I have no clue about OpenSBI.
<Stat_headcrabed>
For mainline kernel, to make reboot working correctly, you need a new version of mainline opensbi
<conchuod>
I don't really care for reboot, what I want is ethernet!
<Stat_headcrabed>
Also ethernet dtb patching is implemented differently(due to different dtb name in vendor and mainline)
<Stat_headcrabed>
so to make mainline eth working you really need a mainline uboot
<Stat_headcrabed>
🤦♂️
<conchuod>
Oh what fun.
<conchuod>
I don't have any ethernet patching at all though.
<conchuod>
It just uses the dts in linux directly.
<conchuod>
I might just add a dts for my board.
<Stat_headcrabed>
Wait
<Stat_headcrabed>
Seems only vendor uboot would patch dtb now
<conchuod>
My u-boot doesn't pass it's dtb to linux, I tftp in a new one.
<conchuod>
So spl patching a dtb isn't gonna have any impact on me. I actually don't want a patched dtb if I can help it, it doesn't make checking what I'm applying easier.
<Stat_headcrabed>
For passing dtb to kernel, mainline uboot passed kernel dtb now
<Stat_headcrabed>
also seems resetting uboot env needs "env default -f -a" rather than "env default -a"
JSharp has quit [Ping timeout: 256 seconds]
JSharp has joined #riscv
Stat_headcrabed has quit [Quit: Stat_headcrabed]
Stat_headcrabed has joined #riscv
Stat_headcrabed1 has joined #riscv
<Stat_headcrabed1>
Also seems I'm wrong about dtb patching in uboot. It is only for uboot rather than kernel.
Stat_headcrabed1 has quit [Client Quit]
<conchuod>
Ye, I did notice that. But a non-rusty u-boot isnt the end of the world, so I dont mind.
<conchuod>
I'll just rebuild the world on this thing, although I hate rebuilding buildroot after a few years.
LetoThe2nd has quit [Read error: Connection reset by peer]
LetoThe2nd has joined #riscv
jonmasters has quit [Ping timeout: 256 seconds]
<conchuod>
That's self inflicted and usually caused by having a mess of different toolchains, some of which have no libc.
jonmasters has joined #riscv
mlw has quit [Ping timeout: 268 seconds]
<courmisch>
not sure if rusty as in old or rusty as is Rustic
<conchuod>
I actually meant to type "crusty" hah
BootLayer has quit [Quit: Leaving]
lvella has joined #riscv
LucasVella[m] has joined #riscv
<LucasVella[m]>
Can someone help me understand why -fPIE code is so different from non-PIE? In particular, why does the compiler generate code to load local symbols from the GOT, since they are local, and subject to the same offset (PC-relative should "just work", right?)
<courmisch>
LucasVella[m]: depends if interpostion is allowed or not
<courmisch>
interposition*
<courmisch>
presumably if you make the symbol static or hidden, there will be no GOT indirection
<jrtc27>
the compiler does not load local symbols from the GOT for -fPIE
<courmisch>
yeah sounds like they should be local but are not
<jrtc27>
local (as in static) and local (as in non-static but defined in the same translation unit) are both accessed via PC-relative offsets
<jrtc27>
what *isn't* is declared-but-not-defined, ie extern T foo
<courmisch>
isn't that compiled to PC-relative after linker relaxation?
<courmisch>
well "compiled" is wrong wording
<jrtc27>
it can be these days, yes
<jrtc27>
I forget which linkers implement it
<jrtc27>
LucasVella[m]: if you want to ask these kinds of questions, godbolt.org is your friend for providing concrete examples
<LucasVella[m]>
let me pastebin the C code and what clang generated...
lagash has quit [Remote host closed the connection]
lagash has joined #riscv
ardb has quit [Read error: Connection reset by peer]
ardb has joined #riscv
Armand has quit [Killed (NickServ (GHOST command used by Armand28))]
armand__ has joined #riscv
lvella has quit [Quit: Leaving]
<LucasVella[m]>
Sorry, I must be crazy. The only difference I can see now is that -fPIE is using auipc instead of lui to load the address of the global stuff, what makes total sense.
Andre_Z has joined #riscv
coldfeet has joined #riscv
mlw has joined #riscv
zjason` has joined #riscv
zjason has quit [Ping timeout: 256 seconds]
naoki has joined #riscv
Stat_headcrabed has quit [Quit: Connection closed for inactivity]
vagrantc has quit [Quit: leaving]
EchelonX has quit [Quit: Leaving]
motherfsck has quit [Quit: quit]
<LucasVella[m]>
Oh, now I understand where my problem comes from! It is from inline assembly inside rust: "la sp, __stack_start", where "__stack_start" is defined by the linker script. With "relocation-model=pie", this is expanded into auipc + lw into "_DYNAMIC", but when static, it expands to auipc + addi. Maybe there is some to tell rust that the symbol __stack_start is internal.
<sorear>
if this is a new static linker ... prioritization is fine but I'm cautious about any workaround that might get upstreamed into rustc
<naoki>
conchuod: linux
<conchuod>
naoki: I will add it to my todo list.
<conchuod>
It's unfortunately not as simple as running savedefconfig, you need to check all the removals.
<naoki>
oh. I thought removed = unavailable or same as default, so it's safe operation
<conchuod>
naoki: Yeah, you're not wrong, it is a NOP. It's just that if something was enabled by over time has been disabled, we really need to check if the right thing to do is actually to add in a pre-requisite instead of removing.
flatmush has joined #riscv
<conchuod>
s/enabled by over/enabled but over/
<naoki>
I'm trying savedefconfig-ed defconfig on Mars now. at least it boots with ubuntu-minimal userland and can build linux kernel ;)
<conchuod>
naoki: Ye, if it booted before it'll boot after since it is should have no impact on the outcome.
<conchuod>
Running savedefconfig is an opportunity to see if some option we wanted has been disabled "silently".
<naoki>
yeah I understand it
Leopold has joined #riscv
flatmush has quit [Ping timeout: 255 seconds]
flatmush has joined #riscv
markh has quit [Ping timeout: 246 seconds]
markh has joined #riscv
DesRoin has quit [Ping timeout: 264 seconds]
DesRoin has joined #riscv
<naoki>
oh, only 77 minutes to build linux kernel (and deb package) on Mars ;)
<naoki>
^with 1.5GHz patch
KombuchaKip has quit [Quit: Leaving.]
KombuchaKip has joined #riscv
Leopold has quit [Remote host closed the connection]