From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Thu, 08 Jul 2021 08:21:35 +0200 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1m1NPj-0003aX-MB for lore@lore.pengutronix.de; Thu, 08 Jul 2021 08:21:35 +0200 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1m1NPi-0001wc-VY; Thu, 08 Jul 2021 08:21:34 +0200 Received: from gallifrey.ext.pengutronix.de ([2001:67c:670:201:5054:ff:fe8d:eefb] helo=[IPv6:::1]) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1m1NPd-0001wO-Ag; Thu, 08 Jul 2021 08:21:29 +0200 To: Oleksij Rempel , distrokit@pengutronix.de References: <20210708041628.17608-1-o.rempel@pengutronix.de> From: Ahmad Fatoum Message-ID: <61173d80-a476-deee-2b93-91dfafbe810b@pengutronix.de> Date: Thu, 8 Jul 2021 08:21:29 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210708041628.17608-1-o.rempel@pengutronix.de> Content-Language: en-US Subject: Re: [DistroKit] [PATCH v1] platform-mipsel: add basic qemu malta support X-BeenThere: distrokit@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: DistroKit Mailinglist List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "DistroKit" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: distrokit-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false Hello Oleksij, On 08.07.21 06:16, Oleksij Rempel wrote: > Add MIPSEL (MIPS little-endian 32bit) platform. > > Signed-off-by: Oleksij Rempel > diff --git a/configs/platform-mipsel/barebox-malta.config b/configs/platform-mipsel/barebox-malta.config > new file mode 100644 > index 0000000..ff2e7f0 > --- /dev/null > +++ b/configs/platform-mipsel/barebox-malta.config > +CONFIG_VIRTIO_MENU=y > +# CONFIG_VIRTIO_MMIO is not set > +# end of Drivers v2021.06.0 should already have virtio over PCI support. Could you enable that as well? > diff --git a/configs/platform-mipsel/config/images/malta.config b/configs/platform-mipsel/config/images/malta.config > new file mode 100644 > index 0000000..07125be > --- /dev/null > +++ b/configs/platform-mipsel/config/images/malta.config > @@ -0,0 +1,28 @@ > +image @IMAGE@ { > + hdimage { > + align = 1M > + disk-signature = 0x74823abf > + } > + partition root-A { > + image = root.ext2 > + partition-type = 0x83 > + size = 512M > + } > + partition data { > + partition-type = 0x83 > + size = 512M > + } > + /* genimage does not write zeros at the end of an image to save space, > + * but the kernel in qemu will complain if the image file is smaller > + * than the partition sizes. work around this by adding an empty > + * partition at the end. > + */ Can't you replace this with image = /dev/zero in the partition data above? > + partition end { > + image = /dev/null > + size = 1M > + offset = 1025M > + in-partition-table = false > + } > +} > + > +/* vim: set tabstop=8 noexpandtab : */ > diff --git a/configs/platform-mipsel/kernelconfig b/configs/platform-mipsel/kernelconfig > new file mode 100644 > index 0000000..c7d00d7 > +# CONFIG_VIRT_DRIVERS is not set > +CONFIG_VIRTIO_MENU=y > +# CONFIG_VIRTIO_PCI is not set Enable this one as well? > diff --git a/configs/platform-mipsel/platforms/barebox-0-common.in b/configs/platform-mipsel/platforms/barebox-0-common.in > new file mode 100644 > index 0000000..0b487ba > --- /dev/null > +++ b/configs/platform-mipsel/platforms/barebox-0-common.in > @@ -0,0 +1,33 @@ > +## SECTION=bootloader > + > +config BAREBOX_COMMON_ARCH_STRING > + string > + default "mips" > + > +menuconfig BAREBOX_COMMON > + prompt "common barebox options " > + bool > + select HOST_LZOP if BAREBOX_COMMON_NEEDS_HOST_LZOP > + help > + A metapackage serving a reference config for all other barebox > + variants in the v7a platform. It doesn't install anything. That's not v7a. > + > +if BAREBOX_COMMON > + > +config BAREBOX_COMMON_VERSION > + prompt "barebox version" > + string > + default "2016.08.0" That's old. Can't you make the default a more recent release? > + > +config BAREBOX_COMMON_MD5 > + prompt "barebox source md5sum" > + string > + > +config BAREBOX_COMMON_NEEDS_HOST_LZOP > + prompt "barebox needs lzop" > + bool > + help > + The barebox binaries can be compressed. Select this if lzop > + is used in order to compile lzop for your development host. > + > +endif > diff --git a/configs/platform-mipsel/platforms/barebox-malta.in b/configs/platform-mipsel/platforms/barebox-malta.in > new file mode 100644 > index 0000000..6976a96 > --- /dev/null > +++ b/configs/platform-mipsel/platforms/barebox-malta.in > @@ -0,0 +1,8 @@ > +## SECTION=bootloader > + > +config BAREBOX_MALTA > + tristate > + prompt "Barebox (malta)" > + select BAREBOX_COMMON > + help > + MIPS Malta support for barebox. > diff --git a/configs/platform-mipsel/platforms/blspec-malta.in b/configs/platform-mipsel/platforms/blspec-malta.in > new file mode 100644 > index 0000000..d51d4ad > --- /dev/null > +++ b/configs/platform-mipsel/platforms/blspec-malta.in > @@ -0,0 +1,5 @@ > +## SECTION=blspec > + > +config BLSPEC_MALTA > + tristate > + prompt "/loader/entries/malta.conf bootloader spec entry" > diff --git a/configs/platform-mipsel/platforms/image-kernel.in b/configs/platform-mipsel/platforms/image-kernel.in > new file mode 100644 > index 0000000..4321b12 > --- /dev/null > +++ b/configs/platform-mipsel/platforms/image-kernel.in > @@ -0,0 +1,4 @@ > +## SECTION=image > + > +config IMAGE_KERNEL > + bool > diff --git a/configs/platform-mipsel/platforms/image-malta.in b/configs/platform-mipsel/platforms/image-malta.in > new file mode 100644 > index 0000000..73df0fd > --- /dev/null > +++ b/configs/platform-mipsel/platforms/image-malta.in > @@ -0,0 +1,10 @@ > +## SECTION=image > + > +config IMAGE_MALTA > + tristate > + select HOST_GENIMAGE > + select BAREBOX_MALTA > + select IMAGE_ROOT_EXT > + prompt "Generate images/malta.hdimg" > + help > + FIXME > diff --git a/configs/platform-mipsel/platforms/kernel-malta.in b/configs/platform-mipsel/platforms/kernel-malta.in > new file mode 100644 > index 0000000..8dcd50c > --- /dev/null > +++ b/configs/platform-mipsel/platforms/kernel-malta.in > @@ -0,0 +1,9 @@ > +## SECTION=kernel > + > +config KERNEL_MALTA > + tristate > + prompt "Linux kernel (malta)" > + select HOST_LIBKMOD > + #select HOST_U_BOOT_TOOLS > + help > + FIXME > diff --git a/configs/platform-mipsel/platforms/kernel.in b/configs/platform-mipsel/platforms/kernel.in > new file mode 100644 > index 0000000..1889211 > --- /dev/null > +++ b/configs/platform-mipsel/platforms/kernel.in > @@ -0,0 +1,26 @@ > +## SECTION=base_kernel > + > +menuconfig KERNEL > + bool > + default y > + prompt "Linux kernel " > + > +if KERNEL > + > +config KERNEL_VERSION > + prompt "kernel version" > + string > + default "4.15" Some newer default? > --- /dev/null > +++ b/doc/hardware_mipsel_qemu.rst > @@ -0,0 +1,13 @@ > +QEmu > +==== > + > +The mipsel platform is ready to run in qemu, using the MIPS Malta board > +simulation. > +There are two ways to run DistoKit inside qemu: > + > +* With barebox: > + Run ``./configs/platform-mipsel/run barebox`` to barebox. The barebox should > + boot the kernel if supported. > +* Without barebox: > + Run ``./configs/platform-mipsel/run`` to directly start the kernel without > + barebox. I must have missed it, where do you swap byte order of the barebox image? FYI, barebox v2021.07.0 will always generate a second .swapped image along with the normal malta image. Cheers, Ahmad -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ DistroKit mailing list DistroKit@pengutronix.de