Re: How to boot FreeBSD for arm 32 bit as DomU with u-boot on my ARM Chromebook
Julien Grall <[email protected]>
| Newsgroups | gmane.comp.emulators.xen.devel,gmane.os.freebsd.devel.arm |
|---|---|
| Message-ID | <[email protected]> |
Hi, On 30/12/2023 12:44, Mario Marietto wrote: >> https://src.fedoraproject.org/repo/pkgs/uboot-tools/u-boot-2017.05.tar.bz2/sha512/be270f9242a72b05463092a022bbabd54996762de1ff23bf7575124ac02e62f49572a4e2f6f571a5019047d40027e56e35593b5cc373c4a5a39b100c3377ba93/ > >> This source code has no support for Xen guests. This was only added in 2020. Can you clarify why you can't use the latest upstream U-boot? > > It's true. I've got the source code of that custom u-boot > implementation in the wrong place. This is the right place : > > https://forum.doozan.com/read.php?3,49039 > > an u-boot / xen developer suggested to me to explore that site because > there is the one and only u-boot customized and off the tree version > that can chainload the freebsd bootloader "ubldr". Unfortunately to > work the FreeBSD rootfs should be compiled with armV5,but my ARM > Chromebook works with armV7. I don't know if armV7 is retrocompatible > with armV5. > In addition,armV5 has been removed from FreeBSD starting from version > 12. Infact Balanga used FreeBSD 11.2. FreeBSD 11 has gone EOL for > several years and it's very hard to make it in a usable state today. I am not entirely sure. The Arm Arm implies that there are some sort of compatibility between Armv5 and Armv7, but they also removed some features. That said, I don't understand why it would matter that binaries are built with Armv5. U-boot should only care about the filesystem type (e.g. ZFS). So you should be able to build your own filesystem. > > ---> In fact, there are some missing low-level layers (e.g. > hypercalls) in order to properly use it for 32-bit domU. I don't know > if there is support out-of-tree. > > @Elliott Mitchell some time ago concerning that point,said : > > I've only ever tried arm64, but since arm32 didn't appear to need much > to be operational I tried to make it possible. In theory it > /should/work on arm32, but I've never tried it. What was missing was > I had never added it to the configuration and one link was needed. > Updated "submit" branch has a tiny adjustment. (the only difference is > the hypercall wrappers, register naming and where the op code goes, > very simple compatibility) > > I'm not experienced,but it seems to me that only a few patches are > needed to make the job done. It is it not clear to me whether the last sentence is from you or Elliott. Regardless that, I think we are talking about two different things. Elliott seems to refer to FreeBSD whereas I was referring to U-boot. If you plan to use U-boot, then I recommend to first focus on U-boot. Then you could look at FreeBSD. > ---> Do you have a tree with FreeBSD + your patches? I would like to > check the zImage code. > > my patches ? Are you talking about the patches that should have been > used on the @Elliott Mitchell github ? I am referring to what ever you are trying. > > https://gitlab.com/ehem/freebsd-src.git > > yes,I tried to use his code but I've got the same error "invalid kernel" [...] > He said that it should work,but I get the error "invalid kernel". [...] > It appears FreeBSD-CURRENT removed the last step converting the kernel > file to kernel.bin.The patch can be readily rebased, but without > kernel.bin that doesn't do too much. So,without a rebase of that patch > the first option is not applicable. This is likely the culprit. I haven't used FreeBSD for a while, so I can't advise on how to fix it. If it were me, I would try to revert the commiting removing the step to create kernel.bin. Cheers, -- Julien Grall