Jump to content


Photo

One proc file for detecting the MACHINE in all enigma2 images.


  • Please log in to reply
772 replies to this topic

Re: One proc file for detecting the MACHINE in all enigma2 images. #501 Huevos

  • PLi® Contributor
  • 4,621 posts

+161
Excellent

Posted 12 December 2020 - 09:43

 

Also what is the reason for making the proc files writable?

It was read-only first then I changed it for https://forums.openp...dpost&p=1284210 but still with no luck, binary can't write to the proc file ...

 

The proc is 644 on the files system, but there is nothing in the .ko file to handle that.



Re: One proc file for detecting the MACHINE in all enigma2 images. #502 Huevos

  • PLi® Contributor
  • 4,621 posts

+161
Excellent

Posted 12 December 2020 - 11:47

So, obviously, we can't all have procs with file addresses that contain "openvision"... we need something universal.

So my suggestion is we have something like /proc/hardware/<whatever>


Edited by Huevos, 12 December 2020 - 11:48.


Re: One proc file for detecting the MACHINE in all enigma2 images. #503 Persian Prince

  • Senior Member
  • 1,982 posts

+247
Excellent

Posted 12 December 2020 - 14:05



Is that data available irrespective of the currently running kernel?

 

Yes it's the beauty of "modinfo" command ;)

 

So, obviously, we can't all have procs with file addresses that contain "openvision"... we need something universal.

So my suggestion is we have something like /proc/hardware/<whatever>

 

 
This is an example and final solution will have its naming.
 

 

 

Also what is the reason for making the proc files writable?

It was read-only first then I changed it for https://forums.openp...dpost&p=1284210 but still with no luck, binary can't write to the proc file ...

 

The proc is 644 on the files system, but there is nothing in the .ko file to handle that.

 

 

I changed it: https://github.com/O...rocfs_main.c#L3


Edited by Persian Prince, 12 December 2020 - 14:14.

Open Vision sources: https://github.com/OpenVisionE2


Re: One proc file for detecting the MACHINE in all enigma2 images. #504 Huevos

  • PLi® Contributor
  • 4,621 posts

+161
Excellent

Posted 12 December 2020 - 14:23

There needs to be concencous on the file naming.

Edited by Huevos, 12 December 2020 - 14:24.


Re: One proc file for detecting the MACHINE in all enigma2 images. #505 Huevos

  • PLi® Contributor
  • 4,621 posts

+161
Excellent

Posted 12 December 2020 - 14:35

And having each distro using different names is crazy.

Re: One proc file for detecting the MACHINE in all enigma2 images. #506 Persian Prince

  • Senior Member
  • 1,982 posts

+247
Excellent

Posted 12 December 2020 - 15:09

Naming isn't important now and we could go like https://forums.openp...20#entry1280873

If we all agreed this is the way, then we could make the final API in a standard way.

Open Vision sources: https://github.com/OpenVisionE2


Re: One proc file for detecting the MACHINE in all enigma2 images. #507 Abu Baniaz

  • PLi® Contributor
  • 2,494 posts

+64
Good

Posted 12 December 2020 - 15:24

"distro" cannot be in the filepath/directory name as that means there is no standard location. The location and names must be uniform across all images.

 

Use something universal and unlikely to be used by a manufacturer. Perhaps:  "enigma2proc", "e2proc", "e2imageproc". 



Re: One proc file for detecting the MACHINE in all enigma2 images. #508 Persian Prince

  • Senior Member
  • 1,982 posts

+247
Excellent

Posted 12 December 2020 - 16:21

Ok lets check what modinfo shows to you ;)

 

Copy these .ko files to your /tmp on your device and don't care which architecture you have.

 

Then:

cd /tmp
modinfo h9.ko
modinfo dm800se.ko

:)


Open Vision sources: https://github.com/OpenVisionE2


Re: One proc file for detecting the MACHINE in all enigma2 images. #509 Abu Baniaz

  • PLi® Contributor
  • 2,494 posts

+64
Good

Posted 12 December 2020 - 16:41

Ok lets check what modinfo shows to you ;)

 

Copy these .ko files to your /tmp on your device and don't care which architecture you have.

 

Then:

modinfo h9.ko
modinfo dm800se.ko

:)

Not every receiver has the fake driver files.

 

Please spell out your point instead of being suggestive as that can be open to misintepretation.


Edited by Abu Baniaz, 12 December 2020 - 16:54.


Re: One proc file for detecting the MACHINE in all enigma2 images. #510 Persian Prince

  • Senior Member
  • 1,982 posts

+247
Excellent

Posted 12 December 2020 - 16:57

Ok lets check what modinfo shows to you ;)

 

Copy these .ko files to your /tmp on your device and don't care which architecture you have.

 

Then:

cd /tmp
modinfo h9.ko
modinfo dm800se.ko

:)

Forgot to attach the zip, sorry.


Open Vision sources: https://github.com/OpenVisionE2


Re: One proc file for detecting the MACHINE in all enigma2 images. #511 IanSav

  • PLi® Contributor
  • 1,491 posts

+51
Good

Posted 12 December 2020 - 17:04

Hi Persian Prince,

 

Here are the results of running this on my GigaBlue UHD UE 4K box.

> modinfo h9.ko
filename:       /tmp/h9.ko
version:        10.2-r291
description:    Open Vision information module
model=h9
brand=airdigital
platform=zgemmahisi3798mv200
visionversion=10.2
visionrevision=r291
visionlanguage=extralanguage
developername=persianpros
feedsurl=http://openvision/feeds/openvision-develop
distro=openvision
oe=master
kernel=4.4.35
python=2.7.18
mediaservice=enigma2-plugin-systemplugins-servicehisilicon
multilib=False
architecture=cortexa15hf-neon-vfpv4
socfamily=hisi3798mv200
blindscanbinary=blindscan
rctype=28
rcname=zgemma6
rcidnum=1
smallflash=False
middleflash=False
imagedir=h9
imagefs= ubi
mtdbootfs=
mtdrootfs=mtd7
mtdkernel=mtd6
rootfile=rootfs.ubi
kernelfile=uImage
mkubifs=-m 2048 -e 126976 -c 8192
ubinize=-m 2048 -p 128KiB
forcemode=no
author:         Open Vision developers
license:        GPL
srcversion:     4B05490988D85BCF31590A3
depends:
vermagic:       4.4.35 SMP mod_unload ARMv7 p2v8
> modinfo dm800se.ko
filename:       /tmp/dm800se.ko
version:        7.5-r221
description:    Open Vision information module
model=dm800se
brand=dreambox
platform=dm1gen
visionversion=7.5
visionrevision=r221
visionlanguage=english
developername=persianpros
feedsurl=http://openvision/feeds/openvision-develop
distro=openvision
oe=pyro
kernel=3.2
python=2.7.13
mediaservice=enigma2-plugin-systemplugins-servicemp3
multilib=False
architecture=mips32el
socfamily=bcm7405
blindscanbinary=blindscan
rctype=0
rcname=dmm1
rcidnum=2
smallflash=True
middleflash=True
imagedir=dm800se
imagefs=jffs2
mtdbootfs=
mtdrootfs=
mtdkernel=mtd2
rootfile=
kernelfile=
mkubifs=-m 512 -e 15KiB -c 3798 -x favor_lzo -X 1 -F -j 4MiB
ubinize=-m 512 -p 16KiB -s 512
forcemode=no
author:         Open Vision developers
license:        GPL
srcversion:     DD4E4310E9ADC9FCC724DA2
depends:
vermagic:       3.2-dm800se SMP mod_unload MIPS32_R1 32BIT

Regards,

Ian.



Re: One proc file for detecting the MACHINE in all enigma2 images. #512 Persian Prince

  • Senior Member
  • 1,982 posts

+247
Excellent

Posted 12 December 2020 - 17:06

Great!

 

Now we could read what's needed from a parent image even if the architecture is different ;)

 

Static data, compiled .ko file so no code change is possible :D


Open Vision sources: https://github.com/OpenVisionE2


Re: One proc file for detecting the MACHINE in all enigma2 images. #513 Huevos

  • PLi® Contributor
  • 4,621 posts

+161
Excellent

Posted 12 December 2020 - 18:29

 

Ok lets check what modinfo shows to you ;)

 

Copy these .ko files to your /tmp on your device and don't care which architecture you have.

 

Then:

modinfo h9.ko
modinfo dm800se.ko

:)

Not every receiver has the fake driver files.

 

Please spell out your point instead of being suggestive as that can be open to misintepretation.

 

There are no fake drivers. The point was you can put the file anywhere and run "modinfo /the/file/location" and it returns anything that is here:

MODULE_AUTHOR("Open Vision developers");
MODULE_DESCRIPTION("Open Vision information");

Edited by Huevos, 12 December 2020 - 18:31.


Re: One proc file for detecting the MACHINE in all enigma2 images. #514 Huevos

  • PLi® Contributor
  • 4,621 posts

+161
Excellent

Posted 12 December 2020 - 18:33

"distro" cannot be in the filepath/directory name as that means there is no standard location. The location and names must be uniform across all images.

 

Use something universal and unlikely to be used by a manufacturer. Perhaps:  "enigma2proc", "e2proc", "e2imageproc". 

What is wrong with "hardware". And why would you want "proc" in the name at all? It is obvious it is a proc because it is in the proc file system. And also "enigma2" is firmware. This outputs hardware info.


Edited by Huevos, 12 December 2020 - 18:35.


Re: One proc file for detecting the MACHINE in all enigma2 images. #515 Huevos

  • PLi® Contributor
  • 4,621 posts

+161
Excellent

Posted 12 December 2020 - 19:04

Great!

 

Now we could read what's needed from a parent image even if the architecture is different ;)

 

Static data, compiled .ko file so no code change is possible :D

And if we are to do that the ".ko" can't be named "openvision.ko". Has to be the same name on all distros.



Re: One proc file for detecting the MACHINE in all enigma2 images. #516 Persian Prince

  • Senior Member
  • 1,982 posts

+247
Excellent

Posted 12 December 2020 - 19:23

I know that for sure.

 

Guys these are just samples and what we (Open Vision) use, the final naming would be a group decision.

 

I think I wrote this in each page ...


Open Vision sources: https://github.com/OpenVisionE2


Re: One proc file for detecting the MACHINE in all enigma2 images. #517 Abu Baniaz

  • PLi® Contributor
  • 2,494 posts

+64
Good

Posted 12 December 2020 - 20:38

 

"distro" cannot be in the filepath/directory name as that means there is no standard location. The location and names must be uniform across all images.

 

Use something universal and unlikely to be used by a manufacturer. Perhaps:  "enigma2proc", "e2proc", "e2imageproc". 

What is wrong with "hardware". And why would you want "proc" in the name at all? It is obvious it is a proc because it is in the proc file system. And also "enigma2" is firmware. This outputs hardware info.

 

 

The data is being added by an Enigma2 distro build process ( hopefully agreed by everyone), nothing intrinsic with the hardware (by manufacturer).

 


There are no fake drivers.

As if some manufacturers do not put a fake box model in the drivers!

 

ROFL



Re: One proc file for detecting the MACHINE in all enigma2 images. #518 IanSav

  • PLi® Contributor
  • 1,491 posts

+51
Good

Posted 12 December 2020 - 20:40

Hi,

 

I think what Persian Prince is trying to suggest is the solution to the information problem.  The name was not high on his considerations (yet).  His test code was probably called called "openvision.ko" because he is a developer on OpenVision.  If it makes it easier for you to digest let's assume that the code will be called "enigma2.ko" and it will always be located in ""/lib/modules/kernelversion/kernel/drivers/".  Thus any code in any image that wants to know about any image in any slot simply needs to find "/lib/modules/kernelversion/kernel/drivers/enigma2.ko".

 

Regards,

Ian.



Re: One proc file for detecting the MACHINE in all enigma2 images. #519 Abu Baniaz

  • PLi® Contributor
  • 2,494 posts

+64
Good

Posted 12 December 2020 - 20:55

If the proc file is going to be used for detecting hardware, it should just contain hardware specific data.

The distro data should be in another file.

 


"/lib/modules/kernelversion/kernel/drivers/". 

IMO, you cannot use this location because it is not a static path. The receivers have different kernel versions.


Edited by Abu Baniaz, 12 December 2020 - 20:56.


Re: One proc file for detecting the MACHINE in all enigma2 images. #520 Abu Baniaz

  • PLi® Contributor
  • 2,494 posts

+64
Good

Posted 12 December 2020 - 21:27

How about?

 

/proc/hardware_data.ko

(for hardware data that distros put there)

 

/proc/enigma2_data.ko

(for enigma data, distro name, type, version, url, build data etc. Several images already use /etc/image-version)


Edited by Abu Baniaz, 12 December 2020 - 21:29.



18 user(s) are reading this topic

0 members, 18 guests, 0 anonymous users