summaryrefslogtreecommitdiffstats
path: root/documentation/yocto-project-qs
diff options
context:
space:
mode:
authorScott Rifenbark <scott.m.rifenbark@intel.com>2015-04-14 14:31:01 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-04-15 15:57:18 +0100
commit65167a872d64ca49f180239e32e546dcfd0868af (patch)
tree711544a8b87eea5c23348a2982fda4da304dbbe0 /documentation/yocto-project-qs
parentd654160eb2ea03aabd77b4bbc7a202d4179bcca3 (diff)
downloadpoky-65167a872d64ca49f180239e32e546dcfd0868af.tar.gz
yocto-project-qs: Added MinnowBoard MAX example to "Super User"
(From yocto-docs rev: b7ef42f44757a81ca1084351e2866c8f0894083c) Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/yocto-project-qs')
-rw-r--r--documentation/yocto-project-qs/yocto-project-qs.xml419
1 files changed, 320 insertions, 99 deletions
diff --git a/documentation/yocto-project-qs/yocto-project-qs.xml b/documentation/yocto-project-qs/yocto-project-qs.xml
index e259a1eb24..9ab638a3d9 100644
--- a/documentation/yocto-project-qs/yocto-project-qs.xml
+++ b/documentation/yocto-project-qs/yocto-project-qs.xml
@@ -871,131 +871,352 @@
871</title> 871</title>
872 872
873 <para> 873 <para>
874 This section 874 This section provides minimal instruction for using the Yocto Project
875 <footnote> 875 to build an image for Beaglebone hardware and for building and
876 <para> 876 booting an image for the third-party
877 Kudos and thanks to Robert P. J. Day of 877 <ulink url='http://www.minnowboard.org/meet-minnowboard-max/'>MinnowBoard MAX</ulink>.
878 <ulink url='http://www.crashcourse.ca'>CrashCourse</ulink> for providing the basis 878 <note>
879 for this "expert" section with information from one of his 879 The steps used in this section were performed on a 64-bit
880 <ulink url='http://www.crashcourse.ca/wiki/index.php/Yocto_Project_Quick_Start'>wiki</ulink> 880 Ubuntu 14.10 system that has four cores.
881 pages. 881 </note>
882 </para>
883 </footnote>
884 gives you a minimal description of how to use the Yocto Project to build
885 images for Beaglebone hardware starting from scratch.
886 The steps were performed on a 64-bit Ubuntu 12.04 system that
887 has four cores.
888 </para> 882 </para>
889 883
890 <section id='getting-yocto'> 884 <section id='building-beaglebone-from-scratch'>
891 <title>Getting the Yocto Project</title> 885 <title>Building Beaglebone from Scratch</title>
892 886
893 <para> 887 <para>
894 Set up your 888 This section
895 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink> 889 <footnote>
896 by using Git to clone the <filename>poky</filename> 890 <para>
897 repository and then check out the release branch: 891 Kudos and thanks to Robert P. J. Day of
898 <literallayout class='monospaced'> 892 <ulink url='http://www.crashcourse.ca'>CrashCourse</ulink>
893 for providing the basis for this "expert" section with
894 information from one of his
895 <ulink url='http://www.crashcourse.ca/wiki/index.php/Yocto_Project_Quick_Start'>wiki</ulink>
896 pages.
897 </para>
898 </footnote>
899 gives you a minimal description of how to use the Yocto Project to
900 build images for Beaglebone hardware starting from scratch.
901 </para>
902
903 <section id='getting-yocto'>
904 <title>Getting the Yocto Project</title>
905
906 <para>
907 Set up your
908 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
909 by using Git to clone the <filename>poky</filename>
910 repository and then check out the release branch:
911 <literallayout class='monospaced'>
899 $ cd ~ 912 $ cd ~
900 $ git clone git://git.yoctoproject.org/poky 913 $ git clone git://git.yoctoproject.org/poky
901 $ cd poky 914 $ cd poky
902 $ git checkout -b &DISTRO_NAME; origin/&DISTRO_NAME; 915 $ git checkout -b &DISTRO_NAME; origin/&DISTRO_NAME;
903 </literallayout> 916 </literallayout>
904 </para> 917 </para>
905 </section> 918 </section>
906 919
907 <section id='setting-up-your-host'> 920 <section id='setting-up-your-host'>
908 <title>Setting Up Your Host</title> 921 <title>Setting Up Your Host</title>
909 922
910 <para> 923 <para>
911 You need some packages for everything to work. 924 You need some packages for everything to work.
912 Rather than duplicate them here, look at the 925 Rather than duplicate them here, look at the
913 "<link linkend='packages'>The Packages</link>" 926 "<link linkend='packages'>The Packages</link>"
914 section earlier in this quick start. 927 section earlier in this quick start.
915 </para> 928 </para>
916 </section> 929 </section>
917 930
918 <section id='initializing-the-build-environment'> 931 <section id='initializing-the-build-environment'>
919 <title>Initializing the Build Environment</title> 932 <title>Initializing the Build Environment</title>
920 933
921 <para> 934 <para>
922 From the root directory of your 935 From the root directory of your
923 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>, 936 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>,
924 initialize your environment and provide a meaningful 937 initialize your environment and provide a meaningful
925 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink> 938 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
926 name: 939 name:
927 <literallayout class='monospaced'> 940 <literallayout class='monospaced'>
928 $ source &OE_INIT_FILE; mybuilds 941 $ source &OE_INIT_FILE; mybuilds
929 </literallayout> 942 </literallayout>
930 At this point, the <filename>mybuilds</filename> directory has 943 At this point, the <filename>mybuilds</filename> directory has
931 been created for you and it is now your current working directory. 944 been created for you and it is now your current working directory.
932 If you do not provide your own directory name, 945 If you do not provide your own directory name,
933 it defaults to <filename>build</filename>, 946 it defaults to <filename>build</filename>,
934 which is inside the Source Directory. 947 which is inside the Source Directory.
935 </para> 948 </para>
936 </section> 949 </section>
937 950
938 <section id='configuring-the-local.conf-file'> 951 <section id='configuring-the-local.conf-file'>
939 <title>Configuring the local.conf File</title> 952 <title>Configuring the local.conf File</title>
940 953
941 <para> 954 <para>
942 Initializing the build environment creates a 955 Initializing the build environment creates a
943 <filename>conf/local.conf</filename> configuration file 956 <filename>conf/local.conf</filename> configuration file
944 in the Build Directory. 957 in the Build Directory.
945 You need to manually edit this file to specify the machine you 958 You need to manually edit this file to specify the machine you
946 are building: 959 are building:
947 <literallayout class='monospaced'> 960 <literallayout class='monospaced'>
948 MACHINE ?= "beaglebone" 961 MACHINE ?= "beaglebone"
949 </literallayout> 962 </literallayout>
950 </para> 963 </para>
951 964
952 <para> 965 <para>
953 A good deal that goes into a Yocto Project build is simply 966 A good deal that goes into a Yocto Project build is simply
954 downloading all of the source tarballs. 967 downloading all of the source tarballs.
955 Steps exist that can help you be more efficient with gathering 968 Steps exist that can help you be more efficient with gathering
956 source files. 969 source files.
957 For example, you can set up local mirrors that hold your 970 For example, you can set up local mirrors that hold your
958 source tarballs or you can pre-fetch all your source without 971 source tarballs or you can pre-fetch all your source without
959 initiating a build until later. 972 initiating a build until later.
960 For more information, see the 973 For more information, see the
961 "<ulink url='&YOCTO_DOCS_DEV_URL;#working-with-source-files'>Working with Source Files</ulink>" 974 "<ulink url='&YOCTO_DOCS_DEV_URL;#working-with-source-files'>Working with Source Files</ulink>"
962 section in the Yocto Project Development Manual. 975 section in the Yocto Project Development Manual.
963 </para> 976 </para>
964 </section> 977 </section>
965 978
966 <section id='building-the-image'> 979 <section id='building-the-image'>
967 <title>Building the Image</title> 980 <title>Building the Image</title>
968 981
969 <para> 982 <para>
970 At this point, you need to select an image to build for the 983 At this point, you need to select an image to build for the
971 Beaglebone hardware. 984 Beaglebone hardware.
972 If this is your first build using the Yocto Project, you should try 985 If this is your first build using the Yocto Project, you should
973 the smallest and simplest image: 986 try the smallest and simplest image:
974 <literallayout class='monospaced'> 987 <literallayout class='monospaced'>
975 $ bitbake core-image-minimal 988 $ bitbake core-image-minimal
976 </literallayout> 989 </literallayout>
977 Now you just wait for the build to finish. 990 Now you just wait for the build to finish.
978 </para> 991 </para>
979 992
980 <para> 993 <para>
981 By default, BitBake aborts when it encounters an error during 994 You might encounter various warning messages during the
982 the build. 995 build.
983 If you want to make sure the build continues even when BitBake 996 For example, if a source file fetch initially fails,
984 encounters an error, use this variation: 997 the OpenEmbedded build system notes that and attempts to
985 <literallayout class='monospaced'> 998 find the files using mirrors.
999 Another example could be values requested for but not
1000 found in the final kernel <filename>.config</filename>
1001 file.
1002 For information on configuration warnings, see the
1003 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#generating-configuration-files'>Generating Configuration Files</ulink>"
1004 section in the Yocto Project Linux Kernel Development Manual.
1005 </para>
1006
1007 <para>
1008 By default, BitBake aborts when it encounters an error during
1009 the build.
1010 If you want to make sure the build continues even when BitBake
1011 encounters an error, use this variation:
1012 <literallayout class='monospaced'>
986 $ bitbake -k core-image-minimal 1013 $ bitbake -k core-image-minimal
987 </literallayout> 1014 </literallayout>
988 </para> 1015 </para>
989 1016
990 <para> 1017 <para>
991 Once you have your image, you can take steps to load and boot it on 1018 Once you have your image, you can take steps to load and boot
992 the target hardware. 1019 it on the target hardware.
993 </para> 1020 </para>
1021
1022 <para>
1023 You can learn about BitBake in general by reading the
1024 <ulink url='&YOCTO_DOCS_BB_URL;'>BitBake User Manual</ulink>.
1025 </para>
1026 </section>
1027 </section>
1028
1029 <section id='building-and-booting-minnowboard-max'>
1030 <title>Building and Booting MinnowBoard MAX</title>
994 1031
995 <para> 1032 <para>
996 You can learn about BitBake in general by reading the 1033 As of the Yocto Project 1.6 release, the MinnowBoard MAX is
997 <ulink url='&YOCTO_DOCS_BB_URL;'>BitBake User Manual</ulink>. 1034 supported by the Yocto Project and the
1035 <filename>meta-intel</filename>
1036 <filename>intel-corei7-64</filename> and
1037 <filename>intel-core2-32</filename> Board Support Packages (BSPs).
1038 <note>
1039 The MinnowBoard MAX ships with 64-bit firmware.
1040 If you want to use the board in 32-bit mode, you must
1041 download the
1042 <ulink url='http://firmware.intel.com/projects/minnowboard-max'>32-bit firmware</ulink>.
1043 </note>
998 </para> 1044 </para>
1045
1046 <section id='mm-getting-yocto-and-meta-intel'>
1047 <title>Getting the Yocto Project and <filename>meta-intel</filename></title>
1048
1049 <para>
1050 Set up your
1051 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
1052 and the <filename>meta-intel</filename> layer
1053 by using Git to clone the <filename>poky</filename>
1054 and <filename>meta-intel</filename> repositories.
1055 These commands use the "&DISTRO_NAME;" branch:
1056 <literallayout class='monospaced'>
1057 $ cd ~
1058 $ mkdir source
1059 $ cd source
1060 $ git clone -b &DISTRO_NAME; git://git.yoctoproject.org/poky
1061 $ cd poky
1062 $ git clone -b &DISTRO_NAME; git://git.yoctoproject.org/meta-intel
1063 </literallayout>
1064 </para>
1065 </section>
1066
1067 <section id='mm-setting-up-your-host'>
1068 <title>Setting Up Your Host</title>
1069
1070 <para>
1071 You need some packages for everything to work.
1072 Rather than duplicate them here, look at the
1073 "<link linkend='packages'>The Packages</link>"
1074 section earlier in this quick start.
1075 </para>
1076 </section>
1077
1078 <section id='mm-initializing-the-build-environment'>
1079 <title>Initializing the Build Environment</title>
1080
1081 <para>
1082 From the root directory of your
1083 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>,
1084 initialize your environment by running the build environment
1085 initialization script:
1086 <literallayout class='monospaced'>
1087 $ source &OE_INIT_FILE;
1088 </literallayout>
1089 At this point, the <filename>build</filename> directory has
1090 been created for you and it is now your current working
1091 directory.
1092 </para>
1093 </section>
1094
1095 <section id='mm-configure-the-build'>
1096 <title>Configure the Build</title>
1097
1098 <para>
1099 To configure the build, you edit the
1100 <filename>bblayers.conf</filename> and
1101 <filename>local.conf</filename> files, both of which are
1102 located in the <filename>build/conf</filename> directory.
1103 </para>
1104
1105 <para>
1106 Here is a quick way to make the edits.
1107 The first command adds the <filename>meta-intel</filename>
1108 branch, which contains the <filename>intel-core*</filename>
1109 BSPs to the build.
1110 The second command selects the BSP by setting the
1111 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
1112 variable.
1113 <literallayout class='monospaced'>
1114 $ echo 'BBLAYERS += "~/source/poky/meta-intel"' >> conf/bblayers.conf
1115 $ echo 'MACHINE = "intel-corei7-64"' >> conf/local.conf
1116 </literallayout>
1117 <note><title>Notes</title>
1118 <para>
1119 If you want a 64-bit build, use the following:
1120 <literallayout class='monospaced'>
1121 $ echo 'MACHINE = "intel-corei7-64"' >> conf/local.conf
1122 </literallayout>
1123 </para>
1124
1125 <para>
1126 If you want 32-bit images, use the following:
1127 <literallayout class='monospaced'>
1128 $ echo 'MACHINE = "intel-core2-32"' >> conf/local.conf
1129 </literallayout>
1130 </para>
1131 </note>
1132 </para>
1133 </section>
1134
1135 <section id='mm-build-the-image'>
1136 <title>Build the Image</title>
1137
1138 <para>
1139 Use this command to build the minimal image for
1140 MinnowBoard MAX:
1141 <literallayout class='monospaced'>
1142 $ bitbake core-image-minimal
1143 </literallayout>
1144 Once the build completes, the resulting basic console image
1145 is located in the Build Directory here:
1146 <literallayout class='monospaced'>
1147 tmp/deploy/images/intel-corei7-64/core-image-minimal-intel-corei7-64.hddimg
1148 </literallayout>
1149 </para>
1150 </section>
1151
1152 <section id='mm-write-the-image'>
1153 <title>Write the Image</title>
1154
1155 <para>
1156 You can write the image to a USB key, SATA drive, or SD card
1157 by using the <filename>mkefidisk.sh</filename> script,
1158 which is included in the <filename>poky</filename>
1159 repository at <filename>scripts/contrib/mkefidisk.sh</filename>:
1160 <literallayout class='monospaced'>
1161 $ sudo $HOME/source/poky/scripts/contrib/mkefidisk.sh <replaceable>HOST_DEVICE</replaceable> \
1162 tmp/deploy/images/intel-corei7-64/core-image-minimal-intel-corei7-64.hddimg <replaceable>TARGET_DEVICE</replaceable>
1163 </literallayout>
1164 In the previous command, <replaceable>HOST_DEVICE</replaceable>
1165 is the device node on the build system (e.g.
1166 <filename>/dev/sdc</filename> or
1167 <filename>/dev/mmcblk0</filename>).
1168 <replaceable>TARGET_DEVICE</replaceable> is the name of the
1169 device as the MinnowBoard MAX sees it (e.g.
1170 <filename>/dev/sda</filename> or
1171 <filename>/dev/mmcblk0</filename>).
1172 </para>
1173 </section>
1174
1175 <section id='mm-boot-the-image'>
1176 <title>Boot the Image</title>
1177
1178 <para>
1179 With the boot device provisioned, you can insert the media into
1180 the MinnowBoard MAX and boot the hardware.
1181 The board should automatically detect the media and boot to
1182 the bootloader and subsequently the operating system.
1183 </para>
1184
1185 <para>
1186 If the board does not boot automatically, you can boot it
1187 manually from the EFI shell as follows:
1188 <literallayout class='monospaced'>
1189 Shell> connect -r
1190 Shell> map -r
1191 Shell> fs0:
1192 Shell> bootx64
1193 </literallayout>
1194 <note>
1195 For a 32-bit image use the following:
1196 <literallayout class='monospaced'>
1197 Shell> bootia32
1198 </literallayout>
1199 </note>
1200 </para>
1201 </section>
1202
1203 <section id='mm-next-steps'>
1204 <title>Next Steps</title>
1205
1206 <para>
1207 Now that you can build a basic image, you could experiment
1208 by building some other example images:
1209 <literallayout class='monospaced'>
1210 $ bitbake core-image-sato
1211 $ bitbake core-image-sato-sdk
1212 </literallayout>
1213 Another possibility is to experiment creating your own image
1214 recipes that add packages to suit your needs.
1215 For information on how to create recipes, see the
1216 "<ulink url='&YOCTO_DOCS_DEV_URL;#new-recipe-writing-a-new-recipe'>Writing a New Recipe</ulink>"
1217 section in the Yocto Project Development Manual.
1218 </para>
1219 </section>
999 </section> 1220 </section>
1000</section> 1221</section>
1001 1222