Bump buildroot to 2020.11-rc1 (#985)
* Update buildroot-patches for 2020.11-rc1 buildroot * Update buildroot to 2020.11-rc1 Signed-off-by: Stefan Agner <stefan@agner.ch> * Don't rely on sfdisk --list-free output The --list-free (-F) argument does not allow machine readable mode. And it seems that the output format changes over time (different spacing, using size postfixes instead of raw blocks). Use sfdisk json output and calculate free partition space ourselfs. This works for 2.35 and 2.36 and is more robust since we rely on output which is meant for scripts to parse. * Migrate defconfigs for Buildroot 2020.11-rc1 In particular, rename BR2_TARGET_UBOOT_BOOT_SCRIPT(_SOURCE) to BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT(_SOURCE). * Rebase/remove systemd patches for systemd 246 * Drop apparmor/libapparmor from buildroot-external * hassos-persists: use /run as directory for lockfiles The U-Boot tools use /var/lock by default which is not created any more by systemd by default (it is under tmpfiles legacy.conf, which we no longer install). * Disable systemd-update-done.service The service is not suited for pure read-only systems. In particular the service needs to be able to write a file in /etc and /var. Remove the service. Note: This is a static service and cannot be removed using systemd-preset. * Disable apparmor.service for now The service loads all default profiles. Some might actually cause problems. E.g. the profile for ping seems not to match our setup for /etc/resolv.conf: [85503.634653] audit: type=1400 audit(1605286002.684:236): apparmor="DENIED" operation="open" profile="ping" name="/run/resolv.conf" pid=27585 comm="ping" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
From 89ad9c143825b13d028c2f1713d55e83135d5c0f Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Sat, 5 Sep 2020 15:38:33 +0200
|
||||
Subject: [PATCH] CMakesLists.txt: fix static build with pcap
|
||||
|
||||
Use pkg-config to find the dependencies of pcap such as libnl otherwise
|
||||
a static-only build will fail on:
|
||||
|
||||
[100%] Linking C executable ef
|
||||
/srv/storage/autobuild/run/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/8.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: /srv/storage/autobuild/run/instance-0/output-1/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libpcap.a(pcap-linux.o): in function `nl80211_init':
|
||||
pcap-linux.c:(.text+0x460): undefined reference to `nl_socket_alloc'
|
||||
/srv/storage/autobuild/run/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/8.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: pcap-linux.c:(.text+0x498): undefined reference to `genl_connect'
|
||||
|
||||
Fixes:
|
||||
- http://autobuild.buildroot.org/results/99062bfc8c21c32bc835acae675aede7c9cf0c90
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
[Upstream status: https://github.com/microchip-ung/easyframes/pull/2]
|
||||
---
|
||||
CMakeLists.txt | 20 ++++++++++++++------
|
||||
1 file changed, 14 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index a62a950..5be128c 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -7,13 +7,21 @@ include_directories(src)
|
||||
|
||||
|
||||
set(_LIBPCAP "")
|
||||
-FIND_PATH(PCAP_INCLUDE_DIR NAMES pcap/pcap.h)
|
||||
-FIND_LIBRARY(PCAP_LIBRARY NAMES pcap)
|
||||
-
|
||||
-if (PCAP_LIBRARY)
|
||||
+find_package(PkgConfig)
|
||||
+pkg_check_modules(PCAP libpcap)
|
||||
+if (PCAP_FOUND)
|
||||
add_definitions(-DHAS_LIBPCAP)
|
||||
- include_directories(${PCAP_INCLUDE_DIR})
|
||||
- set(_LIBPCAP ${PCAP_LIBRARY})
|
||||
+ include_directories(${PCAP_INCLUDE_DIRS})
|
||||
+ set(_LIBPCAP ${PCAP_LIBRARIES})
|
||||
+else()
|
||||
+ FIND_PATH(PCAP_INCLUDE_DIR NAMES pcap/pcap.h)
|
||||
+ FIND_LIBRARY(PCAP_LIBRARY NAMES pcap)
|
||||
+
|
||||
+ if (PCAP_LIBRARY)
|
||||
+ add_definitions(-DHAS_LIBPCAP)
|
||||
+ include_directories(${PCAP_INCLUDE_DIR})
|
||||
+ set(_LIBPCAP ${PCAP_LIBRARY})
|
||||
+ endif()
|
||||
endif()
|
||||
|
||||
add_library(libef STATIC
|
||||
--
|
||||
2.28.0
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
From d3d179c3c39ec10ec636b325325ad8e18ae9542f Mon Sep 17 00:00:00 2001
|
||||
From: Horatiu Vultur <horatiu.vultur@microchip.com>
|
||||
Date: Tue, 1 Sep 2020 13:03:47 +0200
|
||||
Subject: [PATCH] Fix different compiling issues
|
||||
|
||||
[Retrieved from:
|
||||
https://github.com/microchip-ung/easyframes/commit/d3d179c3c39ec10ec636b325325ad8e18ae9542f]
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
---
|
||||
src/ef-exec.c | 4 ++--
|
||||
src/ef-parse-bytes.c | 8 ++++++--
|
||||
src/ef.h | 4 ++--
|
||||
3 files changed, 10 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/ef-exec.c b/src/ef-exec.c
|
||||
index 3d184a0..824164e 100644
|
||||
--- a/src/ef-exec.c
|
||||
+++ b/src/ef-exec.c
|
||||
@@ -108,7 +108,7 @@ int ring_wait_for_init(tpacket_ring *ring) {
|
||||
|
||||
|
||||
int raw_socket(cmd_socket_t *cmd_socket) {
|
||||
- int s, res, val, ifidx;
|
||||
+ int s, res, val, ifidx, i;
|
||||
struct sockaddr_ll sa = {};
|
||||
struct packet_mreq mr = {};
|
||||
|
||||
@@ -194,7 +194,7 @@ int raw_socket(cmd_socket_t *cmd_socket) {
|
||||
//
|
||||
// TODO: This does not seem to be needed, if we uses a RX ring buffer
|
||||
// instead (atleast that seems to work for libpcap)
|
||||
- for (int i = 0; i < 10000; ++i) {
|
||||
+ for (i = 0; i < 10000; ++i) {
|
||||
struct msghdr msg = { 0 };
|
||||
int res = recvmsg(s, &msg, MSG_DONTWAIT);
|
||||
if (res < 0)
|
||||
diff --git a/src/ef-parse-bytes.c b/src/ef-parse-bytes.c
|
||||
index 1dd590f..1785f45 100644
|
||||
--- a/src/ef-parse-bytes.c
|
||||
+++ b/src/ef-parse-bytes.c
|
||||
@@ -2,6 +2,7 @@
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
+#include <endian.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
struct start_with {
|
||||
@@ -212,7 +213,9 @@ buf_t *parse_bytes(const char *s, int bytes) {
|
||||
for (s = data_begin; *s; ++s) {
|
||||
int match_found = 0;
|
||||
for (i = 0; i < sizeof(has_chars)/sizeof(has_chars[0]); ++i) {
|
||||
- for (const char *set_i = has_chars[i].char_set; *set_i; ++set_i) {
|
||||
+ const char *set_i;
|
||||
+
|
||||
+ for (set_i = has_chars[i].char_set; *set_i; ++set_i) {
|
||||
if (*s == *set_i) {
|
||||
has_mask |= has_chars[i].mask;
|
||||
match_found = 1;
|
||||
@@ -313,6 +316,7 @@ buf_t *parse_bytes(const char *s, int bytes) {
|
||||
((has_mask & ~(HAS_HEX_COL)) == 0) && (has_mask & HAS_COLON)) {
|
||||
// This will be treated as a mac-address
|
||||
uint8_t m[6] = {};
|
||||
+ const char *x;
|
||||
|
||||
// We want to be able to write something like this (like we RFC2373
|
||||
// specifies for IPv6):
|
||||
@@ -334,7 +338,7 @@ buf_t *parse_bytes(const char *s, int bytes) {
|
||||
|
||||
//po("line: %d data_begin: %s\n", __LINE__, data_begin);
|
||||
|
||||
- for (const char *x = data_begin; *x; ++x) {
|
||||
+ for (x = data_begin; *x; ++x) {
|
||||
int colon = 0;
|
||||
int val = 0;
|
||||
|
||||
diff --git a/src/ef.h b/src/ef.h
|
||||
index 8926c25..f4c1629 100644
|
||||
--- a/src/ef.h
|
||||
+++ b/src/ef.h
|
||||
@@ -59,8 +59,8 @@ void bl_check(buf_list_t *b);
|
||||
void bl_reset(buf_list_t *b);
|
||||
void bset_value(buf_t *b, uint8_t v);
|
||||
|
||||
-inline void bl_init(buf_list_t *b) { bl_reset(b); }
|
||||
-inline void bl_destroy(buf_list_t *b) { bl_reset(b); }
|
||||
+static inline void bl_init(buf_list_t *b) { bl_reset(b); }
|
||||
+static inline void bl_destroy(buf_list_t *b) { bl_reset(b); }
|
||||
|
||||
int bl_printf_append(buf_list_t *b, const char *format, ...)
|
||||
__attribute__ ((format (printf, 2, 3)));
|
||||
11
buildroot/package/easyframes/Config.in
Normal file
11
buildroot/package/easyframes/Config.in
Normal file
@@ -0,0 +1,11 @@
|
||||
config BR2_PACKAGE_EASYFRAMES
|
||||
bool "easyframes"
|
||||
depends on BR2_USE_MMU # fork()
|
||||
select BR2_PACKAGE_LIBPCAP
|
||||
help
|
||||
This is a small and simple command-line tool for network
|
||||
testing. The tool makes it simple to compose a frame,
|
||||
inject and express what and where frames are expected to be
|
||||
received.
|
||||
|
||||
https://github.com/microchip-ung/easyframes
|
||||
3
buildroot/package/easyframes/easyframes.hash
Normal file
3
buildroot/package/easyframes/easyframes.hash
Normal file
@@ -0,0 +1,3 @@
|
||||
# locally calculated
|
||||
sha256 3c0449b3129c29b5ecf67b689f1a75ffc65fde3c5f62811e2f0439ce4f4af392 easyframes-0.3.tar.gz
|
||||
sha256 24f37598e822a1411fb7164ce7eb3ef120aea8279016399abc282c2381ce3f57 COPYING
|
||||
13
buildroot/package/easyframes/easyframes.mk
Normal file
13
buildroot/package/easyframes/easyframes.mk
Normal file
@@ -0,0 +1,13 @@
|
||||
################################################################################
|
||||
#
|
||||
# easyframes
|
||||
#
|
||||
################################################################################
|
||||
|
||||
EASYFRAMES_VERSION = 0.3
|
||||
EASYFRAMES_SITE = $(call github,microchip-ung,easyframes,v$(EASYFRAMES_VERSION))
|
||||
EASYFRAMES_DEPENDENCIES = host-pkgconf libpcap
|
||||
EASYFRAMES_LICENSE = MIT
|
||||
EASYFRAMES_LICENSE_FILES = COPYING
|
||||
|
||||
$(eval $(cmake-package))
|
||||
Reference in New Issue
Block a user