From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yann E. MORIN Date: Sun, 11 Dec 2016 23:20:56 +0100 Subject: [Buildroot] [PATCH] usbip: add a new package In-Reply-To: References: <1481272671-6491-1-git-send-email-tal.shorer@gmail.com> <20161211135617.GB3599@free.fr> <3fae2ec3-3be6-e839-f854-210b223b65af@mind.be> <20161211220520.GH3599@free.fr> Message-ID: <20161211222056.GI3599@free.fr> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net 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 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 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. | '------------------------------^-------^------------------^--------------------'