26

Odp: Huawei B970b alt oprogramowanie

secam7 napisał/a:

Jest w BB i CC, ale co z tego jak jest za duży i nie wejdzie.

openwrt-e970-squashfs-gz.bin                       02-Oct-2014 07:28             4198500

Przypomnę że router ma 4MB flash, to ciekawe jak to się ma tam zmieścić??

Szkoda czasu, nic się z nim nie da zrobić. sad
Mój skompilowany AA ledwo się mieścił, zostawało coś ~60kB wolnego.
Flash w obudowie 48 nóżkowej, trudny do podmiany.

Wgrywałem przez konsolę (chyba stukałem w spację podczas rozruchu żeby w CFE zostać) z serwera tftp.

Już wtedy problemem było że kernel musiał być spakowany gzipem (co zabierało sporo miejsca),
bo jakiś watchdog sprzętowy ma i jak się soft odpowiedni szybko nie odezwie to go resetuje.

27 (edytowany przez viper_lasser 2022-05-24 06:38:14)

Odp: Huawei B970b alt oprogramowanie

@secam7
Posiadasz może jakiś firmware co obsługuje jakiegoś vpn'a np pptp ?
Ja w swojej wersji nie mam tego ale podobno jest jakaś wersja co to ma. Na chomikach sprawdzałem i nic ciekawego nie znalazłem.

Edit:
@secam7: Do AA robiłeś swojego patcha ? Chyba nie ma normalnie tego routera w tym wydaniu.

28

Odp: Huawei B970b alt oprogramowanie

Stary patchwork już nie działa, ale użyłem (chyba, to już 8 lat temu), patcha z tego maila, trzeba go trochę dopasować.
https://www.mail-archive.com/openwrt-de … 13290.html
Można też wyłuskać patch ze źródeł BB i dopasować do AA.

Ten router był dodawany jak już był AA (rozwojowy) i dlatego wylądował docelowo w BB.

29

Odp: Huawei B970b alt oprogramowanie

@secam7
Dzięki za wskazówki. Znalazłem też taki patch
https://openwrt-devel.openwrt.narkive.c … uawei-e970
Do którego folderu trzeba go wkleić ?
Ten z Twojego linku do target/linux/brcm47xx/image/patches-3.3 ?

30

Odp: Huawei B970b alt oprogramowanie

Nie, nałóż go na źródła openwrt (odpowiednio stare).

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

31

Odp: Huawei B970b alt oprogramowanie

@Cezary Nie wiem w jaki sposób
Czy według tego opisu muszę zapisać

* lzma-loader crashes, so gzipped kernel is used. Presumably due to
watchdog
  reset during kernel decompress.
* b43 wireless driver crashes after loading firmware, use proprietary
module
  (wl) instead. Perhaps due to watchdog, too.
>
(kernel patch below)
>
Signed-off-by: Mathias Adam <m.adam--open...@adamis.de>
>
---
>
Index: target/linux/brcm47xx/image/Makefile
===================================================================
--- target/linux/brcm47xx/image/Makefile      (Revision 29557)
+++ target/linux/brcm47xx/image/Makefile      (Arbeitskopie)
@@ -13,6 +13,7 @@
>
 define Image/Prepare
      cat $(KDIR)/vmlinux | $(STAGING_DIR_HOST)/bin/lzma e -si -so -eos -lc1
-lp2 -pb2 $(KDIR)/vmlinux.lzma
+     gzip -nc9 $(KDIR)/vmlinux $(KDIR)/vmlinux.gz
      rm -f $(KDIR)/loader.gz
      $(MAKE) -C lzma-loader \
              BUILD_DIR="$(KDIR)" \
@@ -51,6 +52,11 @@
      $(STAGING_DIR_HOST)/bin/trx2edips $(BIN_DIR)/$(IMG_PREFIX)-$(1).trx
$(BIN_DIR)/openwrt-$(2)-$(3).bin
 endef
>
+define Image/Build/Huawei
+     cp ./huawei-e970-padding $(BIN_DIR)/openwrt-$(2)-$(3)-gz.bin
+     cat $(BIN_DIR)/$(IMG_PREFIX)-$(1)-gz.trx >>
$(BIN_DIR)/openwrt-$(2)-$(3)-gz.bin
+endef
+
 define trxalign/jffs2-128k
 -a 0x20000 -f $(KDIR)/root.$(1)
 endef
@@ -107,9 +113,13 @@
      $(STAGING_DIR_HOST)/bin/trx -o $(BIN_DIR)/$(IMG_PREFIX)-$(1).trx \
              -f $(KDIR)/loader.gz -f $(KDIR)/vmlinux.lzma \
              $(call trxalign/$(1),$(1))
+     $(STAGING_DIR_HOST)/bin/trx -o $(BIN_DIR)/$(IMG_PREFIX)-$(1)-gz.trx \
+             -f $(KDIR)/vmlinux.gz \
+             $(call trxalign/$(1),$(1))
      $(call Image/Build/$(1),$(1))
      $(call Image/Build/Motorola,$(1),wr850g,1,$(1))
      $(call Image/Build/USR,$(1),usr5461,$(1))
+     $(call Image/Build/Huawei,$(1),e970,$(1))
      $(call Image/Build/Chk,$(1),wnr834b_v2,U12H081T00_NETGEAR,2,$(patsubst
jffs2-%,jffs2,$(1)))
 #    $(call Image/Build/Chk,$(1),wndr3400_v1,U12H155T00_NETGEAR,2,$(patsubst
jffs2-%,jffs2,$(1)))
 #    $(call Image/Build/Chk,$(1),wgr614_v8,U12H072T00_NETGEAR,2,$(patsubst
jffs2-%,jffs2,$(1)))
Index: package/broadcom-diag/src/diag.c
===================================================================
--- package/broadcom-diag/src/diag.c  (Revision 29557)
+++ package/broadcom-diag/src/diag.c  (Arbeitskopie)
@@ -142,6 +142,9 @@
>
      /* Edimax */
      PS1208MFG,
+
+     /* Huawei */
+     HUAWEI_E970,
 };
>
 static void __init bcm4780_init(void) {
@@ -921,6 +924,16 @@
                      { .name = "wlan",       .gpio = 1 << 0, .polarity = 
NORMAL },
              },
      },
+     /* Huawei */
+     [HUAWEI_E970] = {
+             .name   = "Huawei E970",
+             .buttons        = {
+                     { .name = "reset",      .gpio = 1 << 6 },
+             },
+             .leds     = {
+                     { .name = "wlan",       .gpio = 1 << 0, .polarity = 
NORMAL },
+             },
+     },
 };
>
 static struct platform_t __init *platform_detect(void)
@@ -1155,6 +1168,9 @@
              !strcmp(getvar("status_gpio"), "1")) /* gpio based detection */
              return &platforms[PS1208MFG];
>
+     if (!strcmp(boardnum, "0x5347") && !strcmp(boardtype, "0x048e"))  /*
Huawei E970 */
+             return &platforms[HUAWEI_E970];
+
      /* not found */
      return NULL;
 }
>
>
---
>
following patch has to be applied to kernel (3.0):
>
>
diff -Nur a/arch/mips/bcm47xx/time.c b/arch/mips/bcm47xx/time.c
--- a/arch/mips/bcm47xx/time.c        2011-11-29 16:51:22.000000000 +0100
+++ b/arch/mips/bcm47xx/time.c        2011-12-17 18:13:32.000000000 +0100
@@ -25,9 +25,75 @@
>
 #include <linux/init.h>
 #include <linux/ssb/ssb.h>
+#include <linux/gpio.h>
 #include <asm/time.h>
+#include <asm/mach-bcm47xx/nvram.h>
 #include <bcm47xx.h>
>
+#define ROUTER_HUAWEI_E970           1
+
+#define E970_GPIO_WDT_INTERVAL               (HZ / 5)
+#define E970_GPIO_WDT_PIN            7
+
+
+static struct {
+     struct timer_list timer;
+     unsigned long interval;
+     unsigned gpio;
+     int gstate;
+} bcm47xx_gpiowdt;
+
+
+static void bcm47xx_gpiowdt_timer_tick(unsigned long unused)
+{
+     bcm47xx_gpiowdt.gstate = !bcm47xx_gpiowdt.gstate;
+     gpio_set_value(bcm47xx_gpiowdt.gpio, bcm47xx_gpiowdt.gstate);
+
+     mod_timer(&bcm47xx_gpiowdt.timer, jiffies + bcm47xx_gpiowdt.interval);
+}
+
+static void bcm47xx_gpiowdt_setup(unsigned long interval, unsigned gpio)
+{
+     int ret;
+
+     bcm47xx_gpiowdt.interval = interval;
+     bcm47xx_gpiowdt.gpio = gpio;
+     bcm47xx_gpiowdt.gstate = 1;
+
+     ret = gpio_request(bcm47xx_gpiowdt.gpio, "bcm47xx-gpio-wdt");
+     if (ret < 0) {
+             printk(KERN_INFO "bcm47xx: failed to request gpio\n");
+             return;
+     }
+     ret = gpio_direction_output(bcm47xx_gpiowdt.gpio,
bcm47xx_gpiowdt.gstate);
+     if (ret < 0) {
+             printk(KERN_INFO "bcm47xx: failed to set gpio as output\n");
+             return;
+     }
+
+     setup_timer(&bcm47xx_gpiowdt.timer, bcm47xx_gpiowdt_timer_tick, 0L);
+     bcm47xx_gpiowdt_timer_tick(0);
+}
+
+static int get_router(void)
+{
+     char buf[20];
+     u32 boardnum = 0;
+     u16 boardtype = 0;
+
+     if (nvram_getenv("boardnum", buf, sizeof(buf)) >= 0)
+             boardnum = simple_strtoul(buf, NULL, 0);
+     if (nvram_getenv("boardtype", buf, sizeof(buf)) >= 0)
+             boardtype = simple_strtoul(buf, NULL, 0);
+
+     if (boardnum == 0x5347 && boardtype == 0x048e) {
+             /* Huawei E970 */
+                return ROUTER_HUAWEI_E970;
+     }
+
+     return 0;
+}
+
 void __init plat_time_init(void)
 {
      unsigned long hz = 0;
@@ -57,4 +123,11 @@
>
      /* Set MIPS counter frequency for fixed_rate_gettimeoffset() */
      mips_hpt_frequency = hz;
+
+     /* device-specific initializations */
+     switch (get_router()) {
+     case ROUTER_HUAWEI_E970:
+             printk(KERN_INFO "bcm47xx: detected Huawei E970, starting gpio 
watchdog
pet timer\n");
+             bcm47xx_gpiowdt_setup(E970_GPIO_WDT_INTERVAL, 
E970_GPIO_WDT_PIN);
+     }
 }
diff -Nur a/drivers/mtd/bcm47xxpart.c b/drivers/mtd/bcm47xxpart.c
--- a/drivers/mtd/bcm47xxpart.c       2011-11-29 16:51:24.000000000 +0100
+++ b/drivers/mtd/bcm47xxpart.c       2011-12-14 01:30:36.000000000 +0100
@@ -84,6 +84,7 @@
 #define ROUTER_NETGEAR_WNR3500L              4
 #define ROUTER_SIMPLETECH_SIMPLESHARE        5
 #define ROUTER_NETGEAR_WNDR3400              6
+#define ROUTER_HUAWEI_E970           7
>
 static struct mtd_partition bcm47xx_parts[] = {
      { name: "cfe",  offset:0, size:0, mask_flags:MTD_WRITEABLE, },
@@ -414,6 +415,11 @@
              return ROUTER_SIMPLETECH_SIMPLESHARE;
      }
>
+     if (boardnum == 0x5347 && boardtype == 0x048e) {
+             /* Huawei E970 */
+                return ROUTER_HUAWEI_E970;
+     }
+
      return 0;
 }
>
@@ -476,6 +482,19 @@
                      bcm47xx_parts[4].size   = roundup(NVRAM_SPACE, 
mtd->erasesize);
                      break;
>
+             case ROUTER_HUAWEI_E970:
+                     pr_notice("Setting up Huawei E970 factory nvram 
partition\n");
+                     custom_data_size = mtd->erasesize;
+
+                     bcm47xx_parts[3].offset = mtd->size - 
roundup(NVRAM_SPACE,
mtd->erasesize);
+                     bcm47xx_parts[3].size   = roundup(NVRAM_SPACE, 
mtd->erasesize);
+
+                     /* Place factory nvram into a partition */
+                     bcm47xx_parts[4].name = "factory";
+                     bcm47xx_parts[4].offset = bcm47xx_parts[3].offset - 
custom_data_size;
+                     bcm47xx_parts[4].size   =  custom_data_size;
+                     break;
+
              default:
                      bcm47xx_parts[3].offset = mtd->size - 
roundup(NVRAM_SPACE,
mtd->erasesize);
                      bcm47xx_parts[3].size   = roundup(NVRAM_SPACE, 
mtd->erasesize);

do jakiegoś pliku np 999-e970.patch i później wywołać go z głównego folderu
patch -p0 < 999-e970.patch ?

https://github.com/unwireddevices/openwrt

32

Odp: Huawei B970b alt oprogramowanie

Dokładnie.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

33 (edytowany przez viper_lasser 2022-05-24 18:53:41)

Odp: Huawei B970b alt oprogramowanie

Coś nie idzie mi ten patch. Wyskakuje błąd
user@ubuntu:~/openwrt-attitude-adjustment$ patch -p0 < 999_1.patch
patching file target/linux/brcm47xx/image/Makefile
patch: **** malformed patch at line 13:           BUILD_DIR="$(KDIR)" \

Pewnie brakuje jakiejś spacji lub źródło dokładnie nie zgadza się z tym co jest w patchu i nie może czegoś znaleźć.

Czy mógłby ktoś wrzucić tego patcha do wydania AA.

Znalazłem w sieci ale do lede 17.01
https://git.laboratoryb.org/hurricos/op … 2c00b88fd7
https://git.laboratoryb.org/hurricos/op … port.patch

34 (edytowany przez Cezary 2022-05-24 18:57:29)

Odp: Huawei B970b alt oprogramowanie

Źłe to zrobiłeś (skopiowałeś ze strony) spacje tabulacje itd. Ponieważ nie ma tego wiele to będzie prościej jak sobie ręcznie zrobisz zmiany w odpowiednich plikach.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

35

Odp: Huawei B970b alt oprogramowanie

Na podstawie tego linku
https://openwrt-devel.openwrt.narkive.c … uawei-e970
Mam naniesione zmiany w w pliku "broadcom-diag/src/diag.c"

Patcha 830-huawei_e970_support.patch mam wygenerowanego w tej formie na podstawie w/w źródeł.

Patcha wygenerowałem poleceniem patch -p0 < 830.patch a treść 830.patch rozpoczyna się od

diff --git a/target/linux/brcm47xx/patches-3.3/830-huawei_e970_support.patch b/target/linux/brcm47xx/patches-3.3/830-huawei_e970_support.patch
new file mode 100644
index 0000000..2d83d24
--- /dev/null
+++ b/target/linux/brcm47xx/patches-3.3/830-huawei_e970_support.patch
@@ -0,0 +1,120 @@
+--- a/arch/mips/bcm47xx/time.c
++++ b/arch/mips/bcm47xx/time.c
+@@ -25,9 +25,75 @@

Na podstawie powyższego powstał patch docelowy który umieściłem w folderze target/linux/brcm47xx/patches-3.3

--- a/arch/mips/bcm47xx/time.c
+++ b/arch/mips/bcm47xx/time.c
@@ -25,9 +25,75 @@

 #include <linux/init.h>
 #include <linux/ssb/ssb.h>
+#include <linux/gpio.h>
 #include <asm/time.h>
+#include <asm/mach-bcm47xx/nvram.h>
 #include <bcm47xx.h>

+#define ROUTER_HUAWEI_E970 1
+
+#define E970_GPIO_WDT_INTERVAL HZ
+#define E970_GPIO_WDT_PIN 7
+
+
+static struct bcm47xx_gpiowdt {
+ struct timer_list timer;
+ unsigned long interval;
+ unsigned gpio;
+ int gstate;
+} bcm47xx_gpiowdt;
+
+
+static void bcm47xx_gpiowdt_timer_tick(unsigned long unused)
+{
+ bcm47xx_gpiowdt.gstate = !bcm47xx_gpiowdt.gstate;
+ gpio_set_value(bcm47xx_gpiowdt.gpio, bcm47xx_gpiowdt.gstate);
+
+ mod_timer(&bcm47xx_gpiowdt.timer, jiffies + bcm47xx_gpiowdt.interval);
+}
+
+static void bcm47xx_gpiowdt_setup(unsigned long interval, unsigned gpio)
+{
+ int ret;
+
+ bcm47xx_gpiowdt.interval = interval;
+ bcm47xx_gpiowdt.gpio = gpio;
+ bcm47xx_gpiowdt.gstate = 1;
+
+ ret = gpio_request(bcm47xx_gpiowdt.gpio, "bcm47xx-gpio-wdt");
+ if (ret < 0) {
+ printk(KERN_INFO "bcm47xx: failed to request gpio\n");
+ return;
+ }
+ ret = gpio_direction_output(bcm47xx_gpiowdt.gpio, bcm47xx_gpiowdt.gstate);
+ if (ret < 0) {
+ printk(KERN_INFO "bcm47xx: failed to set gpio as output\n");
+ return;
+ }
+
+ setup_timer(&bcm47xx_gpiowdt.timer, bcm47xx_gpiowdt_timer_tick, 0L);
+ bcm47xx_gpiowdt_timer_tick(0);
+}
+
+static int get_router(void)
+{
+ char buf[20];
+ u32 boardnum = 0;
+ u16 boardtype = 0;
+
+ if (nvram_getenv("boardnum", buf, sizeof(buf)) >= 0)
+ boardnum = simple_strtoul(buf, NULL, 0);
+ if (nvram_getenv("boardtype", buf, sizeof(buf)) >= 0)
+ boardtype = simple_strtoul(buf, NULL, 0);
+
+ if (boardnum == 0x5347 && boardtype == 0x048e) {
+ /* Huawei E970 */
+ return ROUTER_HUAWEI_E970;
+ }
+
+ return 0;
+}
+
 void __init plat_time_init(void)
 {
 unsigned long hz = 0;
@@ -57,4 +123,11 @@ void __init plat_time_init(void)

 /* Set MIPS counter frequency for fixed_rate_gettimeoffset() */
 mips_hpt_frequency = hz;
+
+ /* device-specific initializations */
+ switch (get_router()) {
+ case ROUTER_HUAWEI_E970:
+ printk(KERN_INFO "bcm47xx: detected Huawei E970, starting gpio watchdog pet timer\n");
+ bcm47xx_gpiowdt_setup(E970_GPIO_WDT_INTERVAL, E970_GPIO_WDT_PIN);
+ }
 }
--- a/drivers/mtd/bcm47xxpart.c
+++ b/drivers/mtd/bcm47xxpart.c
@@ -84,6 +84,7 @@ struct trx_header {
 #define ROUTER_NETGEAR_WNR3500L 4
 #define ROUTER_SIMPLETECH_SIMPLESHARE 5
 #define ROUTER_NETGEAR_WNDR3400 6
+#define ROUTER_HUAWEI_E970 7

 static int
 find_cfe_size(struct mtd_info *mtd)
@@ -405,6 +406,11 @@ static int get_router(void)
 return ROUTER_SIMPLETECH_SIMPLESHARE;
 }

+ if (boardnum == 0x5347 && boardtype == 0x048e) {
+ /* Huawei E970 */
+ return ROUTER_HUAWEI_E970;
+ }
+
 return 0;
 }

@@ -446,6 +452,7 @@ static int parse_bcm47xx_partitions(stru
 case ROUTER_NETGEAR_WNDR3300:
 case ROUTER_NETGEAR_WNR3500L:
 case ROUTER_NETGEAR_WNDR3400:
+ case ROUTER_HUAWEI_E970:
 /* Netgear: checksum is @ 0x003AFFF8 for 4M flash or checksum
 * is @ 0x007AFFF8 for 8M flash
 */
--- a/arch/mips/bcm47xx/time.c
+++ b/arch/mips/bcm47xx/time.c
@@ -25,9 +25,75 @@

 #include <linux/init.h>
 #include <linux/ssb/ssb.h>
+#include <linux/gpio.h>
 #include <asm/time.h>
+#include <asm/mach-bcm47xx/nvram.h>
 #include <bcm47xx.h>

+#define ROUTER_HUAWEI_E970 1
+
+#define E970_GPIO_WDT_INTERVAL HZ
+#define E970_GPIO_WDT_PIN 7
+
+
+static struct bcm47xx_gpiowdt {
+ struct timer_list timer;
+ unsigned long interval;
+ unsigned gpio;
+ int gstate;
+} bcm47xx_gpiowdt;
+
+
+static void bcm47xx_gpiowdt_timer_tick(unsigned long unused)
+{
+ bcm47xx_gpiowdt.gstate = !bcm47xx_gpiowdt.gstate;
+ gpio_set_value(bcm47xx_gpiowdt.gpio, bcm47xx_gpiowdt.gstate);
+
+ mod_timer(&bcm47xx_gpiowdt.timer, jiffies + bcm47xx_gpiowdt.interval);
+}
+
+static void bcm47xx_gpiowdt_setup(unsigned long interval, unsigned gpio)
+{
+ int ret;
+
+ bcm47xx_gpiowdt.interval = interval;
+ bcm47xx_gpiowdt.gpio = gpio;
+ bcm47xx_gpiowdt.gstate = 1;
+
+ ret = gpio_request(bcm47xx_gpiowdt.gpio, "bcm47xx-gpio-wdt");
+ if (ret < 0) {
+ printk(KERN_INFO "bcm47xx: failed to request gpio\n");
+ return;
+ }
+ ret = gpio_direction_output(bcm47xx_gpiowdt.gpio, bcm47xx_gpiowdt.gstate);
+ if (ret < 0) {
+ printk(KERN_INFO "bcm47xx: failed to set gpio as output\n");
+ return;
+ }
+
+ setup_timer(&bcm47xx_gpiowdt.timer, bcm47xx_gpiowdt_timer_tick, 0L);
+ bcm47xx_gpiowdt_timer_tick(0);
+}
+
+static int get_router(void)
+{
+ char buf[20];
+ u32 boardnum = 0;
+ u16 boardtype = 0;
+
+ if (nvram_getenv("boardnum", buf, sizeof(buf)) >= 0)
+ boardnum = simple_strtoul(buf, NULL, 0);
+ if (nvram_getenv("boardtype", buf, sizeof(buf)) >= 0)
+ boardtype = simple_strtoul(buf, NULL, 0);
+
+ if (boardnum == 0x5347 && boardtype == 0x048e) {
+ /* Huawei E970 */
+ return ROUTER_HUAWEI_E970;
+ }
+
+ return 0;
+}
+
 void __init plat_time_init(void)
 {
 unsigned long hz = 0;
@@ -57,4 +123,11 @@ void __init plat_time_init(void)

 /* Set MIPS counter frequency for fixed_rate_gettimeoffset() */
 mips_hpt_frequency = hz;
+
+ /* device-specific initializations */
+ switch (get_router()) {
+ case ROUTER_HUAWEI_E970:
+ printk(KERN_INFO "bcm47xx: detected Huawei E970, starting gpio watchdog pet timer\n");
+ bcm47xx_gpiowdt_setup(E970_GPIO_WDT_INTERVAL, E970_GPIO_WDT_PIN);
+ }
 }
--- a/drivers/mtd/bcm47xxpart.c
+++ b/drivers/mtd/bcm47xxpart.c
@@ -84,6 +84,7 @@ struct trx_header {
 #define ROUTER_NETGEAR_WNR3500L 4
 #define ROUTER_SIMPLETECH_SIMPLESHARE 5
 #define ROUTER_NETGEAR_WNDR3400 6
+#define ROUTER_HUAWEI_E970 7

 static int
 find_cfe_size(struct mtd_info *mtd)
@@ -405,6 +406,11 @@ static int get_router(void)
 return ROUTER_SIMPLETECH_SIMPLESHARE;
 }

+ if (boardnum == 0x5347 && boardtype == 0x048e) {
+ /* Huawei E970 */
+ return ROUTER_HUAWEI_E970;
+ }
+
 return 0;
 }

@@ -446,6 +452,7 @@ static int parse_bcm47xx_partitions(stru
 case ROUTER_NETGEAR_WNDR3300:
 case ROUTER_NETGEAR_WNR3500L:
 case ROUTER_NETGEAR_WNDR3400:
+ case ROUTER_HUAWEI_E970:
 /* Netgear: checksum is @ 0x003AFFF8 for 4M flash or checksum
 * is @ 0x007AFFF8 for 8M flash
 */
--- a/arch/mips/bcm47xx/time.c
+++ b/arch/mips/bcm47xx/time.c
@@ -25,9 +25,75 @@

 #include <linux/init.h>
 #include <linux/ssb/ssb.h>
+#include <linux/gpio.h>
 #include <asm/time.h>
+#include <asm/mach-bcm47xx/nvram.h>
 #include <bcm47xx.h>

+#define ROUTER_HUAWEI_E970 1
+
+#define E970_GPIO_WDT_INTERVAL HZ
+#define E970_GPIO_WDT_PIN 7
+
+
+static struct bcm47xx_gpiowdt {
+ struct timer_list timer;
+ unsigned long interval;
+ unsigned gpio;
+ int gstate;
+} bcm47xx_gpiowdt;
+
+
+static void bcm47xx_gpiowdt_timer_tick(unsigned long unused)
+{
+ bcm47xx_gpiowdt.gstate = !bcm47xx_gpiowdt.gstate;
+ gpio_set_value(bcm47xx_gpiowdt.gpio, bcm47xx_gpiowdt.gstate);
+
+ mod_timer(&bcm47xx_gpiowdt.timer, jiffies + bcm47xx_gpiowdt.interval);
+}
+
+static void bcm47xx_gpiowdt_setup(unsigned long interval, unsigned gpio)
+{
+ int ret;
+
+ bcm47xx_gpiowdt.interval = interval;
+ bcm47xx_gpiowdt.gpio = gpio;
+ bcm47xx_gpiowdt.gstate = 1;
+
+ ret = gpio_request(bcm47xx_gpiowdt.gpio, "bcm47xx-gpio-wdt");
+ if (ret < 0) {
+ printk(KERN_INFO "bcm47xx: failed to request gpio\n");
+ return;
+ }
+ ret = gpio_direction_output(bcm47xx_gpiowdt.gpio, bcm47xx_gpiowdt.gstate);
+ if (ret < 0) {
+ printk(KERN_INFO "bcm47xx: failed to set gpio as output\n");
+ return;
+ }
+
+ setup_timer(&bcm47xx_gpiowdt.timer, bcm47xx_gpiowdt_timer_tick, 0L);
+ bcm47xx_gpiowdt_timer_tick(0);
+}
+
+static int get_router(void)
+{
+ char buf[20];
+ u32 boardnum = 0;
+ u16 boardtype = 0;
+
+ if (nvram_getenv("boardnum", buf, sizeof(buf)) >= 0)
+ boardnum = simple_strtoul(buf, NULL, 0);
+ if (nvram_getenv("boardtype", buf, sizeof(buf)) >= 0)
+ boardtype = simple_strtoul(buf, NULL, 0);
+
+ if (boardnum == 0x5347 && boardtype == 0x048e) {
+ /* Huawei E970 */
+ return ROUTER_HUAWEI_E970;
+ }
+
+ return 0;
+}
+
 void __init plat_time_init(void)
 {
 unsigned long hz = 0;
@@ -57,4 +123,11 @@ void __init plat_time_init(void)

 /* Set MIPS counter frequency for fixed_rate_gettimeoffset() */
 mips_hpt_frequency = hz;
+
+ /* device-specific initializations */
+ switch (get_router()) {
+ case ROUTER_HUAWEI_E970:
+ printk(KERN_INFO "bcm47xx: detected Huawei E970, starting gpio watchdog pet timer\n");
+ bcm47xx_gpiowdt_setup(E970_GPIO_WDT_INTERVAL, E970_GPIO_WDT_PIN);
+ }
 }
--- a/drivers/mtd/bcm47xxpart.c
+++ b/drivers/mtd/bcm47xxpart.c
@@ -84,6 +84,7 @@ struct trx_header {
 #define ROUTER_NETGEAR_WNR3500L 4
 #define ROUTER_SIMPLETECH_SIMPLESHARE 5
 #define ROUTER_NETGEAR_WNDR3400 6
+#define ROUTER_HUAWEI_E970 7

 static int
 find_cfe_size(struct mtd_info *mtd)
@@ -405,6 +406,11 @@ static int get_router(void)
 return ROUTER_SIMPLETECH_SIMPLESHARE;
 }

+ if (boardnum == 0x5347 && boardtype == 0x048e) {
+ /* Huawei E970 */
+ return ROUTER_HUAWEI_E970;
+ }
+
 return 0;
 }

@@ -446,6 +452,7 @@ static int parse_bcm47xx_partitions(stru
 case ROUTER_NETGEAR_WNDR3300:
 case ROUTER_NETGEAR_WNR3500L:
 case ROUTER_NETGEAR_WNDR3400:
+ case ROUTER_HUAWEI_E970:
 /* Netgear: checksum is @ 0x003AFFF8 for 4M flash or checksum
 * is @ 0x007AFFF8 for 8M flash
 */

Niestety przy próbie kompilacji sypie takimi błędami

user@ubuntu:~/openwrt-attitude-adjustment$ make V=s
make[1]: Entering directory `/home/user/openwrt-attitude-adjustment'
make[2]: Entering directory `/home/user/openwrt-attitude-adjustment'
make[3]: Entering directory `/home/user/openwrt-attitude-adjustment/target/linux'
make[4]: Entering directory `/home/user/openwrt-attitude-adjustment/target/linux/brcm47xx'
if [ -s "/home/user/openwrt-attitude-adjustment/build_dir/linux-brcm47xx/linux-3.3.8/patches/series" ]; then (cd "/home/user/openwrt-attitude-adjustment/build_dir/linux-brcm47xx/linux-3.3.8"; if quilt --quiltrc=- next >/dev/null 2>&1; then quilt --quiltrc=- push -a; else quilt --quiltrc=- top >/dev/null 2>&1; fi ); fi
Applying patch platform/830-huawei_e970_support.patch
patching file arch/mips/bcm47xx/time.c
Hunk #1 FAILED at 25.
Hunk #2 FAILED at 57.
2 out of 2 hunks FAILED -- rejects in file arch/mips/bcm47xx/time.c
patching file drivers/mtd/bcm47xxpart.c
Hunk #1 FAILED at 84.
Hunk #2 FAILED at 405.
Hunk #3 FAILED at 446.
3 out of 3 hunks FAILED -- rejects in file drivers/mtd/bcm47xxpart.c
patching file arch/mips/bcm47xx/time.c
Hunk #1 FAILED at 25.
Hunk #2 FAILED at 57.
2 out of 2 hunks FAILED -- rejects in file arch/mips/bcm47xx/time.c
patching file drivers/mtd/bcm47xxpart.c
Hunk #1 FAILED at 84.
Hunk #2 FAILED at 405.
Hunk #3 FAILED at 446.
3 out of 3 hunks FAILED -- rejects in file drivers/mtd/bcm47xxpart.c
patching file arch/mips/bcm47xx/time.c
Hunk #1 FAILED at 25.
Hunk #2 FAILED at 57.
2 out of 2 hunks FAILED -- rejects in file arch/mips/bcm47xx/time.c
patching file drivers/mtd/bcm47xxpart.c
Hunk #1 FAILED at 84.
Hunk #2 FAILED at 405.
Hunk #3 FAILED at 446.
3 out of 3 hunks FAILED -- rejects in file drivers/mtd/bcm47xxpart.c
Patch platform/830-huawei_e970_support.patch does not apply (enforce with -f)
make[4]: *** [/home/user/openwrt-attitude-adjustment/build_dir/linux-brcm47xx/linux-3.3.8/.quilt_checked] Error 1
make[4]: Leaving directory `/home/user/openwrt-attitude-adjustment/target/linux/brcm47xx'
make[3]: *** [compile] Error 2
make[3]: Leaving directory `/home/user/openwrt-attitude-adjustment/target/linux'
make[2]: *** [target/linux/compile] Error 2
make[2]: Leaving directory `/home/user/openwrt-attitude-adjustment'
make[1]: *** [/home/user/openwrt-attitude-adjustment/staging_dir/target-mipsel_uClibc-0.9.33.2/stamp/.target_compile] Error 2
make[1]: Leaving directory `/home/user/openwrt-attitude-adjustment'
make: *** [world] Error 2
user@ubuntu:~/openwrt-attitude-adjustment$ 

Czy posiada ktoś tego patcha 830-huawei_e970_support.patch ?
Ten z BB jest już trochę inny i też się wysypuje.
https://github.com/openwrt-vgv7519/open … port.patch

36

Odp: Huawei B970b alt oprogramowanie

Zmień go sobie. Zrób kopię pliku, zmień ręcznie to co ma wejść, zrób diffa pomiędzy plikami i będziesz miał łatkę.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

37

Odp: Huawei B970b alt oprogramowanie

Nie potrafię znaleźć tych źródeł
a/arch/mips/bcm47xx/time.c
W którym folderze to jest ?

38

Odp: Huawei B970b alt oprogramowanie

W źródłach kernela w arch/mips/bcm47xx/

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

39

Odp: Huawei B970b alt oprogramowanie

Wymagane źródła do podmiany z niedziałającego patcha znalazłem w folderach
./build_dir/linux-brcm47xx/linux-3.3.8/arch/mips/bcm47xx/time.c
./build_dir/linux-brcm47xx/linux-3.3.8/drivers/mtd/bcm47xxpart.c

Dopisalem odpowiednie wpisy z patcha.

Jak jestem w folderze głównym i wykonam polecenie git diff to wyrzuci mi wszystkie zmiany które zrobiłem.

diff --git a/package/broadcom-diag/src/diag.c b/package/broadcom-diag/src/diag.c
index 7e0ff02..20e3524 100644
--- a/package/broadcom-diag/src/diag.c
+++ b/package/broadcom-diag/src/diag.c
@@ -149,6 +149,10 @@ enum {
 
     /* Edimax */
     PS1208MFG,
+
+    /* Huawei */
+    HUAWEI_E970,
+
 };
 
 static void __init bcm4780_init(void) {
@@ -1016,6 +1020,18 @@ static struct platform_t __initdata platforms[] = {
             { .name = "wlan",    .gpio = 1 << 0, .polarity = NORMAL },
         },
     },
+
+    /* Huawei */
+    [HUAWEI_E970] = {
+        .name = "Huawei E970",
+        .buttons = {
+            { .name = "reset", .gpio = 1 << 6 },
+        },
+        .leds = {
+            { .name = "wlan", .gpio = 1 << 0, .polarity = NORMAL },
+        },
+    },
+
 };
 
 static struct platform_t __init *platform_detect(void)
@@ -1279,6 +1295,9 @@ static struct platform_t __init *platform_detect(void)
         !strcmp(getvar("status_gpio"), "1")) /* gpio based detection */
         return &platforms[PS1208MFG];
 
+    if (!strcmp(boardnum, "0x5347") && !strcmp(boardtype, "0x048e")) /* Huawei E970 */
+        return &platforms[HUAWEI_E970];
+
     /* not found */
     return NULL;
 }
diff --git a/target/linux/brcm47xx/image/Makefile b/target/linux/brcm47xx/image/Makefile
index 33290ff..a51aef9 100644
--- a/target/linux/brcm47xx/image/Makefile
+++ b/target/linux/brcm47xx/image/Makefile
@@ -13,6 +13,7 @@ endef
 
 define Image/Prepare
     cat $(KDIR)/vmlinux | $(STAGING_DIR_HOST)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux.lzma
+    gzip -nc9 $(KDIR)/vmlinux > $(KDIR)/vmlinux.gz
     rm -f $(KDIR)/loader.gz
     $(MAKE) -C lzma-loader \
         BUILD_DIR="$(KDIR)" \
@@ -51,6 +52,13 @@ define Image/Build/Edi
     $(STAGING_DIR_HOST)/bin/trx2edips $(BIN_DIR)/$(IMG_PREFIX)-$(1).trx $(BIN_DIR)/openwrt-$(2)-$(3).bin
 endef
 
+define Image/Build/Huawei
+    dd if=/dev/zero of=$(BIN_DIR)/openwrt-$(2)-$(3)-gz.bin bs=92 count=1
+    echo -ne 'HDR0\x08\x00\x00\x00' >> $(BIN_DIR)/openwrt-$(2)-$(3)-gz.bin
+    cat $(BIN_DIR)/$(IMG_PREFIX)-$(1)-gz.trx >> $(BIN_DIR)/openwrt-$(2)-$(3)-gz.bin
+endef
+
+
 define trxalign/jffs2-128k
 -a 0x20000 -f $(KDIR)/root.$(1)
 endef
@@ -109,9 +117,15 @@ define Image/Build
     $(STAGING_DIR_HOST)/bin/trx -o $(BIN_DIR)/$(IMG_PREFIX)-$(1).trx \
         -f $(KDIR)/loader.gz -f $(KDIR)/vmlinux.lzma \
         $(call trxalign/$(1),$(1))
+        
+    $(STAGING_DIR_HOST)/bin/trx -o $(BIN_DIR)/$(IMG_PREFIX)-$(1)-gz.trx \
+        -f $(KDIR)/vmlinux.gz \
+        $(call trxalign/$(1),$(1))
+
     $(call Image/Build/$(1),$(1))
     $(call Image/Build/Motorola,$(1),wr850g,1,$(1))
     $(call Image/Build/USR,$(1),usr5461,$(1))
+    $(call Image/Build/Huawei,$(1),e970,$(1))
 #    $(call Image/Build/Chk,$(1),wgr614_v8,U12H072T00_NETGEAR,2,$(patsubst jffs2-%,jffs2,$(1)))
 #    $(call Image/Build/Chk,$(1),wgr614_v9,U12H094T00_NETGEAR,2,$(patsubst jffs2-%,jffs2,$(1)))
 #    $(call Image/Build/Chk,$(1),wndr3300,U12H093T00_NETGEAR,2,$(patsubst jffs2-%,jffs2,$(1)))

Nie ma tutaj tych zmian z kernel'a.
Nie wiem jak zrobić z tego patcha.

40

Odp: Huawei B970b alt oprogramowanie

diff -Nuar /build_dir/linux-brcm47xx/linux-3.3.8/arch/mips/bcm47xx/time.c.orig /build_dir/linux-brcm47xx/linux-3.3.8/arch/mips/bcm47xx/time.c > 01.patch
diff -Nuar /build_dir/linux-brcm47xx/linux-3.3.8/arch/mips/bcm47xx/xpart.c.orig /build_dir/linux-brcm47xx/linux-3.3.8/arch/mips/bcm47xx/xpart.c > 02.patch

Zrobiłeś sobie kopię plików, prawda? Później tylko ew zmień na nagłówkach ścieżki do plików żeby się zgadzało (bo tam nie ma być /build_dir/linux-brcm47xx/linux-3.3.8/arch itd tylko tak jak miałeś w oryginale: a/arch/mips/bcm47xx itd).

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

41

Odp: Huawei B970b alt oprogramowanie

@Cezary: Kopię plików zrobiłem nawet z takimi samymi .orig

Tu jeszcze znalazłem instrukcję dla nowszego openwrt.
https://forum.openwrt.org/t/how-to-crea … t-18/29840
Tak samo się robi patche dla starszych wersji ?
Który sposób jest lepszy ?

42

Odp: Huawei B970b alt oprogramowanie

A jak chcesz robić przez quilt to możesz. Choć ci nie powiem czy w AA to było to już nie pamiętam.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

43 (edytowany przez viper_lasser 2022-05-25 22:02:41)

Odp: Huawei B970b alt oprogramowanie

Mam na razie takie zmiany

diff --git a/package/broadcom-diag/src/diag.c b/package/broadcom-diag/src/diag.c
index 7e0ff02..20e3524 100644
--- a/package/broadcom-diag/src/diag.c
+++ b/package/broadcom-diag/src/diag.c
@@ -149,6 +149,10 @@ enum {
 
     /* Edimax */
     PS1208MFG,
+
+    /* Huawei */
+    HUAWEI_E970,
+
 };
 
 static void __init bcm4780_init(void) {
@@ -1016,6 +1020,18 @@ static struct platform_t __initdata platforms[] = {
             { .name = "wlan",    .gpio = 1 << 0, .polarity = NORMAL },
         },
     },
+
+    /* Huawei */
+    [HUAWEI_E970] = {
+        .name = "Huawei E970",
+        .buttons = {
+            { .name = "reset", .gpio = 1 << 6 },
+        },
+        .leds = {
+            { .name = "wlan", .gpio = 1 << 0, .polarity = NORMAL },
+        },
+    },
+
 };
 
 static struct platform_t __init *platform_detect(void)
@@ -1279,6 +1295,9 @@ static struct platform_t __init *platform_detect(void)
         !strcmp(getvar("status_gpio"), "1")) /* gpio based detection */
         return &platforms[PS1208MFG];
 
+    if (!strcmp(boardnum, "0x5347") && !strcmp(boardtype, "0x048e")) /* Huawei E970 */
+        return &platforms[HUAWEI_E970];
+
     /* not found */
     return NULL;
 }
diff --git a/target/linux/brcm47xx/image/Makefile b/target/linux/brcm47xx/image/Makefile
index 33290ff..a51aef9 100644
--- a/target/linux/brcm47xx/image/Makefile
+++ b/target/linux/brcm47xx/image/Makefile
@@ -13,6 +13,7 @@ endef
 
 define Image/Prepare
     cat $(KDIR)/vmlinux | $(STAGING_DIR_HOST)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux.lzma
+    gzip -nc9 $(KDIR)/vmlinux > $(KDIR)/vmlinux.gz
     rm -f $(KDIR)/loader.gz
     $(MAKE) -C lzma-loader \
         BUILD_DIR="$(KDIR)" \
@@ -51,6 +52,13 @@ define Image/Build/Edi
     $(STAGING_DIR_HOST)/bin/trx2edips $(BIN_DIR)/$(IMG_PREFIX)-$(1).trx $(BIN_DIR)/openwrt-$(2)-$(3).bin
 endef
 
+define Image/Build/Huawei
+    dd if=/dev/zero of=$(BIN_DIR)/openwrt-$(2)-$(3)-gz.bin bs=92 count=1
+    echo -ne 'HDR0\x08\x00\x00\x00' >> $(BIN_DIR)/openwrt-$(2)-$(3)-gz.bin
+    cat $(BIN_DIR)/$(IMG_PREFIX)-$(1)-gz.trx >> $(BIN_DIR)/openwrt-$(2)-$(3)-gz.bin
+endef
+
+
 define trxalign/jffs2-128k
 -a 0x20000 -f $(KDIR)/root.$(1)
 endef
@@ -109,9 +117,15 @@ define Image/Build
     $(STAGING_DIR_HOST)/bin/trx -o $(BIN_DIR)/$(IMG_PREFIX)-$(1).trx \
         -f $(KDIR)/loader.gz -f $(KDIR)/vmlinux.lzma \
         $(call trxalign/$(1),$(1))
+        
+    $(STAGING_DIR_HOST)/bin/trx -o $(BIN_DIR)/$(IMG_PREFIX)-$(1)-gz.trx \
+        -f $(KDIR)/vmlinux.gz \
+        $(call trxalign/$(1),$(1))
+
     $(call Image/Build/$(1),$(1))
     $(call Image/Build/Motorola,$(1),wr850g,1,$(1))
     $(call Image/Build/USR,$(1),usr5461,$(1))
+    $(call Image/Build/Huawei,$(1),e970,$(1))
 #    $(call Image/Build/Chk,$(1),wgr614_v8,U12H072T00_NETGEAR,2,$(patsubst jffs2-%,jffs2,$(1)))
 #    $(call Image/Build/Chk,$(1),wgr614_v9,U12H094T00_NETGEAR,2,$(patsubst jffs2-%,jffs2,$(1)))
 #    $(call Image/Build/Chk,$(1),wndr3300,U12H093T00_NETGEAR,2,$(patsubst jffs2-%,jffs2,$(1)))

Patche do kernel'a
/target/linux/brcm47xx/831-huawei-e970.patch

--- a/arch/mips/bcm47xx/time.c
+++ b/arch/mips/bcm47xx/time.c
@@ -25,10 +25,74 @@
 
 #include <linux/init.h>
 #include <linux/ssb/ssb.h>
+#include <linux/gpio.h>
 #include <asm/time.h>
+#include <asm/mach-bcm47xx/nvram.h>
 #include <bcm47xx.h>
 #include <nvram.h>
 
+#define ROUTER_HUAWEI_E970 1
+#define E970_GPIO_WDT_INTERVAL HZ
+#define E970_GPIO_WDT_PIN 7
+
+static struct bcm47xx_gpiowdt {
+ struct timer_list timer;
+ unsigned long interval;
+ unsigned gpio;
+ int gstate;
+} bcm47xx_gpiowdt;
+
+
+static void bcm47xx_gpiowdt_timer_tick(unsigned long unused)
+{
+ bcm47xx_gpiowdt.gstate = !bcm47xx_gpiowdt.gstate;
+ gpio_set_value(bcm47xx_gpiowdt.gpio, bcm47xx_gpiowdt.gstate);
+
+ mod_timer(&bcm47xx_gpiowdt.timer, jiffies + bcm47xx_gpiowdt.interval);
+}
+
+static void bcm47xx_gpiowdt_setup(unsigned long interval, unsigned gpio)
+{
+ int ret;
+
+ bcm47xx_gpiowdt.interval = interval;
+ bcm47xx_gpiowdt.gpio = gpio;
+ bcm47xx_gpiowdt.gstate = 1;
+
+ ret = gpio_request(bcm47xx_gpiowdt.gpio, "bcm47xx-gpio-wdt");
+ if (ret < 0) {
+ printk(KERN_INFO "bcm47xx: failed to request gpio\n");
+ return;
+ }
+ ret = gpio_direction_output(bcm47xx_gpiowdt.gpio, bcm47xx_gpiowdt.gstate);
+ if (ret < 0) {
+ printk(KERN_INFO "bcm47xx: failed to set gpio as output\n");
+ return;
+ }
+
+ setup_timer(&bcm47xx_gpiowdt.timer, bcm47xx_gpiowdt_timer_tick, 0L);
+ bcm47xx_gpiowdt_timer_tick(0);
+}
+
+static int get_router(void)
+{
+ char buf[20];
+ u32 boardnum = 0;
+ u16 boardtype = 0;
+
+ if (nvram_getenv("boardnum", buf, sizeof(buf)) >= 0)
+ boardnum = simple_strtoul(buf, NULL, 0);
+ if (nvram_getenv("boardtype", buf, sizeof(buf)) >= 0)
+ boardtype = simple_strtoul(buf, NULL, 0);
+
+ if (boardnum == 0x5347 && boardtype == 0x048e) {
+ /* Huawei E970 */
+ return ROUTER_HUAWEI_E970;
+ }
+
+ return 0;
+}
+
 void __init plat_time_init(void)
 {
     unsigned long hz = 0;
@@ -72,4 +136,12 @@
 
     /* Set MIPS counter frequency for fixed_rate_gettimeoffset() */
     mips_hpt_frequency = hz;
+
+    /* device-specific initializations */
+    switch (get_router()) {
+    case ROUTER_HUAWEI_E970:
+        printk(KERN_INFO "bcm47xx: detected Huawei E970, starting gpio watchdog pet timer\n");
+        bcm47xx_gpiowdt_setup(E970_GPIO_WDT_INTERVAL, E970_GPIO_WDT_PIN);
+    }
+
 }

/target/linux/brcm47xx/832-huawei-e970.patch

--- a/drivers/mtd/bcm47xxpart.c
+++ b/drivers/mtd/bcm47xxpart.c
@@ -84,6 +84,7 @@
 #define ROUTER_NETGEAR_WNR3500L        4
 #define ROUTER_SIMPLETECH_SIMPLESHARE    5
 #define ROUTER_NETGEAR_WNDR3400        6
+#define ROUTER_HUAWEI_E970 7
 
 static int
 find_cfe_size(struct mtd_info *mtd)
@@ -405,6 +406,11 @@
         return ROUTER_SIMPLETECH_SIMPLESHARE;
     }
 
+    if (boardnum == 0x5347 && boardtype == 0x048e) {
+        /* Huawei E970 */
+        return ROUTER_HUAWEI_E970;
+    }
+
     return 0;
 }
 
@@ -446,6 +452,7 @@
         case ROUTER_NETGEAR_WNDR3300:
         case ROUTER_NETGEAR_WNR3500L:
         case ROUTER_NETGEAR_WNDR3400:
+        case ROUTER_HUAWEI_E970:
             /* Netgear: checksum is @ 0x003AFFF8 for 4M flash or checksum
              * is @ 0x007AFFF8 for 8M flash
              */

Niestety po wywołaniu make menuconfig nie mam do wyboru huawei e970.
Co jeszcze trzeba sprawdzić ?

44

Odp: Huawei B970b alt oprogramowanie

Przegapiłeś gdzieś zmianny w target/linux/brcm47xx/image/Makefile

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

45

Odp: Huawei B970b alt oprogramowanie

Wydaje mi się że w tych zmianach raczej są zmiany w target/linux/brcm47xx/image/Makefile

diff --git a/target/linux/brcm47xx/image/Makefile b/target/linux/brcm47xx/image/Makefile
index 33290ff..a51aef9 100644
--- a/target/linux/brcm47xx/image/Makefile
+++ b/target/linux/brcm47xx/image/Makefile
@@ -13,6 +13,7 @@ endef
 
 define Image/Prepare
     cat $(KDIR)/vmlinux | $(STAGING_DIR_HOST)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux.lzma
+    gzip -nc9 $(KDIR)/vmlinux > $(KDIR)/vmlinux.gz
     rm -f $(KDIR)/loader.gz
     $(MAKE) -C lzma-loader \
         BUILD_DIR="$(KDIR)" \
@@ -51,6 +52,13 @@ define Image/Build/Edi
     $(STAGING_DIR_HOST)/bin/trx2edips $(BIN_DIR)/$(IMG_PREFIX)-$(1).trx $(BIN_DIR)/openwrt-$(2)-$(3).bin
 endef
 
+define Image/Build/Huawei
+    dd if=/dev/zero of=$(BIN_DIR)/openwrt-$(2)-$(3)-gz.bin bs=92 count=1
+    echo -ne 'HDR0\x08\x00\x00\x00' >> $(BIN_DIR)/openwrt-$(2)-$(3)-gz.bin
+    cat $(BIN_DIR)/$(IMG_PREFIX)-$(1)-gz.trx >> $(BIN_DIR)/openwrt-$(2)-$(3)-gz.bin
+endef
+
+
 define trxalign/jffs2-128k
 -a 0x20000 -f $(KDIR)/root.$(1)
 endef
@@ -109,9 +117,15 @@ define Image/Build
     $(STAGING_DIR_HOST)/bin/trx -o $(BIN_DIR)/$(IMG_PREFIX)-$(1).trx \
         -f $(KDIR)/loader.gz -f $(KDIR)/vmlinux.lzma \
         $(call trxalign/$(1),$(1))
+        
+    $(STAGING_DIR_HOST)/bin/trx -o $(BIN_DIR)/$(IMG_PREFIX)-$(1)-gz.trx \
+        -f $(KDIR)/vmlinux.gz \
+        $(call trxalign/$(1),$(1))
+
     $(call Image/Build/$(1),$(1))
     $(call Image/Build/Motorola,$(1),wr850g,1,$(1))
     $(call Image/Build/USR,$(1),usr5461,$(1))
+    $(call Image/Build/Huawei,$(1),e970,$(1))
 #    $(call Image/Build/Chk,$(1),wgr614_v8,U12H072T00_NETGEAR,2,$(patsubst jffs2-%,jffs2,$(1)))
 #    $(call Image/Build/Chk,$(1),wgr614_v9,U12H094T00_NETGEAR,2,$(patsubst jffs2-%,jffs2,$(1)))
 #    $(call Image/Build/Chk,$(1),wndr3300,U12H093T00_NETGEAR,2,$(patsubst jffs2-%,jffs2,$(1)))

46

Odp: Huawei B970b alt oprogramowanie

Ok, wiec usuń katalog tmp ze źródeł, zrób make menuconfig to  sobie zrebuilduje cache.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

47

Odp: Huawei B970b alt oprogramowanie

Niestety nie mam widocznego tego huawei'a.
W menu mam wybrane
Target System->Broadcom BCM947xx/953xx
W Target Profile mam tylko do wyboru m.in Edimax PS1208 i później nie mam Huawei'a a powinien tutaj być.

48

Odp: Huawei B970b alt oprogramowanie

To przeszukaj po źródłach gdzie występuje PS1208, w tych miejscach powinieneś też mieć Huawei.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

49

Odp: Huawei B970b alt oprogramowanie

Jest tylko tutaj
root@ubuntu:/home/user/openwrt-attitude-adjustment# grep -rl PS1208 .
./package/broadcom-diag/src/diag.c.save
./package/broadcom-diag/src/diag.c
./build_dir/linux-brcm47xx/broadcom-diag/diag.c.save
./build_dir/linux-brcm47xx/broadcom-diag/diag.c

50

Odp: Huawei B970b alt oprogramowanie

grep -i, z małej litery też poszukaj.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.