Transcript: from git checkout to qemu desktop: Difference between revisions
No edit summary |
No edit summary |
||
Line 131: | Line 131: | ||
Since this is your first build, it won't matter - it will take awhile regardless, but for later builds, to avoid re-downloading all the packages again, you can point the DL_DIR variable in local conf to the downloads dir of a previous build. Continuing the session... | Since this is your first build, it won't matter - it will take awhile regardless, but for later builds, to avoid re-downloading all the packages again, you can point the DL_DIR variable in local conf to the downloads dir of a previous build. Continuing the session... | ||
trz@elmorro:/usr/local/dev/Yocto/build | trz@elmorro:/usr/local/dev/Yocto/build$ '''cd /usr/local/dev/Yocto''' | ||
trz@elmorro:/usr/local/dev/Yocto$ source | trz@elmorro:/usr/local/dev/Yocto$ '''source oe-init-build-env''' | ||
### Shell environment set up for | ### Shell environment set up for builds. ### | ||
You can now run 'bitbake <target>' | You can now run 'bitbake <target>' | ||
Common targets are: | Common targets are: | ||
core-image-minimal | |||
core-image-sato | |||
meta-toolchain | meta-toolchain | ||
meta-toolchain-sdk | meta-toolchain-sdk | ||
adt-installer | |||
meta-ide-support | |||
You can also run generated qemu images with a command like ' | You can also run generated qemu images with a command like 'runqemu qemux86' | ||
trz@elmorro:/usr/local/src/Yocto/build$ bitbake poky-image-sato | trz@elmorro:/usr/local/src/Yocto/build$ bitbake poky-image-sato |
Revision as of 04:49, 11 March 2012
Here's a cut-and-paste shell session showing one way to do a start-from-scratch git checkout and build, the end result being a sato desktop in a qemu session (commands also shown for that).
NOTE: this transcript was from a build done on a Ubuntu 10.04 system. Please see the 'Yocto Project Quickstart' for the packages required to be installed on the host system for building [1]
One thing to note with this example is that I'm checking out from poky/edison.
trz@elmorro:/usr/local/dev$ mkdir Yocto trz@elmorro:/usr/local/dev$ cd Yocto/ trz@elmorro:/usr/local/dev/Yocto$ git init Initialized empty Git repository in /usr/local/dev/Yocto/.git/ trz@elmorro:/usr/local/dev/Yocto$ git remote add yocto git://git.yoctoproject.org/poky.git trz@elmorro:/usr/local/dev/Yocto$ git remote update Fetching yocto remote: Counting objects: 134438, done. remote: Compressing objects: 100% (39702/39702), done. remote: Total 134438 (delta 93915), reused 131102 (delta 91225) Receiving objects: 100% (134438/134438), 75.48 MiB | 1.70 MiB/s, done. Resolving deltas: 100% (93915/93915), done. From git://git.yoctoproject.org/poky * [new branch] 1.1_M1 -> yocto/1.1_M1 * [new branch] 1.1_M2 -> yocto/1.1_M2 * [new branch] 1.1_M3 -> yocto/1.1_M3 * [new branch] 1.1_M4 -> yocto/1.1_M4 * [new branch] 1.2_M1 -> yocto/1.2_M1 * [new branch] 1.2_M2 -> yocto/1.2_M2 * [new branch] 1.2_M3 -> yocto/1.2_M3 * [new branch] bernard -> yocto/bernard * [new branch] blinky -> yocto/blinky * [new branch] clyde -> yocto/clyde * [new branch] edison -> yocto/edison * [new branch] elroy -> yocto/elroy * [new branch] green -> yocto/green * [new branch] laverne -> yocto/laverne * [new branch] master -> yocto/master * [new branch] pinky -> yocto/pinky * [new branch] purple -> yocto/purple * [new tag] 1.1_M1.final -> 1.1_M1.final * [new tag] 1.1_M2.final -> 1.1_M2.final * [new tag] 1.1_M2.rc3 -> 1.1_M2.rc3 * [new tag] 1.1_M3.final -> 1.1_M3.final * [new tag] 1.1_M3.rc3 -> 1.1_M3.rc3 * [new tag] 1.2_M1.final -> 1.2_M1.final * [new tag] 1.2_M1.rc2 -> 1.2_M1.rc2 * [new tag] 1.2_M2.final -> 1.2_M2.final * [new tag] 1.2_M2.rc1 -> 1.2_M2.rc1 * [new tag] 1.2_M3.rc1 -> 1.2_M3.rc1 * [new tag] bernard-5.0.2+docs -> bernard-5.0.2+docs * [new tag] pinky-3.1.2 -> pinky-3.1.2 From git://git.yoctoproject.org/poky * [new tag] 1.1_M1.rc1 -> 1.1_M1.rc1 * [new tag] 1.1_M1.rc2 -> 1.1_M1.rc2 * [new tag] 1.1_M2.rc1 -> 1.1_M2.rc1 * [new tag] 1.1_M2.rc2 -> 1.1_M2.rc2 * [new tag] 1.1_M3.rc2 -> 1.1_M3.rc2 * [new tag] 1.1_M4.rc2+ -> 1.1_M4.rc2+ * [new tag] 1.1_M4.rc3 -> 1.1_M4.rc3 * [new tag] 1.1_M4.rc4 -> 1.1_M4.rc4 * [new tag] 1.2_M1.rc1 -> 1.2_M1.rc1 * [new tag] bernard-1.0rc1 -> bernard-1.0rc1 * [new tag] bernard-5.0 -> bernard-5.0 * [new tag] bernard-5.0-alpha -> bernard-5.0-alpha * [new tag] bernard-5.0.1 -> bernard-5.0.1 * [new tag] bernard-5.0.2 -> bernard-5.0.2 * [new tag] bernard-5.0rc1 -> bernard-5.0rc1 * [new tag] bernard-5.0rc2 -> bernard-5.0rc2 * [new tag] edison-6.0 -> edison-6.0 * [new tag] laverne-4.0 -> laverne-4.0 * [new tag] laverne-4.0.1 -> laverne-4.0.1 * [new tag] m4 -> m4 * [new tag] purple-3.2 -> purple-3.2 * [new tag] purple-3.2.1 -> purple-3.2.1 trz@elmorro:/usr/local/dev/Yocto$ git checkout -b edison-cur yocto/edison Branch edison-cur set up to track remote branch edison from yocto. Switched to a new branch 'edison-cur' trz@elmorro:/usr/local/dev/Yocto$ ls bitbake LICENSE meta-demoapps meta-yocto README scripts documentation meta meta-skeleton oe-init-build-env README.hardware trz@elmorro:/usr/local/dev/Yocto$ source oe-init-build-env You had no conf/local.conf file. This configuration file has therefore been created for you with some default values. You may wish to edit it to use a different MACHINE (target hardware) or enable parallel build options to take advantage of multiple cores for example. See the file for more information as common configuration options are commented. The Yocto Project has extensive documentation about OE including a reference manual which can be found at: http://yoctoproject.org/documentation For more information about OpenEmbedded see their website: http://www.openembedded.org/ You had no conf/bblayers.conf file. The configuration file has been created for you with some default values. To add additional metadata layers into your configuration please add entries to this file. The Yocto Project has extensive documentation about OE including a reference manual which can be found at: http://yoctoproject.org/documentation For more information about OpenEmbedded see their website: http://www.openembedded.org/ ### Shell environment set up for builds. ### You can now run 'bitbake <target>' Common targets are: core-image-minimal core-image-sato meta-toolchain meta-toolchain-sdk adt-installer meta-ide-support You can also run generated qemu images with a command like 'runqemu qemux86' trz@elmorro:/usr/local/dev/Yocto/build$ cd conf trz@elmorro:/usr/local/dev/Yocto/build/conf$ ls bblayers.conf local.conf
Change only the following variables in local.conf, it makes the build go faster depending on how many CPUs you have. I have 4, with HT, so I'm changing my values to 8:
trz@elmorro:/usr/local/src/Yocto/build/conf$ emacs -nw local.conf BB_NUMBER_THREADS = "8" PARALLEL_MAKE = "-j 8"
Since this is your first build, it won't matter - it will take awhile regardless, but for later builds, to avoid re-downloading all the packages again, you can point the DL_DIR variable in local conf to the downloads dir of a previous build. Continuing the session...
trz@elmorro:/usr/local/dev/Yocto/build$ cd /usr/local/dev/Yocto trz@elmorro:/usr/local/dev/Yocto$ source oe-init-build-env ### Shell environment set up for builds. ### You can now run 'bitbake <target>' Common targets are: core-image-minimal core-image-sato meta-toolchain meta-toolchain-sdk adt-installer meta-ide-support You can also run generated qemu images with a command like 'runqemu qemux86' trz@elmorro:/usr/local/src/Yocto/build$ bitbake poky-image-sato Pseudo is not present but is required, building this first before the main build NOTE: Out of date cache found, rebuilding... Parsing recipes: 100% |#################################################################################################| Time: 00:00:52 Parsing of 783 .bb files complete (0 cached, 783 parsed). 991 targets, 11 skipped, 0 masked, 0 errors. OE Build Configuration: BB_VERSION = "1.11.0" METADATA_BRANCH = "bernard-cur" METADATA_REVISION = "8b6416db1e04af83ecdf57522240ac859d5d8031" TARGET_ARCH = "i586" TARGET_OS = "linux" MACHINE = "qemux86" DISTRO = "poky" DISTRO_VERSION = "1.0" TARGET_FPU = "" NOTE: Resolving any missing task queue dependencies NOTE: Preparing runqueue NOTE: Executing SetScene Tasks NOTE: Executing RunQueue Tasks NOTE: Running task 1 of 88 (ID: 21, /usr/local/src/Yocto/meta/recipes-devtools/quilt/quilt-native_0.48.bb, do_setscene) NOTE: Running task 2 of 88 (ID: 61, virtual:native:/usr/local/src/Yocto/meta/recipes-devtools/gnu-config/gnu-config_20080123.bb, do_setscene) NOTE: Running task 3 of 88 (ID: 77, /usr/local/src/Yocto/meta/recipes-devtools/m4/m4-native_1.4.15.bb, do_setscene) NOTE: Running task 4 of 88 (ID: 37, virtual:native:/usr/local/src/Yocto/meta/recipes-devtools/autoconf/autoconf_2.65.bb, do_setscene) NOTE: Running task 5 of 88 (ID: 45, virtual:native:/usr/local/src/Yocto/meta/recipes-devtools/automake/automake_1.11.1.bb, do_setscene) NOTE: Running task 6 of 88 (ID: 53, /usr/local/src/Yocto/meta/recipes-devtools/libtool/libtool-native_2.4.bb, do_setscene) NOTE: Running task 7 of 88 (ID: 85, virtual:native:/usr/local/src/Yocto/meta/recipes-devtools/tcltk/tcl_8.5.9.bb, do_setscene) NOTE: Running task 8 of 88 (ID: 69, virtual:native:/usr/local/src/Yocto/meta/recipes-core/gettext/gettext_0.17.bb, do_setscene) NOTE: package quilt-native-0.48-r0: task do_setscene: Started NOTE: package quilt-native-0.48-r0: task do_setscene: Succeeded NOTE: package m4-native-1.4.15-r0: task do_setscene: Started NOTE: package m4-native-1.4.15-r0: task do_setscene: Succeeded NOTE: Running task 9 of 88 (ID: 20, /usr/local/src/Yocto/meta/recipes-devtools/quilt/quilt-native_0.48.bb, do_fetch) NOTE: Running task 10 of 88 (ID: 76, /usr/local/src/Yocto/meta/recipes-devtools/m4/m4-native_1.4.15.bb, do_fetch) . . . NOTE: Running task 4960 of 4961 (ID: 9, /usr/local/src/Yocto/meta/recipes-sato/images/poky-image-sato.bb, do_rootfs) NOTE: package poky-image-sato-1.0-r0: task do_rootfs: Started NOTE: package poky-image-sato-1.0-r0: task do_rootfs: Succeeded NOTE: Running noexec task 4961 of 4961 (ID: 4, /usr/local/src/Yocto/meta/recipes-sato/images/poky-image-sato.bb, do_build) NOTE: Tasks Summary: Attempted 4961 tasks of which 4959 didn't need to be rerun and 0 failed. trz@elmorro:/usr/local/src/Yocto/build$ trz@elmorro:/usr/local/src/Yocto/build$ poky-qemu qemux86 Continuing with the following parameters: KERNEL: [/usr/local/src/Yocto/build/tmp/deploy/images/bzImage-qemux86.bin] ROOTFS: [/usr/local/src/Yocto/build/tmp/deploy/images/poky-image-sato-qemux86.ext3] FSTYPE: [ext3] Setting up tap interface under sudo [sudo] password for trz: Acquiring lockfile for tap0... Starting distccd... Running qemu... /usr/local/src/Yocto/build/tmp/sysroots/x86_64-linux/usr/bin/qemu -kernel /usr/local/src/Yocto/build/tmp/deploy/images/bzImage-qemux86.bin -net nic,vlan=0 -net tap,vlan=0,ifname=tap0,script=no,downscript=no -hda /usr/local/src/Yocto/build/tmp/deploy/images/poky-image-sato-qemux86.ext3 -show-cursor -usb -usbdevice wacom-tablet -vga vmware -enable-gl -no-reboot --append "vga=0 root=/dev/hda mem=128M ip=192.168.7.2::192.168.7.1:255.255.255.0 oprofile.timer=1 " vmsvga_value_write: guest runs Linux. Set 'tap0' nonpersistent Releasing lockfile of preconfigured tap device 'tap0' trz@elmorro:/usr/local/src/Yocto/build$