dgilmore changed the topic of #fedora-riscv to: Fedora on RISC-V https://fedoraproject.org/wiki/Architectures/RISC-V || Logs: https://libera.irclog.whitequark.org/fedora-riscv || Alt Arch discussions are welcome in #fedora-alt-arches
tg_ has joined #fedora-riscv
tg has quit [Ping timeout: 245 seconds]
leah2 has quit [Server closed connection]
leah2 has joined #fedora-riscv
zsun has quit [Quit: Leaving.]
<davidlt[m]> rwmjones: your latest blog post is still going strong on the internet: https://www.youtube.com/watch?v=Dwj1-x9_Y4Q
tg_ has quit [Quit: tg_]
<Entei[m]> davidlt: With the rebuilt glibc, I the C instructions seem to have disappeared. Of course I didn't inspect the whole objdump output, and this was just a simple hello world program, but still, it looks promising
<Entei[m]> s/I//
<davidlt[m]> Entei: you might want to write some script to inspect binaries for C instructions in binaries for some form of validation step.
<Entei[m]> Yes working on that
<davidlt[m]> Just remember that not all section in binaries are actually code :)
<Entei[m]> I did rebuild a simple package called banner, just takes a few mins to build. But that one is full of compressed instructions...
<davidlt[m]> Dump with objdump and investigate
<Entei[m]> The text section looks clean of compressed instructions.
<Entei[m]> Does glibc also require --with-arch to be specified? I assumed it's just bunch of libraries, so my gcc could take care of it while building.
jcajka has joined #fedora-riscv
diagprov has quit [Server closed connection]
diagprov has joined #fedora-riscv
kwizart has quit [Server closed connection]
kwizart has joined #fedora-riscv
<davidlt[m]> At the 1st glance it looks good.
<davidlt[m]> I don't recall (I constantly forget) what is location in every section.
<davidlt[m]> Remember that some of these are data, not actual instructions.
<Entei[m]> <davidlt[m]> "At the 1st glance it looks good." <- That's good to hear. Where do I go from here? Rebuild gcc again with bootstrap?
<davidlt[m]> I would pick a few more smaller packages to test, just to on a safe side.
<davidlt[m]> But in general you cannot avoid multiple phases, i.e. mass rebuilds.
<davidlt[m]> On the 1st mass rebuild you will not get "a clean non-C" build.
<davidlt[m]> On the 1st round you will be mixing C and non-C, but they use the same ABI thus no issues.
<davidlt[m]> The more iterations you will do the less there will be C. Most likely pretty much all of it will be gone after 2nd iteration (i.e. phase).
<davidlt[m]> But you need to have some form of metric to scan, and find the odd ones that managed to fall through the cracks somehow.
<davidlt[m]> It could be as stupid as objdump .text section and grep for "c." on every single ELF binary.
<Entei[m]> davidlt[m]: By mass rebuild do you mean all possible in the Rawhide image? Or just the core packages?
<davidlt[m]> And some point you will reconfigure QEMU VMs to drop C (probably after the 2nd phase).
<davidlt[m]> So if there are any C generated, that will cause illegal instruction (i.e. easy to notice).
<davidlt[m]> I would advice to start with packages in @core and then go a bit beyond incl. the most popular packages.
<Entei[m]> davidlt[m]: Yeah that's my plan as well. I observed qemu-system-riscv64 supports shakti-c core for emulation. It could make it easy to test
<davidlt[m]> Use virt machine, just change the CPU ISA.
<Entei[m]> davidlt[m]: Using virt machine. But the way I understood of doing it was passing `-cpu ` flag. It complained rv64g is not a supported core.... (full message at <https://libera.ems.host/_matrix/media/v3/download/libera.chat/c536bf3d8d86102020f3109cc949943a094eed39>)
<davidlt[m]> Yes, because it's not ISA.
<davidlt[m]> It should be (double check it): -cpu rv64,c=off
<davidlt[m]> rv64 is a type of CPU, then there is a ton of properties that you can toggle/set.
<conchuod> There's an actual doc for that
<davidlt[m]> conchuod: Could you share it?
<Entei[m]> conchuod: yes kindly share. I've been searching couple of google pages with different terms, haven't found any documentation
<conchuod> davidlt[m]: Wait, no I got confused.
<conchuod> There's a doc for *some* of it, but not all. Specifically for AIA.
<conchuod> Sorry, jumped the gun a wee bit
<dtometzki> Hello together what are the issue of compressed instructions ?
<davidlt[m]> Entei is trying to build Fedora/RISCV with without C instructions. Whatever CPU he is working on doesn't implement it.
<davidlt[m]> He is also learning as he goes.
<Entei[m]> Aptly explained. :)
<davidlt[m]> IIRC you can query all CPU options via QEMU QMP.
<davidlt[m]> Basically call query-cpu-model-expansion on rv64 and it will tell you what options and what are defaults.
<davidlt[m]> There is qmp-shell script available if you don't want to write calls in JSON :)
<conchuod> Yeah, I thought the riscv doc that that too, but it only has the aia options. FWIW, that's here: https://www.qemu.org/docs/master/system/riscv/virt.html#machine-specific-options
<davidlt[m]> That doc always seemed minimal to me.
<Entei[m]> <davidlt[m]> "It should be (double check it):..." <- This worked like a charm. Tested with my OE image. Thanks
masami has joined #fedora-riscv
masami has quit [Quit: Leaving]
masami has joined #fedora-riscv
fuwei has joined #fedora-riscv
<davidlt[m]> It's so hard to switch the keyboards. I feel like my typing skills went decades back. :D
<davidlt[m]> Especially going back to laptop time non mechanical keyboard.
zsun has joined #fedora-riscv
jcajka has quit [Quit: Leaving]
zsun has quit [Quit: Leaving.]
tg has joined #fedora-riscv
masami has quit [Quit: Leaving]