Commit Graph

598 Commits

Author SHA1 Message Date
Jonas Gorski
4eb5aad667 scripts/getver.sh: try to get branch/upstream automatically
Instead of assuming master is the current branch and origin the right
upstream, try to get both dynamically. If the current branch is not
tracking any upstream, use the origin of the master branch.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
2016-07-13 16:55:32 +02:00
Felix Fietkau
c19381dfca scripts/getver.sh: fix revision number on BSD/MacOS
Strip leading whitespace from wc -l output

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-07-09 20:02:21 +02:00
Jonas Gorski
f1765277ba scripts/getver.sh: avoid use of git rev-list --count
This is not a valid option in older git version, used in e.g. RHEL6.

Reported-by: Steven Haigh <netwiz@crc.id.au>
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
2016-07-09 15:08:46 +02:00
Jonas Gorski
15b88df87f scripts/getver.sh: improve revision output
Change the revision output to r<upstream-revision>+<local commits> so
it is easier to get the base revision (and see if there are local
commits).

Example:
$ ./scripts/getver.sh
r794+3
$

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
2016-07-09 13:41:28 +02:00
Jonas Gorski
1001b5d77c scripts/getver.sh: allow conversion between git hash and revision
Add code allowing easy conversion between git commit ids and revisions.

Example:

$ ./scripts/getver.sh
r792
$ ./scripts/getver.sh r123
b7fc892eb5
$ ./scrpts/getver.sh b7fc892eb5
r123

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
2016-07-09 13:41:28 +02:00
Jonas Gorski
575be9d182 scripts/getver.sh: simplify revision calculation
Use git rev-list --count to get the revision number.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
2016-07-09 13:41:28 +02:00
Felix Fietkau
d8dbd33eba scripts/package-metadata.pl: fix kmod pakage dependencies within the SDK
Instead of ignoring all metadata for package/kernel/linux, process it
and only suppress emitting config data to tmp/.config-package.in

This ensures that packages that select kmod-* packages can inherit their
depdendencies.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-07-07 12:47:04 +02:00
Felix Fietkau
b80dfe4cde scripts/diffconfig.sh: fix handing of CONFIG_TARGET_MULTI_PROFILE
Fixes FS#43

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-07-07 11:23:41 +02:00
Sergey Sergeev
17ee6bb8f3 tools: add kernel2minor utility for Mikrotik devices
This patch adds support of Mikrotik yaffs2 filesystem image for kernel file
and tools/kernel2minor package.
We neede this to boot kernel through RouterBoot on new Mikrotik NOR flash devices.

Signed-off-by: Sergey Sergeev <adron@yapic.net>
2016-07-05 22:59:14 +02:00
Daniel Dickinson
34527688fc scripts/feeds: Prevent .config autocreation
When using scripts/feeds upgrade the .config needs to be
updated but the code to do so was also autocreating a
.config if one didn't exist.  This is counter-productive
when you have not yet used menuconfig (or other config targets)
because things like selecting or deselecting CONFIG_ALL
(to build all package by default) only works if the
package selection has not already been done via an
existing .config selection.

Signed-off-by: Daniel Dickinson <lede@daniel.thecshore.com>
2016-07-05 22:59:13 +02:00
Jo-Philipp Wich
df18b3756f scripts: feeds: fix version detection for Make >= 4.2.1
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-06-15 19:10:32 +02:00
John Crispin
30acacb0af config: add a small_flash feature
this causes KALLSYMS to be off by default

Signed-off-by: John Crispin <john@phrozen.org>
2016-06-13 22:51:43 +02:00
Jo-Philipp Wich
24a7ccb056 treewide: replace jow@openwrt.org with jo@mein.io
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-06-07 11:42:52 +02:00
Felix Fietkau
7eeb254cc4 treewide: replace nbd@openwrt.org with nbd@nbd.name
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-06-07 08:58:42 +02:00
Felix Fietkau
f8ebbbc568 build: implement support for selecting multiple device profiles
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-06-07 08:58:40 +02:00
Felix Fietkau
9ae952cf8c build: split scripts/metadata.pl into target-metadata.pl and package-metadata.pl
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-06-07 08:58:40 +02:00
Daniel Engberg
8372a7f922 download.pl: Rework URLs
Provide HTTPS URL when possible, try to keep 8 mirrors per entry and spread
over several locations of the world. Since most active contributors are in
US/CA and/or EU prioritize mirrors that are within those regions if possible.

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
2016-05-28 09:14:55 +02:00
Petr Štetiar
e0b241bb48 scripts/download.pl: Use CDN for kernel downloads
More info at https://www.kernel.org/introducing-fastly-cdn.html

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2016-05-23 13:39:50 +02:00
Daniel Dickinson
c19b7aaac5 script/symlink-tree.sh: Fix missing config dir
Apparently symlink-tree has not been used in quite some time as it
fails to symlink the always required config dir

Also, if we pulled from git but .git is missing we get
many error messages on the symlinked tree without this
patch (which symlinks .git, if present)

Signed-off-by: Daniel Dickinson <openwrt@daniel.thecshore.com>
2016-05-18 22:17:28 +02:00
Felix Fietkau
f4c4d501e4 build: remove profile kernel/build system config override support
It has been unused for years

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-05-15 20:55:40 +02:00
Syrone Wong
e8bc0834e7 scripts/ipkg-build: fix deprecated GZIP environment variable warning
According to gzip 1.7 release note:

The GZIP environment variable is now obsolescent; gzip now warns if
it is used, and rejects attempts to use dangerous options or operands.
You can use an alias or script instead.

Fix this warning by using pipe instead

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-05-13 17:03:53 +02:00
Felix Fietkau
0d10ada19c scripts/metadata.pl: add support for generating profile make code for the image builder
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-05-13 16:32:36 +02:00
Felix Fietkau
111285e742 download.pl: use http://sources.lede-project.org as download mirror
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-05-13 16:32:35 +02:00
Felix Fietkau
4a31037a34 build: avoid including profiles/*.mk
Generate the active profile name in menuconfig context

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-05-11 20:14:00 +02:00
Felix Fietkau
91799d5198 metadata.pl: fix target profile sorting check
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-05-11 19:18:16 +02:00
Felix Fietkau
1189af85fd metadata.pl: add support for forcing sorting of profiles
Used to mix device profiles (specified in the image makefile) with
regular target profiles.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-05-11 19:03:35 +02:00
Felix Fietkau
6ddca3a361 target.mk: remove the unused Target-Path field
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-05-11 19:03:35 +02:00
Felix Fietkau
4a3348ef09 metadata.pl: add support for selecting packages available only via PROVIDES
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-05-09 14:48:49 +02:00
John Crispin
797fb8a302 scripts: add "r" to revision
343c3be454 accidentially removed the "r"

Signed-off-by: John Crispin <john@phrozen.org>
2016-04-29 04:15:34 +02:00
Iblis Lin
d9a0a8c78f scripts: avoid hard-coded paths in scripts
Signed-off-by: Iblis Lin <e196819@hotmail.com>
2016-04-28 16:43:28 +02:00
Jo-Philipp Wich
941fc5e8c8 global: introduce ALL_NONSHARED symbol
Introduce a new symbol ALL_NONSHARED which selects all non-sharable packages
by default. This option is mainly intented for buildbot setups to build the
target dependant software subset only.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-04-13 17:24:12 +02:00
Jo-Philipp Wich
bf4bfd8ccc scripts: remove "Package-Subdir" metadata handling
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-04-13 15:38:17 +02:00
Jo-Philipp Wich
9a04a80677 scripts: metadata: use the new "Repository" field
Switch to the new "Repository" metadata field to populate tmp/.packagesubdirs

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-04-13 15:33:53 +02:00
Jo-Philipp Wich
7322cca9fa scripts: metadata: add CONFIG_TARGET_SUBTARGET symbol
Add a new string symbol "CONFIG_TARGET_SUBTARGET" which contains the name of
the chosen subtarget or "generic" if there are no subtargets available.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-04-06 21:47:04 +02:00
Álvaro Fernández Rojas
694f060550 download: add @GITHUB download facility
Define a new alias (@GITHUB) for downloading raw files from github repos.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2016-04-03 22:02:46 +02:00
John Crispin
fa69553900 branding: add LEDE branding
Signed-off-by: John Crispin <blogic@openwrt.org>
2016-03-24 22:40:13 +01:00
John Crispin
343c3be454 scripts/getver.sh: generate revision relative to the reboot tag
Signed-off-by: John Crispin <blogic@openwrt.org>
2016-03-24 22:14:12 +01:00
Vasilis Tsiligiannis
b09848cd25 scripts/getver.sh: Use 'git-rev-parse' to detect if tree lies in Git repository
Path to the Git repository directory can be overriden by using the '$GIT_DIR'
environment variable. This patch improves detection of Git repository by using
'git-rev-parse', which respects '$GIT_DIR' environment variable, instead of just
checking the existence of '.git' directory.

Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>

SVN-Revision: 49165
2016-04-13 20:52:26 +00:00
John Crispin
a910a2cdc7 scripts/om-fwupgradecfg-gen.sh: add support for the OM5P-AC
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>

SVN-Revision: 49143
2016-04-09 10:25:54 +00:00
John Crispin
8583cbe26a scripts/om-fwupgradecfg-gen.sh: Generate sha256sum for uboot verification
Future Open Mesh u-boot versions are changing the check of the image files
(vmlinux, rootfs) from md5 to sha256. Having both in them should be enough
to ensure backward and forward compatibility.

Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>

SVN-Revision: 49140
2016-04-09 10:25:42 +00:00
John Crispin
5c408ede6c download: add @GITHUB download facility
Define a new alias (@GITHUB) for downloading raw github repository files

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

SVN-Revision: 49138
2016-04-09 10:25:34 +00:00
Felix Fietkau
9a94538272 scripts/download.pl: fix sha256 hash command (#21931)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48809
2016-02-27 16:20:06 +00:00
Felix Fietkau
86625a148a scripts/strip-kmod.sh: remove a few extra sections to slightly reduce kernel module size
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48608
2016-02-01 13:33:33 +00:00
Jo-Philipp Wich
78e5e56201 scripts: fix GNU data invocation
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 48594
2016-02-01 10:43:27 +00:00
Felix Fietkau
18ba1305d5 scripts/get_source_date_epoch.sh: for SVN use a variant that is compatible with older versions
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48593
2016-02-01 10:33:25 +00:00
Felix Fietkau
64ec9dc2a1 scripts/portable_date.sh: fix parsing of date strings on non-GNU systems
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48592
2016-02-01 10:33:15 +00:00
Felix Fietkau
be6acba4dc build system: have tar use $SOURCE_DATE_EPOCH for --mtime
The --mtime argument to 'tar' sets the modification time for all files within
the archive, which determines the timestamp files will get when they are
extracted. In this case, rootfs and other tarballs will get mtimes which
correspond to the last commit timestamp of the build system, as reported by
git/subversion.

This is a step towards reproducible image builds.

Signed-off-by: bryan newbold <bnewbold@robocracy.org>
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48586
2016-01-31 23:29:16 +00:00
Felix Fietkau
82522dbaee build: introduce SOURCE_DATE_EPOCH variable
SOURCE_DATE_EPOCH is the date of the last modified file using git/svn
as date source.
See https://reproducible-builds.org/specs/source-date-epoch/

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48584
2016-01-31 23:29:07 +00:00
Felix Fietkau
2f14514a12 add scripts/portable_date: wrapper around date for bsd/linux
date -r $unix_timestamp on bsd is equal to date -d @$unix_timestamp on
linux. To support reproducible builds and not loosing every timestamp
it's required to convert a unix timestamp into human readable timestamp

./scripts/portable_date $unix_timstamp +%T

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>

SVN-Revision: 48583
2016-01-31 23:28:55 +00:00
Jo-Philipp Wich
0333da8943 include: group kmod ipk files into a "kernel" subdirectory
This is useful to just use the kmods from an official build while supplying
base packages from a custom feed or the other way around; for just overriding
the kmods with a local repo while using official repos for the rest.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 48475
2016-01-24 15:36:05 +00:00