From 0395c03c9d748090591125ffd53cf0114eabc595 Mon Sep 17 00:00:00 2001 From: Robert Piasek Date: Fri, 20 Feb 2009 02:34:36 +0000 Subject: [PATCH] Re: [PATCH 7/8] qi-add-gta02-indentity-part-parsing.patch Andy, On Tuesday 03 February 2009 18:12:50 Andy Green wrote: > Now everything else is in place, we are able to mount > the GTA02 "identity" partition and extract the USB Ethernet > MAC Address from it, and add it to the kernel commandline. > > This causes the Ethernet gadget to use the same MAC address > each boot, simplifying DHCP server situation. The MAC > address in the identity partition is globally unique from > the factory. Because of this patch I can no longer load g_ether module with host_addr= and dev_addr= parameters. The module is always loaded using factory mac for HOST and random mac for DEV. That messes up my setup a bit, as I use NetworkManager 0.7 on FreeRunner itself (and it expects DEV mac to be the same each time). Would it be a problem to also include g_ether.dev_addr? Attached patch solves my problem. Rob --- qiboot/src/cpu/s3c2442/gta02.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qiboot/src/cpu/s3c2442/gta02.c b/qiboot/src/cpu/s3c2442/gta02.c index 3fd9e42..ce8b5a0 100644 --- a/qiboot/src/cpu/s3c2442/gta02.c +++ b/qiboot/src/cpu/s3c2442/gta02.c @@ -606,6 +606,10 @@ char * append_device_specific_cmdline_gta02(char * cmdline) cmdline += strlen(strcpy(cmdline, " g_ether.host_addr=")); cmdline += strlen(strcpy(cmdline, &mac[2])); *cmdline += ' ' ; + + cmdline += strlen(strcpy(cmdline, " g_ether.dev_addr=")); + cmdline += strlen(strcpy(cmdline, &mac[2])); + *cmdline += ' ' ; bail: this_kernel = real_kernel;