Commit 895a8fa6 authored by Andres Gomez's avatar Andres Gomez Committed by Colin Walters

README updated

parent 63b8f371
...@@ -3,8 +3,8 @@ Overview ...@@ -3,8 +3,8 @@ Overview
The build process is divided into two levels: The build process is divided into two levels:
1) Yocto 1. Yocto
2) ostbuild 2. ostbuild
Yocto is used as a reliable, well-maintained bootstrapping tool. It Yocto is used as a reliable, well-maintained bootstrapping tool. It
provides the basic filesystem layout as well as binaries for core provides the basic filesystem layout as well as binaries for core
...@@ -14,7 +14,7 @@ dependency problems. ...@@ -14,7 +14,7 @@ dependency problems.
At the end, the Yocto build process generates two tarballs: one for a At the end, the Yocto build process generates two tarballs: one for a
base "runtime", and one "devel" with all of the development tools like base "runtime", and one "devel" with all of the development tools like
gcc. We then import that into an OSTree branch gcc. We then import that into an OSTree branch
e.g. "bases/yocto/gnomeos-3.4-i686-devel". e.g. "bases/yocto/gnomeos-3.6-i686-devel".
At present, it's still (mostly) possible to put this data on an ext4 At present, it's still (mostly) possible to put this data on an ext4
filesystem and boot into it. filesystem and boot into it.
...@@ -45,14 +45,17 @@ Yocto, some of which are hacky, others upstreamable. The most ...@@ -45,14 +45,17 @@ Yocto, some of which are hacky, others upstreamable. The most
important part though are the modifications to commit the generated important part though are the modifications to commit the generated
root filesystem into OSTree. root filesystem into OSTree.
For every GNOME OS release, there is a branch on which the needed
patches have landed. By now, that branch is "gnomeos-3.6".
ostbuild details ostbuild details
---------------- ----------------
The simple goal of ostbuild is that it only takes as input a The simple goal of ostbuild is that it only takes as input a
"manifest" which is basically just a list of components to build. You "manifest" which is basically just a list of components to build. You
can see this here: can see an example of this here:
http://git.gnome.org/browse/ostree/tree/gnomeos/3.4/gnomeos-3.4-src.json http://git.gnome.org/gnome-ostree/gnomeos-3.6.json
A component is a pure metadata file which includes the git repository A component is a pure metadata file which includes the git repository
URL and branch name, as well as ./configure flags (--enable-foo). URL and branch name, as well as ./configure flags (--enable-foo).
...@@ -64,9 +67,9 @@ implementation perspective, versus having to maintain a version ...@@ -64,9 +67,9 @@ implementation perspective, versus having to maintain a version
control abstraction layer. control abstraction layer.
The result of a build of a component is an OSTree branch like The result of a build of a component is an OSTree branch like
"artifacts/gnomeos-3.4-i686-devel/libxslt/master". Then, a "compose" "artifacts/gnomeos-3.6-i686-devel/libxslt/master". Then, a "compose"
process merges together the individual filesystem trees into the final process merges together the individual filesystem trees into the final
branches (e.g. gnomeos-3.4-i686-devel). branches (e.g. gnomeos-3.6-i686-devel).
Doing local builds Doing local builds
------------------ ------------------
...@@ -82,65 +85,110 @@ Following this process is equivalent to what we have set up on the ...@@ -82,65 +85,110 @@ Following this process is equivalent to what we have set up on the
ostree.gnome.org build server. It will generate a completely new ostree.gnome.org build server. It will generate a completely new
repository. repository.
srcdir=/src $ srcdir=/src
builddir=/src/build $ builddir=/src/build
# First, you'll need "http://git.gnome.org/browse/linux-user-chroot/"
# installed as setuid root. # First, you'll need "http://git.gnome.org/browse/linux-user-chroot/"
# installed as setuid root.
cd $srcdir
$ cd $srcdir
git clone gnome:linux-user-chroot
cd linux-user-chroot $ git clone gnome:linux-user-chroot
NOCONFIGURE=1 ./autogen.sh $ cd linux-user-chroot
./configure $ NOCONFIGURE=1 ./autogen.sh
make $ ./configure
sudo make install $ make
sudo chown root:root /usr/local/bin/linux-user-chroot $ sudo make install
sudo chmod u+s /usr/local/bin/linux-user-chroot $ sudo chown root:root /usr/local/bin/linux-user-chroot
$ sudo chmod u+s /usr/local/bin/linux-user-chroot
# We're going to be using Yocto. You probably want to refer to:
# http://www.yoctoproject.org/docs/current/yocto-project-qs/yocto-project-qs.html
# Next, we're grabbing my Poky branch. # We're going to be using Yocto. You probably want to refer to:
# http://www.yoctoproject.org/docs/current/yocto-project-qs/yocto-project-qs.html
git clone git://github.com/cgwalters/poky.git # Next, we're grabbing my Poky branch.
cd $builddir
$ git clone git://github.com/cgwalters/poky.git
# This command enters the Poky environment, creating $ cd poky
# a directory named gnomeos-build. $ git co gnomeos-3.6
. $srcdir/poky/oe-init-build-env gnomeos-build $ cd $builddir
# Now edit conf/bblayers.conf, and add
# /src/poky/meta-gnomeos # This command enters the Poky environment, creating
# to BBLAYERS. # a directory named gnomeos-build.
# Make sure tools-profile and tools-testapps are not in EXTRA_IMAGE_FEATURES
# Also, you should choose useful values for BB_NUMBER_THREADS, PARALLEL_MAKE $ . $srcdir/poky/oe-init-build-env gnomeos-build
bitbake ostree-native
bitbake gnomeos-contents-{runtime,devel} # Now edit conf/bblayers.conf, and add
# /src/poky/meta-gnomeos
# This bit is just for shorthand convenience, you can skip it # to BBLAYERS.
cd $builddir #
ln -s tmp/deploy/images/repo repo # Check the conf/local.conf file and make sure "tools-profile" and
# "tools-testapps" are not in EXTRA_IMAGE_FEATURES
# Now create a file ~/.config/ostbuild.cfg #
# example contents: # Also, you should choose useful values for BB_NUMBER_THREADS and
# [global] # PARALLEL_MAKE
# repo=/src/build/gnomeos-build/build/repo #
# mirrordir=/src/build/ostbuild/src # For the meaning of this variables you can check:
# workdir=/src/build/ostbuild/work # http://www.yoctoproject.org/docs/current/poky-ref-manual/poky-ref-manual.html#var-EXTRA_IMAGE_FEATURES
# manifest=/src/ostree/gnomeos/3.4/gnomeos-3.4-src.json # http://www.yoctoproject.org/docs/current/poky-ref-manual/poky-ref-manual.html#var-BB_NUMBER_THREADS
# http://www.yoctoproject.org/docs/current/poky-ref-manual/poky-ref-manual.html#var-PARALLEL_MAKE
# Now we want to use the "ostbuild" binary that was created
# as part of "bitbake ostree-native". You can do e.g.: $ bitbake ostree-native
export PATH=$builddir/build/tmp/sysroots/x86_64-linux/usr/bin:$PATH
# After this command, we will have a native compilation of OSTree
# This next command will download all of the source code to the # e.g. tmp/work/x86_64-linux/ostree-native-1.0-r0/image/opt/gnome-os/tanty/build/gnomeos-build/tmp/sysroots/
# modules specified in $srcdir/ostree/gnomeos/3.4/manifest.json,
# and create a file $workdir/manifest.json that has the $ bitbake gnomeos-contents-{runtime,devel}
# exact git commits we want to build.
ostbuild resolve
# At the end, the Yocto build process generates two tarballs: one for
# This command builds everything # a base "runtime", and one "devel" with all of the development tools
ostbuild build # like gcc. We then import that into an OSTree branch
# e.g. "bases/yocto/gnomeos-3.6-i686-devel".
# This bit is just for shorthand convenience, you can skip it
$ cd $builddir
$ ln -s gnomeos-build/tmp/deploy/images/repo repo
# Now create a file ~/.config/ostbuild.cfg
# example contents:
# [global]
# repo=/src/build/repo
# mirrordir=/src/build/ostbuild/src
# workdir=/src/build/ostbuild/work
# And create the mirrordir and workdir directories
$ mkdir -p $builddir/ostbuild/src
$ mkdir -p $builddir/ostbuild/work
# Now we want to use the "ostbuild" binary that was created
# as part of "bitbake ostree-native". You can do e.g.:
$ export PATH=$builddir/gnomeos-build/tmp/sysroots/x86_64-linux/usr/bin:$PATH
# This next command will download all of the source code to the
# modules specified in $gnome-ostree/gnomeos-3.6.json, and create a
# file $workdir/manifest.json that has the exact git commits we want
# to build.
$ ostbuild resolve --manifest /src/gnome-ostree/gnomeos-3.6.json
# By then, you should create your own prefix for the builds of the
# OSTree
$ ostbuild prefix my-prefix
# This command builds everything
$ ostbuild build-components --src-snapshot $builddir/ostbuild/work/snapshots/gnomeos-3.6-src-snapshot-<year>.<number>-<hash>.json
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment