Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/4] self-hosted-image: the first set of patch
@ 2011-11-24 10:08 Dexuan Cui
  2011-11-24 10:08 ` [PATCH 1/4] runqemu: look for *image* to be more flexible for image names Dexuan Cui
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Dexuan Cui @ 2011-11-24 10:08 UTC (permalink / raw)
  To: openembedded-core

This is the first patchset for the task Build Applianc: self-hosted-image:
https://wiki.yoctoproject.org/wiki/Build_Appliance_Design

The only notable issue left is:
there is an eglibc_initial do_insall failure that seems be caused by make-3.82.
If we downgrade to make-3.81(the hacking patch is at
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=gzhai/build-appliance&id=981a37e3e031e7c96361c1c170050ab3cdbadf6c),
"bitbake core-image-minimal" in the target can build fine. The built image can
run fine with host's qemu (in target, runqemu doesn't work yet as at least
sudo is absent -- we're fixing this).

The above patchset was done by the Build Appliance development team, including
Saul, Edwin and me.

Though there are still some known issues, now we want to share the patches.
Please review, comment and merge them(if they seem good :-).


Thanks!

-- Dexuan, on behalf of the team


The following changes since commit dc2d701207435b0dbd521a11d152f11d0f18d11e:

  apt: Fix locale header and hardcoded libname issues (2011-11-23 23:41:09 +0000)

are available in the git repository at:
  git://git.pokylinux.org/poky-contrib dcui/self-hosted-v2
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dcui/self-hosted-v2

Dexuan Cui (2):
  gcc-package-target.inc: add the symbol link /lib/cpp
  coreutils: build and install hostname

Saul Wold (2):
  runqemu: look for *image* to be more flexible for image names
  Self Hosted Image: Added Task and Images

 .../coreutils/coreutils-8.14/disable_doc_man.patch |   36 ++++
 meta/recipes-core/coreutils/coreutils_8.14.bb      |    9 +-
 meta/recipes-core/images/self-hosted-image.bb      |   11 ++
 meta/recipes-core/tasks/task-self-hosted.bb        |  174 ++++++++++++++++++++
 meta/recipes-devtools/gcc/gcc-4.6.inc              |    2 +-
 meta/recipes-devtools/gcc/gcc-package-target.inc   |    2 +
 scripts/runqemu                                    |    4 +-
 7 files changed, 231 insertions(+), 7 deletions(-)
 create mode 100644 meta/recipes-core/coreutils/coreutils-8.14/disable_doc_man.patch
 create mode 100644 meta/recipes-core/images/self-hosted-image.bb
 create mode 100644 meta/recipes-core/tasks/task-self-hosted.bb

-- 
1.7.6




^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 1/4] runqemu: look for *image* to be more flexible for image names
  2011-11-24 10:08 [PATCH 0/4] self-hosted-image: the first set of patch Dexuan Cui
@ 2011-11-24 10:08 ` Dexuan Cui
  2011-11-24 21:50   ` Richard Purdie
  2011-11-24 10:08 ` [PATCH 2/4] gcc-package-target.inc: add the symbol link /lib/cpp Dexuan Cui
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 12+ messages in thread
From: Dexuan Cui @ 2011-11-24 10:08 UTC (permalink / raw)
  To: openembedded-core

From: Saul Wold <sgw@linux.intel.com>

Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
 scripts/runqemu |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/runqemu b/scripts/runqemu
index 31e9822..a9a362f 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -114,7 +114,7 @@ while [ $i -le $# ]; do
                 usage
             fi
             ;;
-        *-image-*)
+        *image*)
             if [ -z "$ROOTFS" ]; then
                 if [ -f "$arg" ]; then
                     process_filename $arg
@@ -307,7 +307,7 @@ findimage() {
 
     # Sort rootfs candidates by modification time - the most
     # recently created one is the one we most likely want to boot.
-    filenames=`ls -t $where/*core-image*$machine.$extension 2>/dev/null | xargs`
+    filenames=`ls -t $where/*image*$machine.$extension 2>/dev/null | xargs`
     for name in $filenames; do
         if [[ "$name" =~ core-image-sato-sdk ||
               "$name" =~ core-image-sato     ||
-- 
1.7.6




^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 2/4] gcc-package-target.inc: add the symbol link /lib/cpp
  2011-11-24 10:08 [PATCH 0/4] self-hosted-image: the first set of patch Dexuan Cui
  2011-11-24 10:08 ` [PATCH 1/4] runqemu: look for *image* to be more flexible for image names Dexuan Cui
@ 2011-11-24 10:08 ` Dexuan Cui
  2011-11-24 11:21   ` Richard Purdie
  2011-11-24 10:08 ` [PATCH 3/4] Self Hosted Image: Added Task and Images Dexuan Cui
  2011-11-24 10:08 ` [PATCH 4/4] coreutils: build and install hostname Dexuan Cui
  3 siblings, 1 reply; 12+ messages in thread
From: Dexuan Cui @ 2011-11-24 10:08 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
---
 meta/recipes-devtools/gcc/gcc-4.6.inc            |    2 +-
 meta/recipes-devtools/gcc/gcc-package-target.inc |    2 ++
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/meta/recipes-devtools/gcc/gcc-4.6.inc b/meta/recipes-devtools/gcc/gcc-4.6.inc
index 7bf14e3..7cd0850 100644
--- a/meta/recipes-devtools/gcc/gcc-4.6.inc
+++ b/meta/recipes-devtools/gcc/gcc-4.6.inc
@@ -1,6 +1,6 @@
 require gcc-common.inc
 
-PR = "r17"
+PR = "r18"
 
 # Third digit in PV should be incremented after a minor release
 # happens from this branch on gcc e.g. currently its 4.6.0
diff --git a/meta/recipes-devtools/gcc/gcc-package-target.inc b/meta/recipes-devtools/gcc/gcc-package-target.inc
index f0f1a04..3076670 100644
--- a/meta/recipes-devtools/gcc/gcc-package-target.inc
+++ b/meta/recipes-devtools/gcc/gcc-package-target.inc
@@ -122,6 +122,8 @@ do_install () {
 	ln -sf ${TARGET_PREFIX}g++ g++
 	ln -sf ${TARGET_PREFIX}gcc gcc
 	ln -sf ${TARGET_PREFIX}cpp cpp
+	install -d ${D}${base_libdir}
+	ln -sf ${bindir}/${TARGET_PREFIX}cpp ${D}${base_libdir}/cpp
 	ln -sf g++ c++
 	ln -sf gcc cc
 
-- 
1.7.6




^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 3/4] Self Hosted Image: Added Task and Images
  2011-11-24 10:08 [PATCH 0/4] self-hosted-image: the first set of patch Dexuan Cui
  2011-11-24 10:08 ` [PATCH 1/4] runqemu: look for *image* to be more flexible for image names Dexuan Cui
  2011-11-24 10:08 ` [PATCH 2/4] gcc-package-target.inc: add the symbol link /lib/cpp Dexuan Cui
@ 2011-11-24 10:08 ` Dexuan Cui
  2011-11-24 10:08 ` [PATCH 4/4] coreutils: build and install hostname Dexuan Cui
  3 siblings, 0 replies; 12+ messages in thread
From: Dexuan Cui @ 2011-11-24 10:08 UTC (permalink / raw)
  To: openembedded-core

From: Saul Wold <sgw@linux.intel.com>

This is the first pass of creating a self hosted image, this task
and image can pass bitbake's sanity check (if modified to remove the
cvs check) and can build psuedo, albit very slowly on qemu.

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
---
 meta/recipes-core/images/self-hosted-image.bb |   11 ++
 meta/recipes-core/tasks/task-self-hosted.bb   |  174 +++++++++++++++++++++++++
 2 files changed, 185 insertions(+), 0 deletions(-)
 create mode 100644 meta/recipes-core/images/self-hosted-image.bb
 create mode 100644 meta/recipes-core/tasks/task-self-hosted.bb

diff --git a/meta/recipes-core/images/self-hosted-image.bb b/meta/recipes-core/images/self-hosted-image.bb
new file mode 100644
index 0000000..7ddba9c
--- /dev/null
+++ b/meta/recipes-core/images/self-hosted-image.bb
@@ -0,0 +1,11 @@
+IMAGE_INSTALL = "task-core-boot task-core-apps-console task-core-ssh-openssh task-self-hosted"
+
+POKY_EXTRA_INSTALL = "\
+    task-self-hosted \
+    "
+
+IMAGE_ROOTFS_EXTRA_SPACE = "1048576"
+
+inherit core-image
+
+PR = "r0"
diff --git a/meta/recipes-core/tasks/task-self-hosted.bb b/meta/recipes-core/tasks/task-self-hosted.bb
new file mode 100644
index 0000000..c218f43
--- /dev/null
+++ b/meta/recipes-core/tasks/task-self-hosted.bb
@@ -0,0 +1,174 @@
+#
+# Copyright (C) 2010 Intel Corporation
+#
+
+DESCRIPTION = "Create Basic Image Tasks"
+PR = "r0"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
+                    file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+PACKAGES = "\
+    task-self-hosted \
+    task-self-hosted-debug \
+    task-self-hosted-sdk \
+    task-self-hosted-extended \
+    task-self-hosted-graphics \
+    "
+
+ALLOW_EMPTY = "1"
+
+RDEPENDS_task-self-hosted = "\
+    task-self-hosted-debug \
+    task-self-hosted-sdk \
+    task-self-hosted-extended \
+    task-self-hosted-graphics \
+    "
+
+# eglibc-utils: for rpcgen
+RDEPENDS_task-self-hosted-sdk = "\
+    sed \
+    mktemp \
+    eglibc-utils \
+    autoconf \
+    automake \
+    binutils-symlinks \
+    binutils \
+    cpp \
+    cpp-symlinks \
+    ccache \
+    gcc \
+    gcc-symlinks \
+    g++ \
+    g++-symlinks \
+    gettext \
+    make \
+    intltool \
+    libstdc++ \
+    libstdc++-dev \
+    libtool \
+    perl-module-re \
+    perl-module-text-wrap \
+    coreutils \
+    diffutils \
+    pkgconfig \
+    findutils \
+    quilt \
+    less \
+    distcc \
+    ldd \
+    file \
+    tcl \
+    "
+
+RDEPENDS_task-self-hosted-debug = " \
+    gdb \
+    gdbserver \
+    tcf-agent \
+    rsync \
+    strace"
+
+
+RDEPENDS_task-self-hosted-extended = "\
+    binutils \
+    bzip2 \
+    chkconfig \
+    chrpath \
+    curl \
+    dhcp-client \
+    diffstat \
+    diffutils \
+    elfutils \
+    expat \
+    gamin \
+    gdbm \
+    git \
+    gettext \
+    gettext-runtime \
+    grep \
+    groff \
+    gawk \
+    hdparm \
+    libaio \
+    libxml2 \
+    libusb1 \
+    lrzsz \
+    lsof \
+    lzo \
+    man \
+    man-pages \
+    mc \
+    mdadm \
+    minicom \
+    mtools \
+    ncurses \
+    neon \
+    openssl \
+    opkg \
+    opkg-utils \
+    parted \
+    patch \
+    perl \
+    perl-modules \
+    perl-dev \
+    pth \
+    python \
+    python-compile \
+    python-compiler \
+    python-core \
+    python-curses \
+    python-datetime \
+    python-distutils \
+    python-elementtree \
+    python-fcntl \
+    python-logging \
+    python-misc \
+    python-multiprocessing \
+    python-netclient \
+    python-netserver \
+    python-pickle \
+    python-re \
+    python-rpm \
+    python-shell \
+    python-sqlite3 \
+    python-subprocess \
+    python-textutils \
+    python-xmlrpc \
+    python-email \
+    python-unixadmin \
+    python-compression \
+    quota \
+    readline \
+    rpm \
+    screen \
+    setserial \
+    strace \
+    subversion \
+    sysstat \
+    tar \
+    gzip \
+    tcl \
+    texi2html \
+    texinfo \
+    usbutils \
+    unzip \
+    watchdog \
+    wget \
+    which \
+    xinetd \
+    zip \
+    zlib \
+    cpio \
+    "
+
+
+RDEPENDS_task-self-hosted-graphics = "\
+    python-pygtk \
+    mesa-dri \
+    mesa-dri-dev \
+    libglu \
+    libglu-dev \
+    libsdl \
+    libsdl-dev \
+    libx11-dev \
+    "
-- 
1.7.6




^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 4/4] coreutils: build and install hostname
  2011-11-24 10:08 [PATCH 0/4] self-hosted-image: the first set of patch Dexuan Cui
                   ` (2 preceding siblings ...)
  2011-11-24 10:08 ` [PATCH 3/4] Self Hosted Image: Added Task and Images Dexuan Cui
@ 2011-11-24 10:08 ` Dexuan Cui
  2011-11-29  8:15   ` Saul Wold
  3 siblings, 1 reply; 12+ messages in thread
From: Dexuan Cui @ 2011-11-24 10:08 UTC (permalink / raw)
  To: openembedded-core

busybox's hostname doesn't work with pseudo somehow, so let's use the version
of coreutils. This is needed for the self-hosted-image work.

Also add a patch to disable building the doc and manual: we don't really need
them and this causes compilation error in the cross-compiling case.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
---
 .../coreutils/coreutils-8.14/disable_doc_man.patch |   36 ++++++++++++++++++++
 meta/recipes-core/coreutils/coreutils_8.14.bb      |    9 +++--
 2 files changed, 41 insertions(+), 4 deletions(-)
 create mode 100644 meta/recipes-core/coreutils/coreutils-8.14/disable_doc_man.patch

diff --git a/meta/recipes-core/coreutils/coreutils-8.14/disable_doc_man.patch b/meta/recipes-core/coreutils/coreutils-8.14/disable_doc_man.patch
new file mode 100644
index 0000000..c9dc92c
--- /dev/null
+++ b/meta/recipes-core/coreutils/coreutils-8.14/disable_doc_man.patch
@@ -0,0 +1,36 @@
+Upstream-Status: Inappropriate [embedded specific]
+
+We don't really need to build the doc and manual.
+
+Morever, we get this failure in do_compile:
+help2man: can't get `--help' info from hostname.td/hostname
+
+This is because help2man tries to invoke "hostname --help", but in the
+cross-compile case, the target binary may not be execuable on the host.
+
+Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
+
+diff -Nru coreutils-8.14/Makefile.am coreutils-8.14/Makefile.am
+--- coreutils-8.14.orig/Makefile.am	2011-10-10 15:30:55.000000000 +0800
++++ coreutils-8.14/Makefile.am	2011-11-24 17:29:26.398593744 +0800
+@@ -17,7 +17,7 @@
+ 
+ ALL_RECURSIVE_TARGETS =
+ 
+-SUBDIRS = lib src doc man po tests gnulib-tests
++SUBDIRS = lib src po tests gnulib-tests
+ 
+ changelog_etc =				\
+   ChangeLog-2005			\
+diff -Nru coreutils-8.14.orig/Makefile.in coreutils-8.14/Makefile.in
+--- coreutils-8.14.orig/Makefile.in	2011-10-12 17:21:46.000000000 +0800
++++ coreutils-8.14/Makefile.in	2011-11-24 17:29:14.868593748 +0800
+@@ -1453,7 +1453,7 @@
+ 
+ # Some tests always need root privileges, others need them only sometimes.
+ ALL_RECURSIVE_TARGETS = install-root check-root distcheck-hook
+-SUBDIRS = lib src doc man po tests gnulib-tests
++SUBDIRS = lib src po tests gnulib-tests
+ changelog_etc = \
+   ChangeLog-2005			\
+   ChangeLog-2006			\
diff --git a/meta/recipes-core/coreutils/coreutils_8.14.bb b/meta/recipes-core/coreutils/coreutils_8.14.bb
index 01face0..ec41fe2 100644
--- a/meta/recipes-core/coreutils/coreutils_8.14.bb
+++ b/meta/recipes-core/coreutils/coreutils_8.14.bb
@@ -7,7 +7,7 @@ BUGTRACKER = "http://debbugs.gnu.org/coreutils"
 LICENSE = "GPLv3+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504\
                     file://src/ls.c;startline=5;endline=16;md5=e1a509558876db58fb6667ba140137ad"
-PR = "r1"
+PR = "r2"
 DEPENDS = "gmp"
 DEPENDS_virtclass-native = ""
 
@@ -15,10 +15,13 @@ inherit autotools gettext
 
 SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz \
            file://remove-usr-local-lib-from-m4.patch \
+           file://disable_doc_man.patch \
           "
 SRC_URI[md5sum] = "bcb135ce553493a45aba01b39eb3920a"
 SRC_URI[sha256sum] = "0d120817c19292edb19e92ae6b8eac9020e03d51e0af9cb116cf82b65d18b02d"
 
+EXTRA_OECONF += "--enable-install-program=hostname"
+
 EXTRA_OECONF_virtclass-native = "--without-gmp"
 
 # [ gets a special treatment and is not included in this
@@ -29,9 +32,8 @@ bindir_progs = "base64 basename chcon cksum comm csplit cut dir dircolors dirnam
                 sha384sum sha512sum shred shuf sort split stat stdbuf sum tac tail tee test timeout\
                 tr truncate tsort tty unexpand uniq unlink uptime users vdir wc who whoami yes df"
 
-# hostname gets a special treatment and is not included in this
 base_bindir_progs = "cat chgrp chmod chown cp date dd echo false kill ln ls mkdir \
-                     mknod mv pwd rm rmdir sleep stty sync touch true uname"
+                     mknod mv pwd rm rmdir sleep stty sync touch true uname hostname"
 
 sbindir_progs= "chroot"
 
@@ -71,7 +73,6 @@ pkg_prerm_${PN} () {
 	for i in ${sbindir_progs}; do update-alternatives --remove $i $i.${PN}; done
 
 	# The special cases
-	update-alternatives --remove hostname hostname.${PN}
 	update-alternatives --remove uptime uptime.${PN}
 	update-alternatives --remove '[' 'lbracket.${PN}'
 }
-- 
1.7.6




^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH 2/4] gcc-package-target.inc: add the symbol link /lib/cpp
  2011-11-24 10:08 ` [PATCH 2/4] gcc-package-target.inc: add the symbol link /lib/cpp Dexuan Cui
@ 2011-11-24 11:21   ` Richard Purdie
  2011-11-24 15:37     ` Cui, Dexuan
  0 siblings, 1 reply; 12+ messages in thread
From: Richard Purdie @ 2011-11-24 11:21 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Thu, 2011-11-24 at 18:08 +0800, Dexuan Cui wrote:
> Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
> ---
>  meta/recipes-devtools/gcc/gcc-4.6.inc            |    2 +-
>  meta/recipes-devtools/gcc/gcc-package-target.inc |    2 ++
>  2 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/meta/recipes-devtools/gcc/gcc-4.6.inc b/meta/recipes-devtools/gcc/gcc-4.6.inc
> index 7bf14e3..7cd0850 100644
> --- a/meta/recipes-devtools/gcc/gcc-4.6.inc
> +++ b/meta/recipes-devtools/gcc/gcc-4.6.inc
> @@ -1,6 +1,6 @@
>  require gcc-common.inc
>  
> -PR = "r17"
> +PR = "r18"
>  
>  # Third digit in PV should be incremented after a minor release
>  # happens from this branch on gcc e.g. currently its 4.6.0
> diff --git a/meta/recipes-devtools/gcc/gcc-package-target.inc b/meta/recipes-devtools/gcc/gcc-package-target.inc
> index f0f1a04..3076670 100644
> --- a/meta/recipes-devtools/gcc/gcc-package-target.inc
> +++ b/meta/recipes-devtools/gcc/gcc-package-target.inc
> @@ -122,6 +122,8 @@ do_install () {
>  	ln -sf ${TARGET_PREFIX}g++ g++
>  	ln -sf ${TARGET_PREFIX}gcc gcc
>  	ln -sf ${TARGET_PREFIX}cpp cpp
> +	install -d ${D}${base_libdir}
> +	ln -sf ${bindir}/${TARGET_PREFIX}cpp ${D}${base_libdir}/cpp
>  	ln -sf g++ c++
>  	ln -sf gcc cc

Why do we need this change?

Cheers,

Richard






^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 2/4] gcc-package-target.inc: add the symbol link /lib/cpp
  2011-11-24 11:21   ` Richard Purdie
@ 2011-11-24 15:37     ` Cui, Dexuan
  2011-11-24 16:23       ` Richard Purdie
  0 siblings, 1 reply; 12+ messages in thread
From: Cui, Dexuan @ 2011-11-24 15:37 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

Richard Purdie wrote on 2011-11-24:
> On Thu, 2011-11-24 at 18:08 +0800, Dexuan Cui wrote:
>> --- a/meta/recipes-devtools/gcc/gcc-package-target.inc
>> +++ b/meta/recipes-devtools/gcc/gcc-package-target.inc
>> @@ -122,6 +122,8 @@ do_install () {
>>  	ln -sf ${TARGET_PREFIX}g++ g++
>>  	ln -sf ${TARGET_PREFIX}gcc gcc
>>  	ln -sf ${TARGET_PREFIX}cpp cpp
>> +	install -d ${D}${base_libdir}
>> +	ln -sf ${bindir}/${TARGET_PREFIX}cpp ${D}${base_libdir}/cpp
>>  	ln -sf g++ c++
>>  	ln -sf gcc cc
> 
> Why do we need this change?
When I was trying self-hosted-image, eglibc's do_install failed in the target:
ERROR: cannot stat bootparam_prot.h: the cause is: rpcgen doesn't work properly: rpcgen can't exec /lib/cpp since it doesn't exist.

According to http://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/lib.html,  "if a C preprocessor is installed, /lib/cpp must be a reference to it, for historical reasons. The usual placement of this binary is /usr/bin/cpp".

Typical distros, like Ubuntu, openSuSE, Fedora, RHEL, all comply with the rule.

Actually in meta/recipes-devtools/gcc/gcc-package-target.inc, we do try to package ${base_libdir}/cpp:
 FILES_cpp = "\
  ${bindir}/${TARGET_PREFIX}cpp \
  ${base_libdir}/cpp \
  ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1"
But unluckily we didn't to create a symbol link in do_install. This patch adds the symbol link.

Thanks,
-- Dexuan





^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 2/4] gcc-package-target.inc: add the symbol link /lib/cpp
  2011-11-24 15:37     ` Cui, Dexuan
@ 2011-11-24 16:23       ` Richard Purdie
  2011-11-24 23:09         ` Cui, Dexuan
  0 siblings, 1 reply; 12+ messages in thread
From: Richard Purdie @ 2011-11-24 16:23 UTC (permalink / raw)
  To: Cui, Dexuan; +Cc: Patches and discussions about the oe-core layer

On Thu, 2011-11-24 at 23:37 +0800, Cui, Dexuan wrote:
> Richard Purdie wrote on 2011-11-24:
> > On Thu, 2011-11-24 at 18:08 +0800, Dexuan Cui wrote:
> >> --- a/meta/recipes-devtools/gcc/gcc-package-target.inc
> >> +++ b/meta/recipes-devtools/gcc/gcc-package-target.inc
> >> @@ -122,6 +122,8 @@ do_install () {
> >>  	ln -sf ${TARGET_PREFIX}g++ g++
> >>  	ln -sf ${TARGET_PREFIX}gcc gcc
> >>  	ln -sf ${TARGET_PREFIX}cpp cpp
> >> +	install -d ${D}${base_libdir}
> >> +	ln -sf ${bindir}/${TARGET_PREFIX}cpp ${D}${base_libdir}/cpp
> >>  	ln -sf g++ c++
> >>  	ln -sf gcc cc
> > 
> > Why do we need this change?
> When I was trying self-hosted-image, eglibc's do_install failed in the target:
> ERROR: cannot stat bootparam_prot.h: the cause is: rpcgen doesn't work properly: rpcgen can't exec /lib/cpp since it doesn't exist.
> 
> According to http://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/lib.html,  "if a C preprocessor is installed, /lib/cpp must be a reference to it, for historical reasons. The usual placement of this binary is /usr/bin/cpp".
> 
> Typical distros, like Ubuntu, openSuSE, Fedora, RHEL, all comply with the rule.
> 
> Actually in meta/recipes-devtools/gcc/gcc-package-target.inc, we do try to package ${base_libdir}/cpp:
>  FILES_cpp = "\
>   ${bindir}/${TARGET_PREFIX}cpp \
>   ${base_libdir}/cpp \
>   ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1"
> But unluckily we didn't to create a symbol link in do_install. This patch adds the symbol link.

Ok, this sounds great. Put this in the commit message though please!

Cheers,

Richard




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/4] runqemu: look for *image* to be more flexible for image names
  2011-11-24 10:08 ` [PATCH 1/4] runqemu: look for *image* to be more flexible for image names Dexuan Cui
@ 2011-11-24 21:50   ` Richard Purdie
  0 siblings, 0 replies; 12+ messages in thread
From: Richard Purdie @ 2011-11-24 21:50 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Thu, 2011-11-24 at 18:08 +0800, Dexuan Cui wrote:
> From: Saul Wold <sgw@linux.intel.com>
> 
> Signed-off-by: Saul Wold <sgw@linux.intel.com>
> ---
>  scripts/runqemu |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/scripts/runqemu b/scripts/runqemu
> index 31e9822..a9a362f 100755
> --- a/scripts/runqemu
> +++ b/scripts/runqemu
> @@ -114,7 +114,7 @@ while [ $i -le $# ]; do
>                  usage
>              fi
>              ;;
> -        *-image-*)
> +        *image*)
>              if [ -z "$ROOTFS" ]; then
>                  if [ -f "$arg" ]; then
>                      process_filename $arg
As I mentioned to Saul, this is a bad idea since its very close to
matching things like bzImage. I seem to remember something with a
*image* name being in deploy before and having problems with that.

Cheers,

Richard






^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 2/4] gcc-package-target.inc: add the symbol link /lib/cpp
  2011-11-24 16:23       ` Richard Purdie
@ 2011-11-24 23:09         ` Cui, Dexuan
  2011-11-24 23:34           ` Richard Purdie
  0 siblings, 1 reply; 12+ messages in thread
From: Cui, Dexuan @ 2011-11-24 23:09 UTC (permalink / raw)
  To: Richard Purdie; +Cc: Patches and discussions about the oe-core layer

Richard Purdie wrote on 2011-11-25:
> On Thu, 2011-11-24 at 23:37 +0800, Cui, Dexuan wrote:
>> Richard Purdie wrote on 2011-11-24:
>>> On Thu, 2011-11-24 at 18:08 +0800, Dexuan Cui wrote:
>>>> --- a/meta/recipes-devtools/gcc/gcc-package-target.inc
>>>> +++ b/meta/recipes-devtools/gcc/gcc-package-target.inc
>>>> @@ -122,6 +122,8 @@ do_install () {
>>>>  	ln -sf ${TARGET_PREFIX}g++ g++
>>>>  	ln -sf ${TARGET_PREFIX}gcc gcc
>>>>  	ln -sf ${TARGET_PREFIX}cpp cpp
>>>> +	install -d ${D}${base_libdir}
>>>> +	ln -sf ${bindir}/${TARGET_PREFIX}cpp ${D}${base_libdir}/cpp
>>>>  	ln -sf g++ c++
>>>>  	ln -sf gcc cc
>>> 
>>> Why do we need this change?
>> When I was trying self-hosted-image, eglibc's do_install failed in the
>> target: ERROR: cannot stat bootparam_prot.h: the cause is: rpcgen
>> doesn't work properly: rpcgen can't exec /lib/cpp since it doesn't
>> exist.
>> 
>> According to
>> http://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/lib.html,
> "if a C preprocessor is installed, /lib/cpp must be a reference to it,
> for historical reasons. The usual placement of this binary is /usr/bin/cpp".
>> 
>> Typical distros, like Ubuntu, openSuSE, Fedora, RHEL, all comply with
>> the rule.
>> 
>> Actually in meta/recipes-devtools/gcc/gcc-package-target.inc, we do
>> try to
> package ${base_libdir}/cpp:
>>  FILES_cpp = "\
>>   ${bindir}/${TARGET_PREFIX}cpp \
>>   ${base_libdir}/cpp \
>>   ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1"
>> But unluckily we didn't to create a symbol link in do_install. This
>> patch
> adds the symbol link.
> 
> Ok, this sounds great. Put this in the commit message though please!
Hi RP,
Please use the new commit(the only change is the updated commit message):
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=dcui/self-hosted-v2&id=f6001f0b12cb561f5e08d3a5b0d61ab5fa924f40

Thanks,
-- Dexuan


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 2/4] gcc-package-target.inc: add the symbol link /lib/cpp
  2011-11-24 23:09         ` Cui, Dexuan
@ 2011-11-24 23:34           ` Richard Purdie
  0 siblings, 0 replies; 12+ messages in thread
From: Richard Purdie @ 2011-11-24 23:34 UTC (permalink / raw)
  To: Cui, Dexuan; +Cc: Patches and discussions about the oe-core layer

On Fri, 2011-11-25 at 07:09 +0800, Cui, Dexuan wrote:
> Richard Purdie wrote on 2011-11-25:
> > On Thu, 2011-11-24 at 23:37 +0800, Cui, Dexuan wrote:
> >> Richard Purdie wrote on 2011-11-24:
> >>> On Thu, 2011-11-24 at 18:08 +0800, Dexuan Cui wrote:
> >>>> --- a/meta/recipes-devtools/gcc/gcc-package-target.inc
> >>>> +++ b/meta/recipes-devtools/gcc/gcc-package-target.inc
> >>>> @@ -122,6 +122,8 @@ do_install () {
> >>>>  	ln -sf ${TARGET_PREFIX}g++ g++
> >>>>  	ln -sf ${TARGET_PREFIX}gcc gcc
> >>>>  	ln -sf ${TARGET_PREFIX}cpp cpp
> >>>> +	install -d ${D}${base_libdir}
> >>>> +	ln -sf ${bindir}/${TARGET_PREFIX}cpp ${D}${base_libdir}/cpp
> >>>>  	ln -sf g++ c++
> >>>>  	ln -sf gcc cc
> >>> 
> >>> Why do we need this change?
> >> When I was trying self-hosted-image, eglibc's do_install failed in the
> >> target: ERROR: cannot stat bootparam_prot.h: the cause is: rpcgen
> >> doesn't work properly: rpcgen can't exec /lib/cpp since it doesn't
> >> exist.
> >> 
> >> According to
> >> http://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/lib.html,
> > "if a C preprocessor is installed, /lib/cpp must be a reference to it,
> > for historical reasons. The usual placement of this binary is /usr/bin/cpp".
> >> 
> >> Typical distros, like Ubuntu, openSuSE, Fedora, RHEL, all comply with
> >> the rule.
> >> 
> >> Actually in meta/recipes-devtools/gcc/gcc-package-target.inc, we do
> >> try to
> > package ${base_libdir}/cpp:
> >>  FILES_cpp = "\
> >>   ${bindir}/${TARGET_PREFIX}cpp \
> >>   ${base_libdir}/cpp \
> >>   ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1"
> >> But unluckily we didn't to create a symbol link in do_install. This
> >> patch
> > adds the symbol link.
> > 
> > Ok, this sounds great. Put this in the commit message though please!
> Hi RP,
> Please use the new commit(the only change is the updated commit message):
> http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=dcui/self-hosted-v2&id=f6001f0b12cb561f5e08d3a5b0d61ab5fa924f40

Thanks, I've merged this patch to master.

Cheers,

Richard




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 4/4] coreutils: build and install hostname
  2011-11-24 10:08 ` [PATCH 4/4] coreutils: build and install hostname Dexuan Cui
@ 2011-11-29  8:15   ` Saul Wold
  0 siblings, 0 replies; 12+ messages in thread
From: Saul Wold @ 2011-11-29  8:15 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On 11/24/2011 02:08 AM, Dexuan Cui wrote:
> busybox's hostname doesn't work with pseudo somehow, so let's use the version
> of coreutils. This is needed for the self-hosted-image work.
>
> Also add a patch to disable building the doc and manual: we don't really need
> them and this causes compilation error in the cross-compiling case.
>
Upon further review and thoughts about this, it's not idea to remove 
docs and manual's, I will take this patch for now, but we need to file a 
bug and find a better solution that will re-enable the docs and manual 
creation.

Sau!

> Signed-off-by: Dexuan Cui<dexuan.cui@intel.com>
> ---
>   .../coreutils/coreutils-8.14/disable_doc_man.patch |   36 ++++++++++++++++++++
>   meta/recipes-core/coreutils/coreutils_8.14.bb      |    9 +++--
>   2 files changed, 41 insertions(+), 4 deletions(-)
>   create mode 100644 meta/recipes-core/coreutils/coreutils-8.14/disable_doc_man.patch
>
> diff --git a/meta/recipes-core/coreutils/coreutils-8.14/disable_doc_man.patch b/meta/recipes-core/coreutils/coreutils-8.14/disable_doc_man.patch
> new file mode 100644
> index 0000000..c9dc92c
> --- /dev/null
> +++ b/meta/recipes-core/coreutils/coreutils-8.14/disable_doc_man.patch
> @@ -0,0 +1,36 @@
> +Upstream-Status: Inappropriate [embedded specific]
> +
> +We don't really need to build the doc and manual.
> +
> +Morever, we get this failure in do_compile:
> +help2man: can't get `--help' info from hostname.td/hostname
> +
> +This is because help2man tries to invoke "hostname --help", but in the
> +cross-compile case, the target binary may not be execuable on the host.
> +
> +Signed-off-by: Dexuan Cui<dexuan.cui@intel.com>
> +
> +diff -Nru coreutils-8.14/Makefile.am coreutils-8.14/Makefile.am
> +--- coreutils-8.14.orig/Makefile.am	2011-10-10 15:30:55.000000000 +0800
> ++++ coreutils-8.14/Makefile.am	2011-11-24 17:29:26.398593744 +0800
> +@@ -17,7 +17,7 @@
> +
> + ALL_RECURSIVE_TARGETS =
> +
> +-SUBDIRS = lib src doc man po tests gnulib-tests
> ++SUBDIRS = lib src po tests gnulib-tests
> +
> + changelog_etc =				\
> +   ChangeLog-2005			\
> +diff -Nru coreutils-8.14.orig/Makefile.in coreutils-8.14/Makefile.in
> +--- coreutils-8.14.orig/Makefile.in	2011-10-12 17:21:46.000000000 +0800
> ++++ coreutils-8.14/Makefile.in	2011-11-24 17:29:14.868593748 +0800
> +@@ -1453,7 +1453,7 @@
> +
> + # Some tests always need root privileges, others need them only sometimes.
> + ALL_RECURSIVE_TARGETS = install-root check-root distcheck-hook
> +-SUBDIRS = lib src doc man po tests gnulib-tests
> ++SUBDIRS = lib src po tests gnulib-tests
> + changelog_etc = \
> +   ChangeLog-2005			\
> +   ChangeLog-2006			\
> diff --git a/meta/recipes-core/coreutils/coreutils_8.14.bb b/meta/recipes-core/coreutils/coreutils_8.14.bb
> index 01face0..ec41fe2 100644
> --- a/meta/recipes-core/coreutils/coreutils_8.14.bb
> +++ b/meta/recipes-core/coreutils/coreutils_8.14.bb
> @@ -7,7 +7,7 @@ BUGTRACKER = "http://debbugs.gnu.org/coreutils"
>   LICENSE = "GPLv3+"
>   LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504\
>                       file://src/ls.c;startline=5;endline=16;md5=e1a509558876db58fb6667ba140137ad"
> -PR = "r1"
> +PR = "r2"
>   DEPENDS = "gmp"
>   DEPENDS_virtclass-native = ""
>
> @@ -15,10 +15,13 @@ inherit autotools gettext
>
>   SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz \
>              file://remove-usr-local-lib-from-m4.patch \
> +           file://disable_doc_man.patch \
>             "
>   SRC_URI[md5sum] = "bcb135ce553493a45aba01b39eb3920a"
>   SRC_URI[sha256sum] = "0d120817c19292edb19e92ae6b8eac9020e03d51e0af9cb116cf82b65d18b02d"
>
> +EXTRA_OECONF += "--enable-install-program=hostname"
> +
>   EXTRA_OECONF_virtclass-native = "--without-gmp"
>
>   # [ gets a special treatment and is not included in this
> @@ -29,9 +32,8 @@ bindir_progs = "base64 basename chcon cksum comm csplit cut dir dircolors dirnam
>                   sha384sum sha512sum shred shuf sort split stat stdbuf sum tac tail tee test timeout\
>                   tr truncate tsort tty unexpand uniq unlink uptime users vdir wc who whoami yes df"
>
> -# hostname gets a special treatment and is not included in this
>   base_bindir_progs = "cat chgrp chmod chown cp date dd echo false kill ln ls mkdir \
> -                     mknod mv pwd rm rmdir sleep stty sync touch true uname"
> +                     mknod mv pwd rm rmdir sleep stty sync touch true uname hostname"
>
>   sbindir_progs= "chroot"
>
> @@ -71,7 +73,6 @@ pkg_prerm_${PN} () {
>   	for i in ${sbindir_progs}; do update-alternatives --remove $i $i.${PN}; done
>
>   	# The special cases
> -	update-alternatives --remove hostname hostname.${PN}
>   	update-alternatives --remove uptime uptime.${PN}
>   	update-alternatives --remove '[' 'lbracket.${PN}'
>   }



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-11-29  8:22 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-24 10:08 [PATCH 0/4] self-hosted-image: the first set of patch Dexuan Cui
2011-11-24 10:08 ` [PATCH 1/4] runqemu: look for *image* to be more flexible for image names Dexuan Cui
2011-11-24 21:50   ` Richard Purdie
2011-11-24 10:08 ` [PATCH 2/4] gcc-package-target.inc: add the symbol link /lib/cpp Dexuan Cui
2011-11-24 11:21   ` Richard Purdie
2011-11-24 15:37     ` Cui, Dexuan
2011-11-24 16:23       ` Richard Purdie
2011-11-24 23:09         ` Cui, Dexuan
2011-11-24 23:34           ` Richard Purdie
2011-11-24 10:08 ` [PATCH 3/4] Self Hosted Image: Added Task and Images Dexuan Cui
2011-11-24 10:08 ` [PATCH 4/4] coreutils: build and install hostname Dexuan Cui
2011-11-29  8:15   ` Saul Wold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox