Re: [LEDE-DEV] [PATCH] openvpn: update to 2.3.12
Pushed in http://git.lede-project.org/2653a12 - thanks Magnus! ~ Jo ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH] openvpn: update to 2.3.12
300-upstream-fix-polarssl-mbedtls-builds.patch has been applied upstream. Replaced 101-remove_polarssl_debug_call.patch with upstream backport. Changelog: https://community.openvpn.net/openvpn/wiki/ChangesInOpenvpn23#OpenVPN2.3.12 Signed-off-by: Magnus Kroken--- package/network/services/openvpn/Makefile | 6 ++-- ...00-polarssl-disable-runtime-version-check.patch | 2 +- ...101-backport_upstream_polarssl_debug_call.patch | 34 ++ .../patches/101-remove_polarssl_debug_call.patch | 21 --- .../300-upstream-fix-polarssl-mbedtls-builds.patch | 42 -- 5 files changed, 38 insertions(+), 67 deletions(-) create mode 100644 package/network/services/openvpn/patches/101-backport_upstream_polarssl_debug_call.patch delete mode 100644 package/network/services/openvpn/patches/101-remove_polarssl_debug_call.patch delete mode 100644 package/network/services/openvpn/patches/300-upstream-fix-polarssl-mbedtls-builds.patch diff --git a/package/network/services/openvpn/Makefile b/package/network/services/openvpn/Makefile index 54a540f..c88fcbd 100644 --- a/package/network/services/openvpn/Makefile +++ b/package/network/services/openvpn/Makefile @@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=openvpn -PKG_VERSION:=2.3.11 -PKG_RELEASE:=2 +PKG_VERSION:=2.3.12 +PKG_RELEASE:=1 PKG_SOURCE_URL:=http://swupdate.openvpn.net/community/releases PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_MD5SUM:=0f5f1ca1dc5743fa166d93dd4ec952f014b5f33bafd88f0ea34b455cae1434a7 +PKG_MD5SUM:=e3d6cdf2fb58b7569bd628ddb3d76352aa7e85b9 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) diff --git a/package/network/services/openvpn/patches/100-polarssl-disable-runtime-version-check.patch b/package/network/services/openvpn/patches/100-polarssl-disable-runtime-version-check.patch index bd8e5b7..c7955c2 100644 --- a/package/network/services/openvpn/patches/100-polarssl-disable-runtime-version-check.patch +++ b/package/network/services/openvpn/patches/100-polarssl-disable-runtime-version-check.patch @@ -1,6 +1,6 @@ --- a/src/openvpn/ssl_polarssl.c +++ b/src/openvpn/ssl_polarssl.c -@@ -1151,7 +1151,7 @@ const char * +@@ -1156,7 +1156,7 @@ const char * get_ssl_library_version(void) { static char polar_version[30]; diff --git a/package/network/services/openvpn/patches/101-backport_upstream_polarssl_debug_call.patch b/package/network/services/openvpn/patches/101-backport_upstream_polarssl_debug_call.patch new file mode 100644 index 000..bd347a4 --- /dev/null +++ b/package/network/services/openvpn/patches/101-backport_upstream_polarssl_debug_call.patch @@ -0,0 +1,33 @@ +openvpn: fix build without POLARSSL_DEBUG_C + +Backport of upstream master commit +b63f98633dbe2ca92cd43fc6f8597ab283a600bf. + +Signed-off-by: Magnus Kroken + +From b63f98633dbe2ca92cd43fc6f8597ab283a600bf Mon Sep 17 00:00:00 2001 +From: Steffan Karger +Date: Tue, 14 Jun 2016 22:00:03 +0200 +Subject: [PATCH] mbedtls: don't set debug threshold if compiled without + MBEDTLS_DEBUG_C + +For targets with space constraints, one might want to compile mbed TLS +without MBEDTLS_DEBUG_C defined, to save some tens of kilobytes. Make +sure OpenVPN still compiles if that is the case. + +Signed-off-by: Steffan Karger +Acked-by: Gert Doering +Message-Id: <1465934403-6-1-git-send-email-stef...@karger.me> +URL: http://article.gmane.org/gmane.network.openvpn.devel/11922 +Signed-off-by: Gert Doering +--- a/src/openvpn/ssl_polarssl.c b/src/openvpn/ssl_polarssl.c +@@ -747,7 +747,9 @@ void key_state_ssl_init(struct key_state + if (polar_ok(ssl_init(ks_ssl->ctx))) + { + /* Initialise SSL context */ ++ #ifdef POLARSSL_DEBUG_C + debug_set_threshold(3); ++ #endif + ssl_set_dbg (ks_ssl->ctx, my_debug, NULL); + ssl_set_endpoint (ks_ssl->ctx, ssl_ctx->endpoint); diff --git a/package/network/services/openvpn/patches/101-remove_polarssl_debug_call.patch b/package/network/services/openvpn/patches/101-remove_polarssl_debug_call.patch deleted file mode 100644 index 3cef323..000 --- a/package/network/services/openvpn/patches/101-remove_polarssl_debug_call.patch +++ /dev/null @@ -1,21 +0,0 @@ -openvpn: remove call to PolarSSL debug function - -OpenVPN >=2.3.11 uses PolarSSL debug functions for improved logging. -This requires that PolarSSL is built with POLARSSL_DEBUG_C, which increases -its size significantly. - -This change does not impact OpenVPN operation, see: -https://sourceforge.net/p/openvpn/mailman/message/35153943/ - -Signed-off-by: Magnus Kroken - a/src/openvpn/ssl_polarssl.c -+++ b/src/openvpn/ssl_polarssl.c -@@ -742,7 +742,7 @@ void key_state_ssl_init(struct key_state - if (polar_ok(ssl_init(ks_ssl->ctx))) - { - /* Initialise SSL context */ --
[LEDE-DEV] [RFC] lantiq: fix ath5k EEPROM loading
With 12fe4b579801ea812b64fc7e689716cd39c895ec I switched the ath5k eeprom extraction to an alternate code path. Unfortunately this code seams to be broken since ages and broke the ath5k EEPROM extraction. Reported-by: Mohammed BerdaiSigned-off-by: Mathias Kresin --- ...-lantiq-wifi-and-ethernet-eeprom-handling.patch | 36 -- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/target/linux/lantiq/patches-4.4/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch b/target/linux/lantiq/patches-4.4/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch index 7a97815..6f5e0d4 100644 --- a/target/linux/lantiq/patches-4.4/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch +++ b/target/linux/lantiq/patches-4.4/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch @@ -51,7 +51,7 @@ Signed-off-by: John Crispin obj-$(CONFIG_XRX200_PHY_FW) += xrx200_phy_fw.o --- /dev/null +++ b/arch/mips/lantiq/xway/ath_eep.c -@@ -0,0 +1,281 @@ +@@ -0,0 +1,299 @@ +/* + * Copyright (C) 2011 Luca Olivetti + * Copyright (C) 2011 John Crispin @@ -247,6 +247,7 @@ Signed-off-by: John Crispin + return 0; +} + ++static int ath5k_eep_load; +int __init of_ath5k_eeprom_probe(struct platform_device *pdev) +{ + struct device_node *np = pdev->dev.of_node, *mtd_np = NULL; @@ -278,13 +279,19 @@ Signed-off-by: John Crispin + if (IS_ERR(the_mtd)) + return -ENODEV; + ++ ath5k_pdata.eeprom_data = kmalloc(ATH5K_PLAT_EEP_MAX_WORDS<<1, GFP_KERNEL); ++ + i = mtd_read(the_mtd, be32_to_cpup(list), ATH5K_PLAT_EEP_MAX_WORDS << 1, -+ _readlen, (void *) ath5k_pdata.eeprom_data); ++ _readlen, (void *) ath5k_pdata.eeprom_data); + ++ if (!of_property_read_u32(np, "ath,mac-offset", _offset)) { ++ size_t mac_readlen; ++ mtd_read(the_mtd, mac_offset, 6, _readlen, ++ (void *) athxk_eeprom_mac); ++ } + put_mtd_device(the_mtd); + -+ if ((sizeof(ATH5K_PLAT_EEP_MAX_WORDS << 1) != flash_readlen) -+ || i) { ++ if (((ATH5K_PLAT_EEP_MAX_WORDS<<1) != flash_readlen) || i) { + dev_err(>dev, "failed to load eeprom from mtd\n"); + return -ENODEV; + } @@ -293,11 +300,8 @@ Signed-off-by: John Crispin + for (i = 0; i < ATH5K_PLAT_EEP_MAX_WORDS; i++) + ath5k_pdata.eeprom_data[i] = swab16(ath5k_pdata.eeprom_data[i]); + -+ if (!of_property_read_u32(np, "ath,mac-offset", _offset)) -+ memcpy_fromio(athxk_eeprom_mac, (void*) ath5k_pdata.eeprom_data + mac_offset, 6); -+ + if (!is_valid_ether_addr(athxk_eeprom_mac) && ltq_get_eth_mac()) -+ memcpy(athxk_eeprom_mac, ltq_get_eth_mac(), 6); ++ ether_addr_copy(athxk_eeprom_mac, ltq_get_eth_mac()); + + if (!is_valid_ether_addr(athxk_eeprom_mac)) { + dev_warn(>dev, "using random mac\n"); @@ -330,9 +334,23 @@ Signed-off-by: John Crispin + +static int __init of_ath5k_eeprom_init(void) +{ ++ int ret = platform_driver_probe(_eeprom_driver, of_ath5k_eeprom_probe); ++ ++ if (ret) ++ ath5k_eep_load = 1; ++ ++ return ret; ++} ++ ++static int __init of_ath5k_eeprom_init_late(void) ++{ ++ if (!ath5k_eep_load) ++ return 0; ++ + return platform_driver_probe(_eeprom_driver, of_ath5k_eeprom_probe); +} -+device_initcall(of_ath5k_eeprom_init); ++late_initcall(of_ath5k_eeprom_init_late); ++subsys_initcall(of_ath5k_eeprom_init); --- /dev/null +++ b/arch/mips/lantiq/xway/eth_mac.c @@ -0,0 +1,25 @@ -- 2.7.4 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] ubus: how to add an object with a 'catch' all method/signature
Hello Felix, Is it possible to fill in struct ubus_object and struct ubus_object_type so that only one "catch all" method is defined and have the object available for lookup? I can do: struct ubus_method type_m = { .name = "_", .handler = NULL, }; struct ubus_object_type obj_type = { .n_methods = 1, .methods = _m, } struct ubus_method obj_m = { .name = NULL, .handler = func, }; struct ubus_object o = { .name = “path/to/obj”, .type = _type; .n_methods = 1, .methods = _m, }; and libubus will be happy to call my handler for any method name as long as I define at least one method with a nonzero name length for the *type*. If (o.type == NULL) or (o.type->n_methods == 0) or (o.type->methods.name == NULL) or (o.type->methods.name == “") adding the object will succeed but the object cannot be looked up (its path does not appear when running `ubus list`). Are objects with an empty signature not supported? If so, should adding such an object fail? If not, how can I setup a "catch all” (or empty) signature? Thank you — Delio ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [PATCH] Use printf instead of echo.
Felix Fietkauwrote: > On 2016-08-23 12:10, A. Benz wrote: > > Hi Bastian, > > > > I will update them, however to do that while adhering to Felix's request > > on using perfect syntax means going over them one by one. > > > > Perhaps a seasoned sed user can do a trick to automate it? > > > > For now, the change I submitted is whats needed to fix breakage on my > > system. For others, I will send patches if no one takes it up in a few days. > Actually, you might be able to simplify the change even more by > forcing the hostapd build shell to bash (some other packages do > this as well). really? Surely printf is better than requiring bash? signature.asc Description: OpenPGP Digital Signature ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [PATCH 1/2] Octeon: Use ext4 on mmcblk0p3 per default for ER.
On 08/23/2016 02:50 PM, Germano Massullo wrote: > I have some EdgeRouter Pro, in case you need to retrieve any useful > infos for your development process, feel free to ask > Can you please send me information about the mmc flash layout on a factory ER-PRO device. Maybe an output from 'fdisk -l' on an initramfs booted LEDE ? This would be very helpfull, thank you in advance. ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [PATCH 1/2] uqmi: add support for MBIM devices with QMI service
Felix Fietkauwrites: > Applied with some cleanups and portability fixes. > I changed the code to use __packed and endian conversion from libubox. Thanks! Sorry about the sloppy implementation. I guess I expected it to come back with a "changes requested" instead of just fixed up and applied ;) Anyway, I noticed first now that I made several errors in the endian conversion. That's what you get for not testing on big endian. I'll send a followup-fix for that. Still not tested on BE, unfortunately, since I have no simple way to do that. Bjørn ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [PATCH 1/2] Octeon: Use ext4 on mmcblk0p3 per default for ER.
I have some EdgeRouter Pro, in case you need to retrieve any useful infos for your development process, feel free to ask ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH] uqmi: fix big endian bugs in MBIM code
All MBIM integer fields are 32bit little endian. So we need to convert then all on big endian systems. Fixes: e69bf24b00d8 ("uqmi: add support for MBIM devices with QMI service") Signed-off-by: Bjørn Mork--- mbim.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mbim.c b/mbim.c index 33ce19da0f9f..f5336b15a7f6 100644 --- a/mbim.c +++ b/mbim.c @@ -39,12 +39,12 @@ bool is_mbim_qmi(struct mbim_command_message *msg) void mbim_qmi_cmd(struct mbim_command_message *msg, int len, uint16_t tid) { msg->header.type = cpu_to_le32(MBIM_MESSAGE_TYPE_COMMAND); - msg->header.length = sizeof(*msg) + len; + msg->header.length = cpu_to_le32(sizeof(*msg) + len); msg->header.transaction_id = cpu_to_le32(tid); - msg->fragment_header.total = 1; + msg->fragment_header.total = cpu_to_le32(1); msg->fragment_header.current = 0; memcpy(msg->service_id, qmiuuid, 16); msg->command_id = cpu_to_le32(MBIM_CID_QMI_MSG); msg->command_type = cpu_to_le32(MBIM_MESSAGE_COMMAND_TYPE_SET); - msg->buffer_length = len; + msg->buffer_length = cpu_to_le32(len); } -- 2.9.3 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [PATCH 1/2] uqmi: add support for MBIM devices with QMI service
On 2016-08-21 02:01, Bjørn Mork wrote: > Many Qualcomm based devices offer a QMI service when running in MBIM > mode. This is useful for a number of requests which have no MBIM > counterpart. > > This implementation is very basic, simply wrapping the QMI requests > in an MBIM command. It is up to the user to make sure that the MBIM > command sequence is valid, using a mix of umbim and uqmi requests. > > umbim must be used to send "OPEN" before uqmi can issue any MBIM > requests. Example: > > 1. use umbim to open the session, using the '-n' option: > > $ umbim -d /dev/cdc-wdm0 -n caps > devicetype: 0003 - remote > cellularclass: 0001 > voiceclass: 0001 - no-voice > simclass: 0002 > dataclass: 003C > smscaps: 0003 > controlcaps: 0001 > maxsessions: 0008 > deviceid: 0145820007x > firmwareinfo: SWI9X30C_02.08.02.00 > hardwareinfo: EM7455 > > 2. use uqmi to send an MBIM request, using the '-m' option: > > $ uqmi -m -d /dev/cdc-wdm0 --get-serving-system > { > "registration": "registered", > "plmn_mcc": 242, > "plmn_mnc": 1, > "plmn_description": "TELENOR", > "roaming": false > } > > 3. use umbim to close the open session, using the '-t X' option: > > $ umbim -d /dev/cdc-wdm0 -t 2 caps > devicetype: 0003 - remote > cellularclass: 0001 > voiceclass: 0001 - no-voice > simclass: 0002 > dataclass: 003C > smscaps: 0003 > controlcaps: 0001 > maxsessions: 0008 > deviceid: 0145820007x > firmwareinfo: SWI9X30C_02.08.02.00 > hardwareinfo: EM7455 > > Signed-off-by: Bjørn MorkApplied with some cleanups and portability fixes. I changed the code to use __packed and endian conversion from libubox. - Felix ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [PATCH 2/2] Octeon: Do not create backup for vmlinux64.bin on Edgerouter.
On 2016-08-22 14:06, Daniel Danzberger wrote: > This patch avoids sysupgrade to fail and break the boot image. > This patch dosen't affact the Edgerouter Lite. > > The boot partition on the internal mmc flash is only 8.3M large. > Device Boot Start End Sectors Size Id Type > /dev/mmcblk0p1 *63 17135 17073 8.3M 83 Linux > > Creating a backup of vmlinux64.bin might use to much space, > when using a kernel image > 4.2 MBytes. > This results in a "no space left on device" error when sysupgrade > flashes the new kernel image, leaving an incomplete kernel image in the boot > partition. > This prevents further booting. > > Signed-off-by: Daniel DanzbergerMaybe it would be better to remove the backup code entirely instead of playing whack-a-mole ;) - Felix ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [PATCH 1/2] Octeon: Use ext4 on mmcblk0p3 per default for ER.
On 08/23/2016 09:35 AM, Felix Fietkau wrote: > On 2016-08-22 14:06, Daniel Danzberger wrote: >> This patch defaults the rootfs to ext4 on the Ubnt Edgerouter. >> The Edgerouter Lite is not affacted by this patch. >> >> Why EXT4 and not squashfs + jiffs ? >> --- >> The internal mmc flash is badly partitioned. >> >> Disk /dev/mmcblk0: 3.7 GiB, 3959422976 bytes, 7733248 sectors >> Units: sectors of 1 * 512 = 512 bytes >> Sector size (logical/physical): 512 bytes / 512 bytes >> I/O size (minimum/optimal): 512 bytes / 512 bytes >> >> Device Boot Start End Sectors Size Id Type >> /dev/mmcblk0p1 *63 17135 17073 8.3M 83 Linux >> /dev/mmcblk0p2 17199 149183 131985 64.5M 83 Linux >> /dev/mmcblk0p3 149247 2246831 20975851G 83 Linux >> >> block2mtd requires a block size that is a divisor of the device size. >> Both p2 and p3 can only be divided by the sector size 512, >> but Jiffs won't work with a blocksize of 512 bytes. >> >> This also fixes a boot hang, when the kernel tries to mount /root. >> The old commandline was: block2mtd.block2mtd=/dev/mmcblk0p2,65536,rootfs,15 >> >> This line caused the following error message and stopped booting: >> "block2mtd: erasesize must be a divisor of device size" >> >> Signed-off-by: Daniel Danzberger>> --- >> target/linux/octeon/image/Makefile | 5 +++-- >> 1 file changed, 3 insertions(+), 2 deletions(-) >> >> diff --git a/target/linux/octeon/image/Makefile >> b/target/linux/octeon/image/Makefile >> index ab91d06..da0d072 100644 >> --- a/target/linux/octeon/image/Makefile >> +++ b/target/linux/octeon/image/Makefile >> @@ -14,8 +14,9 @@ define Device/Default >>KERNEL := kernel-bin | strip-kernel | patch-cmdline >>IMAGES := sysupgrade.tar >>IMAGE/sysupgrade.tar/squashfs := append-rootfs | pad-rootfs | >> sysupgrade-tar rootfs=@ >> + IMAGE/sysupgrade.tar/ext4 := append-rootfs | pad-rootfs | sysupgrade-tar >> rootfs=@ > pad-rootfs does not make sense for ext4. agree. > >>IMAGE/sysupgrade.tar := sysupgrade-tar >> - FILESYSTEMS := squashfs >> + FILESYSTEMS := squashfs ext4 >> endef >> >> define Build/strip-kernel >> @@ -29,7 +30,7 @@ define Device/generic >> endef >> TARGET_DEVICES += generic >> >> -ER_CMDLINE:=-mtdparts=phys_mapped_flash:640k(boot0)ro,640k(boot1)ro,64k(eeprom)ro >> block2mtd.block2mtd=/dev/mmcblk0p2,65536,rootfs,15 root=/dev/mtdblock3 >> rootfstype=squashfs rootwait >> +ER_CMDLINE:=-mtdparts=phys_mapped_flash:640k(boot0)ro,640k(boot1)ro,64k(eeprom)ro >> block2mtd.block2mtd=/dev/mmcblk0p3,512,rootfs,15 rootfstype=ext4 >> root=/dev/mtdblock3 rootwait > This change does not make any sense to me. As far as I know, at least > the ER-PRO only ships with 2 partitions on mmc, not 3. The device I have has 3 partitions with a impractical size (see the fdisk output in the commit message above). It's possible that the mmc flash on my device has been altered from someone else, before I got it. If you are right, the patch is useless and can be dropped. I am going to confirm this. Is anyone here reading this capable of executing an 'fdisk -l' on a factory ER-Pro device ? > > - Felix > ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [PATCH] base-files: Remove deprecated bridge filtering settings
On 2016-08-23 12:36, Koen Vandeputte wrote: > Since kernel 3.18, br_netfilter is not loaded by default on boot > > As <3.18 kernels are not supported anymore in LEDE, > these settings are useless. > > This also removes the following bootprint whining about it: > > bridge: automatic filtering via arp/ip/ip6tables has been deprecated. > Update your scripts to load br_netfilter if you need this. When the package is installed, br_netfilter is loaded on boot. Since the ebtables module depends on br_netfilter, this could still lead to unwanted cases of netfilter calls from the bridge layer. Also, I don't see how this affects the boot time message at all, I don't see any condition in the kernel code. NACK from me on this one... - Felix ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] ubus: ubusd segfault on lookup
On 2016-08-23 12:38, Delio Brignoli wrote: > Hi Felix, > >> On 23 Aug 2016, at 11:40, Felix Fietkauwrote: >> >> On 2016-08-18 12:19, Delio Brignoli wrote: >>> Hello Felix, >>> >>> ubusd_handle_remove_object() currently sends object removal event >>> followed by a reply to the peer’s remove object request. However the >>> payload of the reply is the same as the object removal event. This >>> results in the peer not clearing the type id in struct ubus_object_type >>> because UBUS_ATTR_OBJTYPE is missing form the reply. If the peer >>> attempts to add the object again, the object will end up having a NULL >>> type field and a lookup will trigger a NULL pointer dereference in >>> used_prot.c:131 >>> >>> Swapping the order of ubus_proto_send_msg_from_blob() and >>> ubusd_free_object() (see diff below) the peer sees the expected >>> messages. Is this an acceptable fix for the issue? It looks like >>> ubusd_create_object() allows object with NULL type to be created, >>> probably because they are used internally, but shouldn’t it reply with >>> an error when a peer tries to add an object with a non-existent type id? >>> >>> Thank you >>> — >>> Delio >>> >>> >>> diff --git a/ubusd_proto.c b/ubusd_proto.c >>> index 0af11f2..d0cfa10 100644 >>> --- a/ubusd_proto.c >>> +++ b/ubusd_proto.c >>> @@ -130,8 +130,8 @@ static int ubusd_handle_remove_object(struct >>> ubus_client *cl, struct ubus_msg_bu >>>if (obj->type && obj->type->refcount == 1) >>>blob_put_int32(, UBUS_ATTR_OBJTYPE, obj->type->id.id); >>> >>> - ubusd_free_object(obj); >>>ubus_proto_send_msg_from_blob(cl, ub, UBUS_MSG_DATA); >>> + ubusd_free_object(obj); >> I've added some fixes for NULL pointer dereference issues, however I >> don't quite understand how this patch changes anything. As far as I can >> tell, ubus_proto_send_msg_from_blob does not access obj. >> Could you please provide some more context for your proposed fix? > > I’ll try explaining again but knowing which bit of my original > explanation isn’t clear would help me preparing a better answer… so here > we go: > > Both ubusd_free_object() (eventually via > ubusd_create_object_event_msg()) and ubus_proto_send_msg_from_blob() use > the same message buffer. So ubusd_handle_remove_object() builds the > payload which gets (indirectly) overwritten by the call to > ubusd_free_object() and then sent again by ubus_proto_send_msg_from_blob(). That was the part I was missing, now it makes sense to me. Fix pushed to git, will update the ubus package soon. Thanks, - Felix ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] Hosting sponsorship / New Git server
Hi all, this is just a quick update from the tech dept. The LEDE project received some generous sponsoring under the Digital Ocean open source program in the form of free hosting credits we can use to run non-compute infrastructure in the Digital Ocean cloud data centers. As one of the very first measures (partly as response to the unexpected recent down times) I migrated our Git server (git.lede-project.org) from a private machine to the Digital Ocean Frankfurt DC, which also gives us IPv6 access to the Git resources as a nice side effect. We now have enough resources to spare to spin up new web instances, for example we could start providing a forum, provided that we find enough volunteers to moderate it. Any thoughts on that? Shall I look into setting up a dedicated forum? I need to review the previous list discussions to see if there was a preferred software candidate already... ~ Jo ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH] base-files: Remove deprecated bridge filtering settings
Since kernel 3.18, br_netfilter is not loaded by default on boot As <3.18 kernels are not supported anymore in LEDE, these settings are useless. This also removes the following bootprint whining about it: bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this. Signed-off-by: Koen Vandeputtediff --git a/package/base-files/files/etc/sysctl.conf b/package/base-files/files/etc/sysctl.conf index 91a3ac9..9ddfe0e 100644 --- a/package/base-files/files/etc/sysctl.conf +++ b/package/base-files/files/etc/sysctl.conf @@ -23,8 +23,3 @@ net.netfilter.nf_conntrack_max=16384 net.netfilter.nf_conntrack_tcp_timeout_established=7440 net.netfilter.nf_conntrack_udp_timeout=60 net.netfilter.nf_conntrack_udp_timeout_stream=180 - -# disable bridge firewalling by default -net.bridge.bridge-nf-call-arptables=0 -net.bridge.bridge-nf-call-ip6tables=0 -net.bridge.bridge-nf-call-iptables=0 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH v2] ath9k: Set ATH9K_STATION_STATISTICS when enabling debugging
The ATH9K_STATION_STATISTICS kernel config variable enables some extra statistics that are useful for debugging (in particular with the airtime fairness patches enabled). This adds that kernel config when selecting ath9k debugging. Signed-off-by: Toke Høiland-Jørgensen--- package/kernel/mac80211/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile index f2839cd..5c0ca3f 100644 --- a/package/kernel/mac80211/Makefile +++ b/package/kernel/mac80211/Makefile @@ -1494,7 +1494,7 @@ config-$(call config_package,lib80211) += LIB80211 LIB80211_CRYPT_WEP LIB80211_C config-$(call config_package,airo) += AIRO config-$(call config_package,ath) += ATH_CARDS ATH_COMMON -config-$(CONFIG_PACKAGE_ATH_DEBUG) += ATH_DEBUG ATH10K_DEBUG +config-$(CONFIG_PACKAGE_ATH_DEBUG) += ATH_DEBUG ATH10K_DEBUG ATH9K_STATION_STATISTICS config-$(CONFIG_PACKAGE_ATH_DFS) += ATH9K_DFS_CERTIFIED ATH10K_DFS_CERTIFIED config-$(call config_package,ath9k) += ATH9K -- 2.9.0 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [PATCH] Set ATH9K_STATION_STATISTICS when enabling ath9k debugging
Toke Høiland-Jørgensenwrites: > Felix Fietkau writes: > >> On 2016-08-23 11:55, Toke Høiland-Jørgensen wrote: > diff --git a/target/linux/generic/config-4.4 > b/target/linux/generic/config-4.4 > index 8c30017..2f12982 100644 > --- a/target/linux/generic/config-4.4 > +++ b/target/linux/generic/config-4.4 > @@ -276,6 +276,7 @@ CONFIG_ATA_SFF=y > # CONFIG_ATH9K is not set > # CONFIG_ATH9K_HTC is not set > # CONFIG_ATH_DEBUG is not set > +# CONFIG_ATH9K_STATION_STATISTICS is not set This change is completely useless, ath9k is never enabled in the kernel config. >>> >>> No, but if it's not in there, the mac80211 build disables it when >>> running `make allnoconfig` even if the Makefile sets it. Unless I've >>> missed some other way to prevent that? >> Aside from some generated bits, the mac80211 .config has nothing to do >> with the kernel config. Also, since the kernel build calls make >> oldconfig, this option will never actually end up being in the kernel >> dir .config at all. Simply leave it out and it'll work just fine. > > Well, it didn't when I tried. The generated .config had it in there, but > after running `make allnoconfig` it disappeared. I can go test again, > but I spent quite a while tearing my hair out before coming up with this > solution... OK, just tried again. Seems you're right; must've been removing the kernel build dir while testing this that fixed things, not the actual change. Will send a v2 :) -Toke ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [PATCH] Use printf instead of echo.
On 2016-08-23 12:10, A. Benz wrote: > Hi Bastian, > > I will update them, however to do that while adhering to Felix's request > on using perfect syntax means going over them one by one. > > Perhaps a seasoned sed user can do a trick to automate it? > > For now, the change I submitted is whats needed to fix breakage on my > system. For others, I will send patches if no one takes it up in a few days. Actually, you might be able to simplify the change even more by forcing the hostapd build shell to bash (some other packages do this as well). - Felix ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [PATCH] Use printf instead of echo.
Hi Bastian, I will update them, however to do that while adhering to Felix's request on using perfect syntax means going over them one by one. Perhaps a seasoned sed user can do a trick to automate it? For now, the change I submitted is whats needed to fix breakage on my system. For others, I will send patches if no one takes it up in a few days. Regards, A. Benz On 08/23/16 17:03, Bastian Bittorf wrote: * Ash Benz[23.08.2016 10:19]: On some systems the shell built-in echo is used while on others /bin/echo and those two are not identical; this causes incomplete .cflags generation on some systems. thanks for that, it was on my list. can you also eleminate some other users, see: # git grep 'echo -n' | wc -l # 87 thanks & bye, bastian ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH] hostapd: use printf to improve portability.
Signed-off-by: Ash Benz--- package/network/services/hostapd/patches/200-multicall.patch | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package/network/services/hostapd/patches/200-multicall.patch b/package/network/services/hostapd/patches/200-multicall.patch index 8b260c2..40bd733 100644 --- a/package/network/services/hostapd/patches/200-multicall.patch +++ b/package/network/services/hostapd/patches/200-multicall.patch @@ -54,10 +54,10 @@ endif +dump_cflags: -+ @echo -n $(CFLAGS) " " ++ @printf "%s " "$(CFLAGS)" + +dump_ldflags: -+ @echo -n $(LDFLAGS) $(LIBS) $(EXTRALIBS) " " ++ @printf "%s " "$(LDFLAGS) $(LIBS) $(EXTRALIBS)" + nt_password_hash: $(NOBJS) $(Q)$(CC) $(LDFLAGS) -o nt_password_hash $(NOBJS) $(LIBS_n) @@ -142,10 +142,10 @@ @$(E) " sed" $< +dump_cflags: -+ @echo -n $(CFLAGS) " " ++ @printf "%s " "$(CFLAGS)" + +dump_ldflags: -+ @echo -n $(LDFLAGS) $(LIBS) $(EXTRALIBS) " " ++ @printf "%s " "$(LDFLAGS) $(LIBS) $(EXTRALIBS)" + wpa_supplicant.exe: wpa_supplicant mv -f $< $@ -- 2.1.4 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [PATCH] Set ATH9K_STATION_STATISTICS when enabling ath9k debugging
Felix Fietkauwrites: > On 2016-08-23 11:55, Toke Høiland-Jørgensen wrote: diff --git a/target/linux/generic/config-4.4 b/target/linux/generic/config-4.4 index 8c30017..2f12982 100644 --- a/target/linux/generic/config-4.4 +++ b/target/linux/generic/config-4.4 @@ -276,6 +276,7 @@ CONFIG_ATA_SFF=y # CONFIG_ATH9K is not set # CONFIG_ATH9K_HTC is not set # CONFIG_ATH_DEBUG is not set +# CONFIG_ATH9K_STATION_STATISTICS is not set >>> This change is completely useless, ath9k is never enabled in the kernel >>> config. >> >> No, but if it's not in there, the mac80211 build disables it when >> running `make allnoconfig` even if the Makefile sets it. Unless I've >> missed some other way to prevent that? > Aside from some generated bits, the mac80211 .config has nothing to do > with the kernel config. Also, since the kernel build calls make > oldconfig, this option will never actually end up being in the kernel > dir .config at all. Simply leave it out and it'll work just fine. Well, it didn't when I tried. The generated .config had it in there, but after running `make allnoconfig` it disappeared. I can go test again, but I spent quite a while tearing my hair out before coming up with this solution... -Toke ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] mission impossible!! add ubifs
On 2016-08-23 11:40, Daniel Golle wrote: On Tue, Aug 23, 2016 at 11:10:11AM +0200, Kenneth Johansson wrote: On 2016-08-23 07:31, Daniel Golle wrote: even this do not currently work. there is no UBI support of any kind for mt7621 and adding it was what I was asking about. There are already devices using UBI on MT7621, just no method to flash UBI using the 'factory'/stock method due to lacking UBI support in the vendor-supplied U-Boot. UBI support is enabled on targets by setting the 'nand' feature, see target/linux/ramips/mt7621/target.mk You may also have a look at So I did a fresh clone. configured for mt7621. added this patch to be able to select ubi image generation. You will need to add 'ubifs' to target/linux/ramips/mt7621/target.mk rather than target/linux/ramips/Makefile. You also need to specify the device-specific parameters which are passed to mkfs.ubifs, e.g. something like UBIFS_OPTS = -m 2048 -e 124KiB -c 4096 Making a mystery out of what you are trying to achieve doesn't help. Especially not if I got the subtle feeling that you are trying to do it in a very wrong way -- in the end, you are paid to build some firmware for a device we'll later on have to live with and cope with your image-building hacks. I know, uniqueness and originality are high values in contemporary society. However, nobody is going to appreciate very unique firmware image formats (unless you are selling security by obscurity). hmm ??? Especially, please have a look at how it works for the many other devices which use NAND flash and thus UBI(FS). It's really not that different from what you want to do, I guess (but don't know, because you are not telling anyone what you are trying to do). well I thought I said exactly what I wanted. I want a ubifs image. not a ubi image so ubinizer is not to be run on it. I want the kernel uImage in /boot and I want the DTB in/boot. that is all. there is no magic strange format its just a filesystem in a ubifs image. So please have a look at ipq806x, lantiq and oxnas image building and sysupgrade script, all you are looking for can be found there. But the issue is that I want to modify the mt7621. it feels like it should be really easy thing to do. And looking on other board is obviously the first thing I did. Still I have not managed to figure out what variable to set or what function to override. But I can always just nuke the entire thing and make a complete new target. then I do not have to adopt anything to how it works right now. It's shame the build system is so abstracted that its no longer possible to understand. ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [PATCH] Set ATH9K_STATION_STATISTICS when enabling ath9k debugging
On 2016-08-23 11:55, Toke Høiland-Jørgensen wrote: >>> diff --git a/target/linux/generic/config-4.4 >>> b/target/linux/generic/config-4.4 >>> index 8c30017..2f12982 100644 >>> --- a/target/linux/generic/config-4.4 >>> +++ b/target/linux/generic/config-4.4 >>> @@ -276,6 +276,7 @@ CONFIG_ATA_SFF=y >>> # CONFIG_ATH9K is not set >>> # CONFIG_ATH9K_HTC is not set >>> # CONFIG_ATH_DEBUG is not set >>> +# CONFIG_ATH9K_STATION_STATISTICS is not set >> This change is completely useless, ath9k is never enabled in the kernel >> config. > > No, but if it's not in there, the mac80211 build disables it when > running `make allnoconfig` even if the Makefile sets it. Unless I've > missed some other way to prevent that? Aside from some generated bits, the mac80211 .config has nothing to do with the kernel config. Also, since the kernel build calls make oldconfig, this option will never actually end up being in the kernel dir .config at all. Simply leave it out and it'll work just fine. - Felix ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [PATCH] Set ATH9K_STATION_STATISTICS when enabling ath9k debugging
On 2016-08-13 12:02, Toke Høiland-Jørgensen wrote: > The ATH9K_STATION_STATISTICS kernel config variable enables some extra > statistics that are useful for debugging (in particular with the airtime > fairness patches enabled). This adds that kernel config when selecting > ath9k debugging. > > Signed-off-by: Toke Høiland-JørgensenMissing "ath9k: " prefix in the subject. > --- > package/kernel/mac80211/Makefile | 2 +- > target/linux/generic/config-4.4 | 1 + > 2 files changed, 2 insertions(+), 1 deletion(-) > > diff --git a/package/kernel/mac80211/Makefile > b/package/kernel/mac80211/Makefile > index f2839cd..5c0ca3f 100644 > --- a/package/kernel/mac80211/Makefile > +++ b/package/kernel/mac80211/Makefile > @@ -1494,7 +1494,7 @@ config-$(call config_package,lib80211) += LIB80211 > LIB80211_CRYPT_WEP LIB80211_C > config-$(call config_package,airo) += AIRO > > config-$(call config_package,ath) += ATH_CARDS ATH_COMMON > -config-$(CONFIG_PACKAGE_ATH_DEBUG) += ATH_DEBUG ATH10K_DEBUG > +config-$(CONFIG_PACKAGE_ATH_DEBUG) += ATH_DEBUG ATH10K_DEBUG > ATH9K_STATION_STATISTICS > config-$(CONFIG_PACKAGE_ATH_DFS) += ATH9K_DFS_CERTIFIED ATH10K_DFS_CERTIFIED > > config-$(call config_package,ath9k) += ATH9K > diff --git a/target/linux/generic/config-4.4 b/target/linux/generic/config-4.4 > index 8c30017..2f12982 100644 > --- a/target/linux/generic/config-4.4 > +++ b/target/linux/generic/config-4.4 > @@ -276,6 +276,7 @@ CONFIG_ATA_SFF=y > # CONFIG_ATH9K is not set > # CONFIG_ATH9K_HTC is not set > # CONFIG_ATH_DEBUG is not set > +# CONFIG_ATH9K_STATION_STATISTICS is not set This change is completely useless, ath9k is never enabled in the kernel config. - Felix ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [PATCH] Use printf instead of echo.
On 23 August 2016 at 10:02, Ash Benzwrote: > On some systems the shell built-in echo is used while on others /bin/echo > and those two are not > identical; this causes incomplete .cflags generation on some systems. > > Signed-off-by: Ash Benz Please use a proper prefix for your subject. For a good hint see git log --oneline package/network/services/hostapd/ Also no need to prepend every line of your commit message with a space. Just write "On some" instead of " On some". ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] mission impossible!! add ubifs
On Tue, Aug 23, 2016 at 11:10:11AM +0200, Kenneth Johansson wrote: > On 2016-08-23 07:31, Daniel Golle wrote: > > > > > even this do not currently work. there is no UBI support of any kind for > > > mt7621 and adding it was what I was asking about. > > There are already devices using UBI on MT7621, just no method to flash > > UBI using the 'factory'/stock method due to lacking UBI support in > > the vendor-supplied U-Boot. UBI support is enabled on targets by > > setting the 'nand' feature, see target/linux/ramips/mt7621/target.mk > > You may also have a look at > > So I did a fresh clone. configured for mt7621. added this patch to be able > to select ubi image generation. You will need to add 'ubifs' to target/linux/ramips/mt7621/target.mk rather than target/linux/ramips/Makefile. You also need to specify the device-specific parameters which are passed to mkfs.ubifs, e.g. something like UBIFS_OPTS = -m 2048 -e 124KiB -c 4096 Making a mystery out of what you are trying to achieve doesn't help. Especially not if I got the subtle feeling that you are trying to do it in a very wrong way -- in the end, you are paid to build some firmware for a device we'll later on have to live with and cope with your image-building hacks. I know, uniqueness and originality are high values in contemporary society. However, nobody is going to appreciate very unique firmware image formats (unless you are selling security by obscurity). Especially, please have a look at how it works for the many other devices which use NAND flash and thus UBI(FS). It's really not that different from what you want to do, I guess (but don't know, because you are not telling anyone what you are trying to do). So please have a look at ipq806x, lantiq and oxnas image building and sysupgrade script, all you are looking for can be found there. Also, you may have a look at target/linux/imx6/image/Makefile (I'm not saying it's a good example if you are building something new, but we had to deal with designs similar to what you are trying in the past... Cheers Daniel > > diff --git a/target/linux/ramips/Makefile b/target/linux/ramips/Makefile > index b4ccaf6..a5e67b8 100644 > --- a/target/linux/ramips/Makefile > +++ b/target/linux/ramips/Makefile > @@ -10,7 +10,7 @@ ARCH:=mipsel > BOARD:=ramips > BOARDNAME:=MediaTek Ralink MIPS > SUBTARGETS:=rt305x mt7620 mt7621 mt7628 mt7688 rt3883 rt288x > -FEATURES:=squashfs gpio mips16 > +FEATURES:=squashfs gpio mips16 ubifs > MAINTAINER:=John Crispin> > KERNEL_PATCHVER:=4.4 > > > > then I build and I fail on this. > > > /home/kenjo/proj/inteno/lede/staging_dir/host/bin/mkfs.ubifs --space-fixup > --force-compr=zlib --squash-uids -o > /home/kenjo/proj/inteno/lede/build_dir/target-mipsel_1004kc_musl-1.1.15/linux-ramips_mt7621/root.ubifs > -d > /home/kenjo/proj/inteno/lede/build_dir/target-mipsel_1004kc_musl-1.1.15/root-ramips > Error: min. I/O unit was not specified (use -h for help) > /home/kenjo/proj/inteno/lede/include/image.mk:312: recipe for target > '/home/kenjo/proj/inteno/lede/build_dir/target-mipsel_1004kc_musl-1.1.15/linux-ramips_mt7621/root.ubifs' > failed > > so its not building. there is no ubi option string anywhere in > target/linux/ramips/ so it looks like its some type of default setting. ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] ubus: ubusd segfault on lookup
On 2016-08-18 12:19, Delio Brignoli wrote: > Hello Felix, > > ubusd_handle_remove_object() currently sends object removal event > followed by a reply to the peer’s remove object request. However the > payload of the reply is the same as the object removal event. This > results in the peer not clearing the type id in struct ubus_object_type > because UBUS_ATTR_OBJTYPE is missing form the reply. If the peer > attempts to add the object again, the object will end up having a NULL > type field and a lookup will trigger a NULL pointer dereference in > used_prot.c:131 > > Swapping the order of ubus_proto_send_msg_from_blob() and > ubusd_free_object() (see diff below) the peer sees the expected > messages. Is this an acceptable fix for the issue? It looks like > ubusd_create_object() allows object with NULL type to be created, > probably because they are used internally, but shouldn’t it reply with > an error when a peer tries to add an object with a non-existent type id? > > Thank you > — > Delio > > > diff --git a/ubusd_proto.c b/ubusd_proto.c > index 0af11f2..d0cfa10 100644 > --- a/ubusd_proto.c > +++ b/ubusd_proto.c > @@ -130,8 +130,8 @@ static int ubusd_handle_remove_object(struct ubus_client > *cl, struct ubus_msg_bu > if (obj->type && obj->type->refcount == 1) > blob_put_int32(, UBUS_ATTR_OBJTYPE, obj->type->id.id); > > - ubusd_free_object(obj); > ubus_proto_send_msg_from_blob(cl, ub, UBUS_MSG_DATA); > + ubusd_free_object(obj); I've added some fixes for NULL pointer dereference issues, however I don't quite understand how this patch changes anything. As far as I can tell, ubus_proto_send_msg_from_blob does not access obj. Could you please provide some more context for your proposed fix? Thanks, - Felix ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [PATCH] Use printf instead of echo.
On 2016-08-23 10:02, Ash Benz wrote: > On some systems the shell built-in echo is used while on others /bin/echo > and those two are not > identical; this causes incomplete .cflags generation on some systems. > > Signed-off-by: Ash Benz> --- > package/network/services/hostapd/patches/200-multicall.patch | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/package/network/services/hostapd/patches/200-multicall.patch > b/package/network/services/hostapd/patches/200-multicall.patch > index 8b260c2..ddfec6e 100644 > --- a/package/network/services/hostapd/patches/200-multicall.patch > +++ b/package/network/services/hostapd/patches/200-multicall.patch > @@ -54,10 +54,10 @@ > endif > > +dump_cflags: > -+@echo -n $(CFLAGS) " " > ++@printf "%s " $(CFLAGS) > + > +dump_ldflags: > -+@echo -n $(LDFLAGS) $(LIBS) $(EXTRALIBS) " " > ++@printf "%s " $(LDFLAGS) $(LIBS) $(EXTRALIBS) > + > nt_password_hash: $(NOBJS) > $(Q)$(CC) $(LDFLAGS) -o nt_password_hash $(NOBJS) $(LIBS_n) > @@ -142,10 +142,10 @@ > @$(E) " sed" $< > > +dump_cflags: > -+@echo -n $(CFLAGS) " " > ++@printf "%s " $(CFLAGS) > + > +dump_ldflags: > -+@echo -n $(LDFLAGS) $(LIBS) $(EXTRALIBS) " " > ++@printf "%s " $(LDFLAGS) $(LIBS) $(EXTRALIBS) While your version appears to work, I think it would be more correct to put everything in one argument for %s. Please use something like: @printf "%s " "$(LDFLAGS) $(LIBS) $(EXTRALIBS)" - Felix ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] mission impossible!! add ubifs
On 2016-08-23 07:31, Daniel Golle wrote: even this do not currently work. there is no UBI support of any kind for mt7621 and adding it was what I was asking about. There are already devices using UBI on MT7621, just no method to flash UBI using the 'factory'/stock method due to lacking UBI support in the vendor-supplied U-Boot. UBI support is enabled on targets by setting the 'nand' feature, see target/linux/ramips/mt7621/target.mk You may also have a look at So I did a fresh clone. configured for mt7621. added this patch to be able to select ubi image generation. diff --git a/target/linux/ramips/Makefile b/target/linux/ramips/Makefile index b4ccaf6..a5e67b8 100644 --- a/target/linux/ramips/Makefile +++ b/target/linux/ramips/Makefile @@ -10,7 +10,7 @@ ARCH:=mipsel BOARD:=ramips BOARDNAME:=MediaTek Ralink MIPS SUBTARGETS:=rt305x mt7620 mt7621 mt7628 mt7688 rt3883 rt288x -FEATURES:=squashfs gpio mips16 +FEATURES:=squashfs gpio mips16 ubifs MAINTAINER:=John CrispinKERNEL_PATCHVER:=4.4 then I build and I fail on this. /home/kenjo/proj/inteno/lede/staging_dir/host/bin/mkfs.ubifs --space-fixup --force-compr=zlib --squash-uids -o /home/kenjo/proj/inteno/lede/build_dir/target-mipsel_1004kc_musl-1.1.15/linux-ramips_mt7621/root.ubifs -d /home/kenjo/proj/inteno/lede/build_dir/target-mipsel_1004kc_musl-1.1.15/root-ramips Error: min. I/O unit was not specified (use -h for help) /home/kenjo/proj/inteno/lede/include/image.mk:312: recipe for target '/home/kenjo/proj/inteno/lede/build_dir/target-mipsel_1004kc_musl-1.1.15/linux-ramips_mt7621/root.ubifs' failed so its not building. there is no ubi option string anywhere in target/linux/ramips/ so it looks like its some type of default setting. ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH] Use printf instead of echo.
On some systems the shell built-in echo is used while on others /bin/echo and those two are not identical; this causes incomplete .cflags generation on some systems. Signed-off-by: Ash Benz--- package/network/services/hostapd/patches/200-multicall.patch | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package/network/services/hostapd/patches/200-multicall.patch b/package/network/services/hostapd/patches/200-multicall.patch index 8b260c2..ddfec6e 100644 --- a/package/network/services/hostapd/patches/200-multicall.patch +++ b/package/network/services/hostapd/patches/200-multicall.patch @@ -54,10 +54,10 @@ endif +dump_cflags: -+ @echo -n $(CFLAGS) " " ++ @printf "%s " $(CFLAGS) + +dump_ldflags: -+ @echo -n $(LDFLAGS) $(LIBS) $(EXTRALIBS) " " ++ @printf "%s " $(LDFLAGS) $(LIBS) $(EXTRALIBS) + nt_password_hash: $(NOBJS) $(Q)$(CC) $(LDFLAGS) -o nt_password_hash $(NOBJS) $(LIBS_n) @@ -142,10 +142,10 @@ @$(E) " sed" $< +dump_cflags: -+ @echo -n $(CFLAGS) " " ++ @printf "%s " $(CFLAGS) + +dump_ldflags: -+ @echo -n $(LDFLAGS) $(LIBS) $(EXTRALIBS) " " ++ @printf "%s " $(LDFLAGS) $(LIBS) $(EXTRALIBS) + wpa_supplicant.exe: wpa_supplicant mv -f $< $@ -- 2.1.4 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [PATCH 1/2] Octeon: Use ext4 on mmcblk0p3 per default for ER.
On 2016-08-22 14:06, Daniel Danzberger wrote: > This patch defaults the rootfs to ext4 on the Ubnt Edgerouter. > The Edgerouter Lite is not affacted by this patch. > > Why EXT4 and not squashfs + jiffs ? > --- > The internal mmc flash is badly partitioned. > > Disk /dev/mmcblk0: 3.7 GiB, 3959422976 bytes, 7733248 sectors > Units: sectors of 1 * 512 = 512 bytes > Sector size (logical/physical): 512 bytes / 512 bytes > I/O size (minimum/optimal): 512 bytes / 512 bytes > > Device Boot Start End Sectors Size Id Type > /dev/mmcblk0p1 *63 17135 17073 8.3M 83 Linux > /dev/mmcblk0p2 17199 149183 131985 64.5M 83 Linux > /dev/mmcblk0p3 149247 2246831 20975851G 83 Linux > > block2mtd requires a block size that is a divisor of the device size. > Both p2 and p3 can only be divided by the sector size 512, > but Jiffs won't work with a blocksize of 512 bytes. > > This also fixes a boot hang, when the kernel tries to mount /root. > The old commandline was: block2mtd.block2mtd=/dev/mmcblk0p2,65536,rootfs,15 > > This line caused the following error message and stopped booting: > "block2mtd: erasesize must be a divisor of device size" > > Signed-off-by: Daniel Danzberger> --- > target/linux/octeon/image/Makefile | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/target/linux/octeon/image/Makefile > b/target/linux/octeon/image/Makefile > index ab91d06..da0d072 100644 > --- a/target/linux/octeon/image/Makefile > +++ b/target/linux/octeon/image/Makefile > @@ -14,8 +14,9 @@ define Device/Default >KERNEL := kernel-bin | strip-kernel | patch-cmdline >IMAGES := sysupgrade.tar >IMAGE/sysupgrade.tar/squashfs := append-rootfs | pad-rootfs | > sysupgrade-tar rootfs=@ > + IMAGE/sysupgrade.tar/ext4 := append-rootfs | pad-rootfs | sysupgrade-tar > rootfs=@ pad-rootfs does not make sense for ext4. >IMAGE/sysupgrade.tar := sysupgrade-tar > - FILESYSTEMS := squashfs > + FILESYSTEMS := squashfs ext4 > endef > > define Build/strip-kernel > @@ -29,7 +30,7 @@ define Device/generic > endef > TARGET_DEVICES += generic > > -ER_CMDLINE:=-mtdparts=phys_mapped_flash:640k(boot0)ro,640k(boot1)ro,64k(eeprom)ro > block2mtd.block2mtd=/dev/mmcblk0p2,65536,rootfs,15 root=/dev/mtdblock3 > rootfstype=squashfs rootwait > +ER_CMDLINE:=-mtdparts=phys_mapped_flash:640k(boot0)ro,640k(boot1)ro,64k(eeprom)ro > block2mtd.block2mtd=/dev/mmcblk0p3,512,rootfs,15 rootfstype=ext4 > root=/dev/mtdblock3 rootwait This change does not make any sense to me. As far as I know, at least the ER-PRO only ships with 2 partitions on mmc, not 3. - Felix ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [PATCH] Modify hostapd's multicall patch
On 2016-08-23 08:56, Ash Benz wrote: > Explicitly call /bin/echo instead of echo only. The shell built-in echo > behaves differently and causes > incomplete .cflags generation on some systems. > > Signed-off-by: Ash BenzThere's no guarantee that /bin/echo is any better than the built-in echo (or that it even exists). Please use printf to make it more portable. - Felix ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH] Modify hostapd's multicall patch
Explicitly call /bin/echo instead of echo only. The shell built-in echo behaves differently and causes incomplete .cflags generation on some systems. Signed-off-by: Ash Benz--- package/network/services/hostapd/patches/200-multicall.patch | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package/network/services/hostapd/patches/200-multicall.patch b/package/network/services/hostapd/patches/200-multicall.patch index 8b260c2..85ed077 100644 --- a/package/network/services/hostapd/patches/200-multicall.patch +++ b/package/network/services/hostapd/patches/200-multicall.patch @@ -54,10 +54,10 @@ endif +dump_cflags: -+ @echo -n $(CFLAGS) " " ++ @/bin/echo -n $(CFLAGS) " " + +dump_ldflags: -+ @echo -n $(LDFLAGS) $(LIBS) $(EXTRALIBS) " " ++ @/bin/echo -n $(LDFLAGS) $(LIBS) $(EXTRALIBS) " " + nt_password_hash: $(NOBJS) $(Q)$(CC) $(LDFLAGS) -o nt_password_hash $(NOBJS) $(LIBS_n) @@ -142,10 +142,10 @@ @$(E) " sed" $< +dump_cflags: -+ @echo -n $(CFLAGS) " " ++ @/bin/echo -n $(CFLAGS) " " + +dump_ldflags: -+ @echo -n $(LDFLAGS) $(LIBS) $(EXTRALIBS) " " ++ @/bin/echo -n $(LDFLAGS) $(LIBS) $(EXTRALIBS) " " + wpa_supplicant.exe: wpa_supplicant mv -f $< $@ -- 2.1.4 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev