[oe] [meta-initramfs] [PATCH] klibc_2.0.2: fix hardcoded symlinks to linux-libc-headers

Andrea Adami andrea.adami at gmail.com
Mon Aug 26 08:47:02 UTC 2013


Sorry, patch is broken for distros like meta-micro, collapsing /usr into /

Thinking again about the symlinks,  we have to respect the install
location of the linux-libc-headers, installed as:
> oe_runmake headers_install INSTALL_HDR_PATH=${D}${exec_prefix} <

So we have to adapt to the case where exec_prefix is not like  "/usr"

Revised version coming later today.
Cheers

Andrea



On Mon, Aug 26, 2013 at 12:53 AM, Andrea Adami <andrea.adami at gmail.com> wrote:
> Klibc needs a copy of the linux headers for itself to build.
> On target the libs and a second copy of headers are installed as well:
> we link relatively to the staging sysroot of the target to make
> these headers available when necessary.
>
> Signed-off-by: Andrea Adami <andrea.adami at gmail.com>
> ---
>  .../recipes-devtools/klibc/klibc-2.0.2/klibc-linux-libc-dev.patch       | 2 +-
>  meta-initramfs/recipes-devtools/klibc/klibc-2.0.2/staging.patch         | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.2/klibc-linux-libc-dev.patch b/meta-initramfs/recipes-devtools/klibc/klibc-2.0.2/klibc-linux-libc-dev.patch
> index 28efcfd..305328b 100644
> --- a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.2/klibc-linux-libc-dev.patch
> +++ b/meta-initramfs/recipes-devtools/klibc/klibc-2.0.2/klibc-linux-libc-dev.patch
> @@ -14,7 +14,7 @@ Index: klibc-2.0~rc2/scripts/Kbuild.install
>         $(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)lib
>         $(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)bin
>  -      $(Q)$(MAKE) -C $(KLIBCKERNELSRC) ARCH=$(KLIBCARCH) INSTALL_HDR_PATH=$(INSTALLROOT)$(INSTALLDIR)/$(KCROSS) headers_install
> -+      $(Q)for x in $(KLIBCKERNELSRC)/include/asm $(KLIBCKERNELSRC)/include/asm* $(KLIBCKERNELSRC)/include/linux $(KLIBCKERNELSRC)/include/mtd; do \
> ++      $(Q)for x in ../../../usr/include/asm ../../../usr/include/asm-generic ../../../usr/include/linux ../../../usr/include/mtd; do \
>  +              ln -sf $${x} $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/ || exit; \
>  +      done
>         $(Q)cp -rf usr/include/. $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/.
> diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.2/staging.patch b/meta-initramfs/recipes-devtools/klibc/klibc-2.0.2/staging.patch
> index 03955f2..e8df8e0 100644
> --- a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.2/staging.patch
> +++ b/meta-initramfs/recipes-devtools/klibc/klibc-2.0.2/staging.patch
> @@ -21,7 +21,7 @@ Index: klibc-1.5.24/scripts/Kbuild.install
>         $(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include
>         $(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)lib
>  -      $(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)bin
> -       $(Q)for x in $(KLIBCKERNELSRC)/include/asm $(KLIBCKERNELSRC)/include/asm* $(KLIBCKERNELSRC)/include/linux $(KLIBCKERNELSRC)/include/mtd; do \
> +       $(Q)for x in ../../../usr/include/asm ../../../usr/include/asm-generic ../../../usr/include/linux ../../../usr/include/mtd; do \
>                 ln -sf $${x} $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/ || exit; \
>         done
>  @@ -103,7 +100,6 @@
> --
> 1.8.1.5
>



More information about the Openembedded-devel mailing list