qemu icon indicating copy to clipboard operation
qemu copied to clipboard

Unable to clone u-boot submodule

Open rb1 opened this issue 3 months ago • 7 comments

Hi,

I am not sure what's changed, but i'm unable to clone the repository and populate the submodules. The initial clone is fine, but initialising the submodules fails asking for authentication.

→ git submodule update --init --recursive Submodule 'roms/QemuMacDrivers' (https://gitlab.com/qemu-project/QemuMacDrivers.git) registered for path 'roms/QemuMacDrivers' Submodule 'roms/SLOF' (https://gitlab.com/qemu-project/SLOF.git) registered for path 'roms/SLOF' Submodule 'roms/edk2' (https://gitlab.com/qemu-project/edk2.git) registered for path 'roms/edk2' Submodule 'roms/ipxe' (https://gitlab.com/qemu-project/ipxe.git) registered for path 'roms/ipxe' Submodule 'roms/openbios' (https://gitlab.com/qemu-project/openbios.git) registered for path 'roms/openbios' Submodule 'roms/opensbi' (https://gitlab.com/qemu-project/opensbi.git) registered for path 'roms/opensbi' Submodule 'roms/qboot' (https://gitlab.com/qemu-project/qboot.git) registered for path 'roms/qboot' Submodule 'roms/qemu-palcode' (https://gitlab.com/qemu-project/qemu-palcode.git) registered for path 'roms/qemu-palcode' Submodule 'roms/seabios' (https://gitlab.com/qemu-project/seabios.git/) registered for path 'roms/seabios' Submodule 'roms/seabios-hppa' (https://gitlab.com/qemu-project/seabios-hppa.git) registered for path 'roms/seabios-hppa' Submodule 'roms/skiboot' (https://gitlab.com/qemu-project/skiboot.git) registered for path 'roms/skiboot' Submodule 'roms/u-boot' (https://gitlab.com/qemu-project/u-boot.git) registered for path 'roms/u-boot' Submodule 'roms/u-boot-sam460ex' (https://gitlab.com/qemu-project/u-boot-sam460ex.git) registered for path 'roms/u-boot-sam460ex' Submodule 'roms/vbootrom' (https://gitlab.com/qemu-project/vbootrom.git) registered for path 'roms/vbootrom' Submodule 'tests/lcitool/libvirt-ci' (https://gitlab.com/libvirt/libvirt-ci.git) registered for path 'tests/lcitool/libvirt-ci' Cloning into '/home/james/sources/qemu/roms/QemuMacDrivers'... Cloning into '/home/james/sources/qemu/roms/SLOF'... Cloning into '/home/james/sources/qemu/roms/edk2'... Cloning into '/home/james/sources/qemu/roms/ipxe'... Cloning into '/home/james/sources/qemu/roms/openbios'... Cloning into '/home/james/sources/qemu/roms/opensbi'... Cloning into '/home/james/sources/qemu/roms/qboot'... Cloning into '/home/james/sources/qemu/roms/qemu-palcode'... Cloning into '/home/james/sources/qemu/roms/seabios'... Cloning into '/home/james/sources/qemu/roms/seabios-hppa'... Cloning into '/home/james/sources/qemu/roms/skiboot'... Cloning into '/home/james/sources/qemu/roms/u-boot'... Username for 'https://gitlab.com':

I used my browser to create an account and authenticate to gitlab. I then navigated to https://gitlab.com/qemu-project/u-boot.git only to get a 404 error.

I've observed this on the master branch by manually trying and also on the xlnx_rel_v2022.2 branch when trying to clone/fetch using yocto.

rb1 avatar Sep 22 '25 16:09 rb1

The .gitmodules file in the qemu upstream changed which changes the location of u-boot.git qemu-project to a new location which causes the do_fetch to fail.

This is my initial attempt to resolve this which is a cherry-pick from the upsteam QEMU project of the fix/adjustment to move the u-boot project path. This was autoclosed by bots https://github.com/Xilinx/qemu/pull/102/files

Here is another opened today from someone else https://github.com/Xilinx/qemu/pull/103

In the meantime while we wait for a proper resolution, here is how we are currently working around this on 2024 for our yocto setup. I imagine this will be a very similar solution across the board if using yocto From my machine conf: REPO:pn-qemu-xilinx := "gitsm://url to fork/qemu.git;protocol=http" REPO:pn-qemu-xilinx-native := "gitsm://url to fork/qemu.git;protocol=http" REPO:pn-qemu-xilinx-system-native := "gitsm://url to fork/qemu.git;protocol=http" BRANCHING:pn-qemu-xilinx-native := "xlnx_rel_v2024.2" BRANCHING:pn-qemu-xilinx-system-native := "xlnx_rel_v2024.2" BRANCHING:pn-qemu-xilinx := "xlnx_rel_v2024.2"

#Meta-xilinx anchors to a specific commit. AUTOREV or pull the new head commit containing your change on your fork SRCREV:pn-qemu-xilinx-native := "${AUTOREV}" SRCREV:pn-qemu-xilinx-system-native := "${AUTOREV}" SRCREV:pn-qemu-xilinx := "${AUTOREV}"

I had a ticket get opened for this with AMD.

griff0417-jackal avatar Sep 22 '25 20:09 griff0417-jackal

Using AUTOREV is discouraged. This requires the build to be online in order to get the latest commit, preventing offline builds.

With that said, you should send something to the meta-xilinx mailing list and meta-xilinx repository here on github to report this issue and request a change to the download to accommodate this upstream change.

mhatle avatar Sep 22 '25 20:09 mhatle

Good point. This is just a workaround that I am using without issue for right now until this is fixed properly. For now I am ok with an autorev against a locally hosted fork and am not doing offline builds but understood, thanks, i appreciate it.

From what I can tell on the yocto side (not related to this project, sorry), it looks like pretty much every -generic machine conf xlnx offers from meta-xilinx will require against their xlnx qemu machine and bring this project into the build causing a fetch error. So I assume that all their rel_ branches for one that they are still supporting will need this .gitmodules patch here on this project, as well as all corresponding commit hash updates in meta-xilinx branches to not have to use autorev.

I have a ticket opened with xlnx/amd dev team on this and will wait to hear back before going to another project and opening another issue /PR. My hope is that since my ticket is this issue within yocto specifically, that they will realize the fix against rel_* branches requires changing the commit hash they explicitly anchor to when they made the release... Understood though, I will comment there if I need to.

griff0417-jackal avatar Sep 22 '25 21:09 griff0417-jackal

For Yocto, as workaround, adding mirrors to local.conf could also work:

MIRRORS:append = " gitsm://gitlab.com/qemu-project/u-boot.git gitsm://gitlab.com/qemu-project-mirrors/u-boot.git \
                   gitsm://gitlab.com/qemu-project/u-boot-sam460ex.git gitsm://gitlab.com/qemu-project-mirrors/u-boot-sam460ex.git \
"

kylex2 avatar Sep 24 '25 15:09 kylex2

This appears to be resolved - someone restored the repository mirror on GitLab.

sethraymond avatar Sep 30 '25 14:09 sethraymond

uboot seems good now, but i still can't run the command above successfully because a different submodule is failing.

https://github.com/Zeex/subhook/ (qemu/roms/edk2/UnitTestFrameworkPkg/Library/SubhookLib/subhook)

I think this is a problem in edk2 repository.

rb1 avatar Oct 01 '25 14:10 rb1

Yes, ed2k now provides their own mirror of subhook at https://github.com/tianocore/edk2-subhook.git.

MIRRORS:append = " gitsm://github.com/Zeex/subhook.git gitsm://github.com/tianocore/edk2-subhook.git \
"

kylex2 avatar Oct 01 '25 15:10 kylex2