Update README file
authorRonan Le Martret <ronan@fridu.net>
Tue, 29 Apr 2014 12:28:49 +0000 (14:28 +0200)
committerRonan Le Martret <ronan@fridu.net>
Tue, 29 Apr 2014 12:28:49 +0000 (14:28 +0200)
Change-Id: If988dde508557854437ab8e64381412bf90a3a21

README.md
lib/oe/smack.py [deleted file]

index 3f879cf..6529a80 100644 (file)
--- a/README.md
+++ b/README.md
@@ -4,25 +4,22 @@ Create a Tizen Common x86_64 image with Yocto
 Target: Haswell/Ivy CPU
 
 # Create your working directory
-
-Create a working directory (for example "~/yocto"):
-
-       mkdir -p ${HOME}/yocto
-       cd ${HOME}/yocto
+Create a working directory (for example "${HOME}/yocto","/mnt/ssd","/tmp"):
+       WORKINGDIR=${HOME}/yocto
+       mkdir -p ${WORKINGDIR}
+       cd ${WORKINGDIR}
 
 Create a download directory (optional). It will act as a common download
 directory amongst projects:
 
-       mkdir -p ${HOME}/yocto/downloads
+       mkdir -p ${WORKINGDIR}/downloads
 
 # Download sources
 
-Downlaod Poky:
-
-       git clone git://git.yoctoproject.org/poky
+Downlaod Poky (patched version for rpm 4 support):
+       git clone git@github.com:eurogiciel-oss/poky.git
 
 Download Intel layers:
-
        git clone git://git.yoctoproject.org/meta-intel
 
 Download openembedded layers:
@@ -36,9 +33,9 @@ Download tizen layer:
 # Configuration
 
 Configure the environment:
-
-       cd ${HOME}/yocto/poky
-       source ./oe-init-build-env build
+       BUILDID="alice"
+       cd ${WORKINGDIR}/poky
+       source ./oe-init-build-env build-${BUILDID}
 
 # Configuration files
 
@@ -47,30 +44,28 @@ Configure the environment:
 This file contains the list of the layers in which poky has to search
 for the recipes.
 
-       # LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf
-       # changes incompatibly
-       LCONF_VERSION = "6"
-
        BBPATH = "${TOPDIR}"
        BBFILES ?= ""
 
+       WORKINGDIR=${HOME}/yocto
+
        BBLAYERS ?= " \
-         ${HOME}/yocto/poky/meta \
-         ${HOME}/yocto/poky/meta-yocto \
-         ${HOME}/yocto/poky/meta-yocto-bsp \
-         ${HOME}/yocto/meta-intel \
-         ${HOME}/yocto/meta-intel/meta-isg/meta-haswell-wc \
-         ${HOME}/yocto/meta-openembedded/meta-efl \
-         ${HOME}/yocto/meta-openembedded/meta-oe \
-         ${HOME}/yocto/meta-openembedded/meta-multimedia \
-         ${HOME}/yocto/meta-openembedded/meta-ruby \
-         ${HOME}/yocto/meta-openembedded/meta-systemd \
-         ${HOME}/yocto/meta-tizen \
+         ${WORKINGDIR}/poky/meta \
+         ${WORKINGDIR}/poky/meta-yocto \
+         ${WORKINGDIR}/poky/meta-yocto-bsp \
+         ${WORKINGDIR}/meta-intel \
+         ${WORKINGDIR}/meta-intel/meta-isg/meta-haswell-wc \
+         ${WORKINGDIR}/meta-openembedded/meta-efl \
+         ${WORKINGDIR}/meta-openembedded/meta-oe \
+         ${WORKINGDIR}/meta-openembedded/meta-multimedia \
+         ${WORKINGDIR}/meta-openembedded/meta-ruby \
+         ${WORKINGDIR}/meta-openembedded/meta-systemd \
+         ${WORKINGDIR}/meta-tizen \
          "
        #For Arch haswell
-       #BBLAYERS += "${HOME}/yocto/meta-intel/meta-haswell-wc"
+       #BBLAYERS_append = "${WORKINGDIR}/meta-intel/meta-haswell-wc "
        #For Arch Ivy
-       BBLAYERS += "${HOME}/yocto/meta-intel/meta-romley"
+       BBLAYERS_append = "${WORKINGDIR}/meta-intel/meta-romley "
 
 ## conf/local.conf
 
@@ -84,9 +79,8 @@ Most of default values can be kept. The one that needs to be changed is:
        MACHINE ?= "romley-ivb"
 
 Other useful option to set:
-
 Download directory:
-       DL_DIR ?= "${HOME}/yocto/downloads"
+       DL_DIR ?= "${WORKINGDIR}/downloads"
 
 Setting the download directory DL_DIR to a directory shared amongst
 projects prevents common data from being downloaded for each project.
@@ -96,35 +90,8 @@ Terminal emulator:
 
 The terminal emulator you want to use.
 
-# WARNING
-# WARNING TMP TRICKS WARNING
-# WARNING
-Unfortunately we have to copy some files to the meta directory
-
-    ls -1 classes/
-     image.bbclass
-     rootfs_rpm.bbclass
-
-    ls -1 lib/oe/
-     package_manager.py
-     smack.py
-
-This should be temporary and will be removed as soon as possible.
-
-    cp ${HOME}/yocto/meta-tizen/classes/* ${HOME}/yocto/poky/meta/classes/
-    cp ${HOME}/yocto/meta-tizen/lib/oe/* ${HOME}/yocto/poky/meta/lib/oe/
-
 # Build the Tizen Common image
-
-       bitbake tizen-common-core-image-minimal-dev
-
-Two useful options are:
-
-'k' "Continue as much as possible after an error. While the target that
-    failed and anything depending on it cannot be built, as much as
-    possible will be built before stopping."
-
-'v' "Output more log message data to the terminal."
+       tizen-common-core-image-minimal-dev
 
 Which gives:
        1) bitbake -kv tizen-common-core-image-minimal-dev
diff --git a/lib/oe/smack.py b/lib/oe/smack.py
deleted file mode 100644 (file)
index 34c98ab..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-import shlex
-import subprocess as sub
-import tempfile
-import stat
-import os
-import sys
-
-import logging
-logger = logging.getLogger('BitBake.OE.Terminal')
-
-
-def create_smackrules(d):
-
-  logger.debug(1, '*** Enter create_smackrules() ***')
-
-  D=d.expand('${WORKDIR}/rootfs')
-  logger.debug(1, 'D = %s' % D)
-
-  command="#!/bin/bash\n"
-  command+="export D=%s\n" %  D
-  command+="cd $D\n"
-  command+="find . | xargs getfattr -h -n 'security.SMACK64' > $D/etc/smack/init_attr\n"
-
-  f = tempfile.NamedTemporaryFile(delete=False)
-  f.write(command)
-  os.chmod(f.name, 0777)
-  f.close()
-
-  splitted_command = shlex.split( str( f.name ) )
-  bb.note("RLM run command:%s" % splitted_command)
-
-  p = sub.Popen(splitted_command,stdout=sub.PIPE,stderr=sub.PIPE)
-  out, err = p.communicate()
-  logger.debug(1, 'p.communicate returned:\nout =\n"%s"\nerr =\n"%s"' % (out, err))
-  os.unlink(f.name)
-
-  logger.debug(1, '*** Leave create_smackrules() ***')
-
-
-def apply_smackrules(d):
-
-  logger.debug(1, '*** Enter apply_smackrules() ***')
-
-  # Neither mke2fs nor tar seem to be working with the xattrs
-  #
-  # Restore the smack xattrs using:
-  #   setfattr -h --restore=./etc/smack/init_attr
-
-  logger.debug(1, '*** Leave apply_smackrules() ***')