usbnet - MAC and sequential interfaces

Mike (mwester) mwester at dls.net
Tue Feb 3 01:11:05 CET 2009


Werner Almesberger wrote:
> Joel Newkirk wrote:
>> It would be
>> convenient for example if the MAC on usb0 were the same as the MAC on eth0
>> with just the OID changed.  (first three octets) (Motorola does this on
>> wireless broadband gear - the MAC address of a unit is the same with just
>> 0a 1a 2a at the start indicating ethernet, RF mgmt, RF client port)
> 
> We can actually do much better. If you
> 
> mkdir -p /mnt/factory
> mount -o ro /dev/mtdblock5 /mnt/factory/
> cat /mnt/factory/usb 
> 
> you get a globally unique MAC address just for USB.
> 
> - Werner

Cool.  Combining this with the initramfs/kexec stuff that's been
discussed on the kernel list (cc'd here): the kexec kernel could very
easily do the magic to read that address as you've described here, and
pass it in on the kernel command line for the real kernel boot.  The
point, of course, being to make the network manager on the host side of
the USB connection happier...

Mike (mwester)



More information about the openmoko-kernel mailing list