diff mbox

[U-Boot,RFC,v3,09/11] net: IPv6 documentation

Message ID 20170125095622.20326-10-judge.packham@gmail.com
State RFC
Delegated to: Joe Hershberger
Headers show

Commit Message

Chris Packham Jan. 25, 2017, 9:56 a.m. UTC
Signed-off-by: Chris Packham <judge.packham@gmail.com>
---

Changes in v3:
- Add brief testing section

Changes in v2: None

 README          |  3 +++
 doc/README.ipv6 | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 58 insertions(+)
 create mode 100644 doc/README.ipv6

Comments

Tom Rini Jan. 28, 2017, 7:51 p.m. UTC | #1
On Wed, Jan 25, 2017 at 10:56:20PM +1300, Chris Packham wrote:
> Signed-off-by: Chris Packham <judge.packham@gmail.com>
> ---
> 
> Changes in v3:
> - Add brief testing section
[snip]
> +Testing using QEMU
> +------------------
> +Refer to README.x86 for instructions on building u-boot for QEMU. Add
> +the relevant IPv6 configuration to the configuration (CONFIG_CMD_NET6,
> +CONFIG_CMD_PING6) and build.
> +
> +On the host system run
> +
> +  sudo qemu-system-i386 -nographic -bios u-boot.rom -net nic -net tap
> +
> +At the u-boot command line run
> +
> +  setenv ipaddr 192.168.1.100
> +  setenv ip6addr 3ffe::100/64
> +
> +On the host system run
> +
> +  sudo ip addr add 3ffe::1/64 dev tap0
> +  sudo ip addr add 192.168.1.1
> +
> +It should now be possible to use ping6 and tftpboot6 to communicate with
> +the host system from the emulated u-boot environment.

So we can test this under qemu? Cool!  That means we should get some
test.py tests written to match up with the ipv4 tests we have today.  My
gut reaction is that qemu-ppce500 should also be able to work too as
it's also using the E1000 driver.
Luka Kovačič Jan. 28, 2017, 7:59 p.m. UTC | #2
Sounds good to me. I will start testing soon and I am going to automate it.

V sob., 28. jan. 2017 8:51 pop. je oseba Tom Rini <trini@konsulko.com>
napisala:

> On Wed, Jan 25, 2017 at 10:56:20PM +1300, Chris Packham wrote:
> > Signed-off-by: Chris Packham <judge.packham@gmail.com>
> > ---
> >
> > Changes in v3:
> > - Add brief testing section
> [snip]
> > +Testing using QEMU
> > +------------------
> > +Refer to README.x86 for instructions on building u-boot for QEMU. Add
> > +the relevant IPv6 configuration to the configuration (CONFIG_CMD_NET6,
> > +CONFIG_CMD_PING6) and build.
> > +
> > +On the host system run
> > +
> > +  sudo qemu-system-i386 -nographic -bios u-boot.rom -net nic -net tap
> > +
> > +At the u-boot command line run
> > +
> > +  setenv ipaddr 192.168.1.100
> > +  setenv ip6addr 3ffe::100/64
> > +
> > +On the host system run
> > +
> > +  sudo ip addr add 3ffe::1/64 dev tap0
> > +  sudo ip addr add 192.168.1.1
> > +
> > +It should now be possible to use ping6 and tftpboot6 to communicate with
> > +the host system from the emulated u-boot environment.
>
> So we can test this under qemu? Cool!  That means we should get some
> test.py tests written to match up with the ipv4 tests we have today.  My
> gut reaction is that qemu-ppce500 should also be able to work too as
> it's also using the E1000 driver.
>
> --
> Tom
>
Chris Packham Jan. 29, 2017, 7:21 a.m. UTC | #3
On 29/01/2017 8:51 AM, "Tom Rini" <trini@konsulko.com> wrote:

On Wed, Jan 25, 2017 at 10:56:20PM +1300, Chris Packham wrote:
> Signed-off-by: Chris Packham <judge.packham@gmail.com>
> ---
>
> Changes in v3:
> - Add brief testing section
[snip]
> +Testing using QEMU
> +------------------
> +Refer to README.x86 for instructions on building u-boot for QEMU. Add
> +the relevant IPv6 configuration to the configuration (CONFIG_CMD_NET6,
> +CONFIG_CMD_PING6) and build.
> +
> +On the host system run
> +
> +  sudo qemu-system-i386 -nographic -bios u-boot.rom -net nic -net tap
> +
> +At the u-boot command line run
> +
> +  setenv ipaddr 192.168.1.100
> +  setenv ip6addr 3ffe::100/64
> +
> +On the host system run
> +
> +  sudo ip addr add 3ffe::1/64 dev tap0
> +  sudo ip addr add 192.168.1.1
> +
> +It should now be possible to use ping6 and tftpboot6 to communicate with
> +the host system from the emulated u-boot environment.

So we can test this under qemu? Cool!


Yup. Thats been really helpful.

That means we should get some
test.py tests written to match up with the ipv4 tests we have today.  My
gut reaction is that qemu-ppce500 should also be able to work too as
it's also using the E1000 driver.


Yeah my initial plan was to add to/copy from the existing ipv4 tests. There
may be a little issue with the default Debian config for tftp-hpa but I
assume travis-ci has some way to tweak that.


--
Tom
Simon Glass Feb. 6, 2017, 3:32 p.m. UTC | #4
Hi Chris,

On 25 January 2017 at 01:56, Chris Packham <judge.packham@gmail.com> wrote:

Commit message?

> Signed-off-by: Chris Packham <judge.packham@gmail.com>
> ---
>
> Changes in v3:
> - Add brief testing section
>
> Changes in v2: None
>
>  README          |  3 +++
>  doc/README.ipv6 | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 58 insertions(+)
>  create mode 100644 doc/README.ipv6

Reviewed-by: Simon Glass <sjg@chromium.org>

But please use 'U-Boot' throughout.

Regards,
Simon
diff mbox

Patch

diff --git a/README b/README
index a95348a876b4..4ab4a0e74f32 100644
--- a/README
+++ b/README
@@ -922,6 +922,7 @@  The following options need to be configured:
 		CONFIG_CMD_MTDPARTS	* MTD partition support
 		CONFIG_CMD_NAND		* NAND support
 		CONFIG_CMD_NET		  bootp, tftpboot, rarpboot
+		CONFIG_CMD_NET6		* tftpboot6
 		CONFIG_CMD_NFS		  NFS support
 		CONFIG_CMD_PCA953X	* PCA953x I2C gpio commands
 		CONFIG_CMD_PCA953X_INFO * PCA953x I2C gpio info command
@@ -929,6 +930,8 @@  The following options need to be configured:
 		CONFIG_CMD_PCMCIA		* PCMCIA support
 		CONFIG_CMD_PING		* send ICMP ECHO_REQUEST to network
 					  host
+		CONFIG_CMD_PING6	* send ICMPv6 ECHO_REQUEST to network
+					  host
 		CONFIG_CMD_PORTIO	* Port I/O
 		CONFIG_CMD_READ		* Read raw data from partition
 		CONFIG_CMD_REGINFO	* Register dump
diff --git a/doc/README.ipv6 b/doc/README.ipv6
new file mode 100644
index 000000000000..b7c2bc417645
--- /dev/null
+++ b/doc/README.ipv6
@@ -0,0 +1,55 @@ 
+IPv6 Support in U-boot
+----------------------
+IPv6 support in U-boot can be considered experimental. The commands
+currently supported are tftpboot6 and ping6.
+
+The following environment variables are used
+- ip6addr - IPv6 address of the device
+- gatewayip6 - IPv6 address of the default gateway
+- serverip6 - IPv6 of the tftp server
+
+Configuration
+-------------
+The following configuration option needs to be selected to support IPv6.
+- CONFIG_CMD_NET6
+Optionally the following can also be selected to enable the ping6
+command.
+- CONFIG_CMD_PING6
+
+TFTP Server Configuration
+-------------------------
+At the time of writing U-boot has been tested against tftp-hpa
+(https://www.kernel.org/pub/software/network/tftp/) the default Debian
+package sets TFTP_ADDRESS=0.0.0.0:69 (in /etc/default/tftpd-hpa) to
+support both IPv4 and IPv6 this need to be changed to ':69'.
+
+Ethernet Driver Requirements
+----------------------------
+For IPv6 to operate correctly the Ethernet device needs to support
+transmission and reception of L2 multicast packets. Transmission is
+usually not a problem. To receive multicast packets the driver needs to
+enable promiscuous mode (some devices have the option of just enabling
+promiscuous multicast reception).
+
+Testing using QEMU
+------------------
+Refer to README.x86 for instructions on building u-boot for QEMU. Add
+the relevant IPv6 configuration to the configuration (CONFIG_CMD_NET6,
+CONFIG_CMD_PING6) and build.
+
+On the host system run
+
+  sudo qemu-system-i386 -nographic -bios u-boot.rom -net nic -net tap
+
+At the u-boot command line run
+
+  setenv ipaddr 192.168.1.100
+  setenv ip6addr 3ffe::100/64
+
+On the host system run
+
+  sudo ip addr add 3ffe::1/64 dev tap0
+  sudo ip addr add 192.168.1.1
+
+It should now be possible to use ping6 and tftpboot6 to communicate with
+the host system from the emulated u-boot environment.