[ptxdist] ld-wrapper mislinks at91bootstrap

2017-11-06 Thread Ladislav Michl
Hi there,

I just added new platform (at91) to my BSP and configured at91bootstrap
v3.8.9.

Problem is that PTXDist-2017.10 produces way too large binary:
2099622 at91sam9260ek-dataflashboot-barebox-3.8.9.bin
while correct size is:
   2470 at91sam9260ek-dataflashboot-barebox-3.8.9.bin

Problem turned out to be ld-wrapper script or something it calls.
Just replacing ld-wrapper in ptxdist-2017.10.0/scripts/wrapper to point
directly to arm-v5te-linux-gnueabi-ld is enough to solve problem.
Does anyone clue where to look? Call path is:
sysroot-host/lib/wrapper in $PATH where
arm-v5te-linux-gnueabi-ld -> ptxdist-2017.10.0/scripts/wrapper/ld-wrapper

Thank you,
ladis

___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH 0/2] ptxdist: pkg-config changes

2017-11-06 Thread Clemens Gruber
Hi,

this is a first attempt at fixing the problems with the hardcoded
libraries, occuring on ArchLinux (before ncurses 6.0+20170902-3).

As a solution, now we detect ncurses and its sublibraries panel and menu
through pkg-config. The --with-ncurses argument can still be used to
prepend the include search path. (If that is no longer necessary / not
used in practice, I can drop it in v2)

I also added some additional checks, recommended by autoscan 2.69, in
the 2nd commit.

Cheers,
Clemens

Clemens Gruber (2):
  ptxdist: Use pkg-config for ncurses detection
  ptxdist: Add more checks, recommended by autoscan

 Makefile.in  |  1 +
 configure.ac | 52 +---
 scripts/kconfig/Makefile |  2 +-
 3 files changed, 47 insertions(+), 8 deletions(-)

-- 
2.15.0


___
ptxdist mailing list
ptxdist@pengutronix.de

Re: [ptxdist] ld-wrapper mislinks at91bootstrap

2017-11-06 Thread Ladislav Michl
On Mon, Nov 06, 2017 at 07:58:58PM +0100, Ladislav Michl wrote:
> Hi there,
> 
> I just added new platform (at91) to my BSP and configured at91bootstrap
> v3.8.9.
> 
> Problem is that PTXDist-2017.10 produces way too large binary:
> 2099622 at91sam9260ek-dataflashboot-barebox-3.8.9.bin
> while correct size is:
>2470 at91sam9260ek-dataflashboot-barebox-3.8.9.bin
> 
> Problem turned out to be ld-wrapper script or something it calls.
> Just replacing ld-wrapper in ptxdist-2017.10.0/scripts/wrapper to point
> directly to arm-v5te-linux-gnueabi-ld is enough to solve problem.
> Does anyone clue where to look? Call path is:
> sysroot-host/lib/wrapper in $PATH where
> arm-v5te-linux-gnueabi-ld -> ptxdist-2017.10.0/scripts/wrapper/ld-wrapper

So, ld-wrapper is adding:
--- at91sam9260ek-dataflashboot-barebox-3.8.9.map   2017-11-07 
07:50:28.819011233 +0100
+++ at91sam9260ek-dataflashboot-barebox-3.8.9.map   2017-11-07 
07:47:48.605530524 +0100
@@ -155,6 +155,11 @@
 
 0x. = ALIGN (0x4)
 
+.note.gnu.build-id
+0x   0x24
+ .note.gnu.build-id
+0x   0x24 linker stubs
+
 .text   0x0020  0x1a0
 0x0020_stext = .
  *(.text)

Modifying at91bootstrap's Makefile to do --remove-section=.note.gnu.build-id
fixes it.

Are there other options to fix this?

ladis

___
ptxdist mailing list
ptxdist@pengutronix.de

Re: [ptxdist] ld-wrapper mislinks at91bootstrap

2017-11-06 Thread Ladislav Michl
On Tue, Nov 07, 2017 at 08:11:17AM +0100, Ladislav Michl wrote:
> On Mon, Nov 06, 2017 at 07:58:58PM +0100, Ladislav Michl wrote:
> > Hi there,
> > 
> > I just added new platform (at91) to my BSP and configured at91bootstrap
> > v3.8.9.
> > 
> > Problem is that PTXDist-2017.10 produces way too large binary:
> > 2099622 at91sam9260ek-dataflashboot-barebox-3.8.9.bin
> > while correct size is:
> >2470 at91sam9260ek-dataflashboot-barebox-3.8.9.bin
> > 
> > Problem turned out to be ld-wrapper script or something it calls.
> > Just replacing ld-wrapper in ptxdist-2017.10.0/scripts/wrapper to point
> > directly to arm-v5te-linux-gnueabi-ld is enough to solve problem.
> > Does anyone clue where to look? Call path is:
> > sysroot-host/lib/wrapper in $PATH where
> > arm-v5te-linux-gnueabi-ld -> ptxdist-2017.10.0/scripts/wrapper/ld-wrapper
> 
> So, ld-wrapper is adding:
> --- at91sam9260ek-dataflashboot-barebox-3.8.9.map 2017-11-07 
> 07:50:28.819011233 +0100
> +++ at91sam9260ek-dataflashboot-barebox-3.8.9.map 2017-11-07 
> 07:47:48.605530524 +0100
> @@ -155,6 +155,11 @@
>  
>  0x. = ALIGN (0x4)
>  
> +.note.gnu.build-id
> +0x   0x24
> + .note.gnu.build-id
> +0x   0x24 linker stubs
> +
>  .text   0x0020  0x1a0
>  0x0020_stext = .
>   *(.text)
> 
> Modifying at91bootstrap's Makefile to do --remove-section=.note.gnu.build-id
> fixes it.
> 
> Are there other options to fix this?

Well, I'll fix upstream the same way kernel handles this.
Kernel is always right: https://lkml.org/lkml/2011/12/15/162
Another option is to use u-boot way, ie. nicely align a embed
this section into binary, but as every byte matters here, lets
not do this.

ladis

___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH 2/2] krb5: add MIT Kerberos package

2017-11-06 Thread Jan Luebbe
This adds a package for the krb5 Kerberos implementation. The tools and
admin libraries (which are not required for servers) are only installed
when requested.

Signed-off-by: Jan Luebbe 
---
 rules/krb5.in   |  37 +
 rules/krb5.make | 126 
 2 files changed, 163 insertions(+)
 create mode 100644 rules/krb5.in
 create mode 100644 rules/krb5.make

diff --git a/rules/krb5.in b/rules/krb5.in
new file mode 100644
index ..c07edcbd0f35
--- /dev/null
+++ b/rules/krb5.in
@@ -0,0 +1,37 @@
+## SECTION=security
+
+menuconfig KRB5
+   tristate
+   select HOST_E2FSPROGS
+   select E2FSPROGS
+   select E2FSPROGS_LIBCOM_ERR
+   select E2FSPROGS_LIBSS
+   select OPENSSL
+   select LIBEDIT
+   prompt "Kerberos"
+   help
+ This is the MIT implementation of the Kerberos network authentication
+ protocol.
+
+if KRB5
+
+config KRB5_ADMIN_LIBS
+   bool
+   prompt "enable admin libraries (libkadm5clnt & libkadm5srv)"
+
+config KRB5_CLIENT_TOOLS
+   bool
+   prompt "enable client tools"
+
+config KRB5_ADMIN_TOOLS
+   bool
+   select KRB5_ADMIN_LIBS
+   prompt "enable admin tools (kinit & kadmin)"
+
+config KRB5_EXAMPLES
+   bool
+   prompt "enable example tools"
+   help
+ This installs gss-client, gss-server, sclient and sserver.
+
+endif
diff --git a/rules/krb5.make b/rules/krb5.make
new file mode 100644
index ..c9dabfb087bc
--- /dev/null
+++ b/rules/krb5.make
@@ -0,0 +1,126 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2017 by Jan Luebbe 
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_KRB5) += krb5
+
+#
+# Paths and names
+#
+KRB5_VERSION   := 1.15.2
+KRB5_MD5   := b160f72161c730897dc7689f876b6e2a
+KRB5   := krb5-$(KRB5_VERSION)
+KRB5_SUFFIX:= tar.gz
+KRB5_URL   := 
https://web.mit.edu/kerberos/dist/krb5/1.15/$(KRB5).$(KRB5_SUFFIX)
+KRB5_SOURCE:= $(SRCDIR)/$(KRB5).$(KRB5_SUFFIX)
+KRB5_DIR   := $(BUILDDIR)/$(KRB5)
+KRB5_LICENSE   := MIT
+
+KRB5_SUBDIR:= src
+
+# 
+# Prepare
+# 
+
+KRB5_PATH  := PATH=$(CROSS_PATH)
+KRB5_CONF_ENV  := \
+   $(CROSS_ENV) \
+   krb5_cv_attr_constructor_destructor=yes,yes \
+   ac_cv_func_regcomp=yes \
+   ac_cv_printf_positional=yes \
+   ac_cv_file__etc_environment=yes \
+   ac_cv_file__etc_TIMEZONE=no
+
+#
+# autoconf
+#
+KRB5_CONF_TOOL := autoconf
+KRB5_CONF_OPT  := \
+   $(CROSS_AUTOCONF_USR) \
+   --disable-dns-for-realm \
+   --enable-delayed-initialization \
+   --enable-thread-support \
+   --disable-rpath \
+   --disable-athena \
+   --disable-audit-plugin \
+   --enable-kdc-lookaside-cache \
+   --disable-asan \
+   --enable-pkinit \
+   --without-size-optimizations \
+   --with-system-et \
+   --with-system-ss \
+   --without-system-db \
+   --without-netlib \
+   --without-hesiod \
+   --without-ldap \
+   --without-tcl \
+   --without-vague-errors \
+   --with-crypto-impl=openssl \
+   --with-prng-alg=fortuna \
+   --with-pkinit-crypto-impl=openssl \
+   --with-tls-impl=openssl \
+   --with-libedit \
+   --without-readline \
+   --without-system-verto
+
+# 
+# Target-Install
+# 
+
+$(STATEDIR)/krb5.targetinstall:
+   @$(call targetinfo)
+
+   @$(call install_init, krb5)
+   @$(call install_fixup, krb5,PRIORITY,optional)
+   @$(call install_fixup, krb5,SECTION,base)
+   @$(call install_fixup, krb5,AUTHOR,"Jan Luebbe ")
+   @$(call install_fixup, krb5,DESCRIPTION,missing)
+
+   @$(call install_lib, krb5, 0, 0, 0644, libgssapi_krb5)
+   @$(call install_lib, krb5, 0, 0, 0644, libgssrpc)
+   @$(call install_lib, krb5, 0, 0, 0644, libk5crypto)
+   @$(call install_lib, krb5, 0, 0, 0644, libkdb5)
+   @$(call install_lib, krb5, 0, 0, 0644, libkrb5)
+   @$(call install_lib, krb5, 0, 0, 0644, libkrb5support)
+
+ifdef PTXCONF_KRB5_ADMIN_LIBS
+   @$(call install_lib, krb5, 0, 0, 0644, libkadm5clnt_mit)
+   @$(call install_lib, krb5, 0, 0, 0644, libkadm5srv_mit)
+endif
+
+ifdef PTXCONF_KRB5_CLIENT_TOOLS
+   @$(call install_copy, krb5, 0, 0, 0755, -, /usr/bin/kdestroy)
+   @$(call install_copy, krb5, 0, 0, 0755, -, /usr/bin/klist)
+   @$(call install_copy, krb5, 0, 0, 0755, -, /usr/bin/kpasswd)
+   @$(call install_copy, krb5, 0, 0, 0755, 

[ptxdist] [PATCH 1/2] e2fsprogs: install headers and host tools

2017-11-06 Thread Jan Luebbe
The compile_et and mk_cmds helpers are needed to generate code during
compilation.

Signed-off-by: Jan Luebbe 
---
 rules/e2fsprogs.make  |  2 +-
 rules/host-e2fsprogs.make | 14 ++
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/rules/e2fsprogs.make b/rules/e2fsprogs.make
index 0b0a81668dd4..48806973beb9 100644
--- a/rules/e2fsprogs.make
+++ b/rules/e2fsprogs.make
@@ -73,7 +73,7 @@ E2FSPROGS_CONF_OPT:= \
--without-included-gettext
 
 E2FSPROGS_MAKE_OPT := $(if $(filter 1,$(strip $(PTXDIST_VERBOSE))),V=1)
-E2FSPROGS_INSTALL_OPT  := install
+E2FSPROGS_INSTALL_OPT  := install install-libs
 
 # 
 # Target-Install
diff --git a/rules/host-e2fsprogs.make b/rules/host-e2fsprogs.make
index c19b7b954b40..4c25cd9e2cb0 100644
--- a/rules/host-e2fsprogs.make
+++ b/rules/host-e2fsprogs.make
@@ -59,3 +59,17 @@ HOST_E2FSPROGS_CONF_OPT  := \
 
 # vim: syntax=make
 
+# 
+# Install
+# 
+
+HOST_E2FSPROGS_INSTALL_OPT := install install-libs
+
+$(STATEDIR)/host-e2fsprogs.install.post:
+   @$(call targetinfo)
+   @$(call world/install.post, HOST_E2FSPROGS)
+   @sed -i -e 's,/share,$(PTXCONF_SYSROOT_HOST)/share,' \
+   $(PTXCONF_SYSROOT_HOST)/bin/compile_et
+   @sed -i -e 's,/share,$(PTXCONF_SYSROOT_HOST)/share,' \
+   $(PTXCONF_SYSROOT_HOST)/bin/mk_cmds
+   @$(call touch)
-- 
2.11.0


___
ptxdist mailing list
ptxdist@pengutronix.de