Linux - Embedded & Single-board computerThis forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I tried to find MAC address string in raw memory dump, by viewing dump content in HEX editor, but it looks that dump does not contain any useful details. Can anyone point me in the right direction for this?
In general, I want to find offset address for MAC address in memory address space. Debugging has a few commands that use memory address space to read or write data. But any instructions on how to find that registers in memory address space is completely missing. Is there programming way to to find that offset? If MAC address is hard code into the NVRAM, possibly there is way to find an offset.
In general, I want to find offset address for MAC address in memory address space. Debugging has a few commands that use memory address space to read or write data. But any instructions on how to find that registers in memory address space is completely missing.
Instructions are missing where? Which program do you use to find the MAC address?
Quote:
Is there programming way to to find that offset? If MAC address is hard code into the NVRAM, possibly there is way to find an offset.
If you know the MAC address, a C program to find it is almost trivial, as long as you have a way to access the NVRAM from C.
Can't you just write the NVRAM content to a file and use the xd command and vi to find the offset of your MAC address?
It's limited Busybox shell on embedded system, no access to nvram from C.
Command usage:
Code:
macread - <offset address from 0x90000000> Read from MAC register.
macwrite - <val> <offset address from 0x90000000> Write to MAC register.
So I need to know the register numbers.
Your original post contains a screenshot of what looks like a hexdump of NOVRAM. So you are able to look at NOVRAM content. Can this tool copy the dump to a file? If yes, you can use vi or any other editor to search for the MAC address in the dump.
I copied the raw memory dump and save it to a file, but I can't find Mac address there. Also, I'm not sure that MAC is stored on NVRAM, it can be hard coded in config file or other file within /usr/sbin.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.