[v5,1/4] board/qemu/riscv32-virt: Update linux config
diff mbox series

Message ID 20190320003706.1126-1-alistair.francis@wdc.com
State Changes Requested
Headers show
Series
  • [v5,1/4] board/qemu/riscv32-virt: Update linux config
Related show

Commit Message

Alistair Francis March 20, 2019, 12:38 a.m. UTC
Update the Linux defconfig. This defconfig is the in tree defconfig with
32-bit support enabled.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
---
 board/qemu/riscv32-virt/linux.config | 35 +++++++++++-----------------
 configs/qemu_riscv32_virt_defconfig  |  4 ++--
 2 files changed, 15 insertions(+), 24 deletions(-)

Comments

Arnout Vandecappelle March 20, 2019, 7:20 p.m. UTC | #1
Hi Alistair,

On 20/03/2019 01:38, Alistair Francis wrote:
> Update the Linux defconfig. This defconfig is the in tree defconfig with
> 32-bit support enabled.

 I would prefer two patches: a first patch that just converts the current
linux.config into a config fragment, without changing anything, and then a
second patch that adds features.

 To do the first patch, just do

make linux-configure
cp output/build/linux*/.config /tmp/riscv32.config
(select BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG)
make linux-reconfigure
utils/diffconfig -m output/build/linux*/.config /tmp/riscv32.config > \
	board/qemu/riscv32-virt/linux.config.fragment
(set BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES)
make linux-reconfigure
diff -u output/build/linux*/.config /tmp/riscv32.config

 For the second patch, you either use the same procedure as above, or you just
manually add the relevant symbols from the fragment.

> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
> ---
>  board/qemu/riscv32-virt/linux.config | 35 +++++++++++-----------------
>  configs/qemu_riscv32_virt_defconfig  |  4 ++--
>  2 files changed, 15 insertions(+), 24 deletions(-)
> 
> diff --git a/board/qemu/riscv32-virt/linux.config b/board/qemu/riscv32-virt/linux.config
> index c25583f768..fa8a9fd650 100644
> --- a/board/qemu/riscv32-virt/linux.config
> +++ b/board/qemu/riscv32-virt/linux.config
> @@ -1,23 +1,14 @@
> +CONFIG_32BIT=y
> +CONFIG_PAGE_OFFSET=0xC0000000

 This makes no sense... These are blind symbols, so their values will be ignored.

 Or am I missing something?

[snip]
> diff --git a/configs/qemu_riscv32_virt_defconfig b/configs/qemu_riscv32_virt_defconfig
> index 6f9a61b11c..15b4c5624c 100644
> --- a/configs/qemu_riscv32_virt_defconfig
> +++ b/configs/qemu_riscv32_virt_defconfig
> @@ -18,8 +18,8 @@ BR2_LINUX_KERNEL=y
>  BR2_LINUX_KERNEL_CUSTOM_GIT=y
>  BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/riscv/riscv-linux.git"
>  BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="8fe28cb58bcb235034b64cbbb7550a8a43fd88be"
> -BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
> -BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/riscv32-virt/linux.config"
> +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
> +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/qemu/riscv32-virt/linux.config"

 Since it's a fragment, better call it linux.config.fragment or linux.fragment
(we have both currently, but a bit more of linux.config.fragment).

 Regards,
 Arnout
Alistair Francis March 20, 2019, 10:50 p.m. UTC | #2
On Wed, Mar 20, 2019 at 12:20 PM Arnout Vandecappelle <arnout@mind.be> wrote:
>
>  Hi Alistair,
>
> On 20/03/2019 01:38, Alistair Francis wrote:
> > Update the Linux defconfig. This defconfig is the in tree defconfig with
> > 32-bit support enabled.
>
>  I would prefer two patches: a first patch that just converts the current
> linux.config into a config fragment, without changing anything, and then a
> second patch that adds features.
>
>  To do the first patch, just do
>
> make linux-configure
> cp output/build/linux*/.config /tmp/riscv32.config
> (select BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG)
> make linux-reconfigure
> utils/diffconfig -m output/build/linux*/.config /tmp/riscv32.config > \
>         board/qemu/riscv32-virt/linux.config.fragment
> (set BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES)
> make linux-reconfigure
> diff -u output/build/linux*/.config /tmp/riscv32.config
>
>  For the second patch, you either use the same procedure as above, or you just
> manually add the relevant symbols from the fragment.

Ok, I have updated this in the v6.

>
> > Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
> > ---
> >  board/qemu/riscv32-virt/linux.config | 35 +++++++++++-----------------
> >  configs/qemu_riscv32_virt_defconfig  |  4 ++--
> >  2 files changed, 15 insertions(+), 24 deletions(-)
> >
> > diff --git a/board/qemu/riscv32-virt/linux.config b/board/qemu/riscv32-virt/linux.config
> > index c25583f768..fa8a9fd650 100644
> > --- a/board/qemu/riscv32-virt/linux.config
> > +++ b/board/qemu/riscv32-virt/linux.config
> > @@ -1,23 +1,14 @@
> > +CONFIG_32BIT=y
> > +CONFIG_PAGE_OFFSET=0xC0000000
>
>  This makes no sense... These are blind symbols, so their values will be ignored.
>
>  Or am I missing something?

I have removed this one, it is generated by the kernel's menuconfig
but they don't seem to be required.

>
> [snip]
> > diff --git a/configs/qemu_riscv32_virt_defconfig b/configs/qemu_riscv32_virt_defconfig
> > index 6f9a61b11c..15b4c5624c 100644
> > --- a/configs/qemu_riscv32_virt_defconfig
> > +++ b/configs/qemu_riscv32_virt_defconfig
> > @@ -18,8 +18,8 @@ BR2_LINUX_KERNEL=y
> >  BR2_LINUX_KERNEL_CUSTOM_GIT=y
> >  BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/riscv/riscv-linux.git"
> >  BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="8fe28cb58bcb235034b64cbbb7550a8a43fd88be"
> > -BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
> > -BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/riscv32-virt/linux.config"
> > +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
> > +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/qemu/riscv32-virt/linux.config"
>
>  Since it's a fragment, better call it linux.config.fragment or linux.fragment
> (we have both currently, but a bit more of linux.config.fragment).

Fxied!

Alistair

>
>  Regards,
>  Arnout
>

Patch
diff mbox series

diff --git a/board/qemu/riscv32-virt/linux.config b/board/qemu/riscv32-virt/linux.config
index c25583f768..fa8a9fd650 100644
--- a/board/qemu/riscv32-virt/linux.config
+++ b/board/qemu/riscv32-virt/linux.config
@@ -1,23 +1,14 @@ 
+CONFIG_32BIT=y
+CONFIG_PAGE_OFFSET=0xC0000000
+CONFIG_PGTABLE_LEVELS=2
 CONFIG_ARCH_RV32I=y
-CONFIG_SMP=y
-CONFIG_NR_CPUS=8
-CONFIG_PCI=y
-CONFIG_SYSVIPC=y
-CONFIG_NET=y
-CONFIG_PACKET=y
-CONFIG_UNIX=y
-CONFIG_INET=y
-# CONFIG_WIRELESS is not set
-CONFIG_VIRTIO_BLK=y
-CONFIG_NETDEVICES=y
-CONFIG_VIRTIO_NET=y
-# CONFIG_ETHERNET is not set
-# CONFIG_WLAN is not set
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_OF_PLATFORM=y
-CONFIG_VIRT_DRIVERS=y
-CONFIG_VIRTIO_MMIO=y
-CONFIG_EXT2_FS=y
-CONFIG_EXT4_FS=y
-CONFIG_TMPFS=y
+# CONFIG_ARCH_RV64I is not set
+CONFIG_MAXPHYSMEM_2GB=y
+CONFIG_LBDAF=y
+# CONFIG_SCSI_NSP32 is not set
+CONFIG_GENERIC_ATOMIC64=y
+CONFIG_GENERIC_LIB_ASHLDI3=y
+CONFIG_GENERIC_LIB_ASHRDI3=y
+CONFIG_GENERIC_LIB_LSHRDI3=y
+CONFIG_GENERIC_LIB_UCMPDI2=y
+CONFIG_GENERIC_LIB_UMODDI3=y
diff --git a/configs/qemu_riscv32_virt_defconfig b/configs/qemu_riscv32_virt_defconfig
index 6f9a61b11c..15b4c5624c 100644
--- a/configs/qemu_riscv32_virt_defconfig
+++ b/configs/qemu_riscv32_virt_defconfig
@@ -18,8 +18,8 @@  BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_GIT=y
 BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/riscv/riscv-linux.git"
 BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="8fe28cb58bcb235034b64cbbb7550a8a43fd88be"
-BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
-BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/riscv32-virt/linux.config"
+BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/qemu/riscv32-virt/linux.config"
 
 # Bootloader
 BR2_TARGET_RISCV_PK=y