From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Oleksij Rempel <o.rempel@pengutronix.de>, distrokit@pengutronix.de
Subject: Re: [DistroKit] [PATCH v1] platform-mipsel: add basic qemu malta support
Date: Thu, 8 Jul 2021 08:21:29 +0200 [thread overview]
Message-ID: <61173d80-a476-deee-2b93-91dfafbe810b@pengutronix.de> (raw)
In-Reply-To: <20210708041628.17608-1-o.rempel@pengutronix.de>
Hello Oleksij,
On 08.07.21 06:16, Oleksij Rempel wrote:
> Add MIPSEL (MIPS little-endian 32bit) platform.
>
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> 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
next prev parent reply other threads:[~2021-07-08 6:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-08 4:16 Oleksij Rempel
2021-07-08 6:21 ` Ahmad Fatoum [this message]
2021-07-15 14:47 ` Roland Hieber
2021-07-15 14:48 ` Roland Hieber
2021-07-15 15:13 ` Oleksij Rempel
2021-07-15 21:38 ` [DistroKit] [PATCH] re-enable gdbserver Roland Hieber
2021-07-16 5:29 ` Robert Schwebel
2021-07-16 7:03 ` Oleksij Rempel
2021-07-16 8:38 ` Roland Hieber
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=61173d80-a476-deee-2b93-91dfafbe810b@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=distrokit@pengutronix.de \
--cc=o.rempel@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox