[oe] image.bbclass IMAGE_DEVICE_TABLES issues

Khem Raj raj.khem at gmail.com
Fri Jun 18 22:17:51 UTC 2010


On Wed, Jun 16, 2010 at 5:27 AM, Frans Meulenbroeks
<fransmeulenbroeks at gmail.com> wrote:
> Hi,
>
> I am having an issue or two with image.bbclass and especially the
> devtable section.
>
> It concers the following part:
>
> # Get a list of files containing tables of devices to be created.
> # * IMAGE_DEVICE_TABLE is the old name to an absolute path to a device
> table file
> # * IMAGE_DEVICE_TABLES is a new name for a file, or list of files, searched
> #   for in the BBPATH
> # If neither are specified then the default name of
> files/device_table-minimal.txt
> # is searched for in the BBPATH (same as the old version.)
> #
> def get_devtable_list(d):
>    import bb
>    devtable = bb.data.getVar('IMAGE_DEVICE_TABLE', d, 1)
>    if devtable != None:
>        return devtable
>    devtables = bb.data.getVar('IMAGE_DEVICE_TABLES', d, 1)
>    if devtables == None:
>        devtables = 'files/device_table-minimal.txt'
>    return " ".join([ bb.which(bb.data.getVar('BBPATH', d, 1), devtable)
>                      for devtable in devtables.split() ])
>
> The issues I have are the following:
> 1. if the file is not there an empty list is returned and used without
> any error being given.
> In case of the default name that is probably ok, but if there is an
> explicit IMAGE_DEVICE_TABLE or IMAGE_DEVICE_TABLES given and the file
> is not there I would qualify the situation as an error.
> Guess it would be very convenient to have an error message in that case.

add a bbnote or somesuch after line 126 in image.bbclass after check
the existence of $devtable

> 2. According to the comment for IMAGE_DEVICE_TABLES (and for the
> default name) the file is searched for in BBPATH. For me BBPATH points
> to an overlay dir with below it recipes/myimage/myimage.bb
> The code does join the names but (at least with my limited python
> knowledge) does not look into subdirs. This is experimentally
> verified.

it looks in BBPATH/<the path given by you>/<table given by you>.txt

> I feel it is more appropriate to have the device table near the bb
> file (e.g. in recipes/myimage/mydevicetable.txt)

devtable is a machine property not image property.

> currently I have to either specify a path in IMAGE_DEVICE_TABLES
> (which I don't like because it makes the recipe dependent of the
> actual place in the tree, so it is not robust to moving it), or have
> the device table on the level of recipes (which I do not like either
> as it is not near the recipe).

its relative to BBPATH I don't see any relation between bb file and
device table

> My suggestion would be to look in the dir of the recipe or in ${WORKDIR}
>
> What do people think about this?
> I'm not really a python wiz, so if someone can contribute a patch that
> would be greatly appreciated.
>
> Frans
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>




More information about the Openembedded-devel mailing list