mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-18 17:33:31 +00:00

* build: fix incomplete initramfs compression options Requires: tools/lz4, tools/lzop complete the wiring so that these options work: * `CONFIG_KERNEL_INITRAMFS_COMPRESSION_LZO` * `CONFIG_KERNEL_INITRAMFS_COMPRESSION_LZ4` Signed-off-by: Tony Butler <spudz76@gmail.com> [remove blocking dependencies for separate ramdisk, fix lzop options] Signed-off-by: Daniel Golle <daniel@makrotopia.org> * include: sync with upstream * toolchain/binutils: add support for version 2.40 Release notes: https://sourceware.org/pipermail/binutils/2023-January/125671.html Signed-off-by: Linhui Liu <liulinhui36@gmail.com> * toolchain/gcc: switch to version 12 by default Also fix build error with gcc 12. * toolchain/nasm: update to 2.16.01 ChangeLog: Version 2.16.01 _This is a documentation update release only._ (*) Fix the creation of the table of contents in the HTML version of the documentation. Version 2.16 (*) Support for the `rdf' format has been discontinued and all the RDOFF utilities has been removed. (*) The `--reproducible' option now leaves the filename field in the COFF object format blank. This was always rather useless since it is only 18 characters long; as such debug formats have to carry their own filename information anyway. (*) Fix handling of MASM-syntax reserved memory (e.g. `dw ?') when used in structure definitions. (*) The preprocessor now supports functions, which can be less verbose and more convenient than the equivalent code implemented using directives. See section 4.4. (*) Fix the handling of `%00' in the preprocessor. (*) Fix incorrect handling of path names affecting error messages, dependency generation, and debug format output. (*) Support for the RDOFF output format and the RDOFF tools have been removed. The RDOFF tools had already been broken since at least NASM 2.14. For flat code the ELF output format recommended; for segmented code the `obj' (OMF) output format. (*) New facility: preprocessor functions. Preprocessor functions, which are expanded similarly to single-line macros, can greatly simplify code that in the past would have required a lengthy list of directives and intermediate macros. See section 4.4. (*) Single-line macros can now declare parameters (using a `&&' prefix) that creates a quoted string, but does _not_ requote an already quoted string. See section 4.2.1. (*) Instruction table updated per public information available as of November 2022. (*) All warnings in the preprocessor have now been assigned warning classes. See appendix A. (*) Fix the invalid use of `RELA'-type relocations instead of `REL'- type relocations when generating DWARF debug information for the `elf32' output format. (*) Fix the handling `at' in `istruc' when the structure contains local labels. See section 5.9.2. (*) When assembling with `--reproducible', don't encode the filename in the COFF header for the `coff', `win32' or `win64' output formats. The COFF header only has space for an 18-character filename, which makes this field rather useless in the first place. Debug output data, if enabled, is not affected. (*) Fix incorrect size calculation when using MASM syntax for non- byte reservations (e.g. `dw ?'.) (*) Allow forcing an instruction in 64-bit mode to have a (possibly redundant) REX prefix, using the syntax `{rex}' as a prefix. (*) Add a `{vex}' prefix to enforce VEX (AVX) encoding of an instruction, either using the 2- or 3-byte VEX prefixes. (*) The `CPU' directive has been augmented to allow control of generation of VEX (AVX) versus EVEX (AVX-512) instruction formats, see section 7.11. (*) Some recent instructions that previously have been only available using EVEX encodings are now also encodable using VEX (AVX) encodings. For backwards compatibility these encodings are not enabled by default, but can be generated either via an explicit `{vex}' prefix or by specifying either `CPU LATEVEX' or `CPU NOEVEX'; see section 7.11. (*) Document the already existing `%unimacro' directive. See section 4.5.12. (*) Fix a code range generation bug in the DWARF debug format (incorrect information in the `DW_AT_high_pc' field) for the ELF output formats. This bug happened to cancel out with a bug in older versions of the GNU binutils linker, but breaks with other linkers and updated or other linkers that expect the spec to be followed. (*) Fix segment symbols with addends, e.g. `jmp _TEXT+10h:0' in output formats that support segment relocations, e.g. the `obj' format. (*) Fix various crashes and hangs on invalid input. Signed-off-by: Linhui Liu <liulinhui36@gmail.com> * toolchain: musl: Fix symbol loading in gdb Fix DT_DEBUG handling on MIPS in musl libc. With this change gdb will load the symbol files for shared libraries on MIPS too. This patch was taken from this thread: https://www.openwall.com/lists/musl/2022/01/09/4 Signed-off-by: Hauke Mehrtens <hmehrtens@maxlinear.com> * tools: sync with upstream * build: fix issues with targets installed via feeds - fix including modules.mk when a target is being replaced - fix calling make targets from target/linux Signed-off-by: Felix Fietkau <nbd@nbd.name> * package: sync with upstream Signed-off-by: Tony Butler <spudz76@gmail.com> Signed-off-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: Linhui Liu <liulinhui36@gmail.com> Signed-off-by: Hauke Mehrtens <hmehrtens@maxlinear.com> Signed-off-by: Felix Fietkau <nbd@nbd.name> Co-authored-by: Tony Butler <spudz76@gmail.com> Co-authored-by: Hauke Mehrtens <hmehrtens@maxlinear.com> Co-authored-by: Felix Fietkau <nbd@nbd.name>
261 lines
6.5 KiB
Diff
261 lines
6.5 KiB
Diff
From 593db38363297247df731566c2aa307a5d795005 Mon Sep 17 00:00:00 2001
|
|
From: David Bauer <mail@david-bauer.net>
|
|
Date: Thu, 18 Jun 2020 00:13:11 +0200
|
|
Subject: [PATCH] add support for RAVPower RP-WD009
|
|
|
|
---
|
|
arch/mips/dts/Makefile | 3 +-
|
|
arch/mips/dts/ravpower-rp-wd009.dts | 50 +++++++++++++++++++++
|
|
arch/mips/mach-mtmips/Kconfig | 9 ++++
|
|
board/ravpower/rp-wd009/Kconfig | 12 +++++
|
|
board/ravpower/rp-wd009/Makefile | 3 ++
|
|
board/ravpower/rp-wd009/board.c | 16 +++++++
|
|
configs/ravpower-rp-wd009-ram_defconfig | 59 +++++++++++++++++++++++++
|
|
include/configs/ravpower-rp-wd009.h | 48 ++++++++++++++++++++
|
|
8 files changed, 199 insertions(+), 1 deletion(-)
|
|
create mode 100644 arch/mips/dts/ravpower-rp-wd009.dts
|
|
create mode 100644 board/ravpower/rp-wd009/Kconfig
|
|
create mode 100644 board/ravpower/rp-wd009/Makefile
|
|
create mode 100644 board/ravpower/rp-wd009/board.c
|
|
create mode 100644 configs/ravpower-rp-wd009-ram_defconfig
|
|
create mode 100644 include/configs/ravpower-rp-wd009.h
|
|
|
|
--- a/arch/mips/dts/Makefile
|
|
+++ b/arch/mips/dts/Makefile
|
|
@@ -25,6 +25,7 @@ dtb-$(CONFIG_TARGET_OCTEON_EBB7304) += m
|
|
dtb-$(CONFIG_TARGET_OCTEON_NIC23) += mrvl,octeon-nic23.dtb
|
|
dtb-$(CONFIG_BOARD_NETGEAR_CG3100D) += netgear,cg3100d.dtb
|
|
dtb-$(CONFIG_BOARD_NETGEAR_DGND3700V2) += netgear,dgnd3700v2.dtb
|
|
+dtb-$(CONFIG_BOARD_RAVPOWER_RP_WD009) += ravpower-rp-wd009.dtb
|
|
dtb-$(CONFIG_BOARD_SAGEM_FAST1704) += sagem,f@st1704.dtb
|
|
dtb-$(CONFIG_BOARD_SFR_NB4_SER) += sfr,nb4-ser.dtb
|
|
dtb-$(CONFIG_BOARD_TPLINK_WDR4300) += tplink_wdr4300.dtb
|
|
--- /dev/null
|
|
+++ b/arch/mips/dts/ravpower-rp-wd009.dts
|
|
@@ -0,0 +1,50 @@
|
|
+// SPDX-License-Identifier: GPL-2.0
|
|
+/*
|
|
+ * Copyright (C) 2018 Stefan Roese <sr@denx.de>
|
|
+ */
|
|
+
|
|
+/dts-v1/;
|
|
+
|
|
+#include "mt7628a.dtsi"
|
|
+#include <dt-bindings/gpio/gpio.h>
|
|
+
|
|
+/ {
|
|
+ compatible = "ravpower,rp-wd009", "ralink,mt7628a-soc";
|
|
+ model = "RAVPower RP-WD009";
|
|
+
|
|
+ aliases {
|
|
+ serial0 = &uart0;
|
|
+ spi0 = &spi0;
|
|
+ };
|
|
+
|
|
+ memory@0 {
|
|
+ device_type = "memory";
|
|
+ reg = <0x0 0x4000000>;
|
|
+ };
|
|
+
|
|
+ chosen {
|
|
+ stdout-path = "serial0:115200n8";
|
|
+ };
|
|
+};
|
|
+
|
|
+&uart0 {
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&spi0 {
|
|
+ status = "okay";
|
|
+ num-cs = <2>;
|
|
+
|
|
+ spi-flash@0 {
|
|
+ #address-cells = <1>;
|
|
+ #size-cells = <1>;
|
|
+ compatible = "jedec,spi-nor";
|
|
+ spi-max-frequency = <40000000>;
|
|
+ reg = <0>;
|
|
+ };
|
|
+};
|
|
+
|
|
+ð {
|
|
+ pinctrl-names = "default";
|
|
+ pinctrl-0 = <&ephy_router_mode>;
|
|
+};
|
|
--- /dev/null
|
|
+++ b/board/ravpower/rp-wd009/Kconfig
|
|
@@ -0,0 +1,12 @@
|
|
+if BOARD_RAVPOWER_RP_WD009
|
|
+
|
|
+config SYS_BOARD
|
|
+ default "rp-wd009"
|
|
+
|
|
+config SYS_VENDOR
|
|
+ default "ravpower"
|
|
+
|
|
+config SYS_CONFIG_NAME
|
|
+ default "ravpower-rp-wd009"
|
|
+
|
|
+endif
|
|
--- /dev/null
|
|
+++ b/board/ravpower/rp-wd009/Makefile
|
|
@@ -0,0 +1,3 @@
|
|
+# SPDX-License-Identifier: GPL-2.0+
|
|
+
|
|
+obj-y += board.o
|
|
--- /dev/null
|
|
+++ b/board/ravpower/rp-wd009/board.c
|
|
@@ -0,0 +1,16 @@
|
|
+// SPDX-License-Identifier: GPL-2.0+
|
|
+/*
|
|
+ * Copyright (C) 2018 Stefan Roese <sr@denx.de>
|
|
+ */
|
|
+
|
|
+
|
|
+int board_early_init_f(void)
|
|
+{
|
|
+ return 0;
|
|
+}
|
|
+
|
|
+
|
|
+int board_late_init(void)
|
|
+{
|
|
+ return 0;
|
|
+}
|
|
--- /dev/null
|
|
+++ b/configs/ravpower-rp-wd009-ram_defconfig
|
|
@@ -0,0 +1,64 @@
|
|
+CONFIG_MIPS=y
|
|
+CONFIG_SYS_LOAD_ADDR=0x80010000
|
|
+CONFIG_NR_DRAM_BANKS=1
|
|
+CONFIG_ARCH_MTMIPS=y
|
|
+CONFIG_SOC_MT7628=y
|
|
+CONFIG_MIPS_BOOT_FDT=y
|
|
+CONFIG_LEGACY_IMAGE_FORMAT=y
|
|
+CONFIG_OF_STDOUT_VIA_ALIAS=y
|
|
+CONFIG_USE_BOOTCOMMAND=y
|
|
+CONFIG_BOOTCOMMAND="sf probe && mtd read firmware 82000000 && bootm 82000000"
|
|
+CONFIG_USE_PREBOOT=y
|
|
+CONFIG_SYS_CONSOLE_INFO_QUIET=y
|
|
+CONFIG_VERSION_VARIABLE=y
|
|
+CONFIG_BOARD_RAVPOWER_RP_WD009=y
|
|
+CONFIG_SYS_MIPS_TIMER_FREQ=290000000
|
|
+CONFIG_HUSH_PARSER=y
|
|
+CONFIG_CMD_LICENSE=y
|
|
+# CONFIG_CMD_ELF is not set
|
|
+# CONFIG_CMD_XIMG is not set
|
|
+CONFIG_CMD_MEMINFO=y
|
|
+# CONFIG_CMD_FLASH is not set
|
|
+CONFIG_CMD_GPIO=y
|
|
+# CONFIG_CMD_LOADS is not set
|
|
+CONFIG_CMD_MTD=y
|
|
+CONFIG_CMD_SPI=y
|
|
+CONFIG_CMD_WDT=y
|
|
+CONFIG_CMD_DHCP=y
|
|
+CONFIG_CMD_MII=y
|
|
+CONFIG_CMD_PING=y
|
|
+CONFIG_CMD_TIME=y
|
|
+CONFIG_CMD_UUID=y
|
|
+CONFIG_CMD_MTDPARTS=y
|
|
+CONFIG_FIT=y
|
|
+CONFIG_FIT_ENABLE_SHA256_SUPPORT=y
|
|
+CONFIG_MTDIDS_DEFAULT="nor0=spi0.0"
|
|
+CONFIG_MTDPARTS_DEFAULT="spi0.0:192k(factory-uboot),64k(config),64k(factory),1536k(loader),64k(params),64k(user_backup),64k(user),14272k(firmware),64k(mode)"
|
|
+CONFIG_DEFAULT_DEVICE_TREE="ravpower-rp-wd009"
|
|
+CONFIG_NET_RANDOM_ETHADDR=y
|
|
+# CONFIG_DM_DEVICE_REMOVE is not set
|
|
+CONFIG_HAVE_BLOCK_DEVICE=y
|
|
+CONFIG_LED=y
|
|
+CONFIG_LED_BLINK=y
|
|
+CONFIG_LED_GPIO=y
|
|
+CONFIG_MTD=y
|
|
+CONFIG_DM_MTD=y
|
|
+CONFIG_SPI_FLASH_GIGADEVICE=y
|
|
+CONFIG_SPI_FLASH_MACRONIX=y
|
|
+CONFIG_SPI_FLASH_SPANSION=y
|
|
+CONFIG_SPI_FLASH_STMICRO=y
|
|
+CONFIG_SPI_FLASH_WINBOND=y
|
|
+CONFIG_SPI_FLASH_XMC=y
|
|
+CONFIG_SPI_FLASH_MTD=y
|
|
+CONFIG_MTD_UBI_BEB_LIMIT=22
|
|
+CONFIG_MT7628_ETH=y
|
|
+CONFIG_PHY=y
|
|
+CONFIG_SPI=y
|
|
+CONFIG_MT7621_SPI=y
|
|
+CONFIG_SYSRESET_SYSCON=y
|
|
+CONFIG_WDT=y
|
|
+CONFIG_WDT_MT7621=y
|
|
+CONFIG_LZMA=y
|
|
+CONFIG_BAUDRATE=57600
|
|
+CONFIG_SYS_MAXARGS=64
|
|
+CONFIG_SYS_CBSIZE=512
|
|
--- /dev/null
|
|
+++ b/include/configs/ravpower-rp-wd009.h
|
|
@@ -0,0 +1,40 @@
|
|
+/* SPDX-License-Identifier: GPL-2.0+ */
|
|
+/*
|
|
+ * Copyright (C) 2018 Stefan Roese <sr@denx.de>
|
|
+ */
|
|
+
|
|
+#ifndef __CONFIG_RAVPOWER_RP_WD009_H
|
|
+#define __CONFIG_RAVPOWER_RP_WD009_H
|
|
+
|
|
+/* CPU */
|
|
+#define CONFIG_SYS_MIPS_TIMER_FREQ 290000000
|
|
+
|
|
+/* RAM */
|
|
+#define CONFIG_SYS_SDRAM_BASE 0x80000000
|
|
+
|
|
+#define CONFIG_SYS_INIT_SP_OFFSET 0x400000
|
|
+
|
|
+#ifdef CONFIG_BOOT_RAM
|
|
+#define CONFIG_SKIP_LOWLEVEL_INIT
|
|
+#endif
|
|
+
|
|
+/* UART */
|
|
+#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200, \
|
|
+ 230400, 460800, 921600 }
|
|
+
|
|
+/* RAM */
|
|
+#define CONFIG_SYS_MEMTEST_START 0x80100000
|
|
+#define CONFIG_SYS_MEMTEST_END 0x80400000
|
|
+
|
|
+/* Memory usage */
|
|
+#define CONFIG_SYS_BOOTPARAMS_LEN (128 * 1024)
|
|
+
|
|
+/* Environment settings */
|
|
+
|
|
+/*
|
|
+ * Environment is right behind U-Boot in flash. Make sure U-Boot
|
|
+ * doesn't grow into the environment area.
|
|
+ */
|
|
+#define CONFIG_BOARD_SIZE_LIMIT CONFIG_ENV_OFFSET
|
|
+
|
|
+#endif /* __CONFIG_RAVPOWER_RP_WD009_H */
|
|
--- a/arch/mips/mach-mtmips/mt7628/Kconfig
|
|
+++ b/arch/mips/mach-mtmips/mt7628/Kconfig
|
|
@@ -27,6 +27,14 @@ config BOARD_MT7628_RFB
|
|
SPI-NOR flash, 1 built-in switch with 5 ports, 1 UART, 1 USB host,
|
|
1 SDXC, 1 PCIe socket and JTAG pins.
|
|
|
|
+config BOARD_RAVPOWER_RP_WD009
|
|
+ bool "RAVPower RP-WD009"
|
|
+ depends on SOC_MT7628
|
|
+ select BOARD_LATE_INIT
|
|
+ select SUPPORTS_BOOT_RAM
|
|
+ help
|
|
+ RAVPower RP-WD009
|
|
+
|
|
config BOARD_VOCORE2
|
|
bool "VoCore2"
|
|
select SPL_SERIAL
|
|
@@ -53,6 +61,7 @@ config SYS_CONFIG_NAME
|
|
default "mt7628" if BOARD_MT7628_RFB
|
|
|
|
source "board/gardena/smart-gateway-mt7688/Kconfig"
|
|
+source "board/ravpower/rp-wd009/Kconfig"
|
|
source "board/seeed/linkit-smart-7688/Kconfig"
|
|
source "board/vocore/vocore2/Kconfig"
|
|
|