[Buildroot] [PATCH] usbip: add a new package
Yann E. MORIN
yann.morin.1998 at free.fr
Sun Dec 11 22:20:56 UTC 2016
Tal, All,
On 2016-12-12 00:11 +0200, Tal Shorer spake thusly:
> On Mon, Dec 12, 2016 at 12:05 AM, Yann E. MORIN <yann.morin.1998 at free.fr> wrote:
> > Tal, Arnout, All,
> >
> > On 2016-12-11 23:46 +0200, Tal Shorer spake thusly:
> >> On Sun, Dec 11, 2016 at 9:59 PM, Arnout Vandecappelle <arnout at mind.be> wrote:
> > [--SNIP--]
> >> > However, doesn't something like this work? Or is it considered too much of a hack?
> >> >
> >> > # Before v3.17 it was in staging.
> >> > # USBIP_SITE is only used inside rules, after linux has already been extracted.
> >> > USBIP_SITE = $(wildcard \
> >> > $(LINUX_DIR)/tools/usb/usbip \
> >> > $(LINUX_DIR)/drivers/staging/usbip/userspace)
> >> It doesn't,
> >
> > Weird, it does work here:
> >
> > USBIP_SITE= $(wildcard \
> > $(LINUX_DIR)/tools/usb/usbip \
> > $(LINUX_DIR)/drivers/staging/usbip/userspace)
> > USBIP_SITE_METHOD = local
> > USBIP_PATCH_DEPENDENCIES = linux
> >
> > define USBIP_CONFIGURE_CMDS
> > @echo 'USBIP_SITE="$(USBIP_SITE)"'
> > endef
> >
> > $(eval $(generic-package))
> >
> > And then:
> >
> > $ make usbip-configure
> > [--SNIP--]
> > USBIP_SITE="/home/ymorin/dev/buildroot/O/build/linux-4.8.13/tools/usb/usbip"
> >
> > Quid? ;-)
> Notice how it says "Extracting" in the "snip". That's a hint that it
> doesn't understand it needs to rsync.
Oh dang, stupid me...
> In the top Make, we can find:
> ########
> include $(sort $(wildcard package/*/*.mk))
>
> include boot/common.mk
> include linux/linux.mk
> include fs/common.mk
> ########
> so pkg-autotools evaluates the wildcard before LINUX_DIR is defined
And contrary to what Arnout said, _SITE *is* evaluated outside of rules,
but soon-enough in pkg-generic.mk, before LINUX_DIR had a change to be
defined.
Good catch, Tal.
So, back to squarte one. You have two options, then:
- adding a kconfig option, like your latest patch provides,
- not supporting kernels <= 3.16, like you also suggested.
I'm fine with either solution.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
More information about the buildroot
mailing list