On 28.10.21 18:41, Stefano Stabellini wrote:
On Thu, 28 Oct 2021, Juergen Gross wrote:On 28.10.21 01:24, Stefano Stabellini wrote:On Wed, 27 Oct 2021, Stefano Stabellini wrote:On Wed, 27 Oct 2021, Juergen Gross wrote:On 26.10.21 02:54, Stefano Stabellini wrote:On Mon, 25 Oct 2021, Juergen Gross wrote:On 22.10.21 21:41, Stefano Stabellini wrote:+JuergenOn Fri, 22 Oct 2021, Andrew Cooper wrote:On 22/10/2021 00:08, Stefano Stabellini wrote:+# build depends +RUN apt-get update && \ + apt-get --quiet --yes install \ + build-essential \ + libssl-dev \ + bc \ + curl \ + flex \ + bison \ + libelf-dev \ + && \ + \ + # Build the kernel + curl -fsSLO https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-"$LINUX_VERSION".tar.xz && \ + tar xvJf linux-"$LINUX_VERSION".tar.xz && \ + cd linux-"$LINUX_VERSION" && \ + make defconfig && \ + make xen.config && \ + cp .config .config.orig && \ + cat .config.orig | grep XEN | grep =m |sed 's/=m/=y/g' >> .config && \ + make -j$(nproc) bzImage && \defconfig is huuuuge. Can we use tinyconfig instead? Also, you want to turn off CONFIG_MODULES seeing as you only copy bzImage to the test. This also fixes the fact that `grep XEN` also matches CONFIG_NETXEN_NIC which has nothing to do with Xen.Tinyconfig would be a good idea but it crashes on QEMU with the appended boot log. I did: # make tinyconfig # make xen.config # make bzImage Of course we could have our own tailored special kernel config for this kernel but I like the simplicify of "make tinyconfig" or "make defconfig" followed by "make xen.config". Unless you know one kconfig option or two that we need to add to tinyconfig to make it work my preference is to go with defconfig for now.You will need to add the dom0 and SMP related config options at least. I'll have a look at config.xen, which is a little bit weird: it configures the backends, but not dom0.Thanks, it would be good if make tinyconfig && make xen.config would just work on QEMU. In the meantime I'll keep defconfig for this test, we can always improve later.Can you please test the attached patch?Yes, that works, thanks!Sorry, I spoke too soon: same error as before: https://gitlab.com/xen-project/people/sstabellini/xen/-/jobs/1722909607/raw (XEN) Hardware Dom0 crashed: rebooting machine in 5 seconds. No output from the kernel.This is not very surprising, as tinyconfig doesn't have CONFIG_PRINTK. BTW, it doesn't have initrd support either (BLK_DEV_RAM and BLK_DEV_INITRD), so I added those to xen.config as well. With the (updated) attached patch the kernel boots fine as dom0 until rootfs is tried to be mounted on a physical machine. I've added CONFIG_BUG, too, in order to have more debugging output if needed.Much better, now there is output: https://gitlab.com/xen-project/people/sstabellini/xen/-/jobs/1726396600/raw This kernel is used as dom0 and from the logs it looks like for dom0 we need a couple more things: - flocks
CONFIG_FILE_LOCKING probably wants to be added.
- the kconfig to recognize #!/bin/sh
This is probably CONFIG_BINFMT_SCRIPT. I'm not sure those should be added to the upstream xen.config. Juergen
OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key
OpenPGP_signature
Description: OpenPGP digital signature