Discussion:
[OpenWrt-Devel] Kamikaze trunk package: how to download firmware from a git repository
Joerg Albert
2008-12-14 18:05:10 UTC
Permalink
I want to create a Makefile for a kernel package, where the sources
come from a git repository and the firmware comes from a second one.

This part works fine for the sources:

PKG_NAME:=kmod-ar9170
PKG_REV:=06609c7644e6770056405b09ff095689d79b4c30
PKG_VERSION:=20081120_$(PKG_REV)
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.kernel.org/pub/scm/linux/kernel/git/jberg/ar9170.git
PKG_SOURCE_PROTO:=git

but I'm lost with the firmware download part. Could someone please
tell what to put inside

#define Download/firmware
#endef

to download the firmware from a git repo?
Downloading from the gitweb interface doesn't work.
Florian Fainelli
2008-12-14 18:13:19 UTC
Permalink
Hello,
Post by Joerg Albert
I want to create a Makefile for a kernel package, where the sources
come from a git repository and the firmware comes from a second one.
PKG_NAME:=kmod-ar9170
PKG_REV:=06609c7644e6770056405b09ff095689d79b4c30
PKG_VERSION:=20081120_$(PKG_REV)
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.kernel.org/pub/scm/linux/kernel/git/jberg/ar9170
.git PKG_SOURCE_PROTO:=git
but I'm lost with the firmware download part. Could someone please
tell what to put inside
#define Download/firmware
#endef
You should specify the protocol to use, you can have a look at
include/Download.mk starting at line 116.

Something like this should be working :

define Download/firmware
PROTO:=git
URL:=git://..../...
endef
--
Best regards, Florian Fainelli
Email : ***@openwrt.org
http://openwrt.org
-------------------------------
Joerg Albert
2008-12-15 23:01:08 UTC
Permalink
Post by Florian Fainelli
You should specify the protocol to use, you can have a look at
include/Download.mk starting at line 116.
define Download/firmware
PROTO:=git
URL:=git://..../...
endef
Thanks a lot, this works just fine in the Makefile:

...
FW_SUBDIR:=linux-firmware
FW_ARCHIVE:=linux-firmware.tar.gz
define Download/firmware
# that's the archive file name created in trunk/dl/ from
# this download containing the whole git snapshot
FILE:=$(FW_ARCHIVE)
PROTO:=git
SUBDIR:=$(FW_SUBDIR)
VERSION:=b66ece11531cc7043bd25dd963c8a58d8d5da2f5
# use http: instead of git: for all users behind restrictive
# firewalls ...
URL:=http://www.kernel.org/pub/scm/linux/kernel/git/dwmw2/linux-firmware.git
endef
$(eval $(call Download,firmware))

Regards,
Jörg.

Loading...