* jinzhcheng <[email protected]> [05.07.2013 20:58]:
> I try to modify mach-tl-wr703n.c:
> static void __init tl_wr703n_setup(void)
> {
>         u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00);
>         u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
> 
>         printk("%s\n", __func__);
> // set mac test, will be set same in /etc/config/wireless
>         *mac = 0x84;
>         *(mac+1) = 0x5d;
>         *(mac+2) = 0xd8;
>         *(mac+3) = 0x0;
>         *(mac+4) = 0x31;
>         *(mac+5) = 0x88;
>         /* disable PHY_SWAP and PHY_ADDR_SWAP bits *
> ..... ...
> but i can't modify the content of 0x1f01fc00 which is in uboot partition 
> region
> and I try to write /dev/mtd0 in userspace, but it failed too.
> If any methods to modify mac?

you can configure this via uci:

option macaddr ...

if you want to write to mtd0, you must modify e.g.:
/openwrt/build_dir/target-mips_r2_uClibc-0.9.33.2/linux-ar71xx_generic/linux-3.8.13/drivers/mtd/tplinkpart.c

and comment/remove the line:
parts[0].mask_flags = MTD_WRITEABLE;

recompile and you can do:
mtd write /tmp/myuboot.bin u-boot

bye, bastian
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to