_florent_ changed the topic of #litex to: LiteX FPGA SoC builder and Cores / Github : https://github.com/enjoy-digital, https://github.com/litex-hub / Logs: https://libera.irclog.whitequark.org/litex
tpb has quit [Remote host closed the connection]
tpb has joined #litex
bl0x_ has quit [Ping timeout: 240 seconds]
bl0x_ has joined #litex
Degi_ has joined #litex
Degi has quit [Ping timeout: 256 seconds]
Degi_ is now known as Degi
FabM has joined #litex
FabM has joined #litex
FabM has quit [Changing host]
<_florent_> bl0x_: Thanks, that's indeed probably a copy&paste leftover that I missed when merging the cmod a7 support, I'll merge your PR
<_florent_> david-sawatzke[m: Thanks, interesting. I'll havea closer look at what is does. I'm indeed not sure if this could be integrated, but we could definitely have a link to it in the wiki
_whitelogger has joined #litex
gatecat_ is now known as gatecat
nats` has joined #litex
rektide_ has quit [Ping timeout: 256 seconds]
rektide has joined #litex
linear_cannon has quit [Ping timeout: 256 seconds]
linear_cannon has joined #litex
gruetze_ is now known as gruetzkopf
trabucay1e is now known as trabucayre
cr1901_ is now known as cr1901
<Peanut> When trying to build the literoot for linux-on-litex-vexriscv, I always end up with "Incorrect selection of kernel headers: expected 5.16.x, got 5.14.x" - which is doubly puzzling, because the BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION points to a 5.13 kernel, according to the git commit stamp.
<Peanut> Ugh, s/literoot/buildroot/
cr1901 has quit [Ping timeout: 240 seconds]
Moe_Icenowy is now known as MoeIcenowy
<_florent_> Peanut: This need to be updated, could you send a PR if you have the updated sha1?
<Peanut> _florent_: I'm not quite at the level that I understand how to fix this. I -think- that the sha1 points to a particular commit on the litex-rebase branch of the kernel. However, if I try e.g. the current commit, it fails to build the kernel due to an error in drivers/fpga/litex-fpga.c
<Peanut> In line 168, devm_fpga_mgr_create() is not known when building.
<_florent_> Peanut: ok, I'll need to rebuild the kernel and update. I'll look at this in the next days
<Peanut> Thanks
<Peanut> Should I open an issue?
<geertu> Peanut: Commit 4ba0b2c294fe6919 ("fpga: mgr: Use standard dev_release for class driver") didn't update drivers/fpga/litex-fpga.c (it's not upstream), and somlo forgot to update it when rebasing?
<geertu> somlo: ^
<geertu> Peanut: I always build my Linux images from a separate Linux source tree (i.e. linux-on-litex-vexriscv/images/Image is a symlink to /path/to/linux-riscv-orangecrab/arch/riscv/boot/Image)
cr1901 has joined #litex
<Peanut> geertu: thanks for that. I can see in the commit that you found that devm_fpga_mgr_create() gets removed/renamed, so that matches the error I'm seeing.
Xesxen_ is now known as Xesxen
<somlo> geertu: was it ever (thus, should it be) in https://github.com/litex-hub/linux/tree/litex-rebase ? If not, should we add it to the list of things "curated" as part of that tree?
<somlo> (I don't think I "lost" anything during rebase, so my guess is it was never part of the stuff I'm keeping track of -- but I might be wrong, happens fairly regularly :)
peepsalot has quit [Quit: Connection reset by peep]
peepsalot has joined #litex
truc is now known as bjonnh
indy has quit [Quit: ZNC 1.8.2 - https://znc.in]
<trabucayre> _florent_: you need to add BR2_KERNEL_HEADERS_5_14=y manually in defconfig to avoid header version mismatch
<trabucayre> if default match your kernel version BR2_KERNEL_HEADERS_X_Y is not set in defconfig ...
<Peanut> trabucayre: I hadn't found that header yet, let me try that right away.
<tpb> Title: Config.in.host « linux-headers « package - buildroot - Buildroot: Making Embedded Linux easy (at git.buildroot.net)
<Peanut> trabucayre: That particular version doesn't exist in the file you linked?
<trabucayre> use BR2_KERNEL_HEADERS_VERSION and set BR2_DEFAULT_KERNEL_VERSION with something like 5.14.0
<trabucayre> or BR2_KERNEL_HEADERS_AS_KERNEL=y
<Peanut> That last option seems the most convenient, testing that first..
FabM has quit [Ping timeout: 268 seconds]
zjason`` has joined #litex
zjason` has quit [Ping timeout: 240 seconds]
<trabucayre> yep
<Peanut> Took a while, but with BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="53b46d10f9a438a29c061cac05fb250568d1d21b" and BR2_KERNEL_HEADERS_AS_KERNEL=y, it still results in "Incorrect selection of kernel headers: expected 5.16.x, got 5.14.x"
<geertu> somlo: You have to make a similar change to drivers/fpga/litex-fpga.c
<trabucayre> Peanut: you have to do 'make clean && make'
<trabucayre> when you change something in toolchain you have to do a full rebuild
<somlo> geertu: similar to what? also, I drivers/fpga/litex-fpga.c (driver for ICAPBitstream fpga manager) isn't something I actually use with Rocket, so while I'm happy to apply patches on top of it in the "curated" tree, I am not set up to test them myself
<Peanut> Yes, of course I did. I did 'make clean', 'make BR2_EXTERNAL=' and then 'make'.
<somlo> this is a vexriscv 32-bit thing I don't deal with directly on my end
<somlo> "patches welcome" and all that happy stuff :)
<trabucayre> you have modified your defconfig or your current config? If defconfig you have to do 'make xxx_defconfig' again
<Peanut> I made the change in linux-on-litex-rexriscv/buildroot/configs/litex_vexriscv_defconfig, then in buildroot did 'make clean', 'make BR2_EXTERNAL=../linux-on-litex-vexriscv/buildroot litex_vexriscv_defconfig', then 'make'.
<trabucayre> looks good
<trabucayre> you have BR2_DEFAULT_KERNEL_VERSION="5.14.0" or something like this?
<Peanut> No, I don't. (I did a test with it earlier, but it's properly commented out).
<somlo> geertu: if I change something in https://github.com/litex-hub/linux/tree/litex-rebase I would prefer to either 1. build it and test it myself (I can only do that easily on rocket), or 2. to have it come as a pre-tested patch from someone I trust (e.g., you :) ), in case it's specific to vexriscv or mor1k or whatever
<trabucayre> sorry: BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_14
<Peanut> So that's got a KERNEL_CUSTOM_REPO_URL and a KERNEL_CUSTOM_REPO_VERSION in there, and then a KERNEL_CUSTOM_CONFIG_FILE fragment.
<trabucayre> you have to thing: 1/ kernel version, config and fragment
<trabucayre> 2/ toolchain
<trabucayre> after make xxx_defconfig the simpliest way is to use make menuconfig
<trabucayre> Toolchain -> Kernel Headers (Same as kernel being built)
<trabucayre> Toolchain -> Custom kernel headers series (5.14.x)
<Peanut> It currently says 'Custom kernel headers series (5.16.x or later)', let me change that.
<trabucayre> yep
<Peanut> The build completed, testing it now.
<trabucayre> you have to add these two options to the defconfig to fix this issue
<Peanut> Thanks, that worked, I have a 5.14.0 kernel now which includes the I2C device that I added to the ButterStick board config.
Degi has quit [Ping timeout: 240 seconds]
Degi has joined #litex
Degi has quit [Ping timeout: 256 seconds]