[OpenWrt-Devel] write/read from mtd ART partition
John kerry
kerry9842 at gmail.com
Tue Feb 16 08:10:32 EST 2016
Hi,
Sorry for the previous email, The MAC address got changed.
Could you please help me to write the serial number also.
Actually i have enabled the ART2 also for the calibration.
So how i can write the MAC, Serial number (15 Digits) without overwriting
on calibration data.
Thanks,
John
On Tue, Feb 16, 2016 at 8:44 PM, John kerry <kerry9842 at gmail.com> wrote:
> Hi,
>
> Thank you so much for reply.
>
> The offset for the mac address is as below:
> Ethernet MAC address is saved in art partition with offset 0
> WiFi device calibration data is saved in art partition with offset 0x1000
>
> As you mentioned above: I have tried the below command but the mac address
> is not changed
>
> root at ST-MA_WIFI:/# dd if=/dev/mtd5 of=/tmp/art.img
> 128+0 records in
> 128+0 records out
> root at ST-MA_WIFI:/# printf "\x00\x26\x75\x96\x22\x33" | dd conv=notrunc
> of=/tmp/a
> rt.img bs=1 seek=$((0x0))
> 6+0 records in
> 6+0 records out
> root at ST-MA_WIFI:/# mtd write /tmp/art.img art
> Unlocking art ...
>
> Writing from /tmp/art.img to art ...
>
> Thanks,
> John
>
>
>
> On Tue, Feb 16, 2016 at 7:23 PM, <micke.prag at telldus.se> wrote:
>
>> 2016-02-16 11:43 skrev John kerry:
>>
>> Hi
>>>
>>> I am trying to write mac address and Serial number in ART partition.
>>>
>>> Creating 6 MTD partitions on "spi0.0":
>>> 0x000000000000-0x000000040000 : "u-boot"
>>> 0x000000040000-0x000000050000 : "u-boot-env"
>>> 0x000000050000-0x000000680000 : "rootfs"
>>> mtd: partition "rootfs" set to be root filesystem
>>> mtd: partition "rootfs_data" created automatically, ofs=5B0000, len=D0000
>>> 0x0000005b0000-0x000000680000 : "rootfs_data"
>>> 0x000000680000-0x0000007f0000 : "kernel"
>>> 0x0000007f0000-0x000000800000 : "art"
>>> 0x000000050000-0x0000007e0000 : "firmware"
>>>
>>> cat /proc/mtd
>>> dev: size erasesize name
>>> mtd0: 00040000 00010000 "u-boot"
>>> mtd1: 00010000 00010000 "u-boot-env"
>>> mtd2: 00630000 00010000 "rootfs"
>>> mtd3: 000d0000 00010000 "rootfs_data"
>>> mtd4: 00170000 00010000 "kernel"
>>> mtd5: 00010000 00010000 "art"
>>> mtd6: 00790000 00010000 "firmware"
>>>
>>> Could anyone help me to write wifi mac address and Serial number to ART
>>> partition without overwriting on calibration data.
>>>
>>> Thanks, John
>>>
>>> _______________________________________________
>>> openwrt-devel mailing list
>>> openwrt-devel at lists.openwrt.org
>>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel [1]
>>>
>>
>> You may modify these three lines for your application. You need to alter
>> the offset for the mac address:
>>
>> dd if=/dev/mtd5 of=/tmp/art.img
>> printf "\xAA\xBB\xCC\xDD\xEE\xFF" | dd conv=notrunc of=/tmp/art.img bs=1
>> seek=$((0x10))
>> mtd write /tmp/art.img art
>>
>> _______________________________________________
>> openwrt-devel mailing list
>> openwrt-devel at lists.openwrt.org
>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20160216/183a989e/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list