diff options
| -rw-r--r-- | documentation/poky-ref-manual/extendpoky.xml | 120 |
1 files changed, 120 insertions, 0 deletions
diff --git a/documentation/poky-ref-manual/extendpoky.xml b/documentation/poky-ref-manual/extendpoky.xml index ebd9804431..1f14d7c9b0 100644 --- a/documentation/poky-ref-manual/extendpoky.xml +++ b/documentation/poky-ref-manual/extendpoky.xml | |||
| @@ -1072,6 +1072,126 @@ | |||
| 1072 | </para> | 1072 | </para> |
| 1073 | </section> | 1073 | </section> |
| 1074 | 1074 | ||
| 1075 | <section id="building-multiple-architecture-libraries-into-one-image"> | ||
| 1076 | <title>Building Multiple Architecture Libraries into One Image</title> | ||
| 1077 | |||
| 1078 | <para> | ||
| 1079 | By taking steps you can create a single image that contains more than | ||
| 1080 | one library for different architectures. | ||
| 1081 | This feature is called "Multilib". | ||
| 1082 | This section overviews the process only. | ||
| 1083 | For more detail on how to implement this feature, see the | ||
| 1084 | <ulink url='https://wiki.yoctoproject.org/wiki/Multilib'>Multilib</ulink> wiki | ||
| 1085 | page. | ||
| 1086 | </para> | ||
| 1087 | |||
| 1088 | <section id='preparing-to-use-multilib'> | ||
| 1089 | <title>Preparing to use Multilib</title> | ||
| 1090 | |||
| 1091 | <para> | ||
| 1092 | In order to implement Multilib, you need to prepare your recipes and packages as | ||
| 1093 | follows: | ||
| 1094 | <itemizedlist> | ||
| 1095 | <listitem><para>Use the <filename>BBCLASSEXTEND</filename> variable to enable | ||
| 1096 | a recipe for Multilib. | ||
| 1097 | See the <filename>meta/conf/multilib.conf</filename> configuration file | ||
| 1098 | in the Yocto Project Files directory to see how this variable is used. | ||
| 1099 | </para></listitem> | ||
| 1100 | <listitem><para>Define a global variable <filename>${MLPREFIX}</filename> | ||
| 1101 | to specify the libraries (e.g. "<filename>lib32-'</filename>" or | ||
| 1102 | "<filename>lib64-</filename>").</para></listitem> | ||
| 1103 | <listitem><para>Rename your recipe to be <filename>${MLPREFIX}${PN}</filename>. | ||
| 1104 | </para></listitem> | ||
| 1105 | <listitem><para>For any recipe that uses Multilib and specifies lists of | ||
| 1106 | recipes or packages with variables such as <filename>DEPENDS</filename>, | ||
| 1107 | <filename>RDEPENDS</filename>, | ||
| 1108 | <filename>RPROVIDES</filename>, <filename>RRECOMMENDS</filename>, | ||
| 1109 | <filename>PACKAGES</filename>, <filename>PACKAGES_DYNAMIC</filename>, | ||
| 1110 | map those recipes or packages with <filename>${MLPREFIX}</filename>. | ||
| 1111 | </para></listitem> | ||
| 1112 | </itemizedlist> | ||
| 1113 | </para> | ||
| 1114 | |||
| 1115 | <para> | ||
| 1116 | Next, be sure that the correct cross-toolchain parameters are used | ||
| 1117 | by setting <filename>DEFAULTTUNE_virtclass-multilib-xxx</filename> | ||
| 1118 | in the <filename>local.conf</filename> configuration file in the | ||
| 1119 | Yocto Project build directory. | ||
| 1120 | </para> | ||
| 1121 | |||
| 1122 | <para> | ||
| 1123 | If you are using the RPM Package Management System, you need to consider the | ||
| 1124 | following: | ||
| 1125 | <itemizedlist> | ||
| 1126 | <listitem><para>Define the unique architecure for the Multilib packages, along with | ||
| 1127 | creating a unique deploy folder under <filename>tmp/deploy/rpm</filename> in | ||
| 1128 | the Yocto Project build directory. | ||
| 1129 | For example, consider <filename>lib32</filename> in a | ||
| 1130 | <filename>qemux86-64</filename> image. | ||
| 1131 | The possible architectures in the system are "all", "qemux86_64", "lib32_qemux86_64", | ||
| 1132 | and "lib32_x86".</para></listitem> | ||
| 1133 | <listitem><para>Because the <filename>${MLPREFIX}</filename> is stripped from | ||
| 1134 | <filename>${PN}</filename> during RPM packaging, the naming for a normal | ||
| 1135 | RPM package and a Multilib RPM package in a <filename>qemux86-64</filename> | ||
| 1136 | system resolves to something similar to <filename>bash-4.1-r2.x86_64.rpm</filename> and | ||
| 1137 | <filename>bash-4.1.r2.lib32_x86.rpm</filename>, respectively.</para></listitem> | ||
| 1138 | <listitem><para>When installing a Multilib image, the RPM backend first installs | ||
| 1139 | the base image and then installs the Multilib libraries.</para></listitem> | ||
| 1140 | </itemizedlist> | ||
| 1141 | </para> | ||
| 1142 | |||
| 1143 | <para> | ||
| 1144 | If you are using the IPK Package Management System, you need to consider the | ||
| 1145 | following: | ||
| 1146 | <itemizedlist> | ||
| 1147 | <listitem><para><filename>${MLPREFIX}</filename> is not stripped from | ||
| 1148 | <filename>${PN}</filename> during IPK packaging, the naming for a normal | ||
| 1149 | RPM package and a Multilib IPK package in a <filename>qemux86-64</filename> | ||
| 1150 | system resolves to something like <filename>bash_4.1-r2.x86_64.ipk</filename> and | ||
| 1151 | <filename>lib32-bash_4.1-rw_x86.ipk</filename>, respectively.</para></listitem> | ||
| 1152 | <listitem><para>The IPK deploy folder is not modified with | ||
| 1153 | <filename>${MLPREFIX}</filename> because packages with and without | ||
| 1154 | the Multilib feature can exist in the same folder due to the | ||
| 1155 | <filename>${PN}</filename> differences.</para></listitem> | ||
| 1156 | <listitem><para>IPK defines a sanity check for Multilib installation using certain | ||
| 1157 | rules for file comparison, overridden, etc.</para></listitem> | ||
| 1158 | </itemizedlist> | ||
| 1159 | </para> | ||
| 1160 | </section> | ||
| 1161 | |||
| 1162 | <section id='using-multilib'> | ||
| 1163 | <title>Using Multilib</title> | ||
| 1164 | |||
| 1165 | <para> | ||
| 1166 | After you have set up the recipies and configurations to use the Multilib feature, | ||
| 1167 | you are ready to build the image. | ||
| 1168 | Follow these steps: | ||
| 1169 | <orderedlist> | ||
| 1170 | <listitem><para>Make changes in your <filename>local.conf</filename> | ||
| 1171 | configuration file in the Yocto Project build directory. | ||
| 1172 | Here is an example: | ||
| 1173 | <literallayout class='monospaced'> | ||
| 1174 | MULTILIB_IMAGE(INSTALL = "lib32-connman" | ||
| 1175 | require conf/multilib.con | ||
| 1176 | MULTILIBS = "multilib:lib32" | ||
| 1177 | DEFAULTTUNE_virtclass-multilib-lib32 = "x86" | ||
| 1178 | </literallayout></para></listitem> | ||
| 1179 | <listitem><para>Build the image using the BitBake command. | ||
| 1180 | For example: | ||
| 1181 | <literallayout class='monospaced'> | ||
| 1182 | $ bitbake core-image-sato | ||
| 1183 | </literallayout> | ||
| 1184 | If you want to build a particular recipe only, | ||
| 1185 | use the BitBake command and specify the recipe only. | ||
| 1186 | For example: | ||
| 1187 | <literallayout class='monospaced'> | ||
| 1188 | $ bitbake lib32-connman | ||
| 1189 | </literallayout></para></listitem> | ||
| 1190 | </orderedlist> | ||
| 1191 | </para> | ||
| 1192 | </section> | ||
| 1193 | </section> | ||
| 1194 | |||
| 1075 | <section id="usingpoky-configuring-LIC_FILES_CHKSUM"> | 1195 | <section id="usingpoky-configuring-LIC_FILES_CHKSUM"> |
| 1076 | <title>Tracking License Changes</title> | 1196 | <title>Tracking License Changes</title> |
| 1077 | 1197 | ||
