Project

General

Profile

How to get mityarm335x_factory_config from userspace?

Added by Agron S. about 1 month ago

How do I get the info of this struct from the userspace?

mityarm335x_factory_config

  • 64 struct mityarm335x_factory_config {
    65 u32 magic;
    66 u32 version;
    67 u8 mac6;
    68 u32 reserved;
    69 u32 spare;
    70 u32 serialnumber;
    71 char partnum32;
    72 };

*

It is defined in
/ arch / arm / mach-omap2 / mityarm335x.h

and it is used in
/ arch / arm / mach-omap2 / board-mityarm335x.c

However, I don't want to use the debugfs because I have trimmed down the OS image.

What I am mostly interested is to get the SOM model, NAND size and serial number.

How can I do that?

Thanks,
//Agron


Replies (3)

RE: How to get mityarm335x_factory_config from userspace? - Added by Michael Williamson about 1 month ago

If you don't want to use debugfs, you can try to read it from the sysfs eeprom file.

We have utility code as part of other MitySOM uBoot repositories that can be compiled to do this at the link below.

Please note I have not tested this code with the AM335x, but I believe it will work as we try to maintain compatibility of the factory configuration structure across our SOM products. Only open this file as read only, as corruption of the factory configuration data can result in the SOM not operating properly.

https://support.criticallink.com/gitweb/?p=u-boot-ti.git;a=tree;f=tools/factoryconfig;hb=f609ccf7370a2c2c988c401ad9c2d19b02df00b5

With regards,
Mike

RE: How to get mityarm335x_factory_config from userspace? - Added by Michael Williamson about 1 month ago

Just to follow up, you'll need to make sure the path to the eeprom file is correct in the code.

see this page:

https://support.criticallink.com/redmine/projects/armc8-platforms/wiki/Software_FAQs

RE: How to get mityarm335x_factory_config from userspace? - Added by Jonathan Cormier about 1 month ago

Also if you don't have the eeprom driver loaded, I can provide some quick shell scripts which extract the info using i2cget calls.

    (1-3/3)
    Go to top
    Add picture from clipboard (Maximum size: 1 GB)