Using widgets to add structure to OpenEmbedded
Using Widgets to add structure to BitBake/OpenEmbedded.
The purpose of BitBake and OpenEmbedded is to create an image of a distribution which will run on a target machine.
One of the most challenging aspects of describing OpenEmbedded is defining where a specific type of information is
defined. By not clearly specifying where information is defined, the SPOT (single point of truth) principle is violated.
There is always a trade-off between flexibility and introducing structure into a system. In the case of BiteBake and OpenEmbedded, which solve a very specific problem, more is gained than lost by introducing structure.
Graphical toolkits do a very good job of exchanging flexibility for structure by using widgets. Everything is gtk+ is
a widget. Widgets have generic properties and methods which can easily be overridden. Widgets can contain other widgets.
Similarly, BitBake and OpenEmbedded can be broken down into a number of widgets. Each widget type represents a layer which define domain specific parameters and methods. Below is a possible widget hierarchy
1. Host Machine.
a. Set up build structure.
b. Native compiler.
2. Target Machine.
a. Target architecture.
b. Cross compiler.
c. Target specific device drivers.
3. Image
a. Target file system type.
b. Target root file system.
4. Distro
a. Features to include in distribution.
5. Tasks
a. Container which includes predefined sets of packages.
6. Packages
a. Individual software packages.
For flexibility, a widget can contain any widget of a lower type.
Interesting, because the conf parser is the same as the .bb parser, setting up such a widget based hierarchy would not involve any significant changes to bb or oe.
Bbclasses would define generic widgets.
Widgets are created by inheriting from the correct bbclass. Widget override generic functionality by setting variables and defining methods
Widgets can contain child widgets by including other bbfiles.
Does anyone see any obvious problem with such a system before I start testing it?
This type of structure would make the documentation much easier. It would also significantly reduce the OpenEmbedded learning curve.
Thanks
David Farning
Am 10.11.2007 um 20:19 schrieb David Farning:
Quoted 2 lines
Using Widgets to add structure to BitBake/OpenEmbedded.
Hmm, I fail a bit to see the point but instead of calling it widget why not call it by the real name? It is a object, everything are objects :)
But besides that I don't see any issue besides many people not knowing object orientated programming.
z.
Hello David,
Quoted 6 lines · David Farning
One of the most challenging aspects of describing OpenEmbedded is defining where a specific type of information is
defined. By not clearly specifying where information is defined, the SPOT (single point of truth) principle is violated.
Tthere are a lot of abstract objects in OpenEmbedded, some different only by subtleties.
Quoted 5 lines
There is always a trade-off between flexibility and introducing structure into a system. In the case of BiteBake and OpenEmbedded, which solve a very specific problem, more is gained than lost by introducing structure.
The structure is there. It takes a steep learning curve to see what the structure
is about.
Quoted 5 lines
Graphical toolkits do a very good job of exchanging flexibility for structure by using widgets. Everything is gtk+ is
a widget. Widgets have generic properties and methods which can easily be overridden. Widgets can contain other widgets.
Objects.
Do not introduce widgets into BB/OE, you are throwing in a whole new jargon that adds confusion, not structure!
Quoted 5 lines
Similarly, BitBake and OpenEmbedded can be broken down into a number of widgets. Each widget type represents a layer which define domain specific parameters and methods. Below is a possible widget hierarchy
Quoted 9 lines
1. Host Machine.
a. Set up build structure.
b. Native compiler.2. Target Machine.
a. Target architecture.
b. Cross compiler.
c. Target specific device drivers.
A cross-compiler belongs with a target machine? No, I don't buy that, too confusing.
A cross-compiler compiles on a certain architecture, for a certain architecture.
Quoted 6 lines
Does anyone see any obvious problem with such a system before I start testing it?
This type of structure would make the documentation much easier. It would also significantly reduce the OpenEmbedded learning curve.
Sorry, I disagree. It would add MPOC (multiple points of confusion).
What is needed is a unambiguous description of what we have now, with the sole purpose the smoothen the learning curve.
Regards,
Signature · 1 line
Leon