找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 737|回复: 0

openwrt怎么打补丁呀

[复制链接]
发表于 2020-2-13 16:31 | 显示全部楼层 |阅读模式
由于openwrt不支持sd,找到一遍文章说是要打补丁,我已经按照作者所说拷到 [color=rgb(3, 102, 214) !important]target/linux/ramips/patches-4.14/500-hack-mt76x8-pinctrl-esdmode.patch,但编译的时候还是出错提示mipsel-openwrt-linux-musl-cpp: error: ../dts/_alfa-network_awusfree1.dts: No such file or directory
mipsel-openwrt-linux-musl-cpp: warning: '-x assembler-with-cpp' after last input file has no effect
mipsel-openwrt-linux-musl-cpp: fatal error: no input files

请问各位大佬这个该怎么处理

From: Chuanhong Guo <gch981213@gmail.com>
Date: Sat, 13 Jul 2019 17:59:03 +0800
Subject: [PATCH] ramips: hack: add esdmode pinctrl group

Since mt76x8an ver1 eco2, SDXC pins can be switched to the
following pinmap:
sd_d1  -> PAD_I2S_SDI
sd_d0  -> PAD_I2S_WS
sd_cmd -> PAD_I2S_CLK
sd_d3  -> PAD_I2C_SCLK
sd_d2  -> PAD_I2C_SD
sd_clk -> PAD_GPIO0
sd_wp  -> PAD_TXD1
sd_cd  -> PAD_RXD1

To use this pinmap, one would need to set ESD_MODE bit (bit 15)
to 1 in GPIO1_MODE and switch other used pads into GPIO mode.

MTK called this pinmap "router mode" and the pinmap described
in their datasheed is called "iot mode".

This patch is hacky because:
1. pinmux-rt2880 doesn't support reserving noncontiguous GPIO
   pins so those GPIOs can't be properly reserved.
2. it misused "gpio" function for "iot mode", due to the fact
   that this mode doesn't reserve any GPIOs.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
---
--- a/arch/mips/ralink/mt7620.c
+++ b/arch/mips/ralink/mt7620.c
@@ -149,6 +149,7 @@ static struct rt2880_pmx_func refclk_grp
static struct rt2880_pmx_func perst_grp_mt7628[] = { FUNC("perst", 0, 36, 1) };
static struct rt2880_pmx_func wdt_grp_mt7628[] = { FUNC("wdt", 0, 38, 1) };
static struct rt2880_pmx_func spi_grp_mt7628[] = { FUNC("spi", 0, 7, 4) };
+static struct rt2880_pmx_func esd_mode_grp_mt7628[] = { FUNC("sdxc", 1, 0, 0) };

static struct rt2880_pmx_func sd_mode_grp_mt7628[] = {
        FUNC("jtag", 3, 22, 8),
@@ -297,6 +298,7 @@ static struct rt2880_pmx_func wled_an_gr
#define MT7628_GPIO_MODE_I2C                20
#define MT7628_GPIO_MODE_REFCLK                18
#define MT7628_GPIO_MODE_PERST                16
+#define MT7628_GPIO_MODE_ESDMODE        15
#define MT7628_GPIO_MODE_WDT                14
#define MT7628_GPIO_MODE_SPI                12
#define MT7628_GPIO_MODE_SDMODE                10
@@ -319,6 +321,7 @@ static struct rt2880_pmx_group mt7628an_
                                1, MT7628_GPIO_MODE_I2C),
        GRP("refclk", refclk_grp_mt7628, 1, MT7628_GPIO_MODE_REFCLK),
        GRP("perst", perst_grp_mt7628, 1, MT7628_GPIO_MODE_PERST),
+        GRP_G("esdmode", esd_mode_grp_mt7628, 1, 0, MT7628_GPIO_MODE_ESDMODE),
        GRP("wdt", wdt_grp_mt7628, 1, MT7628_GPIO_MODE_WDT),
        GRP("spi", spi_grp_mt7628, 1, MT7628_GPIO_MODE_SPI),
        GRP_G("sdmode", sd_mode_grp_mt7628, MT7628_GPIO_MODE_MASK,


我的恩山、我的无线 The best wifi forum is right here.
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-4-19 16:53

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表