Im afraid reading the docs is the best way to fully grasp Yocto. The former is best practice, as you call that in Yocto regardless of the machine. For example if your MACHINE is m圆ul, invoking bitbake virtual/kernel is the same as bitbake linux-imx. Then in platform.txt you reference the some_board_specific_property property with this syntax:Īnd you get the value of that property that was defined in boards.txt for the currently selected board. What you need to do is set a proper MACHINE, and the bitbake will take care of the rest. In this example, 43 is a 32-bit integer, java is a string, 32L is a long 64-bit integer, etc. A simple expression in java has a type that can either be a primitive type or a reference type. Myboard2.some_board_specific_property=My Board 2 specific property value here An expression in Java is a series of operators, variables, and method calls constructed according to the syntax o the language for evaluating a single value. You can then define the properties differently from one board definition to another in boards.txt: myboard1.some_board_specific_property=My Board 1 specific property value here So let's say you have two boards defined in boards.txt: myboard1.name=My Board 1 The properties in boards.txt are set according to whether the board associated with the board ID that prefixes the property is selected. It's just that it's in boards.txt, not in platform.txt. However, there is a very powerful system for setting properties based on which board is selected. If you were to need something like this, you would do it in a separate script, then call that script from one of the recipes in platform.txt (note that you can have unlimited build hook recipes). There is no support for any conditional syntax in the platform properties format.
0 Comments
Leave a Reply. |