[RFC] [WIP] incorporate picotcp into barebox: a small demo

Antony Pavlov antonynpavlov at gmail.com
Sun May 25 02:58:19 PDT 2014


Hi all!

I have adapted barebox for work with picotcp network stack.

Picotcp is not a small piece of code so I can't easyly send
a patch to the barebox maillist. I have put results of my work on github,
see mini-howto below.

This picotcp integration is a dirty hack in many ways.
We need additional effors for adapting barebox and picotcp
for more easy joint operation.

Please express your opinion on my work. I'm awaiting your comments.

Many thanks to Alessandro Rubini for his pointing on picotcp!


barebox picotcp mini-howto
==========================

1. clone and build sandbox barebox

  $ git clone https://github.com/frantony/barebox -b picotcp.20140525
  ...
  $ make sandbox_defconfig
  ...
  $ make

2.  run sandbox barebox

  # ./barebox

3.  Inside sandbox barebox initialize the 'eth' network interface
and check routes:

  barebox at barebox sandbox:/ ifconfig eth 10.0.0.1 255.255.255.0
  Assigned ipv4 10.0.0.1 to device eth
  barebox at barebox sandbox:/ route
  picotcp IPv4 routing table
  Destination     Gateway         Genmask         Metric Iface
  10.0.0.0        0.0.0.0         255.255.255.0   1      eth

4. on host initialize the 'barebox' tap interface (you may need
root account for this and bellow operations on host):

  # ifconfig barebox 10.0.0.2

and check barebox accessibility:

  # ping -c 1 10.0.0.1
  PING 10.0.0.1 (10.0.0.1) 56(84) bytes of data.
  64 bytes from 10.0.0.1: icmp_seq=1 ttl=64 time=0.526 ms

  --- 10.0.0.1 ping statistics ---
  1 packets transmitted, 1 received, 0% packet loss, time 0ms
  rtt min/avg/max/mdev = 0.526/0.526/0.526/0.000 ms

5. inside sandbox barebox check host accessibility.
Note: use picoping, not ping!

  barebox at barebox sandbox:/ picoping 10.0.0.2
  barebox at barebox sandbox:/ 48 bytes from 10.0.0.2: icmp_req=1 ttl=64 time=304 ms
  48 bytes from 10.0.0.2: icmp_req=2 ttl=64 time=0 ms
  48 bytes from 10.0.0.2: icmp_req=3 ttl=64 time=0 ms
  48 bytes from 10.0.0.2: icmp_req=4 ttl=64 time=0 ms
  48 bytes from 10.0.0.2: icmp_req=5 ttl=64 time=0 ms
  48 bytes from 10.0.0.2: icmp_req=6 ttl=64 time=0 ms
  48 bytes from 10.0.0.2: icmp_req=7 ttl=64 time=0 ms
  48 bytes from 10.0.0.2: icmp_req=8 ttl=64 time=0 ms
  48 bytes from 10.0.0.2: icmp_req=9 ttl=64 time=0 ms
  48 bytes from 10.0.0.2: icmp_req=10 ttl=64 time=0 ms

-- 
Best regards,
  Antony Pavlov



More information about the barebox mailing list