Jump to content

Hardware line is missing on /proc/cpuinfo


Ahmet Cihat Holta

Recommended Posts

Hi all,

 

I have a OrangePi Zero 2 Plus - H5 and installed Armbian buut when i build WiringOP it gives hardware line is missin message. I think so /proc/cpuinfo file is creating by armbian when bord is booting and lines contains all cpu informations.  How can i fix the issue? There is any idea?

 

Thanks in advance.

Link to comment
Share on other sites

42 minutes ago, zador.blood.stained said:

userspace libraries should use other ways to detect SoC and board model at runtime.

 

As already suggested to @Larry Bank for his ArmbianIO project a while ago: eg. checking for existence of /proc/device-tree/model and reading the string from there. The DT node exists for a reason.

Link to comment
Share on other sites

1 hour ago, tkaiser said:

As already suggested to @Larry Bank for his ArmbianIO project a while ago: eg. checking for existence of /proc/device-tree/model and reading the string from there. The DT node exists for a reason.

Or, as I suggested before, read /proc/device-tree/compatible (null-separated array) which contains both the board name and SoC name, so even if the library doesn't support a new board it can at least support SoC specific pin map.

Link to comment
Share on other sites

1 hour ago, zador.blood.stained said:

Or, as I suggested before, read /proc/device-tree/compatible (null-separated array) which contains both the board name and SoC name, so even if the library doesn't support a new board it can at least support SoC specific pin map.

There is no "SoC specific pin map". The SoC info is not enough to know the pin map because it's completely arbitrary and up to the board manufacturer. The 40-pin header on the NanoPi boards use different GPIO ports from the 40-pin header on OrangePi boards.

Link to comment
Share on other sites

2 minutes ago, zador.blood.stained said:

There is no pin header map but you can still access pins by their port bank and number in the bank, i.e. PA10, PC3, PD6 on Allwinner devices.

That misses the point of ArmbianIO. The purpose of it is that when you connect your device to pin X (e.g. 1-40) on the GPIO header, you reference X in your code and don't have to deal with the specifics of each SoC/board. The only way to accomplish that is to have a specific pin map for each board and properly identify the board. I recently added a new option that lets you manually specify the board by name if it doesn't see the machine.id.

Link to comment
Share on other sites

A dirty hack to make it working in orangepi PC2 immediately :

 

Edit the file WiringOP/wiringPi/wiringPi.c (https://github.com/tumugin/WiringOP), change the function isH5(void) to :

int isH5(void)
{
	return 1;
}

then "sudo ./build".

 

I don't know C language, so there is no better way for me.

 

 

Edit : I have verified the following is working, other pins/functions are not tested :

## Tested with LED + resistor across physical pin 1 (3.3V) and pin 7
PORT=7		

gpio mode $PORT out
gpio write $PORT 0;		## LED on
gpio write $PORT 1;		## LED off

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines