On Friday, July 26, 2013 9:37:14 AM UTC+10, Matt Reimer wrote:
>
> Try netcfg eth0 hw 00:11:22:33:44:55.
>
> Matt
>
> On Wednesday, July 24, 2013 3:35:27 PM UTC-7, 
> ben....@rnd.designcom.com.auwrote:
>>
>> Hi, so I'm trying to have the ability to set the mac address after the 
>> kernel has been compiled.
>> I think there are two main ways of doing this.
>>
>> 1. In the kernel read a file and set the mac address accordingly.
>> 2. Put a script in init that reads a file and sets the mac address.
>>
>> My progress so far:
>> 1. 
>> So I modified fec.c to alter the mac address and I have tried to open the 
>> file with both sys_open and filp_open, vfs_read. But every time I get an 
>> error -2 (ENOENT). After looking at the description it says the file path 
>> does not exist or it is a broken link. The file path is definitely correct 
>> as when I am in putty after boot i can access the file. This makes me think 
>> that when fec.c runs it has not mounted any drives yet. Is there a way to 
>> mount the partitions myself. Or change when the sd card is mounted?
>>
>> 2. 
>> This seems like a better option anyways. But I do not no how to set the 
>> mac address.
>> Normally i would do:
>> ifconfig eth0 hw ether 02:01:02:03:04:08
>>
>> But it does not support the hw ether command.
>>
>> I also read I can change the /sys/class/net/eth0/address but I seem to 
>> only have read access and cant create files here.
>>
>> Is there another way to set the mac?
>> Do I need to include the complete ifconfig source into sbin?
>>
>> The command does not support the hw command do I need to import the 
>> libraries
>>
>

-- 
-- 
unsubscribe: android-kernel+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-kernel
--- 
You received this message because you are subscribed to the Google Groups 
"Android Linux Kernel Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-kernel+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to