Commit Graph

11754 Commits

Author SHA1 Message Date
Rafał Miłecki
df8ca9a5c4 mtd: add -c option for specifying amount of data to be used for checksum
So far fixtrx was calculating checksum over amount of data matching
partition erase size. It was mostly a workaround of checksum problem
after changing anything in initial TRX content (e.g. formatting JFFS2).
Its main purpose was to make bootloader accept modified TRX. This didn't
provide much protection of flash data against corruption.

This new option lets caller request calculating checksum over a bigger
amount of data. It may be used e.g. to include whole kernel data for
checksum and hopefully make bootloader go info failsafe mode if
something goes wrong.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
2016-05-09 20:10:58 +02:00
Rafał Miłecki
2dd125048d mtd: trx: use separated buffer for TRX header
We plan to adjust usage of the main buffer to allow reading custom
amount of data for CRC32. This means we need another buffer that will be
always block aligned.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
2016-05-09 20:10:58 +02:00
rmilecki
6de401b1f8 mtd: seama: exit with error if Seama header wasn't found
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
2016-05-09 18:53:22 +02:00
rmilecki
06a3241c27 mtd: seama: fix image data handling
1) Put sanity checks in one place
2) Respect provided offset
3) Read only as much data as needed for MD5 calculation

Thanks to the last change this is a great speedup and memory saver. On
devices with NAND flash we were allocating & reading about 128 MiB while
something about 8 MiB is enough.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
2016-05-09 18:53:18 +02:00
rmilecki
30edc32888 mtd: seama: move buf allocation to the MD5 function
This buf is only used in this function now, so lets move it there.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
2016-05-09 18:53:14 +02:00
rmilecki
1d628f0cbe mtd: seama: update MD5 using header in the first block buffer
This will allow separating first block buffer from a buffer used for MD5
calculation.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
2016-05-09 18:53:13 +02:00
rmilecki
bcccb03200 mtd: seama: add md5 to header struct
This allows us to drop some extra offset calculations and simplifies
code a bit.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
2016-05-09 18:53:11 +02:00
rmilecki
8632d89fa0 mtd: check for Seama magic early when fixing MD5
This avoid long (and unneeded) process of reading all data in case of
running on MTD not containig Seama entity.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
2016-05-09 18:53:09 +02:00
rmilecki
320641585b mtd: add missing breaks in a switch
On platforms supporting both: TRX and Seama calling "fixtrx" was
resulting in trying to fix Seama as well.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
2016-05-09 18:53:06 +02:00
rmilecki
8a60a41951 mtd: use tabs for indents
This makes code style consistent across the whole file.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
2016-05-09 18:53:02 +02:00
Felix Fietkau
5071fb27b9 ncurses: remove libncurses, provide it via libncursesw
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-05-09 14:49:33 +02:00
Felix Fietkau
5b64e3532a mt76: update to the latest version
Fixes a tx locking error and adds a pci id

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-05-05 19:43:23 +01:00
Felix Fietkau
6259583ef3 mt76: fix rebuild on CONFIG_PACKAGE_MAC80211_MESH changes
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-05-05 19:43:23 +01:00
Daniel Golle
9b9c78e071 base-files: evaluate uci-defaults on run-time installations
Packages may install scripts into /etc/uci-defaults to be executed once
after installation, usually at the first boot of the target. This works
fine if the package was installed to the rootfs during build or using
the ImageBuilder.
If the package is installed using opkg during run-time uci-defaults
were applied only after a reboot of the device. Avoid the need to
reboot by evaluting the package's uci-defaults in default-postinst.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2016-05-04 14:24:37 +01:00
Michal Hrusecky
f6adbdf3cd openssl: Update to version 1.0.2h
Bump to the latest version, fixes several security issues:
 * CVE-2016-2107, CVE-2016-2105, CVE-2016-2106, CVE-2016-2109, CVE-2016-2176
More details at https://www.openssl.org/news/openssl-1.0.2-notes.html

Signed-off-by: Michal Hrusecky <Michal.Hrusecky@nic.cz>
2016-05-04 13:00:31 +01:00
Jo-Philipp Wich
4076d863bd firewall3: fix mark rules for local traffic, fix race condition
Update to latest HEAD in order to fix MARK rule generation for local traffic,
also fix a possible race condition during firewall start.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-05-02 18:46:30 +01:00
Gergely Kiss
a2b555189b libiconv: add all ASCII aliases
This patch adds missing ASCII aliases to the libiconv stub in order to avoid conversion errors like https://github.com/openwrt/packages/issues/2373

Signed-off-by: Gergely Kiss <mail.gery@gmail.com>
2016-05-02 18:35:35 +01:00
Hans Dedecker
6a06cd8331 xtables-addons: Avoid redefinition of SHRT_MAX in lua packet script
Patch Lua packet script defines SHRT_MAX which is already defined in <linux/kernel.h> and
is included indirectly by lauxlib.h. Fix the redefintion as it leads to compile failure
on systems which treat macro redefinition as an error

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2016-05-02 18:28:01 +01:00
Jo-Philipp Wich
a6f76bffd8 signing: remove unatteded build key and use current keyring instead
Remove the public unatteded buildkey from the opkg package to avoid
having hardcoded keys in tree. Use the external keyring package instead
which can be easily updated by users.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-04-30 20:39:23 +02:00
John Crispin
33de8c77e2 fstools: fix snapshot support
Signed-off-by: John Crispin <john@phrozen.org>
2016-04-29 04:15:46 +02:00
John Crispin
0fae7270cf fstools: update to latest git HEAD
fixes snapshot support

Signed-off-by: John Crispin <john@phrozen.org>
2016-04-29 04:15:34 +02:00
John Crispin
4a8e960c62 base-files: fix group/user settings after sysupgrade
Signed-off-by: John Crispin <john@phrozen.org>
2016-04-29 04:15:34 +02:00
John Crispin
ed07ef1601 base-files: split user/group addition code into a function
Signed-off-by: John Crispin <john@phrozen.org>
2016-04-29 04:15:34 +02:00
John Crispin
c9e3cd798d fstools: update to latest git HEAD
this adds the remount command to the block tool

Signed-off-by: John Crispin <john@phrozen.org>
2016-04-29 04:15:34 +02:00
John Crispin
d72e538e89 base-files: add new public key used by unattended builds
Signed-off-by: John Crispin <john@phrozen.org>
2016-04-29 04:15:34 +02:00
John Crispin
a13f47760c base-files: add a conditional dependency to lede-keyring
Signed-off-by: John Crispin <john@phrozen.org>
2016-04-29 04:15:34 +02:00
John Crispin
d2e4caf343 lede-keyring: add the developer public keyring
Signed-off-by: John Crispin <john@phrozen.org>
2016-04-29 04:15:34 +02:00
Hans Dedecker
ec9f6fe04d ppp: Add ppp-mod-passwordfd subpackage to ppp
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2016-04-28 13:50:41 +02:00
Hans Dedecker
ce9e5e16ff dnsmasq: Add conntrack support in the full variant
Conntrack support reads the connection track mark associated with
incoming DNS queries and sets the same mark value on the upstream
forwarded DNS query. This can be usefull to track traffic generated
by dnsmasq to associate it with the clients who generate the queries,
usefull for bandwidth accouting and firewall.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2016-04-28 13:50:20 +02:00
Hans Dedecker
16122117a5 dropbear: Add procd interface triggers when interface config is specified
A dropbear instance having an interface config won't start if the interface is down as no
IP address is available.
Adding interface triggers for each configured interface executing the dropbear reload script
will start the dropbear instance when the interface is up.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2016-04-28 13:49:37 +02:00
Hans Dedecker
b3f6c4b3ac iproute2: Add package for nstat utility
Add support for the command line utility nstat displaying network statistics

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2016-04-28 13:49:17 +02:00
Hans Dedecker
7545c1d96b dropbear: Make utmp and putuline support configurable via seperate config options
Utmp support tracks who is currenlty logged in by logging info to the file /var/run/utmp (supported by busybox)
Putuline support will use the utmp structure to write to the utmp file

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2016-04-28 13:47:48 +02:00
Hans Dedecker
a83f049b5b netifd: Add configurable DHCP release behavior
Make sending a DHCP release configurable when the client exits allowing to clean up
IP/mac state info in intermediate devices.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2016-04-28 13:44:47 +02:00
Hans Dedecker
312cb987f9 xtables-addons: Fix Lua packet script implementation
lua_packet_segment parameter start has type char pointer; in function lua_tg
it's assigned an uint16 value generating compiler warnings obviously indicating
posssible seg fault problems. Fix the issue by using the correct skb functions
so the parameter points to the position inside the sk_buff

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Signed-off-by: Stijn Cleynhens <stijn.cleynhens@gmail.com>
2016-04-28 11:45:43 +02:00
Jo-Philipp Wich
07bdd30906 package: remove duplicate lines from otrx and nvram makefiles
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-04-26 23:28:17 +02:00
Jo-Philipp Wich
b04a25491f package: flag further target specific packages as nonshared
Add nonshared flag to package depending on specific targets or subtargets as
there's no guarantee otherwise that they'll be available in the shared repo.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-04-26 23:26:43 +02:00
Jo-Philipp Wich
69ccef03f9 package: mark nvram and otrx nonshared as they're target specific
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-04-26 23:09:12 +02:00
Álvaro Fernández Rojas
0ab31bfced brcm2708-gpu-fw: update to latest version
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2016-04-24 13:00:11 +02:00
Jo-Philipp Wich
4c60a6f803 opkg: fix use-after-free with duplicate packages on the command line
When the same package file is specified multiple times on the opkg install
command line, the name pointer on the argv array becomes stale after the
package structures have been merged, leading to invalid memory accesses
upon install.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-04-23 14:03:50 +02:00
Jo-Philipp Wich
9531e0fce5 package: fix toolchain ipk flags
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-04-22 12:20:47 +02:00
Jo-Philipp Wich
37de17c379 linux: kmod-e100: use preconverted firmware files
Instead of converting the firmware files ourselves, use the files
generated during the normal kernel build process. This fixes packaging
kmod-e100 in the SDK environment.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-04-21 16:39:59 +02:00
John Crispin
528ffec3cd base-files: remove ununsed login.sh
Signed-off-by: John Crispin <john@phrozen.org>
2016-04-19 20:42:34 +02:00
John Crispin
b4e33a1c08 base-files: Allow to disable failsafe mode
Signed-off-by: Daniel Dickinson <openwrt@daniel.thecshore.com>
2016-04-19 10:07:35 +02:00
John Crispin
dc92917409 image / basefiles: make console password configurable
Signed-off-by: Daniel Dickinson <openwrt@daniel.thecshore.com>
Signed-off-by: John Crispin <john@phrozen.org>
2016-04-18 21:53:07 +02:00
John Crispin
5e85ae9e4c base-files: fix error message during boot
preinit spews out this message

"cat: can't open '/proc/device-tree/model': No such file or directory"

Signed-off-by: John Crispin <john@phrozen.org>
2016-04-11 11:58:57 +02:00
Álvaro Fernández Rojas
9dee77795d brcm2708-gpu-fw: improve package version and release
Use git revision as package release and date for package version.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2016-04-16 11:27:56 +02:00
Álvaro Fernández Rojas
2cd1f5a0db brcmfmac43430-firmware: improve package version and release
Use git revision as package release and date for package version.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2016-04-16 11:25:56 +02:00
Jo-Philipp Wich
abc828b085 openssl: fix wrong build target strings
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-04-15 07:40:31 +02:00
Jo-Philipp Wich
addfc0efdd uclibc++: add hack to fix failing patch
One of the patched files, include/unwind-cxx.h, contains windows newlines
which lead to the following failure:

  Applying ./patches/006-eabi_fix.patch using plaintext:
  patching file include/typeinfo
  patching file include/unwind-cxx.h
  Hunk #1 FAILED at 173 (different line endings).
  Hunk #2 FAILED at 181 (different line endings).

Add a fixup command to the prepare phase which normalizes the line endings
before applying source patches.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-04-14 18:27:12 +02:00
Jo-Philipp Wich
9e04019024 package: flag essential components as nonshared
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-04-06 22:38:47 +02:00