<BrandonDunne[m]>
<davidlt[m]> "Brandon Dunne: Yes, you can help..." <- I've done some RPM packaging for ManageIQ (RH CloudForms now IBM Infrastructure Management), but I'm not too familiar with the Fedora side
<dtometzki>
<davidlt[m]> "Note that Fedora 38 images don't..." <- Hello davidlt i had to change it because there was the old entries as descriebed in the doc
<davidlt[m]>
If you use Unmatched image you need to change it, but QEMU image has it changed (unless I messed up somehow).
<dtometzki>
yes i downloaded this file Fedora-Developer-38-20230519.n.0-nvme.raw.img.xz
<Entei[m]>
<davidlt[m]> "There is a new one available..." <- This one booted nicely. But I am unable to login. The website says login as root with password riscv, but it keeps prompting Login incorrect
<dtometzki>
Entei you should see a message with the passwort
<Entei[m]>
dtometzki: Oh I just saw it. Didn't pay attention.
<Entei[m]>
thanks
<davidlt[m]>
dtometzki: I just checked, and all is good.
<dtometzki>
davidlt: what is the u-boot.itb ?
<dtometzki>
* the u-boot.itb (Fedora-Developer-38-20230519.n.0-u-boot.itb)?
<davidlt[m]>
Device Tree Binary containing U-Boot proper bin, DTB for the board, OpenSBI FW_DYNAMIC generic firmware.
esv has joined #fedora-riscv
<dtometzki>
davidlt: the u-boot image in the itb file is the same as u-boot-spl.bin or is it an other ?
<davidlt[m]>
SPL loads U-Boot ITB. Looks at it's internal configuration (there is only one). Loads OpenSBI binary. Fills the structure about the next boot stage. Calls OpenSBI, which then calls U-Boot proper binary.
<davidlt[m]>
There is also TPL. That's even a smaller U-Boot, but rarely used.
<davidlt[m]>
SPL is also the stage at which DRAM gets initialized (typically).
<davidlt[m]>
SPL only has L2 to work with.
<dtometzki>
ah ok thanks for the info
<davidlt[m]>
I use the a very similar bootflow on QEMU as on the board to make my life easier with testing.
<davidlt[m]>
But that will change to EDK2 firmware at some point.
<davidlt[m]>
It's still WIP on the QEMU side.
<dtometzki>
do you know a good documentation link about this ?
<davidlt[m]>
No, it's mailing list emails.
<Entei[m]>
Any central place to specify build flags? I am running the Fedora riscv image built for rv64gc, say I wish to rebuild packages for rv64ima, or rebuild gcc with different ISA spec version(--with-isa) and default CPU (--with-arch) etc?
<Entei[m]>
* for rv64ima (-march flag), or
<davidlt[m]>
Well that's not gonna be easy.
<davidlt[m]>
That would affect ABI.
<davidlt[m]>
You most likely need to bootstrap from zero.
<davidlt[m]>
I would advise you to look at OpenEmbedded or/and Buildroot. Those might be able to produce you a Linux image with IMA only.
<davidlt[m]>
Payload is not really used these days. FW_DYNAMIC is dominating, but load address will change per vendor. For example JH7110 already requires changing it for that SoC.
<Entei[m]>
<davidlt[m]> "I would advise you to look at..." <- I tried openembedded. kinda wanted to port Fedora for the custom architecture, but at some point I just got stuck. That point is mock, with the ridiculous amounts of dependencies.
<davidlt[m]>
I think ELF files used to work with QEMU, etc. My head is fuzzy about them already.
<davidlt[m]>
Entei[m]: Yeah. Other "rich features" Linux distributions also will not support IMA. This specific extensions mix is only used by the firmware binaries (U-Boot, GRUB, etc.)
<davidlt[m]>
Now in the older days (BBL instead of OpenSBI) you could emulated F and D.
<davidlt[m]>
OpenSBI doesn't provide any extension emulation via trapping.
<davidlt[m]>
But even FPGA implementations incl. F, D, C, bitmanip, and more.
<davidlt[m]>
The problem with IMA is that without F and D that changes default ABI. You also need to use soft-floats here.
<Entei[m]>
Right now I have a rebuilt mock package on openembedded produced image, with some rebuilt packages and going nodeps for most part. Finally doing mock --version gives Password is invalid, unable to troubleshoot this problem
<davidlt[m]>
Basically you cannot talk to existing binaries if they use floating points.
<davidlt[m]>
Doing a full distribution bootstrap will be expensive (time and money on compute side).
<Entei[m]>
davidlt[m]: The IMA was just example. I am porting to architecture with imafd, aka, g. Need an image without compressed instructions
<davidlt[m]>
Without the compressed it's easy.
<davidlt[m]>
C has not affect on the ABI.
<Entei[m]>
davidlt[m]: oh I like the sound of that
<Entei[m]>
So where do I specify my build flags so all rpmbuilds automatically set those flags?
<davidlt[m]>
Do you want just a quick hack?
<Entei[m]>
davidlt[m]: Anything that could get me started. Any help is appreciated.
<Entei[m]>
Of course I'd like to avoid editing each spec file
<davidlt[m]>
The quick hack would be to recompile redhat-rpm-config
<davidlt[m]>
Not ideal, but should work in most of the cases.
<davidlt[m]>
In parallel you could recompile GCC with a different default (takes ~10 days on Unmatched to compile).
<davidlt[m]>
Actually SHAKTI (from India) team might have Fedora without C.
<davidlt[m]>
Their initial SoCs were built without C.
<Entei[m]>
davidlt[m]: Damn 10 days!!! That's a long time. But iirc Unmatched has only 4 cores right?
<davidlt[m]>
Yeah.
<davidlt[m]>
64-core systems are incoming.
<thefossguy>
davidlt[m]: I remember a similar discussion. Thats highly likely.
<davidlt[m]>
I would still advice to stick to OpenEmbedded or Buildroot as that's way less work.
<Entei[m]>
davidlt[m]: I just looked on their website, just one gitlab repo with buildroot.
<thefossguy>
Did anyone attend the Barcelona RISC-V summit?
<davidlt[m]>
Entei[m]: I didn't. I actually even forgot about it 👀
<davidlt[m]>
thefossguy: I didn't. I actually forgot about it ... 👀
<thefossguy>
I thought you might’ve since you’re closer
<thefossguy>
But we xan always catch up on YT it seems
<Entei[m]>
davidlt[m]: That's great. I have access to some 24 core Xeons, might be able to compile faster on QEMU right now.
<thefossguy>
*can
<davidlt[m]>
Those Summits tend to be boring, not really that technical down to the ground stuff.
<davidlt[m]>
More of RVI, scientific papers, some announcements, very little users touching software bits.
<davidlt[m]>
Entei: QEMU will make life easier on the larger packages that scale with -jX. On single thread builds the board wins.
<davidlt[m]>
I think rwmjones did some benchmarks (board vs QEMU) recently.
<thefossguy>
On the topic RVI, whats up with rv128i? Has that gotten any real interests from any chip maker? Especially the AI ones that build the stack themselves?
<davidlt[m]>
I used EPYC with 32-core VM + 80GB of RAM for GCC build testing (bootstrap disabled, etc.) that took 8 hours or so without tests, and 2 days with tests IIRC>
<davidlt[m]>
Nah, RV128 is just a placeholder for the whatever future.
<davidlt[m]>
I don't think AI need RV128 at all.
<thefossguy>
And here I thought we would get 16 byte machines
<davidlt[m]>
Well, we are getting more 16-byte instructions in RVA23 :)
<davidlt[m]>
I don't really like that. Makes life a bit more complicated, and who knows if there is enough benefits.
<davidlt[m]>
Especially if they keep adding more of them.
<thefossguy>
davidlt[m]: With a 16 byte word I think they can cram more BFs in. Or am I misunderstanding something 🙃
<davidlt[m]>
You have vector specification for all these kind of things.
<davidlt[m]>
And those can go up to 2K IIRC.
<thefossguy>
That I forgot until you reminded 😅
<davidlt[m]>
Not that anyone will implement something like that.
<thefossguy>
AMX is 4K afaik
<davidlt[m]>
Yeah, but that's matrix :)
<thefossguy>
Not AMX but whatever Intel calls Advanced Matrix Extension
<thefossguy>
Nvm, it is amx
<davidlt[m]>
T-HEAD has matrix extension for RISCV.
<davidlt[m]>
For JH7110 we need FW_DYNAMIC generic with FW_TEXT_START=0x40000000
<rwmjones>
so about the directory name, the opensbi make install rule creates %{_datadir}/%{name}/%{PLATFORM}/firmware
<davidlt[m]>
The only parameter that changes is FW_TEXT_START per board.
<rwmjones>
I thought the point is that the start address can be found automatically?
* rwmjones
reads fw.md again ...
<rwmjones>
> The FW_DYNAMIC firmware gets information about the next booting stage entry, e.g. a bootloader or an OS kernel, from previous booting stage at runtime.
<rwmjones>
so in %ao?
<rwmjones>
a0
<davidlt[m]>
I don't recall the details. There is a struct that we pass on to OpenSBI.