diff options
Diffstat (limited to 'meta-initramfs/recipes-devtools/klibc')
12 files changed, 436 insertions, 0 deletions
diff --git a/meta-initramfs/recipes-devtools/klibc/klcc-cross_2.0.4.bb b/meta-initramfs/recipes-devtools/klibc/klcc-cross_2.0.4.bb new file mode 100644 index 000000000..2f4afce06 --- /dev/null +++ b/meta-initramfs/recipes-devtools/klibc/klcc-cross_2.0.4.bb | |||
@@ -0,0 +1,40 @@ | |||
1 | SUMMARY = "The klcc crosscompiler for klibc" | ||
2 | |||
3 | require klibc.inc | ||
4 | DEPENDS = "klibc" | ||
5 | |||
6 | FILESPATH =. "${FILE_DIRNAME}/klibc-${PV}:" | ||
7 | |||
8 | SRC_URI += "file://use-env-for-perl.patch" | ||
9 | |||
10 | # disable task already run in klibc recipe | ||
11 | do_configure[noexec] = "1" | ||
12 | |||
13 | do_compile() { | ||
14 | oe_runmake 'INSTALLDIR=${STAGING_DIR_TARGET}${libdir}/klibc' klcc | ||
15 | } | ||
16 | |||
17 | do_install() { | ||
18 | install -d ${D}${bindir_crossscripts}/ | ||
19 | install -m 0755 klcc/klcc ${D}${bindir_crossscripts}/${TARGET_PREFIX}klcc | ||
20 | # Insert an unencoded path as a comment to trigger the sstate renaming functions | ||
21 | sed -i '2i #${STAGING_DIR_TARGET}' ${D}${bindir_crossscripts}/${TARGET_PREFIX}klcc | ||
22 | } | ||
23 | |||
24 | SYSROOT_PREPROCESS_FUNCS += "klcc_sysroot_preprocess" | ||
25 | |||
26 | klcc_sysroot_preprocess () { | ||
27 | sysroot_stage_dir ${D}${bindir_crossscripts} ${SYSROOT_DESTDIR}${bindir_crossscripts} | ||
28 | } | ||
29 | |||
30 | deltask do_package | ||
31 | deltask do_packagedata | ||
32 | deltask do_package_write_ipk | ||
33 | deltask do_package_write_rpm | ||
34 | deltask do_package_write_deb | ||
35 | deltask do_package_write_tar | ||
36 | |||
37 | SSTATE_SCAN_FILES = "*" | ||
38 | EXTRA_STAGING_FIXMES = "MANGLEDSTAGINGDIRTARGET MANGLEDSTAGINGDIR" | ||
39 | MANGLEDSTAGINGDIR = "${@d.getVar("STAGING_DIR", True).replace("/", "\\\\/").replace("-", "\\\\-")}" | ||
40 | MANGLEDSTAGINGDIRTARGET = "${@d.getVar("STAGING_DIR_TARGET", True).replace("/", "\\\\/").replace("-", "\\\\-")}" | ||
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/armv4-fix-v4bx.patch b/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/armv4-fix-v4bx.patch new file mode 100644 index 000000000..6bb384bb0 --- /dev/null +++ b/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/armv4-fix-v4bx.patch | |||
@@ -0,0 +1,15 @@ | |||
1 | Status: not applicable upstream, in OE/Yocto we use $(FIX_V4BX) | ||
2 | which is "" in case of armv5 or thumbs. | ||
3 | |||
4 | Signed-off-by: Andrea Adami <andrea.adami@gmail.com> | ||
5 | |||
6 | --- a/usr/klibc/arch/arm/MCONFIG 2013-01-09 01:12:02.000000000 +0100 | ||
7 | +++ b/usr/klibc/arch/arm/MCONFIG 2013-01-08 23:45:59.000000000 +0100 | ||
8 | @@ -29,6 +29,7 @@ | ||
9 | KLIBCSHAREDFLAGS = -Ttext 0x01800200 | ||
10 | ifeq ($(CONFIG_AEABI),y) | ||
11 | KLIBCREQFLAGS += -mabi=aapcs-linux -mno-thumb-interwork | ||
12 | +KLIBCLDFLAGS += $(FIX_ARMV4_EABI_BX) | ||
13 | else | ||
14 | KLIBCREQFLAGS += -mabi=apcs-gnu -mno-thumb-interwork | ||
15 | endif | ||
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/klcc-consider-sysroot.patch b/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/klcc-consider-sysroot.patch new file mode 100644 index 000000000..9bc4835dc --- /dev/null +++ b/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/klcc-consider-sysroot.patch | |||
@@ -0,0 +1,14 @@ | |||
1 | diff --git a/klcc/klcc.in b/klcc/klcc.in | ||
2 | index 43d0984..61e9385 100644 | ||
3 | --- a/klcc/klcc.in | ||
4 | +++ b/klcc/klcc.in | ||
5 | @@ -204,6 +204,9 @@ while ( defined($a = shift(@ARGV)) ) { | ||
6 | # Libraries | ||
7 | push(@libs, $a); | ||
8 | push(@libs, shift(@ARGV)) if ( $2 eq '' ); | ||
9 | + } elsif ( $a =~ /^--([sysroot=])(.*)$/ ) { | ||
10 | + # Override gcc encoded sysroot | ||
11 | + push(@ccopt, $a); | ||
12 | } else { | ||
13 | die "$0: unknown option: $a\n"; | ||
14 | } | ||
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/klibc-config-eabi.patch b/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/klibc-config-eabi.patch new file mode 100644 index 000000000..316c80a92 --- /dev/null +++ b/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/klibc-config-eabi.patch | |||
@@ -0,0 +1,14 @@ | |||
1 | Patch was imported from the OpenEmbedded git server | ||
2 | (git://git.openembedded.org/openembedded) | ||
3 | as of commit id b6764cf32ec93547531130dca364fb95e1c495f4 | ||
4 | Signed-off-by: Thomas Kunze <thommycheck@gmx.de> | ||
5 | |||
6 | diff -Nur klibc-1.5/defconfig klibc-1.5p/defconfig | ||
7 | --- klibc-1.5/defconfig 2007-03-04 02:52:10.000000000 +0100 | ||
8 | +++ klibc-1.5p/defconfig 2008-02-08 19:24:22.337127756 +0100 | ||
9 | @@ -5,4 +5,4 @@ | ||
10 | CONFIG_REGPARM=y | ||
11 | # ARM options | ||
12 | # CONFIG_KLIBC_THUMB is not set | ||
13 | -# CONFIG_AEABI is not set | ||
14 | +CONFIG_AEABI=y | ||
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/klibc-linux-libc-dev.patch b/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/klibc-linux-libc-dev.patch new file mode 100644 index 000000000..204306475 --- /dev/null +++ b/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/klibc-linux-libc-dev.patch | |||
@@ -0,0 +1,22 @@ | |||
1 | commit 43adf69062254fb4f8d4d11fb5fe36a60ae25d5a | ||
2 | Author: Ben Hutchings <ben@decadent.org.uk> | ||
3 | Date: Sun Mar 14 18:41:56 2010 +0000 | ||
4 | |||
5 | Taken from debian "Fix klibc Debian specific build trouble" | ||
6 | Adapted for klibc_2.0.2 | ||
7 | |||
8 | Index: klibc-2.0~rc2/scripts/Kbuild.install | ||
9 | =================================================================== | ||
10 | --- klibc-2.0~rc2.orig/scripts/Kbuild.install 2012-02-11 18:50:21.000000000 +0000 | ||
11 | +++ klibc-2.0~rc2/scripts/Kbuild.install 2012-02-11 19:04:52.000000000 +0000 | ||
12 | @@ -95,7 +95,9 @@ | ||
13 | $(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include | ||
14 | $(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)lib | ||
15 | $(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)bin | ||
16 | - $(Q)$(MAKE) -C $(KLIBCKERNELSRC) ARCH=$(KLIBCARCH) INSTALL_HDR_PATH=$(INSTALLROOT)$(INSTALLDIR)/$(KCROSS) headers_install | ||
17 | + $(Q)for x in ../../../include/asm ../../../include/asm-generic ../../../include/linux ../../../include/mtd; do \ | ||
18 | + ln -sf $${x} $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/ || exit; \ | ||
19 | + done | ||
20 | $(Q)cp -rf usr/include/. $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/. | ||
21 | $(Q)chmod -R a+rX $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include | ||
22 | $(Q)$(install-data) $(srctree)/klcc/klcc.1 $(INSTALLROOT)$(mandir)/man1/$(KCROSS)klcc.1 | ||
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/staging.patch b/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/staging.patch new file mode 100644 index 000000000..400864bb2 --- /dev/null +++ b/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/staging.patch | |||
@@ -0,0 +1,144 @@ | |||
1 | Patch was imported from the OpenEmbedded git server | ||
2 | (git://git.openembedded.org/openembedded) | ||
3 | as of commit id eefb99a313bbcc8f34c8b32bf0c5aa2dd2580735 | ||
4 | Signed-off-by: Thomas Kunze <thommycheck@gmx.de> | ||
5 | |||
6 | Minor edits following upstream changes | ||
7 | Signed-off-by: Andrea Adami <andrea.adami@gmail.com> | ||
8 | |||
9 | Index: klibc-1.5.24/scripts/Kbuild.install | ||
10 | =================================================================== | ||
11 | --- a/scripts/Kbuild.install 2011-07-27 15:50:53.000000000 +0200 | ||
12 | +++ b/scripts/Kbuild.install 2011-08-01 00:03:03.000000000 +0200 | ||
13 | @@ -88,13 +88,10 @@ | ||
14 | header: | ||
15 | $(Q)echo " INSTALL headers + man pages to $(INSTALLROOT)$(INSTALLDIR)" | ||
16 | $(Q)mkdir -p $(INSTALLROOT)$(bindir) | ||
17 | - $(Q)mkdir -p $(INSTALLROOT)$(mandir)/man1 | ||
18 | - $(Q)mkdir -p $(INSTALLROOT)$(SHLIBDIR) | ||
19 | $(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR) | ||
20 | $(Q)-rm -rf $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include | ||
21 | $(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include | ||
22 | $(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)lib | ||
23 | - $(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)bin | ||
24 | $(Q)for x in ../../../include/asm ../../../include/asm-generic ../../../include/linux ../../../include/mtd; do \ | ||
25 | ln -sf $${x} $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/ || exit; \ | ||
26 | done | ||
27 | @@ -103,7 +100,6 @@ | ||
28 | done | ||
29 | $(Q)cp -rf usr/include/. $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/. | ||
30 | $(Q)chmod -R a+rX $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include | ||
31 | - $(Q)$(install-data) $(srctree)/klcc/klcc.1 $(INSTALLROOT)$(mandir)/man1/$(KCROSS)klcc.1 | ||
32 | $(Q)$(install-bin) $(objtree)/klcc/$(KCROSS)klcc $(INSTALLROOT)$(bindir) | ||
33 | |||
34 | footer: header | ||
35 | |||
36 | Index: klibc-1.5.24/usr/dash/Kbuild | ||
37 | =================================================================== | ||
38 | --- a/usr/dash/Kbuild 2011-07-27 15:50:53.000000000 +0200 | ||
39 | +++ b/usr/dash/Kbuild 2011-08-01 00:07:56.000000000 +0200 | ||
40 | @@ -92,5 +92,3 @@ | ||
41 | $(obj)/syntax.h: $(obj)/syntax.c | ||
42 | $(Q): | ||
43 | |||
44 | -# Targets to install | ||
45 | -install-y := sh.shared | ||
46 | |||
47 | Index: klibc-1.5.24/usr/gzip/Kbuild | ||
48 | =================================================================== | ||
49 | --- a/usr/gzip/Kbuild 2011-07-27 15:50:53.000000000 +0200 | ||
50 | +++ b/usr/gzip/Kbuild 2011-08-01 00:06:39.000000000 +0200 | ||
51 | @@ -21,5 +21,3 @@ | ||
52 | # Cleaning | ||
53 | targets := gzip gzip.g gunzip zcat | ||
54 | |||
55 | -# Targets to install | ||
56 | -install-y := gzip gunzip zcat | ||
57 | |||
58 | Index: klibc-1.5.24/usr/kinit/fstype/Kbuild | ||
59 | =================================================================== | ||
60 | --- a/usr/kinit/fstype/Kbuild 2011-07-27 15:50:53.000000000 +0200 | ||
61 | +++ b/usr/kinit/fstype/Kbuild 2011-08-01 00:09:12.000000000 +0200 | ||
62 | @@ -21,5 +21,3 @@ | ||
63 | # Cleaning | ||
64 | clean-dirs := static shared | ||
65 | |||
66 | -# install binary | ||
67 | -install-y := $(shared-y) | ||
68 | |||
69 | Index: klibc-1.5.24/usr/kinit/ipconfig/Kbuild | ||
70 | =================================================================== | ||
71 | --- a/usr/kinit/ipconfig/Kbuild 2011-07-27 15:50:53.000000000 +0200 | ||
72 | +++ b/usr/kinit/ipconfig/Kbuild 2011-08-01 00:10:52.000000000 +0200 | ||
73 | @@ -27,5 +27,3 @@ | ||
74 | # Cleaning | ||
75 | clean-dirs := static shared | ||
76 | |||
77 | -# install binary | ||
78 | -install-y := $(shared-y) | ||
79 | |||
80 | Index: klibc-1.5.24/usr/kinit/Kbuild | ||
81 | =================================================================== | ||
82 | --- a/usr/kinit/Kbuild 2011-07-27 15:50:53.000000000 +0200 | ||
83 | +++ b/usr/kinit/Kbuild 2011-08-01 00:20:18.000000000 +0200 | ||
84 | @@ -33,5 +33,3 @@ | ||
85 | subdir- := fstype ipconfig nfsmount resume run-init | ||
86 | |||
87 | |||
88 | -# install binary | ||
89 | -install-y := kinit kinit.shared | ||
90 | |||
91 | Index: klibc-1.5.24/usr/kinit/nfsmount/Kbuild | ||
92 | =================================================================== | ||
93 | --- a/usr/kinit/nfsmount/Kbuild 2011-07-27 15:50:53.000000000 +0200 | ||
94 | +++ b/usr/kinit/nfsmount/Kbuild 2011-08-01 00:12:52.000000000 +0200 | ||
95 | @@ -23,5 +23,3 @@ | ||
96 | |||
97 | clean-dirs := static shared | ||
98 | |||
99 | -# Install binary | ||
100 | -install-y := $(shared-y) | ||
101 | |||
102 | Index: klibc-1.5.24/usr/kinit/resume/Kbuild | ||
103 | =================================================================== | ||
104 | --- a/usr/kinit/resume/Kbuild 2011-07-27 15:50:53.000000000 +0200 | ||
105 | +++ b/usr/kinit/resume/Kbuild 2011-08-01 00:13:51.000000000 +0200 | ||
106 | @@ -26,5 +26,3 @@ | ||
107 | # Cleaning | ||
108 | clean-dirs := static shared | ||
109 | |||
110 | -# install binary | ||
111 | -install-y := $(shared-y) | ||
112 | |||
113 | Index: klibc-1.5.24/usr/kinit/run-init/Kbuild | ||
114 | =================================================================== | ||
115 | --- a/usr/kinit/run-init/Kbuild 2011-07-27 15:50:53.000000000 +0200 | ||
116 | +++ b/usr/kinit/run-init/Kbuild 2011-08-01 00:14:41.000000000 +0200 | ||
117 | @@ -25,5 +25,3 @@ | ||
118 | # Cleaning | ||
119 | clean-dirs := static shared | ||
120 | |||
121 | -# install binary | ||
122 | -install-y := $(shared-y) | ||
123 | |||
124 | Index: klibc-1.5.24/usr/klibc/Kbuild | ||
125 | =================================================================== | ||
126 | --- a/usr/klibc/Kbuild 2011-07-27 15:50:53.000000000 +0200 | ||
127 | +++ b/usr/klibc/Kbuild 2011-08-01 00:18:11.000000000 +0200 | ||
128 | @@ -177,5 +177,3 @@ | ||
129 | $(INSTALLROOT)$(INSTALLDIR)/$(KLIBCCROSS)lib)) | ||
130 | $(Q)$(install-lib) $(obj)/klibc-$(SOLIBHASH).so \ | ||
131 | $(INSTALLROOT)$(INSTALLDIR)/$(KLIBCCROSS)lib | ||
132 | - $(Q)$(install-lib) $(obj)/klibc-$(SOLIBHASH).so \ | ||
133 | - $(INSTALLROOT)$(SHLIBDIR) | ||
134 | |||
135 | Index: klibc-1.5.24/usr/utils/Kbuild | ||
136 | =================================================================== | ||
137 | --- a/usr/utils/Kbuild 2011-07-27 15:50:53.000000000 +0200 | ||
138 | +++ b/usr/utils/Kbuild 2011-08-01 00:19:13.000000000 +0200 | ||
139 | @@ -72,5 +72,3 @@ | ||
140 | # Clean deletes the static and shared dir | ||
141 | clean-dirs := static shared | ||
142 | |||
143 | -# install only install the shared binaries | ||
144 | -install-y := $(shared-y) shared/reboot shared/poweroff | ||
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/use-env-for-perl.patch b/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/use-env-for-perl.patch new file mode 100644 index 000000000..eac128cc0 --- /dev/null +++ b/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/use-env-for-perl.patch | |||
@@ -0,0 +1,25 @@ | |||
1 | Patch was imported from the OpenEmbedded git server | ||
2 | (git://git.openembedded.org/openembedded) | ||
3 | as of commit id 676cbb54d42c89a4832871064cfcb7ee2ad372ee | ||
4 | |||
5 | klcc-cross: Add patch to use /usr/bin/env perl | ||
6 | Certain configurations (such as autobuilders) may build in very | ||
7 | deep paths (that are longer than the #! mechanism allows) which | ||
8 | makes it unsafe to use the direct path for perl. In our case we know | ||
9 | that /usr/bin/env perl will always return ours (if it has been built). | ||
10 | |||
11 | Signed-off-by: Tom Rini <tom_rini@mentor.com> | ||
12 | |||
13 | Index: klibc-1.5.20/klcc/makeklcc.pl | ||
14 | =================================================================== | ||
15 | --- a/klcc/makeklcc.pl | ||
16 | +++ b/klcc/makeklcc.pl | ||
17 | @@ -26,7 +26,7 @@ sub pathsearch($) { | ||
18 | return undef; | ||
19 | } | ||
20 | |||
21 | -print "#!${perlpath}\n"; | ||
22 | +print "#!/usr/bin/env perl\n"; | ||
23 | |||
24 | open(KLIBCCONF, "< $klibcconf\0") | ||
25 | or die "$0: cannot open $klibcconf: $!\n"; | ||
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-static-utils_2.0.4.bb b/meta-initramfs/recipes-devtools/klibc/klibc-static-utils_2.0.4.bb new file mode 100644 index 000000000..c835fd647 --- /dev/null +++ b/meta-initramfs/recipes-devtools/klibc/klibc-static-utils_2.0.4.bb | |||
@@ -0,0 +1,12 @@ | |||
1 | SUMMARY = "klibc utils for initramfs statically compiled" | ||
2 | |||
3 | FILESPATH =. "${FILE_DIRNAME}/klibc-${PV}:" | ||
4 | |||
5 | PACKAGES = "${PN}" | ||
6 | FILES_${PN} = "" | ||
7 | |||
8 | KLIBC_UTILS_VARIANT = "static" | ||
9 | KLIBC_UTILS_PKGNAME = "klibc-static-utils" | ||
10 | |||
11 | require klibc-utils.inc | ||
12 | require klibc.inc | ||
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-utils.inc b/meta-initramfs/recipes-devtools/klibc/klibc-utils.inc new file mode 100644 index 000000000..9014f5267 --- /dev/null +++ b/meta-initramfs/recipes-devtools/klibc/klibc-utils.inc | |||
@@ -0,0 +1,60 @@ | |||
1 | do_install() { | ||
2 | install -d ${D}${base_bindir} | ||
3 | install -d ${D}${base_sbindir} | ||
4 | # debian packages kinit + kinit.shared but only sh.shared | ||
5 | if [ "${KLIBC_UTILS_VARIANT}" = "shared" ]; then | ||
6 | install -m 755 usr/kinit/kinit ${D}${base_bindir}/kinit | ||
7 | install -m 755 usr/kinit/kinit.shared ${D}${base_bindir}/kinit.shared | ||
8 | install -m 755 usr/dash/sh.shared ${D}${base_bindir}/sh.shared | ||
9 | else | ||
10 | install -m 755 usr/dash/sh ${D}${base_bindir}/sh | ||
11 | install -m 755 usr/kinit/kinit ${D}${base_bindir}/kinit | ||
12 | fi | ||
13 | install -m 755 usr/gzip/gzip ${D}${base_bindir} | ||
14 | install -m 755 usr/kinit/fstype/${KLIBC_UTILS_VARIANT}/fstype ${D}${base_bindir} | ||
15 | install -m 755 usr/kinit/ipconfig/${KLIBC_UTILS_VARIANT}/ipconfig ${D}${base_bindir} | ||
16 | install -m 755 usr/kinit/nfsmount/${KLIBC_UTILS_VARIANT}/nfsmount ${D}${base_bindir} | ||
17 | install -m 755 usr/kinit/resume/${KLIBC_UTILS_VARIANT}/resume ${D}${base_bindir} | ||
18 | install -m 755 usr/kinit/run-init/${KLIBC_UTILS_VARIANT}/run-init ${D}${base_bindir} | ||
19 | install -m 755 usr/utils/${KLIBC_UTILS_VARIANT}/cat ${D}${base_bindir} | ||
20 | install -m 755 usr/utils/${KLIBC_UTILS_VARIANT}/chroot ${D}${base_bindir} | ||
21 | install -m 755 usr/utils/${KLIBC_UTILS_VARIANT}/cpio ${D}${base_bindir} | ||
22 | install -m 755 usr/utils/${KLIBC_UTILS_VARIANT}/dd ${D}${base_bindir} | ||
23 | install -m 755 usr/utils/${KLIBC_UTILS_VARIANT}/dmesg ${D}${base_bindir} | ||
24 | install -m 755 usr/utils/${KLIBC_UTILS_VARIANT}/false ${D}${base_bindir} | ||
25 | install -m 755 usr/utils/${KLIBC_UTILS_VARIANT}/halt ${D}${base_bindir} | ||
26 | install -m 755 usr/utils/${KLIBC_UTILS_VARIANT}/kill ${D}${base_bindir} | ||
27 | install -m 755 usr/utils/${KLIBC_UTILS_VARIANT}/ln ${D}${base_bindir} | ||
28 | # losetup goes in ${base_sbindir} | ||
29 | install -m 755 usr/utils/${KLIBC_UTILS_VARIANT}/losetup ${D}${base_sbindir} | ||
30 | install -m 755 usr/utils/${KLIBC_UTILS_VARIANT}/ls ${D}${base_bindir} | ||
31 | install -m 755 usr/utils/${KLIBC_UTILS_VARIANT}/minips ${D}${base_bindir} | ||
32 | install -m 755 usr/utils/${KLIBC_UTILS_VARIANT}/mkdir ${D}${base_bindir} | ||
33 | install -m 755 usr/utils/${KLIBC_UTILS_VARIANT}/mkfifo ${D}${base_bindir} | ||
34 | install -m 755 usr/utils/${KLIBC_UTILS_VARIANT}/mknod ${D}${base_bindir} | ||
35 | install -m 755 usr/utils/${KLIBC_UTILS_VARIANT}/mount ${D}${base_bindir} | ||
36 | install -m 755 usr/utils/${KLIBC_UTILS_VARIANT}/mv ${D}${base_bindir} | ||
37 | install -m 755 usr/utils/${KLIBC_UTILS_VARIANT}/nuke ${D}${base_bindir} | ||
38 | install -m 755 usr/utils/${KLIBC_UTILS_VARIANT}/pivot_root ${D}${base_bindir} | ||
39 | install -m 755 usr/utils/${KLIBC_UTILS_VARIANT}/poweroff ${D}${base_bindir} | ||
40 | install -m 755 usr/utils/${KLIBC_UTILS_VARIANT}/readlink ${D}${base_bindir} | ||
41 | install -m 755 usr/utils/${KLIBC_UTILS_VARIANT}/reboot ${D}${base_bindir} | ||
42 | install -m 755 usr/utils/${KLIBC_UTILS_VARIANT}/sleep ${D}${base_bindir} | ||
43 | install -m 755 usr/utils/${KLIBC_UTILS_VARIANT}/sync ${D}${base_bindir} | ||
44 | install -m 755 usr/utils/${KLIBC_UTILS_VARIANT}/true ${D}${base_bindir} | ||
45 | install -m 755 usr/utils/${KLIBC_UTILS_VARIANT}/umount ${D}${base_bindir} | ||
46 | install -m 755 usr/utils/${KLIBC_UTILS_VARIANT}/uname ${D}${base_bindir} | ||
47 | ln -s gzip ${D}${base_bindir}/gunzip | ||
48 | ln -s gzip ${D}${base_bindir}/zcat | ||
49 | } | ||
50 | |||
51 | EXTRA_KLIBC_DEPS = "${@base_conditional('KLIBC_UTILS_VARIANT', 'shared', '${THIS_LIBKLIBC}', '', d)}" | ||
52 | |||
53 | PACKAGES_DYNAMIC += "^${KLIBC_UTILS_PKGNAME}-.*" | ||
54 | |||
55 | python populate_packages_prepend () { | ||
56 | base_bin_dir = d.expand('${base_bindir}') | ||
57 | do_split_packages(d, base_bin_dir, '(.*)', '${KLIBC_UTILS_PKGNAME}-%s', 'Klibc util for %s', extra_depends='${EXTRA_KLIBC_DEPS}', allow_links=True, allow_dirs=True) | ||
58 | base_sbin_dir = d.expand('${base_sbindir}') | ||
59 | do_split_packages(d, base_sbin_dir, '(.*)', '${KLIBC_UTILS_PKGNAME}-%s', 'Klibc util for %s', extra_depends='${EXTRA_KLIBC_DEPS}', allow_dirs=True) | ||
60 | } | ||
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-utils_2.0.4.bb b/meta-initramfs/recipes-devtools/klibc/klibc-utils_2.0.4.bb new file mode 100644 index 000000000..06e71cb7b --- /dev/null +++ b/meta-initramfs/recipes-devtools/klibc/klibc-utils_2.0.4.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | SUMMARY = "klibc utils for initramfs" | ||
2 | |||
3 | FILESPATH =. "${FILE_DIRNAME}/klibc-${PV}:" | ||
4 | |||
5 | PACKAGES = "${PN}" | ||
6 | FILES_${PN} = "" | ||
7 | |||
8 | KLIBC_UTILS_VARIANT = "shared" | ||
9 | KLIBC_UTILS_PKGNAME = "klibc-utils" | ||
10 | |||
11 | require klibc-utils.inc | ||
12 | require klibc.inc | ||
13 | |||
14 | DEPENDS = "klibc" | ||
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc.inc b/meta-initramfs/recipes-devtools/klibc/klibc.inc new file mode 100644 index 000000000..f3e9972a4 --- /dev/null +++ b/meta-initramfs/recipes-devtools/klibc/klibc.inc | |||
@@ -0,0 +1,52 @@ | |||
1 | DESCRIPTION = "klibc is intended to be a minimalistic libc subset for \ | ||
2 | use with initramfs. It is deliberately written for small size, \ | ||
3 | minimal entaglement, and portability, not speed." | ||
4 | SECTION = "libs" | ||
5 | LICENSE = "BSD-3-Clause & GPL-2.0 & MIT & Zlib" | ||
6 | LIC_FILES_CHKSUM = "file://usr/klibc/LICENSE;md5=d75181f10e998c21eb147f6d2e43ce8b" | ||
7 | DEPENDS = "linux-libc-headers perl-native" | ||
8 | SRCREV = "7763dd33e5b8eed4b9e3c583c02c10176fd550d3" | ||
9 | |||
10 | SRC_URI = "git://git.kernel.org/pub/scm/libs/klibc/klibc.git" | ||
11 | SRC_URI_append_linux-gnueabi = " file://klibc-config-eabi.patch \ | ||
12 | file://armv4-fix-v4bx.patch \ | ||
13 | " | ||
14 | SRC_URI_append_linux-uclibceabi = " file://klibc-config-eabi.patch \ | ||
15 | file://armv4-fix-v4bx.patch \ | ||
16 | " | ||
17 | SRC_URI += "file://klibc-linux-libc-dev.patch \ | ||
18 | file://staging.patch \ | ||
19 | file://klcc-consider-sysroot.patch \ | ||
20 | " | ||
21 | |||
22 | S = "${WORKDIR}/git" | ||
23 | |||
24 | EXTRA_OEMAKE = "'KLIBCARCH=${KLIBC_ARCH}' \ | ||
25 | 'CROSS_COMPILE=${TARGET_PREFIX}' \ | ||
26 | 'KLIBCKERNELSRC=${STAGING_DIR_TARGET}${exec_prefix}' \ | ||
27 | 'prefix=${exec_prefix}' \ | ||
28 | 'INSTALLROOT=${D}' \ | ||
29 | 'SHLIBDIR=${libdir}' \ | ||
30 | " | ||
31 | |||
32 | export FIX_ARMV4_EABI_BX = "${FIX_V4BX}" | ||
33 | |||
34 | do_configure () { | ||
35 | ln -sf "${STAGING_DIR_TARGET}${exec_prefix}" linux | ||
36 | } | ||
37 | |||
38 | INHIBIT_PACKAGE_STRIP = "1" | ||
39 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" | ||
40 | KLIBC_ARCH = "${TARGET_ARCH}" | ||
41 | KLIBC_ARCH_aarch64 = "arm64" | ||
42 | KLIBC_ARCH_armeb = "arm" | ||
43 | KLIBC_ARCH_mipsel = "mips" | ||
44 | KLIBC_ARCH_x86 = "i386" | ||
45 | KLIBC_ARCH_x86-64 = "x86_64" | ||
46 | KLIBC_ARCH_i486 = "i386" | ||
47 | KLIBC_ARCH_i586 = "i386" | ||
48 | KLIBC_ARCH_i686 = "i386" | ||
49 | KLIBC_ARCH_pentium = "i386" | ||
50 | KLIBC_ARCH_powerpc = "ppc" | ||
51 | KLIBC_ARCH_powerpc64 = "ppc64" | ||
52 | THIS_LIBKLIBC = "libklibc (= ${PV})" | ||
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc_2.0.4.bb b/meta-initramfs/recipes-devtools/klibc/klibc_2.0.4.bb new file mode 100644 index 000000000..bc80f382f --- /dev/null +++ b/meta-initramfs/recipes-devtools/klibc/klibc_2.0.4.bb | |||
@@ -0,0 +1,24 @@ | |||
1 | SUMMARY = "klibc, a small C library for use with initramfs" | ||
2 | |||
3 | do_install() { | ||
4 | oe_runmake install | ||
5 | # the crosscompiler is packaged by klcc-cross | ||
6 | # remove klcc | ||
7 | rm ${D}${bindir}/klcc | ||
8 | # remove now empty dir | ||
9 | rmdir ${D}${bindir} | ||
10 | install -d ${D}${libdir} | ||
11 | install -m 755 usr/klibc/klibc-*.so ${D}${libdir} | ||
12 | (cd ${D}${libdir}; ln -s klibc-*.so klibc.so) | ||
13 | } | ||
14 | |||
15 | PACKAGES = "libklibc libklibc-staticdev libklibc-dev" | ||
16 | |||
17 | FILES_libklibc = "${libdir}/klibc-*.so" | ||
18 | FILES_libklibc-staticdev = "${libdir}/klibc/lib/libc.a" | ||
19 | FILES_libklibc-dev = "${libdir}/klibc.so \ | ||
20 | ${libdir}/klibc/lib/* \ | ||
21 | ${libdir}/klibc/include/* \ | ||
22 | " | ||
23 | |||
24 | require klibc.inc | ||