mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] MIPS: qemu-malta*_defconfig: enable e1000 network driver
@ 2024-01-03 10:52 Antony Pavlov
  2024-01-04 11:17 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Antony Pavlov @ 2024-01-03 10:52 UTC (permalink / raw)
  To: barebox

Thanks to Denis Orlov's work on dma_sync_single_for_*()
interface and e1000 patches we can enable e1000 support
on both 32-bit and 64-bit qemu malta boards.

32-bit malta qemu command line:

    qemu-system-mips -M malta -cpu 24Kf -m 256M \
        -nographic -serial mon:stdio \
        -bios images/barebox-qemu-malta.img \
        -net user,tftp=$(pwd) -net nic,model=e1000

64-bit malta qemu command line:

    qemu-system-mips64el -M malta -cpu MIPS64R2-generic -m 256M \
        -nographic -serial mon:stdio \
        -bios images/barebox-qemu-malta.img.swapped \
        -net user,tftp=$(pwd) -net nic,model=e1000

Barebox commands to check e1000 network interface:

    barebox@qemu malta:/ devinfo eth0
    Parent: pci-8086:100e.0
    Parameters:
      ethaddr: 52:54:00:12:34:56 (type: MAC)
      gateway: 0.0.0.0 (type: ipv4)
      ipaddr: 0.0.0.0 (type: ipv4)
      linux.bootargs:  (type: string)
      linux.devname:  (type: string)
      mode: dhcp (type: enum) (values: "dhcp", "static", "disabled")
      netmask: 0.0.0.0 (type: ipv4)
      serverip:  (type: string)
    barebox@qemu malta:/ devinfo pci-8086:100e.0
    Driver: e1000
    Bus: pci
    Parameters:
      class: 0200 (type: string)
      devfn: 90 (type: string)
      device: 100e (type: string)
      revision: 0003 (type: string)
      vendor: 8086 (type: string)
    barebox@qemu malta:/ dhcp eth0
    eth0: DHCP client bound to address 10.0.2.15
    barebox@qemu malta:/ tftp images/barebox-qemu-malta.img
            [################################################################]

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
 arch/mips/configs/qemu-malta64el_defconfig | 1 +
 arch/mips/configs/qemu-malta_defconfig     | 1 +
 2 files changed, 2 insertions(+)

diff --git a/arch/mips/configs/qemu-malta64el_defconfig b/arch/mips/configs/qemu-malta64el_defconfig
index da3396246d5..c1f7366d76d 100644
--- a/arch/mips/configs/qemu-malta64el_defconfig
+++ b/arch/mips/configs/qemu-malta64el_defconfig
@@ -63,6 +63,7 @@ CONFIG_NET_NETCONSOLE=y
 CONFIG_OFDEVICE=y
 CONFIG_OF_BAREBOX_DRIVERS=y
 CONFIG_VIRTIO_CONSOLE=y
+CONFIG_DRIVER_NET_E1000=y
 CONFIG_DRIVER_NET_RTL8139=y
 CONFIG_DRIVER_NET_VIRTIO=y
 # CONFIG_SPI is not set
diff --git a/arch/mips/configs/qemu-malta_defconfig b/arch/mips/configs/qemu-malta_defconfig
index 4be05b7e5a3..99714aa3068 100644
--- a/arch/mips/configs/qemu-malta_defconfig
+++ b/arch/mips/configs/qemu-malta_defconfig
@@ -60,6 +60,7 @@ CONFIG_NET_NETCONSOLE=y
 CONFIG_OFDEVICE=y
 CONFIG_OF_BAREBOX_DRIVERS=y
 CONFIG_VIRTIO_CONSOLE=y
+CONFIG_DRIVER_NET_E1000=y
 CONFIG_DRIVER_NET_RTL8139=y
 CONFIG_DRIVER_NET_VIRTIO=y
 # CONFIG_SPI is not set
-- 
2.39.0




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] MIPS: qemu-malta*_defconfig: enable e1000 network driver
  2024-01-03 10:52 [PATCH] MIPS: qemu-malta*_defconfig: enable e1000 network driver Antony Pavlov
@ 2024-01-04 11:17 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2024-01-04 11:17 UTC (permalink / raw)
  To: Antony Pavlov; +Cc: barebox

On Wed, Jan 03, 2024 at 01:52:46PM +0300, Antony Pavlov wrote:
> Thanks to Denis Orlov's work on dma_sync_single_for_*()
> interface and e1000 patches we can enable e1000 support
> on both 32-bit and 64-bit qemu malta boards.
> 
> 32-bit malta qemu command line:
> 
>     qemu-system-mips -M malta -cpu 24Kf -m 256M \
>         -nographic -serial mon:stdio \
>         -bios images/barebox-qemu-malta.img \
>         -net user,tftp=$(pwd) -net nic,model=e1000
> 
> 64-bit malta qemu command line:
> 
>     qemu-system-mips64el -M malta -cpu MIPS64R2-generic -m 256M \
>         -nographic -serial mon:stdio \
>         -bios images/barebox-qemu-malta.img.swapped \
>         -net user,tftp=$(pwd) -net nic,model=e1000
> 
> Barebox commands to check e1000 network interface:
> 
>     barebox@qemu malta:/ devinfo eth0
>     Parent: pci-8086:100e.0
>     Parameters:
>       ethaddr: 52:54:00:12:34:56 (type: MAC)
>       gateway: 0.0.0.0 (type: ipv4)
>       ipaddr: 0.0.0.0 (type: ipv4)
>       linux.bootargs:  (type: string)
>       linux.devname:  (type: string)
>       mode: dhcp (type: enum) (values: "dhcp", "static", "disabled")
>       netmask: 0.0.0.0 (type: ipv4)
>       serverip:  (type: string)
>     barebox@qemu malta:/ devinfo pci-8086:100e.0
>     Driver: e1000
>     Bus: pci
>     Parameters:
>       class: 0200 (type: string)
>       devfn: 90 (type: string)
>       device: 100e (type: string)
>       revision: 0003 (type: string)
>       vendor: 8086 (type: string)
>     barebox@qemu malta:/ dhcp eth0
>     eth0: DHCP client bound to address 10.0.2.15
>     barebox@qemu malta:/ tftp images/barebox-qemu-malta.img
>             [################################################################]
> 
> Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
> ---
>  arch/mips/configs/qemu-malta64el_defconfig | 1 +
>  arch/mips/configs/qemu-malta_defconfig     | 1 +
>  2 files changed, 2 insertions(+)

Applied, thanks

Sascha

> 
> diff --git a/arch/mips/configs/qemu-malta64el_defconfig b/arch/mips/configs/qemu-malta64el_defconfig
> index da3396246d5..c1f7366d76d 100644
> --- a/arch/mips/configs/qemu-malta64el_defconfig
> +++ b/arch/mips/configs/qemu-malta64el_defconfig
> @@ -63,6 +63,7 @@ CONFIG_NET_NETCONSOLE=y
>  CONFIG_OFDEVICE=y
>  CONFIG_OF_BAREBOX_DRIVERS=y
>  CONFIG_VIRTIO_CONSOLE=y
> +CONFIG_DRIVER_NET_E1000=y
>  CONFIG_DRIVER_NET_RTL8139=y
>  CONFIG_DRIVER_NET_VIRTIO=y
>  # CONFIG_SPI is not set
> diff --git a/arch/mips/configs/qemu-malta_defconfig b/arch/mips/configs/qemu-malta_defconfig
> index 4be05b7e5a3..99714aa3068 100644
> --- a/arch/mips/configs/qemu-malta_defconfig
> +++ b/arch/mips/configs/qemu-malta_defconfig
> @@ -60,6 +60,7 @@ CONFIG_NET_NETCONSOLE=y
>  CONFIG_OFDEVICE=y
>  CONFIG_OF_BAREBOX_DRIVERS=y
>  CONFIG_VIRTIO_CONSOLE=y
> +CONFIG_DRIVER_NET_E1000=y
>  CONFIG_DRIVER_NET_RTL8139=y
>  CONFIG_DRIVER_NET_VIRTIO=y
>  # CONFIG_SPI is not set
> -- 
> 2.39.0
> 
> 

-- 
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 |



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-01-04 11:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-03 10:52 [PATCH] MIPS: qemu-malta*_defconfig: enable e1000 network driver Antony Pavlov
2024-01-04 11:17 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox