Skip to content

Commit

Permalink
merge mainline
Browse files Browse the repository at this point in the history
  • Loading branch information
HandsomeYingyan committed Oct 29, 2021
1 parent 20bfe16 commit 2ad6b16
Show file tree
Hide file tree
Showing 36 changed files with 219 additions and 80 deletions.
18 changes: 16 additions & 2 deletions package/libs/ncurses/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=ncurses
PKG_VERSION:=6.2
PKG_RELEASE:=1
PKG_RELEASE:=3

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
Expand Down Expand Up @@ -120,7 +120,21 @@ ifneq ($(HOST_OS),FreeBSD)
mv $$$$dir $$$$(echo -ne "\x$$$$dir"); \
done \
)
for file in a/ansi d/dumb l/linux r/rxvt r/rxvt-unicode s/screen v/vt100 v/vt102 x/xterm x/xterm-color x/xterm-256color; do \
for file in \
a/ansi \
d/dumb \
l/linux \
r/rxvt \
r/rxvt-unicode \
s/screen \
s/screen-256color \
t/tmux \
t/tmux-256color \
v/vt100 \
v/vt102 \
x/xterm \
x/xterm-color \
x/xterm-256color; do \
$(INSTALL_DIR) $(1)/usr/share/terminfo/`dirname $$$$file`; \
$(CP) $(PKG_INSTALL_DIR)/usr/share/terminfo/$$$$file \
$(1)/usr/share/terminfo/$$$$file; \
Expand Down
9 changes: 5 additions & 4 deletions package/libs/wolfssl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=wolfssl
PKG_VERSION:=4.7.0-stable
PKG_RELEASE:=3
PKG_VERSION:=4.8.1-stable
PKG_RELEASE:=$(AUTORELEASE)

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/wolfSSL/wolfssl/archive/v$(PKG_VERSION)
PKG_HASH:=b0e740b31d4d877d540ad50cc539a8873fc41af02bd3091c4357b403f7106e31
PKG_HASH:=50db45f348f47e00c93dd244c24108220120cb3cc9d01434789229c32937c444

PKG_FIXUP:=libtool libtool-abiver
PKG_INSTALL:=1
Expand Down Expand Up @@ -69,6 +69,7 @@ TARGET_LDFLAGS += -flto

# --enable-stunnel needed for OpenSSL API compatibility bits
CONFIGURE_ARGS += \
--enable-reproducible-build \
--enable-lighty \
--enable-opensslall \
--enable-opensslextra \
Expand Down Expand Up @@ -101,7 +102,7 @@ endif

ifeq ($(CONFIG_WOLFSSL_HAS_WPAS),y)
CONFIGURE_ARGS += \
--enable-wpas --enable-sha512 --enable-fortress --enable-fastmath
--enable-wpas --enable-fortress --enable-fastmath
endif

define Build/InstallDev
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
From fa8f23284d4689c2a737204b337b58d966dcbd8c Mon Sep 17 00:00:00 2001
From: Sean Parkinson <sean@wolfssl.com>
Date: Fri, 20 Aug 2021 10:23:38 +1000
Subject: [PATCH] Maths x86 asm: change asm snippets to get compiling

TFM:
Use register or memory for c0, c1, c2 in SQRADD and SQRADD2.
SP:
Use register or memory for vl, vh, vo in SP_ASM_MUL_ADD,
SP_ASM_MUL_ADD2 and SP_ASM_SQR_ADD.
---
wolfcrypt/src/asm.c | 29 ++++++++++++++++++++---------
wolfcrypt/src/sp_int.c | 6 +++---
2 files changed, 23 insertions(+), 12 deletions(-)

--- a/wolfcrypt/src/asm.c
+++ b/wolfcrypt/src/asm.c
@@ -698,33 +698,39 @@ __asm__( \

#define SQRADD(i, j) \
__asm__( \
- "movl %6,%%eax \n\t" \
+ "movl %3,%%eax \n\t" \
"mull %%eax \n\t" \
"addl %%eax,%0 \n\t" \
"adcl %%edx,%1 \n\t" \
"adcl $0,%2 \n\t" \
- :"=r"(c0), "=r"(c1), "=r"(c2): "0"(c0), "1"(c1), "2"(c2), "m"(i) :"%eax","%edx","cc");
+ :"+rm"(c0), "+rm"(c1), "+rm"(c2) \
+ : "m"(i) \
+ :"%eax","%edx","cc");

#define SQRADD2(i, j) \
__asm__( \
- "movl %6,%%eax \n\t" \
- "mull %7 \n\t" \
+ "movl %3,%%eax \n\t" \
+ "mull %4 \n\t" \
"addl %%eax,%0 \n\t" \
"adcl %%edx,%1 \n\t" \
"adcl $0,%2 \n\t" \
"addl %%eax,%0 \n\t" \
"adcl %%edx,%1 \n\t" \
"adcl $0,%2 \n\t" \
- :"=r"(c0), "=r"(c1), "=r"(c2): "0"(c0), "1"(c1), "2"(c2), "m"(i), "m"(j) :"%eax","%edx", "cc");
+ :"+rm"(c0), "+rm"(c1), "+rm"(c2) \
+ : "m"(i), "m"(j) \
+ :"%eax","%edx", "cc");

#define SQRADDSC(i, j) \
-__asm__( \
+__asm__( \
"movl %3,%%eax \n\t" \
"mull %4 \n\t" \
"movl %%eax,%0 \n\t" \
"movl %%edx,%1 \n\t" \
"xorl %2,%2 \n\t" \
- :"=r"(sc0), "=r"(sc1), "=r"(sc2): "g"(i), "g"(j) :"%eax","%edx","cc");
+ :"=r"(sc0), "=r"(sc1), "=r"(sc2) \
+ : "g"(i), "g"(j) \
+ :"%eax","%edx","cc");

#define SQRADDAC(i, j) \
__asm__( \
@@ -733,7 +739,9 @@ __asm__(
"addl %%eax,%0 \n\t" \
"adcl %%edx,%1 \n\t" \
"adcl $0,%2 \n\t" \
- :"=r"(sc0), "=r"(sc1), "=r"(sc2): "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) :"%eax","%edx","cc");
+ :"=r"(sc0), "=r"(sc1), "=r"(sc2) \
+ : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
+ :"%eax","%edx","cc");

#define SQRADDDB \
__asm__( \
@@ -743,7 +751,10 @@ __asm__(
"addl %6,%0 \n\t" \
"adcl %7,%1 \n\t" \
"adcl %8,%2 \n\t" \
- :"=r"(c0), "=r"(c1), "=r"(c2) : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) : "cc");
+ :"=r"(c0), "=r"(c1), "=r"(c2) \
+ : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), \
+ "r"(sc2) \
+ : "cc");

#elif defined(TFM_X86_64)
/* x86-64 optimized */
--- a/wolfcrypt/src/sp_int.c
+++ b/wolfcrypt/src/sp_int.c
@@ -476,7 +476,7 @@ static WC_INLINE sp_int_digit sp_div_wor
"addl %%eax, %[l] \n\t" \
"adcl %%edx, %[h] \n\t" \
"adcl $0 , %[o] \n\t" \
- : [l] "+r" (vl), [h] "+r" (vh), [o] "+r" (vo) \
+ : [l] "+rm" (vl), [h] "+rm" (vh), [o] "+rm" (vo) \
: [a] "r" (va), [b] "r" (vb) \
: "eax", "edx", "cc" \
)
@@ -502,7 +502,7 @@ static WC_INLINE sp_int_digit sp_div_wor
"addl %%eax, %[l] \n\t" \
"adcl %%edx, %[h] \n\t" \
"adcl $0 , %[o] \n\t" \
- : [l] "+r" (vl), [h] "+r" (vh), [o] "+r" (vo) \
+ : [l] "+rm" (vl), [h] "+rm" (vh), [o] "+rm" (vo) \
: [a] "r" (va), [b] "r" (vb) \
: "eax", "edx", "cc" \
)
@@ -541,7 +541,7 @@ static WC_INLINE sp_int_digit sp_div_wor
"addl %%eax, %[l] \n\t" \
"adcl %%edx, %[h] \n\t" \
"adcl $0 , %[o] \n\t" \
- : [l] "+r" (vl), [h] "+r" (vh), [o] "+r" (vo) \
+ : [l] "+rm" (vl), [h] "+rm" (vh), [o] "+rm" (vo) \
: [a] "m" (va) \
: "eax", "edx", "cc" \
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
From f447e4c1fa4c932c0286fa0331966756e243db81 Mon Sep 17 00:00:00 2001
From: JacobBarthelmeh <jacob@wolfssl.com>
Date: Fri, 17 Sep 2021 15:06:13 -0700
Subject: [PATCH] update macro guard on SHA256 transform call

---
src/ssl.c | 3 ++-
tests/api.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)

--- a/src/ssl.c
+++ b/src/ssl.c
@@ -17639,7 +17639,8 @@ size_t wolfSSL_get_client_random(const W

#if defined(OPENSSL_EXTRA)
#if !defined(HAVE_SELFTEST) && (!defined(HAVE_FIPS) || \
- (defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION > 2)))
+ (defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION > 2))) && \
+ !defined(WOLFSSL_DEVCRYPTO_HASH) && !defined(WOLFSSL_AFALG_HASH)
/* Apply SHA256 transformation to the data */
int wolfSSL_SHA256_Transform(WOLFSSL_SHA256_CTX* sha256,
const unsigned char* data)
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/wolfssl/wolfcrypt/settings.h
+++ b/wolfssl/wolfcrypt/settings.h
@@ -2255,7 +2255,7 @@ extern void uITRON4_free(void *p) ;
@@ -2274,7 +2274,7 @@ extern void uITRON4_free(void *p) ;
#endif

/* warning for not using harden build options (default with ./configure) */
Expand Down
13 changes: 13 additions & 0 deletions package/libs/wolfssl/patches/110-build-with-libtool-2.4.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/configure.ac b/configure.ac
index 144c857e4..de7f6b45a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,7 +32,7 @@ AC_ARG_PROGRAM

AC_CONFIG_HEADERS([config.h:config.in])

-LT_PREREQ([2.4.2])
+LT_PREREQ([2.4])
LT_INIT([disable-static win32-dll])

#shared library versioning
4 changes: 2 additions & 2 deletions package/libs/wolfssl/patches/200-ecc-rng.patch
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RNG regardless of the built settings for wolfssl.

--- a/wolfcrypt/src/ecc.c
+++ b/wolfcrypt/src/ecc.c
@@ -10293,21 +10293,21 @@ void wc_ecc_fp_free(void)
@@ -10938,21 +10938,21 @@ void wc_ecc_fp_free(void)

#endif /* FP_ECC */

Expand All @@ -37,7 +37,7 @@ RNG regardless of the built settings for wolfssl.

--- a/wolfssl/wolfcrypt/ecc.h
+++ b/wolfssl/wolfcrypt/ecc.h
@@ -584,10 +584,8 @@ WOLFSSL_API
@@ -616,10 +616,8 @@ WOLFSSL_API
void wc_ecc_fp_free(void);
WOLFSSL_LOCAL
void wc_ecc_fp_init(void);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,14 @@

q_atm.so: q_atm.c
$(QUIET_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -shared -fpic -o q_atm.so q_atm.c -latm
@@ -205,4 +206,15 @@ static-syms.h: $(wildcard *.c)
@@ -205,4 +206,16 @@ static-syms.h: $(wildcard *.c)
sed -n '/'$$s'[^ ]* =/{s:.* \([^ ]*'$$s'[^ ]*\) .*:extern char \1[] __attribute__((weak)); if (!strcmp(sym, "\1")) return \1;:;p}' $$files ; \
done > $@

+else
+
+tc: dynsyms.list
+m_xt.so: dynsyms.list
+dynsyms.list: $(wildcard *.c)
+ files="$(filter-out $(patsubst %.so,%.c,$(TCSO)), $^)" ; \
+ echo "{" > $@ ; \
Expand Down
1 change: 0 additions & 1 deletion target/linux/ath79/mikrotik/config-default
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ CONFIG_MTD_NAND_RB91X=y
CONFIG_MTD_RAW_NAND=y
CONFIG_MTD_ROUTERBOOT_PARTS=y
CONFIG_MTD_SPI_NAND=y
CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y
CONFIG_MTD_SPLIT_MINOR_FW=y
CONFIG_MTD_UBI=y
CONFIG_MTD_UBI_BLOCK=y
Expand Down
3 changes: 1 addition & 2 deletions target/linux/ipq40xx/files/drivers/net/phy/ar40xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1198,8 +1198,7 @@ ar40xx_init_port(struct ar40xx_priv *priv, int port)
{
u32 t;

ar40xx_rmw(priv, AR40XX_REG_PORT_STATUS(port),
AR40XX_PORT_AUTO_LINK_EN, 0);
ar40xx_write(priv, AR40XX_REG_PORT_STATUS(port), 0);

ar40xx_write(priv, AR40XX_REG_PORT_HEADER(port), 0);

Expand Down
1 change: 1 addition & 0 deletions target/linux/layerscape/armv8_64b/config-5.4
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ CONFIG_DMA_SHARED_BUFFER=y
CONFIG_DMA_VIRTUAL_CHANNELS=y
CONFIG_DNOTIFY=y
CONFIG_DPAA2_CONSOLE=y
# CONFIG_DRM_CDNS_MHDP is not set
CONFIG_DRM_RCAR_WRITEBACK=y
CONFIG_DTC=y
CONFIG_DT_IDLE_STATES=y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,30 +85,3 @@ Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com>
*
* Harninder Rai <harninder.rai@nxp.com>
*
@@ -301,6 +301,26 @@
reg = <0x0 0x2190000 0x0 0x10000>;
interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&sysclk>, <&clockgen 4 1>;
+ clock-names = "ipg", "per";
+ status = "disabled";
+ };
+
+ can0: can@2180000 {
+ compatible = "fsl,ls1028ar1-flexcan",
+ "fsl,lx2160ar1-flexcan";
+ reg = <0x0 0x2180000 0x0 0x10000>;
+ interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&sysclk>, <&clockgen 4 1>;
+ clock-names = "ipg", "per";
+ status = "disabled";
+ };
+
+ can1: can@2190000 {
+ compatible = "fsl,ls1028ar1-flexcan",
+ "fsl,lx2160ar1-flexcan";
+ reg = <0x0 0x2190000 0x0 0x10000>;
+ interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&sysclk>, <&clockgen 4 1>;
clock-names = "ipg", "per";
status = "disabled";
};
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Signed-off-by: Yuantian Tang <andy.tang@nxp.com>

--- a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
@@ -556,6 +556,16 @@
@@ -536,6 +536,16 @@
clock-names = "wdog_clk", "apb_pclk";
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Signed-off-by: Sahil Malhotra <sahil.malhotra@nxp.com>

--- a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
@@ -789,6 +789,13 @@
@@ -769,6 +769,13 @@
};
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
cpus {
#address-cells = <1>;
#size-cells = <0>;
@@ -787,6 +791,19 @@
@@ -767,6 +771,19 @@
little-endian;
};
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com>

--- a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
@@ -768,7 +768,9 @@
@@ -748,7 +748,9 @@
/* PF1: VF0-1 BAR0 - non-prefetchable memory */
0x82000000 0x0 0x00000000 0x1 0xf8210000 0x0 0x020000
/* PF1: VF0-1 BAR2 - prefetchable memory */
Expand All @@ -33,7 +33,7 @@ Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com>

enetc_port0: ethernet@0,0 {
compatible = "fsl,enetc";
@@ -784,12 +786,66 @@
@@ -764,12 +766,66 @@
#address-cells = <1>;
#size-cells = <0>;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>

--- a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
@@ -750,7 +750,6 @@
@@ -730,7 +730,6 @@
reg = <0x01 0xf0000000 0x0 0x100000>;
#address-cells = <3>;
#size-cells = <2>;
- #interrupt-cells = <1>;
msi-parent = <&its>;
device_type = "pci";
bus-range = <0x0 0x0>;
@@ -803,6 +802,8 @@
@@ -783,6 +782,8 @@
switch@0,5 {
compatible = "mscc,felix-switch";
reg = <0x000500 0 0 0 0>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com>

--- a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
@@ -832,6 +832,7 @@
@@ -812,6 +812,7 @@
};
port@5 {
reg = <5>;
+ ethernet = <&enetc_port3>;
fixed-link {
speed = <1000>;
full-duplex;
@@ -839,7 +840,7 @@
@@ -819,7 +820,7 @@
};
};
};
Expand Down
Loading

0 comments on commit 2ad6b16

Please sign in to comment.