Skip to content

Commit f2f67a6

Browse files
authored
Merge pull request #12 from coolsnowwolf/master
ramips: add support for C-Life XG1 [WIFI6] (coolsnowwolf#10057)
2 parents 8e05fbc + 3060ad3 commit f2f67a6

File tree

170 files changed

+3415
-1299
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

170 files changed

+3415
-1299
lines changed

include/kernel-5.19

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
LINUX_VERSION-5.19 = .6
2-
LINUX_KERNEL_HASH-5.19.6 = 41a4f824af614460c429a7c723e8dcbb0e042f0047d328c18b4ed6f2b4efa63a
1+
LINUX_VERSION-5.19 = .8
2+
LINUX_KERNEL_HASH-5.19.8 = 616308795a952a6a39b4c74807c33916850eb7166d8ed7c9a87a1ba55d7487ce

package/boot/arm-trusted-firmware-tools/Makefile

+4-10
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
include $(TOPDIR)/rules.mk
99

1010
PKG_NAME:=arm-trusted-firmware-tools
11-
PKG_VERSION:=2.4
11+
PKG_VERSION:=2.7
1212
PKG_RELEASE:=1
13-
PKG_HASH:=bf3eb3617a74cddd7fb0e0eacbfe38c3258ee07d4c8ed730deef7a175cc3d55b
13+
PKG_HASH:=53422dc649153838e03820330ba17cb10afe3e330ecde0db11e4d5f1361a33e6
1414

1515
PKG_MAINTAINER:=Daniel Golle <[email protected]>
1616
PKG_HOST_ONLY:=1
@@ -34,23 +34,17 @@ define Host/Compile
3434
$(HOST_BUILD_DIR)/tools/fiptool \
3535
CPPFLAGS="$(HOST_CFLAGS)" \
3636
LDFLAGS="$(HOST_LDFLAGS)"
37-
$(MAKE) -C \
38-
$(HOST_BUILD_DIR)/tools/sptool \
39-
CPPFLAGS="$(HOST_CFLAGS)" \
40-
LDFLAGS="$(HOST_LDFLAGS)"
4137
endef
4238

4339
define Host/Install
4440
$(INSTALL_DIR) $(STAGING_DIR_HOST)/bin/
4541
$(INSTALL_BIN) $(HOST_BUILD_DIR)/tools/fiptool/fiptool $(STAGING_DIR_HOST)/bin/
46-
$(INSTALL_BIN) $(HOST_BUILD_DIR)/tools/sptool/sptool $(STAGING_DIR_HOST)/bin/
47-
$(INSTALL_BIN) $(HOST_BUILD_DIR)/tools/sptool/sp_mk_generator.py $(STAGING_DIR_HOST)/bin/
42+
$(INSTALL_BIN) $(HOST_BUILD_DIR)/tools/sptool/sptool.py $(STAGING_DIR_HOST)/bin/
4843
endef
4944

5045
define Host/Clean
5146
rm -f $(STAGING_DIR_HOST)/bin/fiptool
52-
rm -f $(STAGING_DIR_HOST)/bin/sptool
53-
rm -f $(STAGING_DIR_HOST)/bin/sp_mk_generator.py
47+
rm -f $(STAGING_DIR_HOST)/bin/sptool.py $(STAGING_DIR_HOST)/bin/sptool
5448
endef
5549

5650
$(eval $(call BuildPackage,arm-trusted-firmware-tools))

package/boot/uboot-envtools/files/ramips

+1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ ravpower,rp-wd03)
4848
[ -n "$idx" ] && \
4949
ubootenv_add_uci_config "/dev/mtd$idx" "0x4000" "0x1000" "0x1000"
5050
;;
51+
c-life,xg1|\
5152
jcg,q20)
5253
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
5354
;;

package/firmware/linux-firmware/realtek.mk

+7-7
Original file line numberDiff line numberDiff line change
@@ -101,20 +101,20 @@ define Package/rtl8821ae-firmware/install
101101
endef
102102
$(eval $(call BuildPackage,rtl8821ae-firmware))
103103

104+
Package/rtl8821ce-firmware = $(call Package/firmware-default,RealTek RTL8821CE firmware)
105+
define Package/rtl8821ce-firmware/install
106+
$(INSTALL_DIR) $(1)/lib/firmware/rtw88
107+
$(INSTALL_DATA) $(PKG_BUILD_DIR)/rtw88/rtw8821c_fw.bin $(1)/lib/firmware/rtw88
108+
endef
109+
$(eval $(call BuildPackage,rtl8821ce-firmware))
110+
104111
Package/rtl8822be-firmware = $(call Package/firmware-default,RealTek RTL8822BE firmware)
105112
define Package/rtl8822be-firmware/install
106113
$(INSTALL_DIR) $(1)/lib/firmware/rtw88
107114
$(INSTALL_DATA) $(PKG_BUILD_DIR)/rtw88/rtw8822b_fw.bin $(1)/lib/firmware/rtw88
108115
endef
109116
$(eval $(call BuildPackage,rtl8822be-firmware))
110117

111-
Package/rtl8821cu-firmware = $(call Package/firmware-default,RealTek RTL8821CU firmware)
112-
define Package/rtl8821cu-firmware/install
113-
$(INSTALL_DIR) $(1)/lib/firmware/rtw88
114-
$(INSTALL_DATA) $(PKG_BUILD_DIR)/rtw88/rtw8821c_fw.bin $(1)/lib/firmware/rtw88
115-
endef
116-
$(eval $(call BuildPackage,rtl8821cu-firmware))
117-
118118
Package/rtl8822ce-firmware = $(call Package/firmware-default,RealTek RTL8822CE firmware)
119119
define Package/rtl8822ce-firmware/install
120120
$(INSTALL_DIR) $(1)/lib/firmware/rtw88

package/kernel/mt76/Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ PKG_LICENSE_FILES:=
88

99
PKG_SOURCE_URL:=https://github.com/openwrt/mt76
1010
PKG_SOURCE_PROTO:=git
11-
PKG_SOURCE_DATE:=2022-08-26
12-
PKG_SOURCE_VERSION:=5ec78e1ec43d1e39edfea1efb9fd4541fa004af0
13-
PKG_MIRROR_HASH:=b96ec5199d423dc27e4fe7f0e94c8d5970f6db812237816235f3b735a5cb216a
11+
PKG_SOURCE_DATE:=2022-09-06
12+
PKG_SOURCE_VERSION:=d70546462b7b51ebc2bcdd5c534fdf3465be62a4
13+
PKG_MIRROR_HASH:=3d6b68d70a78c0072ed10ab2548344b6b3a70ad99e4edc258fafa16886f4abf9
1414

1515
PKG_MAINTAINER:=Felix Fietkau <[email protected]>
1616
PKG_USE_NINJA:=0

package/libs/mbedtls/Makefile

+3-7
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
1616
PKG_SOURCE_URL:=https://codeload.github.com/ARMmbed/mbedtls/tar.gz/v$(PKG_VERSION)?
1717
PKG_HASH:=6797a7b6483ef589deeab8d33d401ed235d7be25eeecda1be8ddfed406d40ff4
1818

19-
PKG_BUILD_PARALLEL:=1
2019
PKG_LICENSE:=GPL-2.0-or-later
2120
PKG_LICENSE_FILES:=gpl-2.0.txt
2221
PKG_CPE_ID:=cpe:/a:arm:mbed_tls
@@ -46,6 +45,7 @@ $(call Package/mbedtls/Default)
4645
CATEGORY:=Libraries
4746
SUBMENU:=SSL
4847
TITLE+= (library)
48+
PKGFLAGS:=nonshared
4949
ABI_VERSION:=12
5050
endef
5151

@@ -67,13 +67,11 @@ config LIBMBEDTLS_HAVE_ARMV8CE_AES
6767
bool
6868
default y
6969
prompt "Enable use of the ARMv8 Crypto Extensions"
70-
depends on aarch64 && !TARGET_bcm27xx && !TARGET_bcm4908
70+
depends on aarch64 && !TARGET_bcm27xx
7171
help
7272
Use of the ARMv8 Crypto Extensions greatly increase performance
7373
(up to 4x faster on AES-GCM while 10x faster on raw AES).
7474

75-
Related instructions should be included in all modern Aarch64
76-
devices, except some wastes like Broadcom.
7775
If you don't sure, say Y here.
7876

7977
config LIBMBEDTLS_HAVE_SSE2
@@ -118,8 +116,6 @@ This package contains mbedtls helper programs for private key and
118116
CSR generation (gen_key, cert_req)
119117
endef
120118

121-
PKG_INSTALL:=1
122-
123119
TARGET_CFLAGS += -ffunction-sections -fdata-sections
124120
TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS))
125121
ifneq ($(CONFIG_LIBMBEDTLS_HAVE_ARMV8CE_AES),)
@@ -175,4 +171,4 @@ define Package/mbedtls-util/install
175171
endef
176172

177173
$(eval $(call BuildPackage,libmbedtls))
178-
$(eval $(call BuildPackage,mbedtls-util))
174+
$(eval $(call BuildPackage,mbedtls-util))

package/libs/mbedtls/patches/100-Implements-with-ARMv8-CE.patch

+20-21
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ QEMU seems to also need
2727
Then run normal make or cmake etc.
2828
---
2929

30-
--- a/ChangeLog.d/armv8_crypto_extensions.txt
30+
--- /dev/null
3131
+++ b/ChangeLog.d/armv8_crypto_extensions.txt
3232
@@ -0,0 +1,2 @@
3333
+Features
3434
+ * Support ARMv8 Cryptography Extensions for AES and GCM.
35-
--- a/include/mbedtls/armv8ce_aes.h
35+
--- /dev/null
3636
+++ b/include/mbedtls/armv8ce_aes.h
3737
@@ -0,0 +1,63 @@
3838
+/**
@@ -100,7 +100,7 @@ Then run normal make or cmake etc.
100100
+#endif /* MBEDTLS_ARMV8CE_AES_H */
101101
--- a/include/mbedtls/check_config.h
102102
+++ b/include/mbedtls/check_config.h
103-
@@ -95,6 +95,10 @@
103+
@@ -72,6 +72,10 @@
104104
#error "MBEDTLS_AESNI_C defined, but not all prerequisites"
105105
#endif
106106

@@ -111,22 +111,22 @@ Then run normal make or cmake etc.
111111
#if defined(MBEDTLS_CTR_DRBG_C) && !defined(MBEDTLS_AES_C)
112112
#error "MBEDTLS_CTR_DRBG_C defined, but not all prerequisites"
113113
#endif
114-
@@ -772,3 +776,4 @@
114+
@@ -897,3 +901,4 @@
115115
typedef int mbedtls_iso_c_forbids_empty_translation_units;
116116

117117
#endif /* MBEDTLS_CHECK_CONFIG_H */
118118
+
119119
--- a/include/mbedtls/config.h
120120
+++ b/include/mbedtls/config.h
121-
@@ -73,6 +73,7 @@
121+
@@ -46,6 +46,7 @@
122122
* Requires support for asm() in compiler.
123123
*
124124
* Used in:
125125
+ * library/armv8ce_aes.c
126126
* library/aria.c
127127
* library/timing.c
128128
* include/mbedtls/bn_mul.h
129-
@@ -1888,6 +1889,21 @@
129+
@@ -2313,6 +2314,21 @@
130130
#define MBEDTLS_AESNI_C
131131

132132
/**
@@ -150,7 +150,7 @@ Then run normal make or cmake etc.
150150
* Enable the AES block cipher.
151151
--- a/library/aes.c
152152
+++ b/library/aes.c
153-
@@ -69,7 +69,9 @@
153+
@@ -39,7 +39,9 @@
154154
#if defined(MBEDTLS_AESNI_C)
155155
#include "mbedtls/aesni.h"
156156
#endif
@@ -161,7 +161,7 @@ Then run normal make or cmake etc.
161161
#if defined(MBEDTLS_SELF_TEST)
162162
#if defined(MBEDTLS_PLATFORM_C)
163163
#include "mbedtls/platform.h"
164-
@@ -1052,6 +1054,11 @@
164+
@@ -999,6 +1001,11 @@ int mbedtls_aes_crypt_ecb( mbedtls_aes_c
165165
return( mbedtls_aesni_crypt_ecb( ctx, mode, input, output ) );
166166
#endif
167167

@@ -173,7 +173,7 @@ Then run normal make or cmake etc.
173173
#if defined(MBEDTLS_PADLOCK_C) && defined(MBEDTLS_HAVE_X86)
174174
if( aes_padlock_ace )
175175
{
176-
--- a/library/armv8ce_aes.c
176+
--- /dev/null
177177
+++ b/library/armv8ce_aes.c
178178
@@ -0,0 +1,142 @@
179179
+/*
@@ -320,7 +320,7 @@ Then run normal make or cmake etc.
320320
+#endif /* MBEDTLS_ARMV8CE_AES_C */
321321
--- a/library/CMakeLists.txt
322322
+++ b/library/CMakeLists.txt
323-
@@ -7,6 +7,7 @@
323+
@@ -15,6 +15,7 @@ set(src_crypto
324324
aesni.c
325325
arc4.c
326326
aria.c
@@ -330,7 +330,7 @@ Then run normal make or cmake etc.
330330
base64.c
331331
--- a/library/gcm.c
332332
+++ b/library/gcm.c
333-
@@ -71,6 +71,10 @@
333+
@@ -41,6 +41,10 @@
334334
#include "mbedtls/aesni.h"
335335
#endif
336336

@@ -341,7 +341,7 @@ Then run normal make or cmake etc.
341341
#if defined(MBEDTLS_SELF_TEST) && defined(MBEDTLS_AES_C)
342342
#include "mbedtls/aes.h"
343343
#include "mbedtls/platform.h"
344-
@@ -140,6 +144,12 @@
344+
@@ -87,6 +91,12 @@ static int gcm_gen_table( mbedtls_gcm_co
345345
if( ( ret = mbedtls_cipher_update( &ctx->cipher_ctx, h, 16, h, &olen ) ) != 0 )
346346
return( ret );
347347

@@ -352,9 +352,9 @@ Then run normal make or cmake etc.
352352
+#endif
353353
+
354354
/* pack h as two 64-bits ints, big-endian */
355-
GET_UINT32_BE( hi, h, 0 );
356-
GET_UINT32_BE( lo, h, 4 );
357-
@@ -248,6 +258,11 @@
355+
hi = MBEDTLS_GET_UINT32_BE( h, 0 );
356+
lo = MBEDTLS_GET_UINT32_BE( h, 4 );
357+
@@ -196,6 +206,11 @@ static void gcm_mult( mbedtls_gcm_contex
358358
unsigned char lo, hi, rem;
359359
uint64_t zh, zl;
360360

@@ -368,18 +368,17 @@ Then run normal make or cmake etc.
368368
unsigned char h[16];
369369
--- a/library/Makefile
370370
+++ b/library/Makefile
371-
@@ -72,6 +72,7 @@
372-
aesni.o \
373-
arc4.o \
371+
@@ -74,6 +74,7 @@ OBJS_CRYPTO= \
374372
aria.o \
375-
+ armv8ce_aes.o \
376373
asn1parse.o \
377374
asn1write.o \
375+
+ armv8ce_aes.o \
378376
base64.o \
379-
377+
bignum.o \
378+
blowfish.o \
380379
--- a/library/version_features.c
381380
+++ b/library/version_features.c
382-
@@ -583,6 +583,9 @@
381+
@@ -624,6 +624,9 @@ static const char * const features[] = {
383382
#if defined(MBEDTLS_AESNI_C)
384383
"MBEDTLS_AESNI_C",
385384
#endif /* MBEDTLS_AESNI_C */

package/libs/mbedtls/patches/200-config.patch

-1
Original file line numberDiff line numberDiff line change
@@ -225,4 +225,3 @@
225225
+//#define MBEDTLS_XTEA_C
226226

227227
/** \} name SECTION: mbed TLS modules */
228-

package/network/utils/ethtool/Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
include $(TOPDIR)/rules.mk
99

1010
PKG_NAME:=ethtool
11-
PKG_VERSION:=5.18
11+
PKG_VERSION:=5.19
1212
PKG_RELEASE:=1
1313

1414
PKG_MAINTAINER:=Felix Fietkau <[email protected]>
1515
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
1616
PKG_SOURCE_URL:=@KERNEL/software/network/ethtool
17-
PKG_HASH:=9577b2ffbce710b659fb239598ec92bced1ca400ca0f1286762bfa44e4784270
17+
PKG_HASH:=3b752a3329827907ac3812f2831dfecf51c8c41c55d2d69cfb9c53ca06449fc6
1818

1919
PKG_LICENSE:=GPL-2.0
2020
PKG_LICENSE_FILES:=COPYING

0 commit comments

Comments
 (0)