From: Jan Viktorin <viktorin@rehivetech.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v3 3/3] dpdk: new package
Date: Fri, 25 Mar 2016 13:32:40 +0100 [thread overview]
Message-ID: <20160325133240.38684e8b@jvn> (raw)
In-Reply-To: <20160322211232.374d47a2@free-electrons.com>
Hello Thomas,
I've got some questions about the Config.in...
On Tue, 22 Mar 2016 21:12:32 +0100
Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote:
> Hello,
>
> On Tue, 22 Mar 2016 11:36:26 +0100, Jan Viktorin wrote:
>
> > diff --git a/package/dpdk/Config.in b/package/dpdk/Config.in
> > new file mode 100644
> > index 0000000..a42271e
> > --- /dev/null
> > +++ b/package/dpdk/Config.in
> > @@ -0,0 +1,53 @@
> > +config BR2_PACKAGE_DPDK
> > + bool "dpdk"
>
> Indentation of properties should be done with one tab (ditto in the
> following lines)
>
> > + depends on (BR2_i386 && !BR2_x86_i386 && !BR2_x86_i486 \
> > + && !BR2_x86_i586 && !BR2_x86_x1000) \
> > + || BR2_ARM_CPU_ARMV7A || BR2_aarch64 || BR2_aarch64_be
>
> I'm wondering why you have this list of architecture dependencies. Is
> it because there is really some architecture specific code, or is it a
> left-over from the times we didn't had the BR2_TOOLCHAIN_HAS_x
> options ?
>
> If that's really needed, please add a blind option like this:
>
> config BR2_PACKAGE_DPDK_ARCH_SUPPORTS
> bool
> default y if ...
So, should I move here also the HAS_SYNC checks?
>
> That you can re-use as a dependency, both for the comment (see below)
> and the main option.
>
> > + depends on BR2_TOOLCHAIN_USES_GLIBC
>
> Then you need to have a comment like:
>
> comment "dpdk needs a toolchain w/ glibc"
> depends on !BR2_TOOLCHAIN_USES_GLIBC
> depends on BR2_TOOLCHAIN_HAS_SYNC_...
The conditiion must be "if all dependencies but BR2_TOOLCHAIN_USES_GLIBC
are met", is it right? So, should I put here the HAS_SYNC_*,
ARCH_SUPPORTS, BR2_LINUX_KERNEL and BR2_LINUX_NEEDS_MODULES?
>
> > + depends on BR2_TOOLCHAIN_HAS_SYNC_1
> > + depends on BR2_TOOLCHAIN_HAS_SYNC_2
> > + depends on BR2_TOOLCHAIN_HAS_SYNC_4
> > + depends on BR2_TOOLCHAIN_HAS_SYNC_8
>
> Cosmetic nit, but I would prefer to see:
>
> depends on BR2_TOOLCHAIN_HAS_SYNC_1 && \
> BR2_TOOLCHAIN_HAS_SYNC_2 && \
> BR2_TOOLCHAIN_HAS_SYNC_4 && \
> BR2_TOOLCHAIN_HAS_SYNC_8
[...]
> depends on BR2_LINUX_KERNEL
>
> in your Config.in, as well as a corresponding comment:
>
> comment "dpdk needs the Linux kernel to be built"
> depends on !BR2_LINUX_KERNEL
The same situation here. Should I test "all && !BR2_LINUX_KERNEL"?
>
> > +
> > +ifeq ($(BR2_PACKAGE_LIBPCAP),y)
> > +DPDK_DEPENDENCIES += libpcap
> > +endif
> > +
> > +ifeq ($(BR2_SHARED_LIBS),y)
> > +define DPDK_ENABLE_SHARED_LIBS
> > + $(call KCONFIG_ENABLE_OPT,CONFIG_RTE_BUILD_SHARED_LIB,\
> > + $(@D)/build/.config)
> > +endef
> > +
> > +DPDK_POST_CONFIGURE_HOOKS += DPDK_ENABLE_SHARED_LIBS
> > +endif
> > +
> > +# We're building a kernel module without using the kernel-module infra,
> > +# so we need to tell we want module support in the kernel
> > +ifeq ($(BR2_PACKAGE_DPDK),y)
> > +LINUX_NEEDS_MODULES = y
> > +endif
>
> This is no longer the "right" way of doing this. Just select
> BR2_LINUX_NEEDS_MODULES in Config.in.
>
[...]
My current state is:
config BR2_PACKAGE_DPDK
depends on BR2_PACKAGE_DPDK_ARCH_SUPPORTS
depends on BR2_TOOLCHAIN_USES_GLIBC
depends on BR2_LINUX_NEEDS_MODULES
depends on BR2_TOOLCHAIN_HAS_SYNC_1 &&\
BR2_TOOLCHAIN_HAS_SYNC_2 &&\
BR2_TOOLCHAIN_HAS_SYNC_4 &&\
BR2_TOOLCHAIN_HAS_SYNC_8
config BR2_PACKAGE_DPDK_ARCH_SUPPORTS
bool
default y if (BR2_i386 && !BR2_x86_i386 && !BR2_x86_i486 \
&& !BR2_x86_i586 && !BR2_x86_x1000) \
|| BR2_ARM_CPU_ARMV7A || BR2_aarch64 || BR2_aarch64_be
comment "dpdk needs a toolchain w/ glibc"
depends on !BR2_TOOLCHAIN_USES_GLIBC
depends on ??
comment "dpdk needs the Linux kernel to be built"
depends on !BR2_LINUX_KERNEL
depends on ??
Jan
> > +$(eval $(generic-package))
>
> Other than that, looks good to me.
>
> Thomas
--
Jan Viktorin E-mail: Viktorin at RehiveTech.com
System Architect Web: www.RehiveTech.com
RehiveTech
Brno, Czech Republic
next prev parent reply other threads:[~2016-03-25 12:32 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-22 10:36 [Buildroot] [PATCH v3 0/3] dpdk: new package Jan Viktorin
2016-03-22 10:36 ` [Buildroot] [PATCH v3 1/3] python-ptyprocess: " Jan Viktorin
2016-03-22 11:02 ` Yegor Yefremov
2016-03-22 10:36 ` [Buildroot] [PATCH v3 2/3] python-pexpect: " Jan Viktorin
2016-03-22 11:06 ` Yegor Yefremov
2016-03-22 10:36 ` [Buildroot] [PATCH v3 3/3] dpdk: " Jan Viktorin
2016-03-22 20:12 ` Thomas Petazzoni
2016-03-23 12:50 ` Jan Viktorin
2016-03-25 12:32 ` Jan Viktorin [this message]
2016-03-25 13:17 ` Thomas Petazzoni
2016-03-27 1:31 ` [Buildroot] [PATCH v4 0/3] " Jan Viktorin
2016-03-27 1:31 ` [Buildroot] [PATCH v4 1/3] python-ptyprocess: " Jan Viktorin
2016-03-27 1:51 ` Jan Viktorin
2016-04-15 20:47 ` Thomas Petazzoni
2016-03-27 1:31 ` [Buildroot] [PATCH v4 2/3] python-pexpect: " Jan Viktorin
2016-03-27 1:50 ` Jan Viktorin
2016-03-27 20:51 ` Yegor Yefremov
2016-04-15 20:49 ` Thomas Petazzoni
2016-03-27 1:31 ` [Buildroot] [PATCH v4 3/3] dpdk: " Jan Viktorin
2016-03-27 1:48 ` Jan Viktorin
2016-04-15 21:52 ` Thomas Petazzoni
2016-04-16 0:07 ` Jan Viktorin
2016-04-16 7:31 ` Thomas Petazzoni
2016-04-16 17:08 ` [Buildroot] [PATCH v5] " Jan Viktorin
2016-04-17 14:38 ` Thomas Petazzoni
2016-04-17 15:56 ` Jan Viktorin
2016-04-17 19:35 ` Thomas Petazzoni
2016-04-17 20:56 ` Jan Viktorin
2016-04-17 21:06 ` Thomas Petazzoni
2016-04-18 8:23 ` Jan Viktorin
2016-04-18 22:50 ` Arnout Vandecappelle
2016-04-19 12:27 ` Jan Viktorin
2016-04-19 19:30 ` Arnout Vandecappelle
2016-04-19 20:47 ` Thomas Petazzoni
2016-04-19 21:41 ` Jan Viktorin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160325133240.38684e8b@jvn \
--to=viktorin@rehivetech.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.