[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Booting the FreeBSD kernel as an zImage file needs a patch upgrade ?.



Sorry I forgot to change the name of the kernel :

# cd /usr/freebsd-src/sys/arm/conf
# cp GENERIC MYKERNEL

# nano MYKERNEL
makeoptions WITH_KERNEL_BIN=1

# make KERNCONF=MYKERNEL TARGET=arm TARGET_ARCH=armv7 buildkernel
# make KERNCONF=MYKERNEL TARGET=arm TARGET_ARCH=armv7 DESTDIR=/build-xen installkernel

same error as before : kldxref: /build-xen/boot/kernel/kernel: no ELF relocation table found.

On Fri, Jan 5, 2024 at 7:48 PM Mario Marietto <marietto2008@xxxxxxxxx> wrote:
Ok. I've found the solution reading here :

https://cgit.freebsd.org/src/diff/share/man/man5/src.conf.5?id=ce37de8e05b233bc50de2c7678ee841573e6a7e2

So on FreeBSD 15.0-CURRENT I did :

nano /etc/src.conf
WITH_KERNEL_BIN=1
(WITH_KERNEL_BIN is wrong)

$ cd /usr
$ git clone https://gitlab.com/ehem/freebsd-src.git
$ cd freebsd-src
$ make KERNCONF=GENERIC TARGET=arm TARGET_ARCH=armv7 buildkernel
$ make KERNCONF=GENERIC TARGET=arm TARGET_ARCH=armv7 DESTDIR=/build-xen installkernel

Unfortunately I get this error :

kldxref: /build-xen/boot/kernel/kernel: no ELF relocation table found

and the kernel.bin file is not generated.

experiment n. 2 : I have removed the parameter WITH_KERNEL_BIN=1 from /etc/src.conf ;

I've added the parameter :

makeoptions WITH_KERNEL_BIN=1

to the kernel file called GENERIC on "/usr/freebsd-src/sys/amd64/conf"

and then I've launched again the compilation :

$ make KERNCONF=GENERIC TARGET=arm TARGET_ARCH=armv7 buildkernel
$ make KERNCONF=GENERIC TARGET=arm TARGET_ARCH=armv7 DESTDIR=/build-xen installkernel

Unfortunately I've got the same error as before and the kernel.bin file hasn't been produced as well.


On Wed, Jan 3, 2024 at 6:33 PM Mario Marietto <marietto2008@xxxxxxxxx> wrote:
@Warner Losh :

Can you explain where I should add the parameter "WITH_KERNEL_BIN" ? I
tried in several ways,but it is not accepted :

$ make KERNCONF=GENERIC TARGET=arm TARGET_ARCH=armv7 buildkernel
WITH_KERNEL_BIN = wrong

$ make KERNCONF=GENERIC TARGET=arm TARGET_ARCH=armv7 WITH_KERNEL_BIN
buildkernel = wrong

$ make KERNCONF=GENERIC TARGET=arm TARGET_ARCH=armv7
DESTDIR=/build-xen WITH_KERNEL_BIN installkernel = wrong

$ make KERNCONF=GENERIC TARGET=arm TARGET_ARCH=armv7
DESTDIR=/build-xen installkernel WITH_KERNEL_BIN = wrong

How is it ?



On Tue, Jan 2, 2024 at 3:27 PM Julien Grall <julien@xxxxxxx> wrote:
>
> Hi,
>
> On 01/01/2024 23:03, Mario Marietto wrote:
> > I still see too many variables in the equation. I need to eliminate
> > some of them. So :
> >
> > 1) Do I need to patch the file locore-v6.S with the Julien's patch ?
> > ---> https://xenbits.xen.org/gitweb/?p=people/julieng/freebsd.git;a=commit;h=12a7cb346b88c6d3f52a20b98f361dc62797fbcd
>
> I believe so otherwise XL will not know how to load the binary file (see
> below).
>
> >
> > 2) What kind of u-boot are you talking about ? Where should I get it ?
> You don't need U-boot if you have a zImage. Instead, you can ask 'xl' to
> load it from the dom0 filesystem. The option in the xl configuration is
>
> kernel='<path-to-binary>'
>
> Cheers,
>
> --
> Julien Grall



--
Mario.


--
Mario.


--
Mario.

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.