Skip to content
Snippets Groups Projects
  1. Mar 13, 2022
  2. Mar 12, 2022
    • Rafał Miłecki's avatar
      base-files: call "sync" after initial setup · 9851d4b6
      Rafał Miłecki authored
      
      OpenWrt uses a lot of (b)ash scripts for initial setup. This isn't the
      best solution as they almost never consider syncing files / data. Still
      this is what we have and we need to try living with it.
      
      Without proper syncing OpenWrt can easily get into an inconsistent state
      on power cut. It's because:
      1. Actual (flash) inode and data writes are not synchronized
      2. Data writeback can take up to 30 seconds (dirty_expire_centisecs)
      3. ubifs adds extra 5 seconds (dirty_writeback_centisecs) "delay"
      
      Some possible cases (examples) for new files:
      1. Power cut during 5 seconds after write() can result in all data loss
      2. Power cut happening between 5 and 35 seconds after write() can result
         in empty file (inode flushed after 5 seconds, data flush queued)
      
      Above affects e.g. uci-defaults. After executing some migration script
      it may get deleted (whited out) without generated data getting actually
      written. Power cut will result in missing data and deleted file.
      
      There are three ways of dealing with that:
      1. Rewriting all user-space init to proper C with syncs
      2. Trying bash hacks (like creating tmp files & moving them)
      3. Adding sync and hoping for no power cut during critical section
      
      This change introduces the last solution that is the simplest. It
      reduces time during which things may go wrong from ~35 seconds to
      probably less than a second. Of course it applies only to IO operations
      performed before /etc/init.d/boot . It's probably the stage when the
      most new files get created.
      
      All later changes are usually done using smarter C apps (e.g. busybox or
      uci) that creates tmp files and uses rename() that is expected to be
      atomic.
      
      Signed-off-by: default avatarRafał Miłecki <rafal@milecki.pl>
      Acked-by: default avatarHauke Mehrtens <hauke@hauke-m.de>
      Acked-by: default avatarSergey Ryazanov <ryazanov.s.a@gmail.com>
      9851d4b6
    • Daniel Golle's avatar
      uqmi: update to git HEAD · 2a801ee5
      Daniel Golle authored
      
       44dd095 uqmi: corrected too short received SMS
      
      Signed-off-by: default avatarDaniel Golle <daniel@makrotopia.org>
      Unverified
      2a801ee5
    • Lech Perczak's avatar
      uqmi: set CID during 'query-data-status' operation · c8a88118
      Lech Perczak authored
      
      Modems used in ZTE mobile broadband routers require to query the data
      session status using the same CID as one used to establish the session,
      otherwise they will report the session as "disconnected" despite
      reporting correct PDH in previous step. Without this change, IPv6
      connection on these modems doesn't establish properly. In IPv4 this bug
      is present as well, but for some reason querying of IPv4 status works
      using temporary CID, this however seems noncompliant with QMI
      specifications, so fix it as well.
      
      Signed-off-by: default avatarLech Perczak <lech.perczak@gmail.com>
      c8a88118
  3. Mar 11, 2022
  4. Mar 10, 2022
  5. Mar 09, 2022
    • Paul Spooren's avatar
      CI: move logs/ to GITHUB_WORKSPACE · a5eeac80
      Paul Spooren authored
      
      Artifacts can only be uploaded from inside the GITHUB_WORKSPACE. While
      the Linux CI jobs run inside that per default, a special case-sensitive
      mount outside the GITHUB_WORKSPACE is used for macOS builds.
      
      To make log artifacts work for both macOS and Linux, move logs/ folder
      to GITHUB_WORKSPACE on failures.
      
      Signed-off-by: default avatarPaul Spooren <mail@aparcar.org>
      a5eeac80
    • Rui Salvaterra's avatar
      toolchain: binutils: add support for version 2.38 · 6b822189
      Rui Salvaterra authored
      While at it, also fix the download.xs4all.nl and add ftp.gnu.org to the GNU
      mirrors, as it seems to be updated faster.
      
      Deleted (upstreamed):
      600-Close_the_file_descriptor.patch [1]
      
      [1] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=5a98fb7513b559e20dfebdbaa2a471afda3b4742
      
      
      
      Signed-off-by: default avatarRui Salvaterra <rsalvaterra@gmail.com>
      6b822189
    • Dmitry Chigiryov's avatar
      ramips: allow USB power control on TP-Link MR3020v3 · 9d06f1a6
      Dmitry Chigiryov authored
      
      By switching EPHY_LED4_N_JTRST_N from EPHY_LED4_N to GPIO#39
      we can control USB port power an all current revisions of MR3020v3.
      It was not a thing on some first revisions, pin was unused.
      But for now on all current MR3020v3 boards EPHY_LED4_N_JTRST_N pin
      is connected to USB power key.
      Also it was not used as EPHY indicator on any revision of the board.
      
      Signed-off-by: default avatarDmitry Chigiryov <dmitry.chigiryov@ya.ru>
      [changed author address (used SoB one)]
      Signed-off-by: default avatarSungbo Eo <mans0n@gorani.run>
      9d06f1a6
    • Sungbo Eo's avatar
      ramips: fix DEVICE_VENDOR for unbranded devices · 94d4269e
      Sungbo Eo authored
      
      In commit ee66fe4e ("ramips: convert DEVICE_TITLE to new variables"),
      DEVICE_VENDOR of some unbranded devices were set incorrectly:
      * WR512-3GN is not a dev board from Ralink.
      * "XDX-RN502J" is the whole model name and should be not split.
      
      This patch sets their DEVICE_VENDOR to "Unbranded", and changes their DTS
      model properties accordingly.
      
      Ref: d0bf15f2 ("ramips: add support for A5-V11 board (resubmit)")
      Ref: 9085b05d ("ramips: rt305x: support for wr512-3gn-like routers")
      Ref: 0e486d2f ("ramips: add support for unbranded XDX-RN502J board")
      Signed-off-by: default avatarSungbo Eo <mans0n@gorani.run>
      94d4269e
    • Kim Namu's avatar
      ramips: mt7621: add support for Zbtlink ZBT-WG1608 · 2876f753
      Kim Namu authored
      
      Zbtlink ZBT-WG1608 is a Wi-Fi router intendent to use with WWAN (4G/5G)
      modems.
      
      Specifications:
      * SoC: MediaTek MT7621A
      * RAM: 256/512 MiB
      * Flash: 16/32 MiB (SPI NOR)
      * Wi-Fi:
        * MediaTek MT7603E : 2.4Ghz
        * MediaTek MT7613BE : 5Ghz
      * Ethernet: 10/100/1000 Mbps Ethernet x5 ports (4xLAN + WAN)
      * M.2: 1x slot with USB&SIM
        * EM7455/EM12-G/EM160R/RM500Q-AE
      * USB: 1x 3.0 Type-A port
      * External storage: 1x microSD (SDXC) slot
      * UART: console (115200 baud)
      * LED:
        * 1 power indicator
        * 1 WLAN 2.4G controlled (wlan 2G)
        * 3 SoC controlled (wlan 5G, wwan, internet)
        * 5 per Eth phy (4xLAN + WAN)
      
      MAC Addresses:
      * LAN    : f8:5e:3c:xx:xx:e0 (Factory, 0xe000 (hex))
      * WAN    : f8:5e:3c:xx:xx:e1 (Factory, 0xe006 (hex))
      * 2.4 GHz: f8:5e:3c:xx:xx:de (Factory, 0x0004 (hex))
      * 5 GHz  : f8:5e:3c:xx:xx:df (Factory, 0x8004 (hex))
      
      Installation:
      * Vendor's firmware is OpenWrt (LEDE) based, so the sysupgrade image can
        be directly used to install OpenWrt. Firmware must be upgraded using the
        'force' and 'do not save configuration' command line options (or
        correspondig web interface checkboxes) since the vendor firmware is from
        the pre-DSA era.
      
      Recovery Mode:
       * Press reset button, power up the device, wait for about 10sec.
       * Upload sysupgrade image through the firmware recovery mode web page at
        192.168.1.1.
      
      Signed-off-by: default avatarKim Namu <namu@theseed.io>
      2876f753
    • Ray Wang's avatar
      ramips: add support for Asus RT-AC1200 · 3c4810fe
      Ray Wang authored
      Asus RT-AC1200 is a 2.4/5GHz dual band AC router,
      based on MediaTek MT7628AN.
      
      Specification:
      * SoC: MT7628AN
      * RAM: DDR2 64 MiB
      * Flash: 16 MiB NOR (W25Q128BV)
      * Wi-Fi:
        * 2.4GHz: SoC Built-in
        * 5GHz: MT7612EN
      * Ethernet: 5x 100Mbps
        * Switch: SoC built-in
      * USB: 1x 2.0
      
      Flash Layout:
       0x0000000-0x0030000 : "bootloader"
       0x0030000-0x0040000 : "nvram"
       0x0040000-0x0050000 : "factory"
       0x0050000-0x1000000 : "firmware"
      
      MAC address:
       LAN: factory 0x28
       WAN: factory 0x22
       2.4G: factory 0x4
       5G: factory 0x8004
      
      Installation via **recovery** mode:
      1. Download the Asus recovery firmware (windows) tool from
         http://dlcdnet.asus.com/pub/ASUS/LiveUpdate/Release/Wireless/Rescue.zip
      
      
      2. Set your ethernet IP manually 192.168.1.5 / 255.255.255.0 with NO
         gateway.
      3. Plug in your ethernet to LAN port 1 on the router.
      4. Load up the recovery software with the firmware file, but don't press
         "Upload" yet.
      5. Plug in the router to power WHILE HOLDING the reset button in. While
         CONTINUING to hold the button, select "Upload" Continue to hold the
         reset button in until it finishes and verifies!
      6. If that doesn't work try pressing "Upload" first just before you do
         step 5. At some point while holding reset the rescue tool will finally
         detect and upload the firmware. That's when you can let go of the
         reset button.
      7. The router will reboot and not much will happen. Wait a minute or 2.
      8. Power off and on the router again. Voila. Set everything your Ethernet
         IP back to DHCP (automatically) and you're good to go.
      
      Revert to stock firmware:
      1. Install stock image via recovery mode.
      
      Tested-by: default avatarIvan Pavlov <AuthorReflex@gmail.com>
      Signed-off-by: default avatarRay Wang <raywang777@foxmail.com>
      3c4810fe
    • Sungbo Eo's avatar
      tools: zip: make encrypted archives reproducible · 4f3a565f
      Sungbo Eo authored
      
      Zip always try to generate new encryption header depending on execution
      time and process id, which is far from being reproducible. This commit
      changes the zip srand() seed to a predictable value to generate
      reproducible random bytes for the encryption header. This will compromise
      the goal of secure archive encryption, but it would not be a big problem
      for our purpose.
      
      Signed-off-by: default avatarSungbo Eo <mans0n@gorani.run>
      4f3a565f
    • Sungbo Eo's avatar
      tools: zip: fetch SOURCE_DATE_EPOCH directly · 39d06472
      Sungbo Eo authored
      Remove "--mtime" option introduced in commit 18c9faa0 ("tools: zip:
      add option for reproducible archives") and instead fetch SOURCE_DATE_EPOCH
      environment variable directly in the code.
      
      Ref: https://sourceforge.net/p/infozip/patches/25/
      
      
      Signed-off-by: default avatarSungbo Eo <mans0n@gorani.run>
      39d06472
    • Sungbo Eo's avatar
      build: image: use UTC for zip timestamp · e42764cc
      Sungbo Eo authored
      
      Zip uses DOS timestamp for mtime which is stored in local time and hence
      depends on the timezone of the build system. Force zip to use UTC timezone
      to make image builds more reproducible.
      
      Signed-off-by: default avatarSungbo Eo <mans0n@gorani.run>
      e42764cc
  6. Mar 08, 2022
  7. Mar 07, 2022
    • INAGAKI Hiroshi's avatar
      uboot-envtools: add support for I-O DATA BSH-G24MB · 98113220
      INAGAKI Hiroshi authored
      
      This patch adds the device-specific configuration to u-boot-envtools for
      I-O DATA BSH-G24MB switch.
      
      Signed-off-by: default avatarINAGAKI Hiroshi <musashino.open@gmail.com>
      98113220
    • INAGAKI Hiroshi's avatar
      realtek: add support for I-O DATA BSH-G24MB · 7b197705
      INAGAKI Hiroshi authored
      
      I-O DATA BSH-G24MB is a 24 port gigabit switch, based on RTL8382M.
      
      Specification:
      
      - SoC		: Realtek RTL8382M
      - RAM		: DDR2 128 MiB (Nanya NT5TU128M8HE-AC)
      - Flash		: SPI-NOR 16 MiB (Macronix MX25L12835FM2I-10G)
      - Ethernet	: 10/100/1000 Mbps x24
        - port 1-8	: RTL8218B
        - port 9-16	: RTL8218B (SoC)
        - port 17-24	: RTL8218B
      - LEDs/Keys	: 2x, 1x
      - UART		: pin header on PCB
        - JP2: 3.3V, TX, RX, GND from rear side
        - 115200n8
      - Power		: 100 VAC, 50/60 Hz
        - Plug	: IEC 60320-C13
      
      Flash instruction using sysupgrade image:
      
      1. Boot BSH-G24MB normally
      2. Connect BSH-G24MB to the DHCP enabled network
      3. Find the device's IP address and open the WebUI and login
         Note: by default, the device obtains IP address from DHCP server of
               the network
      4. Open firmware update page ("ファームウェア アップデート")
      5. Rename the OpenWrt sysupgrade image to "bsh-g24mb_v100.image" and
         select it
      6. Press apply ("適用") button to perform update
      7. Wait ~150 seconds to complete flashing
      
      Note:
      
      - BSH-G24MB has a power-related LED ("電源"), but it's not connected to
        the GPIO of the SoC or RTL8231 and cannot be controlled. Instead of
        it, use system status LED on other than running-state.
      
      - "sys_loop" LED indicates system status and loop-detection status in
        stock firmware.
      
      - BSH-G24MB has 2x os-image partitions named as "RUNTIME"/"RUNTIME2" in
        16 MiB SPI-NOR flash and the size of image per partition is only
        6848 KiB. The secondary image is never used on stock firmware, so also
        use it on OpenWrt to get more space.
      
      Signed-off-by: default avatarINAGAKI Hiroshi <musashino.open@gmail.com>
      7b197705
    • Josef Schlehofer's avatar
      nftables: update to version 1.0.2 · d71928c1
      Josef Schlehofer authored
      Changelog:
      https://lwn.net/ml/netdev/YhO5Pn+6+dgAgSd9@salvia/
      
      Patches:
      
      removed:
      - 001-parser-allow-quoted-string-in-flowtable_expr_member:
      it is now part of upstream release [1]
      
      added:
      - 001-examples-compile-with-make-check.patch:
      backported from [2], it fixes:
      
      nft-json-file.c:3:10: fatal error: nftables/libnftables.h: No such file or directory
          3 | #include <nftables/libnftables.h>
            |          ^~~~~~~~~~~~~~~~~~~~~~~~
      compilation terminated.
      
      [1] https://git.netfilter.org/nftables/commit/?h=v1.0.2&id=07af4429241c9832a613cb8620331ac54257d9df
      [2] https://git.netfilter.org/nftables/commit/?id=18a08fb7f0443f8bde83393bd6f69e23a04246b3
      
      
      
      Signed-off-by: default avatarJosef Schlehofer <pepe.schlehofer@gmail.com>
      d71928c1
    • Hauke Mehrtens's avatar
      linux-firmware: Update to version 20220209 · baea8255
      Hauke Mehrtens authored
      
      This switches the iwlwifi-firmware-ax200 file to API version 66, this is
      the most recent version supported by our driver.
      
      The following files used in OpenWrt changed:
       amdgpu-firmware/lib/firmware/amdgpu/yellow_carp_dmcub.bin
       ar3k-firmware/lib/firmware/qca/nvm_usb_00130201.bin
       ar3k-firmware/lib/firmware/qca/nvm_usb_00130201_010a.bin
       ar3k-firmware/lib/firmware/qca/nvm_usb_00130201_010b.bin
       ar3k-firmware/lib/firmware/qca/nvm_usb_00130201_0303.bin
       ar3k-firmware/lib/firmware/qca/nvm_usb_00130201_gf.bin
       ar3k-firmware/lib/firmware/qca/nvm_usb_00130201_gf_010a.bin
       ar3k-firmware/lib/firmware/qca/nvm_usb_00130201_gf_010b.bin
       ar3k-firmware/lib/firmware/qca/nvm_usb_00130201_gf_0303.bin
       ar3k-firmware/lib/firmware/qca/rampatch_usb_00130200.bin
       ar3k-firmware/lib/firmware/qca/rampatch_usb_00130201.bin
       iwlwifi-firmware-ax200/lib/firmware/iwlwifi-cc-a0-66.ucode
       iwlwifi-firmware-ax210/lib/firmware/iwlwifi-ty-a0-gf-a0-66.ucode
       iwlwifi-firmware-ax210/lib/firmware/iwlwifi-ty-a0-gf-a0.pnvm
       iwlwifi-firmware-iwl9000/lib/firmware/iwlwifi-9000-pu-b0-jf-b0-46.ucode
       iwlwifi-firmware-iwl9260/lib/firmware/iwlwifi-9260-th-b0-jf-b0-46.ucode
       rtl8822ce-firmware/lib/firmware/rtw88/rtw8822c_fw.bin
      
      Signed-off-by: default avatarHauke Mehrtens <hauke@hauke-m.de>
      baea8255
    • Rafał Miłecki's avatar
      bcm4908: fix init on CFE devices · c45b5abf
      Rafał Miłecki authored
      
      exit in preinit script was stopping whole process
      
      Fixes: 93259e8c ("bcm4908: support "rootfs_data" on U-Boot devices")
      Signed-off-by: default avatarRafał Miłecki <rafal@milecki.pl>
      c45b5abf
    • Felix Fietkau's avatar
    • Felix Fietkau's avatar
      toolchain/binutils: remove old versions · b3b0a25e
      Felix Fietkau authored
      
      Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
      b3b0a25e
Loading