447 Commits

Author SHA1 Message Date
lean
99222f49fd Version Update to R20.9.15 2020-09-15 14:01:14 +08:00
lean
697f6e9972 Revert "Update v2ray version to 4.28.1 (#5447)"
This reverts commit cfc9629d4f.
2020-09-15 11:54:54 +08:00
Android Dev Notes
c11f800d34 Fix grammatical errors (#5463) 2020-09-15 09:35:55 +08:00
AmadeusGhost
bcce04eb66 luci-app-kodexplorer: add missing dependencies unzip (#5460) 2020-09-15 09:34:57 +08:00
AmadeusGhost
92481cb484 verysync: adjust download address (#5455) 2020-09-14 19:26:43 +08:00
cabbyjing
4abf84eae9 Update Makefile (#5443) 2020-09-13 09:08:54 +08:00
accors
cfc9629d4f Update v2ray version to 4.28.1 (#5447) 2020-09-13 09:08:32 +08:00
536wfr
c1305ad3bc add curl as dependence (#5448) 2020-09-13 09:08:03 +08:00
DoveKi
2b57c926b4 Update Xiaomi R4 get lan_mac (#5437) 2020-09-11 13:52:09 +08:00
Saxon
a3d51d83b0 Rclone: bump version from 1.52.2 to 1.53.0 (#5422)
v1.53.0 - 2020-09-02
See commits

New Features
The VFS layer was heavily reworked for this release - see below for more details
Interactive mode -i/--interactive for destructive operations (fishbullet)
Add --bwlimit-file flag to limit speeds of individual file transfers (Nick Craig-Wood)
Transfers are sorted by start time in the stats and progress output (Max Sum)
Make sure backends expand ~ and environment vars in file names they use (Nick Craig-Wood)
Add --refresh-times flag to set modtimes on hashless backends (Nick Craig-Wood)
build
Remove vendor directory in favour of Go modules (Nick Craig-Wood)
Build with go1.15.x by default (Nick Craig-Wood)
Drop macOS 386 build as it is no longer supported by go1.15 (Nick Craig-Wood)
Add ARMv7 to the supported builds (Nick Craig-Wood)
Enable rclone cmount on macOS (Nick Craig-Wood)
Make rclone build with gccgo (Nick Craig-Wood)
Make rclone build with wasm (Nick Craig-Wood)
Change beta numbering to be semver compatible (Nick Craig-Wood)
Add file properties and icon to Windows executable (albertony)
Add experimental interface for integrating rclone into browsers (Nick Craig-Wood)
lib: Add file name compression (Klaus Post)
rc
Allow installation and use of plugins and test plugins with rclone-webui (Chaitanya Bankanhal)
Add reverse proxy pluginsHandler for serving plugins (Chaitanya Bankanhal)
Add mount/listmounts option for listing current mounts (Chaitanya Bankanhal)
Add operations/uploadfile to upload a file through rc using encoding multipart/form-data (Chaitanya Bankanhal)
Add core/copmmand to execute rclone terminal commands. (Chaitanya Bankanhal)
rclone check
Add reporting of filenames for same/missing/changed (Nick Craig-Wood)
Make check command obey --dry-run/-i/--interactive (Nick Craig-Wood)
Make check do --checkers files concurrently (Nick Craig-Wood)
Retry downloads if they fail when using the --download flag (Nick Craig-Wood)
Make it show stats by default (Nick Craig-Wood)
rclone obscure: Allow obscure command to accept password on STDIN (David Ibarra)
rclone config
Set RCLONE_CONFIG_DIR for use in config files and subprocesses (Nick Craig-Wood)
Reject remote names starting with a dash. (jtagcat)
rclone cryptcheck: Add reporting of filenames for same/missing/changed (Nick Craig-Wood)
rclone dedupe: Make it obey the --size-only flag for duplicate detection (Nick Craig-Wood)
rclone link: Add --expire and --unlink flags (Roman Kredentser)
rclone mkdir: Warn when using mkdir on remotes which can't have empty directories (Nick Craig-Wood)
rclone rc: Allow JSON parameters to simplify command line usage (Nick Craig-Wood)
rclone serve ftp
Don't compile on < go1.13 after dependency update (Nick Craig-Wood)
Add error message if auth proxy fails (Nick Craig-Wood)
Use refactored goftp.io/server library for binary shrink (Nick Craig-Wood)
rclone serve restic: Expose interfaces so that rclone can be used as a library from within restic (Jack)
rclone sync: Add --track-renames-strategy leaf (Nick Craig-Wood)
rclone touch: Add ability to set nanosecond resolution times (Nick Craig-Wood)
rclone tree: Remove -i shorthand for --noindent as it conflicts with -i/--interactive (Nick Craig-Wood)
Bug Fixes
accounting
Fix documentation for speed/speedAvg (Nick Craig-Wood)
Fix elapsed time not show actual time since beginning (Chaitanya Bankanhal)
Fix deadlock in stats printing (Nick Craig-Wood)
build
Fix file handle leak in GitHub release tool (Garrett Squire)
rclone check: Fix successful retries with --download counting errors (Nick Craig-Wood)
rclone dedupe: Fix logging to be easier to understand (Nick Craig-Wood)
Mount
Warn macOS users that mount implementation is changing (Nick Craig-Wood)
to test the new implementation use rclone cmount instead of rclone mount
this is because the library rclone uses has dropped macOS support
rc interface
Add call for unmount all (Chaitanya Bankanhal)
Make mount/mount remote control take vfsOpt option (Nick Craig-Wood)
Add mountOpt to mount/mount (Nick Craig-Wood)
Add VFS and Mount options to mount/listmounts (Nick Craig-Wood)
Catch panics in cgofuse initialization and turn into error messages (Nick Craig-Wood)
Always supply stat information in Readdir (Nick Craig-Wood)
Add support for reading unknown length files using direct IO (Windows) (Nick Craig-Wood)
Fix On Windows don't add -o uid/gid=-1 if user supplies -o uid/gid. (Nick Craig-Wood)
Fix macOS losing directory contents in cmount (Nick Craig-Wood)
Fix volume name broken in recent refactor (Nick Craig-Wood)
VFS
Implement partial reads for --vfs-cache-mode full (Nick Craig-Wood)
Add --vfs-writeback option to delay writes back to cloud storage (Nick Craig-Wood)
Add --vfs-read-ahead parameter for use with --vfs-cache-mode full (Nick Craig-Wood)
Restart pending uploads on restart of the cache (Nick Craig-Wood)
Support synchronous cache space recovery upon ENOSPC (Leo Luan)
Allow ReadAt and WriteAt to run concurrently with themselves (Nick Craig-Wood)
Change modtime of file before upload to current (Rob Calistri)
Recommend --vfs-cache-modes writes on backends which can't stream (Nick Craig-Wood)
Add an optional fs parameter to vfs rc methods (Nick Craig-Wood)
Fix errors when using > 260 char files in the cache in Windows (Nick Craig-Wood)
Fix renaming of items while they are being uploaded (Nick Craig-Wood)
Fix very high load caused by slow directory listings (Nick Craig-Wood)
Fix renamed files not being uploaded with --vfs-cache-mode minimal (Nick Craig-Wood)
Fix directory locking caused by slow directory listings (Nick Craig-Wood)
Fix saving from chrome without --vfs-cache-mode writes (Nick Craig-Wood)
Local
Add --local-no-updated to provide a consistent view of changing objects (Nick Craig-Wood)
Add --local-no-set-modtime option to prevent modtime changes (tyhuber1)
Fix race conditions updating and reading Object metadata (Nick Craig-Wood)
Cache
Make any created backends be cached to fix rc problems (Nick Craig-Wood)
Fix dedupe on caches wrapping drives (Nick Craig-Wood)
Crypt
Add --crypt-server-side-across-configs flag (Nick Craig-Wood)
Make any created backends be cached to fix rc problems (Nick Craig-Wood)
Alias
Make any created backends be cached to fix rc problems (Nick Craig-Wood)
Azure Blob
Don't compile on < go1.13 after dependency update (Nick Craig-Wood)
B2
Implement server side copy for files > 5GB (Nick Craig-Wood)
Cancel in progress multipart uploads and copies on rclone exit (Nick Craig-Wood)
Note that b2's encoding now allows \ but rclone's hasn't changed (Nick Craig-Wood)
Fix transfers when using download_url (Nick Craig-Wood)
Box
Implement rclone cleanup (buengese)
Cancel in progress multipart uploads and copies on rclone exit (Nick Craig-Wood)
Allow authentication with access token (David)
Chunker
Make any created backends be cached to fix rc problems (Nick Craig-Wood)
Drive
Add rclone backend drives to list shared drives (teamdrives) (Nick Craig-Wood)
Implement rclone backend untrash (Nick Craig-Wood)
Work around drive bug which didn't set modtime of copied docs (Nick Craig-Wood)
Added --drive-starred-only to only show starred files (Jay McEntire)
Deprecate --drive-alternate-export as it is no longer needed (themylogin)
Fix duplication of Google docs on server side copy (Nick Craig-Wood)
Fix "panic: send on closed channel" when recycling dir entries (Nick Craig-Wood)
Dropbox
Add copyright detector info in limitations section in the docs (Alex Guerrero)
Fix rclone link by removing expires parameter (Nick Craig-Wood)
Fichier
Detect Flood detected: IP Locked error and sleep for 30s (Nick Craig-Wood)
FTP
Add explicit TLS support (Heiko Bornholdt)
Add support for --dump bodies and --dump auth for debugging (Nick Craig-Wood)
Fix interoperation with pure-ftpd (Nick Craig-Wood)
Google Cloud Storage
Add support for anonymous access (Kai Lüke)
Jottacloud
Bring back legacy authentification for use with whitelabel versions (buengese)
Switch to new api root - also implement a very ugly workaround for the DirMove failures (buengese)
Onedrive
Rework cancel of multipart uploads on rclone exit (Nick Craig-Wood)
Implement rclone cleanup (Nick Craig-Wood)
Add --onedrive-no-versions flag to remove old versions (Nick Craig-Wood)
Pcloud
Implement rclone link for public link creation (buengese)
Qingstor
Cancel in progress multipart uploads on rclone exit (Nick Craig-Wood)
S3
Preserve metadata when doing multipart copy (Nick Craig-Wood)
Cancel in progress multipart uploads and copies on rclone exit (Nick Craig-Wood)
Add rclone link for public link sharing (Roman Kredentser)
Add rclone backend restore command to restore objects from GLACIER (Nick Craig-Wood)
Add rclone cleanup and rclone backend cleanup to clean unfinished multipart uploads (Nick Craig-Wood)
Add rclone backend list-multipart-uploads to list unfinished multipart uploads (Nick Craig-Wood)
Add --s3-max-upload-parts support (Kamil Trzciński)
Add --s3-no-check-bucket for minimising rclone transactions and perms (Nick Craig-Wood)
Add --s3-profile and --s3-shared-credentials-file options (Nick Craig-Wood)
Use regional s3 us-east-1 endpoint (David)
Add Scaleway provider (Vincent Feltz)
Update IBM COS endpoints (Egor Margineanu)
Reduce the default --s3-copy-cutoff to < 5GB for Backblaze S3 compatibility (Nick Craig-Wood)
Fix detection of bucket existing (Nick Craig-Wood)
SFTP
Use the absolute path instead of the relative path for listing for improved compatibility (Nick Craig-Wood)
Add --sftp-subsystem and --sftp-server-command options (aus)
Swift
Fix dangling large objects breaking the listing (Nick Craig-Wood)
Fix purge not deleting directory markers (Nick Craig-Wood)
Fix update multipart object removing all of its own parts (Nick Craig-Wood)
Fix missing hash from object returned from upload (Nick Craig-Wood)
Tardigrade
Upgrade to uplink v1.2.0 (Kaloyan Raev)
Union
Fix writing with the all policy (Nick Craig-Wood)
WebDAV
Fix directory creation with 4shared (Nick Craig-Wood)
v1.52.3 - 2020-08-07
See commits

Bug Fixes
docs
Disable smart typography (eg en-dash) in MANUAL.* and man page (Nick Craig-Wood)
Update install.md to reflect minimum Go version (Evan Harris)
Update install from source instructions (Nick Craig-Wood)
make_manual: Support SOURCE_DATE_EPOCH (Morten Linderud)
log: Fix --use-json-log going to stderr not --log-file on Windows (Nick Craig-Wood)
serve dlna: Fix file list on Samsung Series 6+ TVs (Matteo Pietro Dazzi)
sync: Fix deadlock with --track-renames-strategy modtime (Nick Craig-Wood)
Cache
Fix moveto/copyto remote:file remote:file2 (Nick Craig-Wood)
Drive
Stop using root_folder_id as a cache (Nick Craig-Wood)
Make dangling shortcuts appear in listings (Nick Craig-Wood)
Drop "Disabling ListR" messages down to debug (Nick Craig-Wood)
Workaround and policy for Google Drive API (Dmitry Ustalov)
FTP
Add note to docs about home vs root directory selection (Nick Craig-Wood)
Onedrive
Fix reverting to Copy when Move would have worked (Nick Craig-Wood)
Avoid comma rendered in URL in onedrive.md (Kevin)
Pcloud
Fix oauth on European region "eapi.pcloud.com" (Nick Craig-Wood)
S3
Fix bucket Region auto detection when Region unset in config (Nick Craig-Wood)
2020-09-09 11:32:39 +08:00
Saxon
38a401c9de Update Makefile (#5425) 2020-09-09 11:32:26 +08:00
AmadeusGhost
611171589b verysync: add more download address to avoid official changes (#5420) 2020-09-09 11:32:07 +08:00
Zeng Weiyu
7ee73b061a Change portainer to portainer-ce (#5431) 2020-09-09 11:31:08 +08:00
536wfr
951f37b25f UnblockNeteaseMusicGo 0.2.5 (#5429) 2020-09-09 11:30:35 +08:00
Kslr
7ce9641037 Update to v2ray 4.27.5 version (#5403) 2020-09-04 09:39:46 +08:00
ricksuzade-maker
4a96f98ecd v2ray-plugin: bump to 1.4.2 (#5404) 2020-09-04 09:29:12 +08:00
tl768
622c204290 Update Makefile (#5409) 2020-09-04 09:28:24 +08:00
Alecthw
102a615d74 update n2n version to 2.8.0 (#5407) 2020-09-04 09:14:41 +08:00
chongshengB
88d85bb574 kernel: bump 5.4 to 5.4.61 (#5399)
Manually merged:
  backport-5.4
     011-kbuild-export-SUBARCH.patch
  layerscape
    701-net-0262-net-dsa-ocelot-add-tagger-for-Ocelot-Felix-switches.patch

All other modifications made by update_kernel.sh

Build-tested: x86/64, lantiq/xrx200, ramips/mt7621
Run-tested: ipq806x (R7800), lantiq/xrx200, x86/64, ramips (RT-AC57U)

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
[minor commit message adjustments]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>

Co-authored-by: John Audia <graysky@archlinux.us>
2020-09-01 17:21:00 +08:00
zhusir
219c4866d6 Update v2ray version to 4.27.4 (#5379) 2020-09-01 11:39:50 +08:00
ricksuzade-maker
a23d832955 Bump v2ray-plugin to 1.4.1 (#5386) 2020-09-01 11:39:33 +08:00
CN_SZTL
a07a47018c mbedtls: update to 2.16.7 (#5377)
Mbed TLS 2.16.7 is a maintenance release of the Mbed TLS 2.16 branch,
and provides bug fixes and minor enhancements. This release includes
fixes for security issues and the most severe one is described in more
detail in a security advisory:
https://tls.mbed.org/tech-updates/security-advisories/mbedtls-security-advisory-2020-07

* Fix a side channel vulnerability in modular exponentiation that could
reveal an RSA private key used in a secure enclave.
* Fix side channel in mbedtls_ecp_check_pub_priv() and
mbedtls_pk_parse_key() / mbedtls_pk_parse_keyfile() (when loading a private
key that didn't include the uncompressed public key), as well as
mbedtls_ecp_mul() / mbedtls_ecp_mul_restartable() when called with a NULL
f_rng argument. An attacker with access to precise enough timing and
memory access information (typically an untrusted operating system
attacking a secure enclave) could fully recover the ECC private key.
* Fix issue in Lucky 13 counter-measure that could make it ineffective when
hardware accelerators were used (using one of the MBEDTLS_SHAxxx_ALT
macros).

Due to Mbed TLS moving from ARMmbed to the Trusted Firmware project, some
changes to the download URLs are required. For the time being, the
ARMmbed/mbedtls Github repository is the canonical source for Mbed TLS.

Signed-off-by: Magnus Kroken <mkroken@gmail.com>
[Use https://codeload.github.com and new tar.gz file]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

Co-authored-by: Magnus Kroken <mkroken@gmail.com>
2020-08-30 21:17:26 +08:00
CN_SZTL
12d0742fd5 kernel: bump to 4.14.195, 5.4.60 (#5376)
* kernel: bump 5.4 to 5.4.60

Deleted upstream patches:
  generic:
    041-genirq-affinity-Make-affinity-setting-if-activated-o.patch
  ipq806x:
    093-5-v5.8-ipq806x-PCI-qcom-Define-some-PARF-params-needed-for-ipq8064-SoC.patch
    093-6-v5.8-ipq806x-PCI-qcom-Add-support-for-tx-term-offset-for-rev-2_1_0.patch

Merged manually:
  ipq806x:
    093-4-v5.8-ipq806x-PCI-qcom-Use-bulk-clk-api-and-assert-on-error.patch
  layerscape:
    804-crypto-0016-MLKU-114-1-crypto-caam-reduce-page-0-regs-access-to-.patch

Build-tested: ath79/generic, ipq806x, layerscape/armv7, layerscape/armv8_64b
Run-tested: ipq806x (R7800)

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>

* kernel: Update kernel 4.14 to version 4.14.195

Compile and runtime tested on lantiq/xrx200 and x86/64.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

Co-authored-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Co-authored-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-08-30 21:16:31 +08:00
CN_SZTL
53dfbe11aa exfat: update to 5.8.7 (#5378)
93e2334 exfat: fix build error on linux-5.4,5.5 kernel
01a7b8c exfat: fix name_hash computation on big endian systems
8f92bc0 exfat: fix wrong size update of stream entry by typo

Removed commented material that was for testing compilation.

Removed patch as the error was fixed upstream. First entry above.

Signed-off-by: Rosen Penev <rosenp@gmail.com>

Co-authored-by: Rosen Penev <rosenp@gmail.com>
2020-08-30 21:15:56 +08:00
kongfl888 K
9c0e3433f4 dns2sock: use github source instead (#5388)
Because of the redirection of SF, sometimes code download errors.
This is very unfriendly to cloud compilation.

Signed-off-by: kongfl888 K <kongfl888@outlook.com>
2020-08-30 21:15:24 +08:00
babutree
ddae30c491 Update to verysync 1.5.5 version (#5368) 2020-08-27 16:14:06 +08:00
AmadeusGhost
20274fd514 ipq806x: sync official source code (#5365) 2020-08-27 15:57:30 +08:00
lean
a1618b97f7 Version bump to R20.8.27 2020-08-27 15:55:37 +08:00
AmadeusGhost
404209f6c4 kernel: bump to 4.14.193, 4.19.138, 5.4.59 (#5350)
kernel: bump to 4.14.193, 4.19.138, 5.4.59 (#5350)
  431fb8c mac80211: add AQL improvements
  6bdd4c9 mac80211: add missing backports for building with 4.14 kernels
  0106820 mac80211: add missing return code checks in AQL improvements
  e7f7101 mac80211: rework encapsulation offload support

[package]
  base-files: add function for generating random MAC
  dnsmasq: abort dhcp_check on interface state
  boot: sync upstream source code
  ath10k-ct-firmware/mt76/sch_cake: update to latest git HEAD

[script]
  download: add China Mirror Station

[target]
  Sync: arc770, ath79, bcm63xx, kirkwood, lantiq, layerscape,
        mediatek, mvebu, octeon, oxnas, pistachio, uml
  Sync most of the target patches.

Run-compiled-on: ipq40xx (4.19 & 5.4), ramips
2020-08-26 11:31:50 +08:00
ricksuzade-maker
7dd173abbc Wireguard-tools: Bump to 1.0.20200820 (#5338) 2020-08-21 16:49:29 +08:00
hyird
d003d3d900 keep truboacc at bottom (#5326) 2020-08-20 16:01:20 +08:00
Her0R0cket
3283cc4324 iproute2: disable SELinux for now (#5328)
follow openwrt:iproute2: disable SELinux for now
2020-08-20 16:01:01 +08:00
kongfl888 K
3e7c32a48d Coremark: use the general way to detect 64bit or not. (#5330)
Signed-off-by: kongfl888 K <kongfl888@outlook.com>
2020-08-20 16:00:27 +08:00
AmadeusGhost
46524d9336 ipq806x: sync upstream source code (#5320) 2020-08-18 01:41:42 +08:00
Her0R0cket
7ba6311016 fix depends for libdevmapper & change host pkg name (#5325)
* fix depends for libdevmapper

fix depends for libdevmapper

* Use python3 in18.04 

Use python3 in18.04
2020-08-18 01:40:34 +08:00
AmadeusGhost
075090c4d5 mac80211: support kernel 4.14 and update to 5.8 (#5303)
* mac80211: refresh patches

* mac80211: build compat on kernel 4.14

* mac80211: Update to version 5.8

The removed patches were applied upstream.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

Co-authored-by: Chen Minqiang <ptpt52@gmail.com>
Co-authored-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-08-11 23:37:22 +08:00
mjyhj
1a8e657689 luci-app-zerotier: fix bugs (#5276)
1.support muilt network id 
2.drop network config when stop 
3.restart service when network changed

code by CN_SZTL 1715173329
https://github.com/project-openwrt/openwrt
2020-08-10 15:26:35 +08:00
mjyhj
b4bc0d39e2 luci-app-diskman: bump to v0.2.10 (#5277) 2020-08-09 15:47:50 +08:00
AmadeusGhost
7e3464582c mac80211-5.8: fix build on kernel 4.14 and sync upstream commit (#5295)
* mac80211-5.8: fix build on kernel 4.14

* mac80211: sync upstream commit
2020-08-09 15:47:25 +08:00
firker
f9e821f979 Update Makefile (#5280) 2020-08-07 23:54:06 +08:00
ricksuzade-maker
d5f6807b2b Bump v2ray-plugin to v1.3.5 (#5283) 2020-08-07 23:53:34 +08:00
AmadeusGhost
b1677a562c mac80211: bump to 5.8-rc2, add ath10k VHT support and very basic support for ipq807x ath11k (#5288)
* mac80211: bump to 5.8-rc2

changelog:
  dfe0bc8 mac80211: allow ACS restriction with fixed channel
  727685c mac80211: rt2x00: define RF5592 in init_eeprom routine
  cfd2f3b mac80211: create channel list for fixed channel operation
  d1100c7 mac80211: Update to version 5.7.5-1
  ed2015c mac80211: Update to version 5.8-rc2-1
  a956c14 mac80211: util: don't warn on missing sband iftype data
  8b3e170 hostapd: fix incorrect service name
  68bf5a9 mac80211: don't kill wireless daemon on teardown
  25e0ae6 mac80211: make cfg80211 testmode support optional (and disabled by default)
  b7727a8 mac80211: fix AQL issues
  3d731fc mac80211: merge performance improvement patches

* mt76: update to 2020-07-22

Signed-off-by: Felix Fietkau <nbd@nbd.name>

* mac80211: allow VHT on 2.4GHz

Allow VHT rate on 2.4GHz in order to use 256-QAM

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>

* ath10k: allow VHT on 2.4GHz

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>

* hostapd: add vendor_vht option

hostapd has vendor_vht option to enable VHT (256-QAM) on 2.4GHz
Add this option to hostapd.sh so users can enable it via uci

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>

* ipq807x: Refresh kernel configuration

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

* ipq807x: Add WCSS bus

This is needed to build ath11k.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

* mac80211: Add ath11k

This adds the Qualcomm 802.11ax wireless chipset support.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

Co-authored-by: Felix Fietkau <nbd@nbd.name>
Co-authored-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
Co-authored-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-08-07 23:53:02 +08:00
ZhenYu
aed7fc6131 CI: multi-asset delivery support (#5243)
*
fix: asset release broken
fix: failed to upgrade helloworld
2020-08-06 15:29:42 +08:00
SuLingGG
376abbc89e Fix baidupcs-web file name to fit i386 device (#5263) 2020-08-06 13:10:43 +08:00
DoveKi
85808a075c ramips: use mt proprietary driver for XiaoMI MI R4 (#5244) 2020-08-05 19:40:13 +08:00
CN_SZTL
413d8692d0 linux: improve exFAT support (#5249)
* staging: remove staging exfat driver

This will be replaced with the driver found in newer kernels.

Signed-off-by: Rosen Penev <rosenp@gmail.com>

* exfat: add out of tree module

>From an email conversation with the person responsible for upstreaming
the exFAT driver, it seems the staging one in kernel 5.4 is not so
good. Excerpts below.

Namjae Jeon:
Hm... exfat in 5.4 kernel  that we did crap shit long time ago is
contributed by someone who we don't know.
This version is unstable and low quality code. We have been improving
it continuously.
and staging version exfat is removed from linux 5.7 kernel.

linux exfat oot  version is a backport of exfat in linux 5.7 kernel to
support lower version kernel, and it is a real.
You can see the patch history fro linux-exfat-oot.
this version support timezone and boot sector verification feature newly.
and better filesystem structure and much clean code quality that
reviewed by high profile kernel developers. and add many bug fixes.
And this version is officially maintained by me and kernel guys.

I would not recommend to use staging exfat version.

Signed-off-by: Rosen Penev <rosenp@gmail.com>

* automount: switch exFAT driver to high performance ver

Co-authored-by: Rosen Penev <rosenp@gmail.com>
2020-08-05 19:39:06 +08:00
ricksuzade-maker
1b96532fcb Bump wireguard to 1.0.20200729 (#5221) 2020-07-30 08:46:16 +08:00
CN_SZTL
093cfcf243 target/rockchip: drop ugly hacks (sync with official) (#5218) 2020-07-29 19:02:51 +08:00
lphgor
50a8e8f348 UnblockNeteaseMusicGo: bump to 0.2.4 (#5214) 2020-07-29 12:18:49 +08:00
acooler15
0a796c092b add check and format 'security' parameter in function scan_app , and function connect_ap add bssid option (#5200)
* check and format security

* apcli add bssid option

* updat PKG_RELEASE to 16
2020-07-28 12:44:57 +08:00
Hugo Yuan
ef882612fd Readme: Update English version (#5197) 2020-07-27 19:05:41 +08:00
John Smith
18fb27faf6 Update README.md (#5174)
编译提示/bin/sh: 1: rsync: not found
增加 rsync 默认依赖
2020-07-26 15:02:31 +08:00
AmadeusGhost
30decd5f30 ramips/mtwifi: disable bind apcli interface to lan by default (#5178)
The apcli interface can be bound to either lan or wan, so cancel the
default settings.
2020-07-26 15:02:08 +08:00
AmadeusGhost
6f156e443d luci-app-mtwifi: add wifi relay support (#5168)
* luci-app-mtwifi: add wifi relay support

Source code: Nossiac/mtk-openwrt-feeds
Based on commit 'wireless: wext: remove ndo_do_ioctl fallback'

* luci-app-mtwifi: fix ap-scan failed

* luci-app-mtwifi: show overview when relay is enabled
2020-07-23 22:39:25 +08:00
Hugo Yuan
0866d17f4f fix dnsmasq resolvfile path (#5159) 2020-07-22 16:43:42 +08:00
ricksuzade-maker
f5b06268b4 Bump v2ray-plugin to 1.3.4 (#5152) 2020-07-22 12:16:43 +08:00
coolsnowwolf
289e393763 Merge branch 'master' of https://github.com/coolsnowwolf/lede 2020-07-20 22:49:03 +08:00
coolsnowwolf
4dbc650998 package: drop adbyby by default 2020-07-20 22:48:40 +08:00
z826540272
e68d170e60 Revert shadowsocksr-libev:reduce file size (#5147)
用来修复编译失败。
2020-07-20 16:47:53 +08:00
coolsnowwolf
14371af55d ipq40xx: fix ethernet vlan double tagging 2020-07-20 13:53:04 +08:00
coolsnowwolf
7fdf770ca0 Merge branch 'master' of https://github.com/coolsnowwolf/lede 2020-07-20 13:46:06 +08:00
coolsnowwolf
3356040880 kernel: bump 5.4 to 5.4.51 2020-07-20 13:45:54 +08:00
AmadeusGhost
1e8536f117 ramips: improve ac2100/dir882 support (#5136) 2020-07-19 19:09:26 +08:00
big fox tail
fb7752d159 openvpn: fix bug (#5130) 2020-07-19 13:55:49 +08:00
big fox tail
88cd26581a 20200718-忽略文件添加*.log (#5128) 2020-07-19 13:54:52 +08:00
big fox tail
b04643026a wget: prefer ipv4 than ipv6 (#5127) 2020-07-19 13:54:32 +08:00
AmadeusGhost
0635250cda ramips/mt7621: re-added hwnat support for kernel 5.4 (#5120)
* ramips: mt7621.dtsi: add missing pinctrl to ethernet node

Add rgmii1_pins (1st GMAC) and mdio_pins to ethernet node
pinctrl to ensure they are set to correct mode

* ramips: kernel: ralink-eth support mt7621

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>

* ramips: some devices use ralink-eth driver

Also re-added mt7621 hwnat support for some devices.

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
Signed-off-by: AmadeusGhost <amadeus@openjmu.xyz>

* ramips/mt7621: re-added hwnat support

Co-authored-by: LGA1150 <dqfext@gmail.com>
Co-authored-by: Chen Minqiang <ptpt52@gmail.com>
2020-07-18 01:02:11 +08:00
SJZ
6e2f7ac729 Unblockmusic Cloud unlock Log output typo (#5105) 2020-07-17 10:54:46 +08:00
AmadeusGhost
e47f199950 ipq806x: add support for RuiJie RG-MTFI-M520 (#5112)
Fix startup by Mr.chilauhe.

Signed-off-by: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com>
2020-07-17 10:53:56 +08:00
HiGarfield
fc0516eae7 openvpn: fix uci-defaults script (#5103)
修复防火墙端口号。用户如果设置自定义端口,例如1197,则升级固件时,需要uci查询用户设定的自定义端口号,然后打开防火墙端口。
2020-07-14 20:00:10 +08:00
ricksuzade-maker
90571f5db1 Bump wireguard to 1.0.20200712 (#5100) 2020-07-14 13:17:09 +08:00
AmadeusGhost
0426d95035 bcm27xx: rpi4: enable wifi by default (#5090) 2020-07-13 11:29:09 +08:00
Xiaok
ba2038499a vlmcsd: bump version to svn1113-2020-03-28 (#5088) 2020-07-13 10:09:57 +08:00
AmadeusGhost
ed6be7ead9 gmediarender: fix compilation (#5070) 2020-07-12 11:56:40 +08:00
Jason Zang
00938c8e20 xlnetacc: adjust iface event handling strategy (#5076)
出于以下两个原因,调整快鸟服务对于iface事件的处理策略:
1. 快鸟服务跟随系统启动,ifup事件使快鸟服务重复启动,出现2个快鸟脚本运行实例(原始脚本对于重复运行的判断失效,原因未知)。修改为restart后可保证快鸟服务启动前关闭正在运行的快鸟服务。
2. ifdown事件后不应该立即停止快鸟服务。iface下线后,快鸟脚本无法访问快鸟服务器进行账户注销。未正常注销的账户在外部ip变动后重新上线会触发812错误(12或24小时内无法提速)。因此ifdown事件触发后不停止快鸟服务,而是等iface重新上线(网络恢复正常)后重启服务,以此保证账户注销流程可以正常进行。
2020-07-12 11:56:17 +08:00
coolsnowwolf
95cd6ee365 ramips: miss typo 2020-07-10 17:45:48 +08:00
AmadeusGhost
15b5fbbc0a ramips: improve support for dir878/882 (#5058) 2020-07-10 11:58:12 +08:00
Charles Chin
74f1dce2c3 Add zh-cn po for luci-app-qBittorrent (#5057)
* translate `Open Web Interface`

* 打开管理页面自适应 http 和 https
2020-07-10 11:56:56 +08:00
Crazy365
6fb7d552d4 fix k3 wifi drive problem (#5053)
解决K3无线驱动未被选中编译问题
2020-07-09 18:01:55 +08:00
Crazy365
a55cb52dcb fix k3screenctrl depends (#5052)
解决target名称变化造成k3screenctrl无法选中编译问题
2020-07-09 18:01:26 +08:00
coolsnowwolf
1eb3eac387 ramips: fix dts name 2020-07-08 23:03:33 +08:00
hyy-666
c9bd4acac7 fix missing dir-882 and dir-878 and enable mt7615d's LED default n (#5039) 2020-07-08 17:37:28 +08:00
coolsnowwolf
9905c8cd15 luci-app-ipsec-vpnd: add strongswan-mod-kernel-libipsec 2020-07-08 16:49:39 +08:00
coolsnowwolf
dc46e107bc luci-app-webadmin: fix typo 2020-07-08 16:48:02 +08:00
hyy-666
e04cde3f2a fix menuconfig missing DIR-878 A1 DIR-882 A1 (#5038) 2020-07-08 16:43:03 +08:00
coolsnowwolf
146bf0281a target: rip of ip6tables 2020-07-08 16:28:32 +08:00
hyy-666
345a201394 ramips: add support for Dlink DIR-878 A1 DIR-882 A1 Motorola MR2600 (#5035)
* ramips: add support for Dlink DIR-878 A1 DIR-882 A1 Motorola MR2600

* ramips: add support for Dlink DIR-878 A1 DIR-882 A1 Motorola MR2600

* ramips: add support for Dlink DIR-878 A1 DIR-882 A1 Motorola MR2600

Co-authored-by: hyy-666 <hyiy666@gmail.com>
2020-07-08 16:23:05 +08:00
AmadeusGhost
e3aad86a01 wireless-regdb: custom change txpower and dfs (#5036)
Co-authored-by: Chen Minqiang <ptpt52@gmail.com>
2020-07-08 15:22:44 +08:00
coolsnowwolf
37c63e9b3d ppp: add shellsync support 2020-07-08 14:45:43 +08:00
coolsnowwolf
170042c687 luci-app-flowoffload: remove kernel limite 2020-07-08 12:48:24 +08:00
BoBppy
f6aacba030 R2S:swap lan and wan (#5028)
R2S的描述是eth1为LAN,eth0为WAN(强迫症xD
2020-07-08 12:23:54 +08:00
coolsnowwolf
86d0c132f4 Merge branch 'master' of https://github.com/coolsnowwolf/lede 2020-07-07 20:22:16 +08:00
coolsnowwolf
7f73591fbf x86: fix cpu temp info 2020-07-07 20:22:05 +08:00
NivalXer
74b263ba93 mwlwifi:add disable-amsdu patch (#5027) 2020-07-07 18:19:10 +08:00
AmadeusGhost
0c94245788 mtwifi: update dual 7615 config (Thx zmzhuai and MeIsReallyBa) (#5025) 2020-07-07 17:02:20 +08:00
coolsnowwolf
b1413474d4 Version update to R20.7.7 2020-07-07 12:43:25 +08:00
coolsnowwolf
dca53083ba bcm53xx: phicomm-k3 using custom k3-brcmfmac4366c-firmware 2020-07-07 12:41:13 +08:00
coolsnowwolf
786a6e1843 bcm53xx: phicomm-k3 using custom k3-brcmfmac4366c-firmware 2020-07-07 12:39:50 +08:00
coolsnowwolf
3b4a069b2e package: remove some old pack 2020-07-07 12:38:06 +08:00
coolsnowwolf
bb51e8a978 coremark: bump version to 2020-05-28 2020-07-07 12:30:20 +08:00
coolsnowwolf
ea3f2b1f16 Merge branch 'master' of https://github.com/coolsnowwolf/lede 2020-07-07 12:22:36 +08:00
coolsnowwolf
3ac0246ce9 automount:use antfs instead of ntfs-3g 2020-07-07 12:22:24 +08:00
AmadeusGhost
d8a77f3f19 shortcut-fe-cm: load only once to avoid panic (#5019) 2020-07-07 11:40:17 +08:00
coolsnowwolf
88aed2924e autocore: x86 change RPS/XPS handling to all CPUs 2020-07-06 16:13:07 +08:00
coolsnowwolf
351441834c uci: add uci_add_list method 2020-07-06 14:30:34 +08:00
coolsnowwolf
462c88bfc9 ipq40xx: swtich to kernel 4.19 2020-07-06 14:12:55 +08:00
accors
55d1d3733c Update v2ray version to 4.26.0 (#4983) 2020-07-06 13:55:24 +08:00
ricksuzade-maker
24a2aed1d9 Bump v2ray-plugin to 1.3.3 (#5003)
Bump v2ray-plugin to the newest version.
2020-07-06 13:55:09 +08:00
coolsnowwolf
ed5938f061 linux-firmware: Update linux-firmware to 20200619 2020-07-06 13:51:25 +08:00
coolsnowwolf
9da58fc28a wireless: wext: remove ndo_do_ioctl fallback 2020-07-06 12:31:15 +08:00
AmadeusGhost
6647c14b61 rampis: newifi3: adjust led settings (#4999) 2020-07-06 11:41:46 +08:00
Miracle1414
ac3a454edb qBittorrent: bump to v4.2.5 (#5000) 2020-07-06 11:40:54 +08:00
coolsnowwolf
486426de57 ipq40xx: less ess_edma ipv6 log output 2020-07-06 11:40:29 +08:00
coolsnowwolf
9c42b9f581 luci-app-unblockmusic: enable lossless for go version 2020-07-06 11:25:42 +08:00
coolsnowwolf
c080e1bc41 kernel: Fix ath79 DSP exception at bootup 2020-07-06 11:13:05 +08:00
coolsnowwolf
5568cae67c download.pl:add mirrors for mainland China users 2020-07-06 10:58:24 +08:00
coolsnowwolf
707e6ed1a1 kernel: update to 4.14.187, 4.19.131, 5.4.50 2020-07-06 10:52:50 +08:00
coolsnowwolf
40c8226ff8 Merge branch 'master' of https://github.com/coolsnowwolf/lede 2020-07-06 10:50:16 +08:00
coolsnowwolf
e7e044dc34 shortcut-fe: splite to 2 packges and rip off ipv6 2020-07-06 10:50:04 +08:00
Kuma
35b9c66cae UnblockNeteaseMusicGo: bump version to 0.2.3 (#4988) 2020-07-06 09:32:26 +08:00
coolsnowwolf
bc656479fb default-settings: remove sqm.zh-cn.po 2020-07-05 18:50:04 +08:00
coolsnowwolf
b8e27f1f78 luci-app-ttyd: bump version 2020-07-05 18:36:43 +08:00
coolsnowwolf
108ef02c85 Revert "mtwifi: repair options (#4980)"
This reverts commit 23eb8b49a7.
2020-07-05 18:03:39 +08:00
coolsnowwolf
359680f107 ramips: fix netgear R6850 wireless depend 2020-07-05 17:48:33 +08:00
AmadeusGhost
23eb8b49a7 mtwifi: repair options (#4980) 2020-07-05 17:46:48 +08:00
AmadeusGhost
7dbd43f75f mtwifi: mt7615: fix install (#4979) 2020-07-05 17:11:28 +08:00
coolsnowwolf
ba14b8065c Merge branch 'master' of https://github.com/coolsnowwolf/lede 2020-07-05 16:11:26 +08:00
coolsnowwolf
d90ca2f6a4 ipq40xx: unselect some package 2020-07-05 16:11:16 +08:00
AmadeusGhost
f8baa878b1 mtwifi: mt7615: update config and disable autoload (#4975) 2020-07-05 15:19:40 +08:00
coolsnowwolf
68dfdeddb5 bcm53xx: add k3screenctrl for phicomm k3 2020-07-05 15:13:17 +08:00
coolsnowwolf
05aa31a875 default-settings: add luci-compat dependence 2020-07-05 13:09:35 +08:00
coolsnowwolf
eb2bf74ff5 uci: fix luci firewall rules display error 2020-07-05 13:01:05 +08:00
Chuck
989c1444ac add missing dependence (#4971)
Signed-off-by: Chuck <fanck0605@qq.com>
2020-07-05 12:40:21 +08:00
coolsnowwolf
61b257c96b ipq40xx: fix rt-acrh17 lan mac 2020-07-05 12:39:30 +08:00
AmadeusGhost
24cb7521b6 mtwifi: add mt7612 support (#4968)
* mtwifi: add mt7612 support (Thx TangHaili)

* mtwifi: mt7603/7612: disable autoload (Thx TangHaili)

* ramips: newifi3: use mtwifi

* luci-app-mtwifi: sync TangHaili's Source
2020-07-05 11:57:49 +08:00
coolsnowwolf
d4539c3188 ramips: fix AC2100/R6850 wireless setting 2020-07-04 20:16:43 +08:00
coolsnowwolf
2322672203 Merge pull request #4952 from AmadeusGhost/amend
mtwifi: add dual 7615 support
2020-07-04 15:22:40 +08:00
AmadeusGhost
4c3334c5ba mtwifi: add dual 7615 support (Thx TangHaili) 2020-07-04 13:39:48 +08:00
coolsnowwolf
104ed945a6 mac80211: set default country code to US 2020-07-04 12:01:27 +08:00
coolsnowwolf
db12a9ccbe ramips: use mt proprietary driver for XiaoMI/Redmi AC2100 2020-07-04 11:34:26 +08:00
coolsnowwolf
1c1aef021d add mt proprietary driver for linux 5.4 (Thx MeIsReallyBa and hanwckf) 2020-07-04 11:23:36 +08:00
coolsnowwolf
90e48a34ba Merge branch 'master' of https://github.com/coolsnowwolf/lede 2020-07-04 00:13:28 +08:00
coolsnowwolf
df073244ab ramips:improve R6850 support 2020-07-04 00:13:20 +08:00
coolsnowwolf
80c47d3476 Merge pull request #4938 from lphgor/patch-1
kcptun: bump to 20200701
2020-07-03 21:55:46 +08:00
coolsnowwolf
c1941e154b Merge branch 'master' of https://github.com/coolsnowwolf/lede 2020-07-03 20:04:08 +08:00
coolsnowwolf
7bd0d56834 x86: remove kmod-r8169 2020-07-03 20:03:55 +08:00
lphgor
7eaf95e309 kcptun: bump to 20200701 2020-07-03 20:02:39 +08:00
coolsnowwolf
49b45cde79 Merge pull request #4936 from ElonH/luci-app-rclone
luci-app-rclone: bump version from 1.4.0 to 1.4.1
2020-07-03 19:29:39 +08:00
coolsnowwolf
dc4751b10e Merge pull request #4935 from ElonH/rclone-ng
RcloneNg: bump version from 0.3.2 to 0.4.0
2020-07-03 19:29:23 +08:00
coolsnowwolf
29c62f24f5 Merge pull request #4934 from ElonH/rclone
Rclone: bump version from 1.52.1 to 1.52.2
2020-07-03 19:29:10 +08:00
coolsnowwolf
c551f6ec88 Merge branch 'master' of https://github.com/coolsnowwolf/lede 2020-07-03 19:19:50 +08:00
coolsnowwolf
76cf8abc00 x86: add AMD Ryzen zen3 and Hygon Dhyana cpu temperature support 2020-07-03 19:19:39 +08:00
ElonH
6e98ad5339 Rclone: bump version from 1.52.1 to 1.52.2
v1.52.2 - 2020-06-24

[See commits](https://github.com/rclone/rclone/compare/v1.52.1...v1.52.2)

* Bug Fixes
    * build
        * Fix docker release build action (Nick Craig-Wood)
        * Fix custom timezone in Docker image (NoLooseEnds)
    * check: Fix misleading message which printed errors instead of differences (Nick Craig-Wood)
    * errors: Add WSAECONNREFUSED and more to the list of retriable Windows errors (Nick Craig-Wood)
    * rcd: Fix incorrect prometheus metrics (Gary Kim)
    * serve restic: Fix flags so they use environment variables (Nick Craig-Wood)
    * serve webdav: Fix flags so they use environment variables (Nick Craig-Wood)
    * sync: Fix --track-renames-strategy modtime (Nick Craig-Wood)
* Drive
    * Fix not being able to delete a directory with a trashed shortcut (Nick Craig-Wood)
    * Fix creating a directory inside a shortcut (Nick Craig-Wood)
    * Fix --drive-impersonate with cached root_folder_id (Nick Craig-Wood)
* SFTP
    * Fix SSH key PEM loading (Zac Rubin)
* Swift
    * Speed up deletes by not retrying segment container deletes (Nick Craig-Wood)
* Tardigrade
    * Upgrade to uplink v1.1.1 (Caleb Case)
* WebDAV
    * Fix free/used display for rclone about/df for certain backends (Nick Craig-Wood)
2020-07-03 18:18:48 +08:00
coolsnowwolf
6922fd811f Merge pull request #4933 from AmadeusGhost/amend
ipq40xx-5.4 fix
2020-07-03 18:16:02 +08:00
ElonH
4746841d0f luci-app-rclone: bump version from 1.4.0 to 1.4.1
set web client and fuse packages as optional
2020-07-03 18:14:22 +08:00
ElonH
e8589083e5 RcloneNg: bump version from 0.3.2 to 0.4.0
[0.4.0](https://github.com/ElonH/RcloneNg/compare/v0.3.2...v0.4.0) (2020-07-03)

    ⚠ BREAKING CHANGES

* **tasks:** remove tasks viewer
* **list-view:** In Mobile View, double click to open directory, lomg press it to popup detail log.
* **home-mode:** In Mobile View, double click remote item to enter file system,and long press it to popup
detail dialog.

    Features

* **dashboard:** add version card ([a36fcbe](a36fcbe919))
* **home-mode:** support remote detail on mobile view ([2015e2f](2015e2fea6))
* **jobs-manager:** clean finished groups ([188fcdf](188fcdf56c))
* **jobs-manager:** enable reset stats ([ec025bd](ec025bd8d4))
* **list-view:** support file detail on mobile view ([ce36cf2](ce36cf25cf))
* **pages:** show response time ([9a02b22](9a02b22ea5))

    Bug Fixes

* **file-manager:** footer over main sidebar in mobile view ([48b855a](48b855a7f4)), closes [#2](https://github.com/ElonH/RcloneNg/issues/2)
* **jobs-manager:** no animation on refresh button in mobile view ([b0d21d7](b0d21d7416))
* **list-view:** prevent showing detail when checking item ([a2a4fa2](a2a4fa2c5d))
* avoid duration format error on other page ([a1c4f75](a1c4f7521a))
* cancel underline in <a> ([6c179fa](6c179fa3e7))
* **tasks:** paste again not work around ([c339dfa](c339dfa07f))
2020-07-03 18:07:34 +08:00
coolsnowwolf
2c8ea33784 odhcpd: fix compilation with GCC10 2020-07-03 18:02:13 +08:00
coolsnowwolf
9fddcf33a6 Merge branch 'master' of https://github.com/coolsnowwolf/lede 2020-07-03 18:01:24 +08:00
coolsnowwolf
bac469f0ba busybox: add ps -ef option for docker top command 2020-07-03 18:01:13 +08:00
AmadeusGhost
0b296d75bc ipq40xx: cm520: fix startup with opboot 2020-07-03 17:53:49 +08:00
AmadeusGhost
45ddd9f782 ipq40xx: r619ac: fix wan/lan led 2020-07-03 17:53:29 +08:00
coolsnowwolf
d541afbf42 Merge pull request #4932 from DoveKi/master
ramips: mt7621: update Xiaomi Mi Router 4
2020-07-03 17:37:55 +08:00
doveki
d83f9cd545 ramips: mt7621: update Xiaomi Mi Router 4 2020-07-03 16:04:48 +08:00
coolsnowwolf
51143b4c75 ipq40xx: add G-DOCK 2.0 (P&W R619AC) v5.4 support 2020-07-03 15:38:30 +08:00
coolsnowwolf
ee5f9b59c5 Update rblibtorrent
Update Makefile
2020-07-03 15:34:06 +08:00
coolsnowwolf
75fc3be079 squashfs: make mkfs with multi-cpus speedup 2020-07-03 15:17:32 +08:00
coolsnowwolf
b93293ef8d ipq40xx: essedma time-balanced scheduling for nat 2020-07-03 15:14:36 +08:00
whalechoi
e8e0f38f9a Update Makefile
support building with new boost version
2020-07-03 14:32:25 +08:00
coolsnowwolf
96652f8f80 dnsmasq: disable dhcpv6 by default 2020-07-03 13:58:59 +08:00
coolsnowwolf
57c30e4128 uhttpd: disable https redir 2020-07-03 13:40:31 +08:00
coolsnowwolf
04f6d885bd Merge pull request #4928 from AmadeusGhost/modified
kernel-5.4 fix merge commit
2020-07-03 13:14:27 +08:00
coolsnowwolf
8e012e7da4 ipq40xx: add support for ASUS RT-ACRH17 v5.4 2020-07-03 12:49:17 +08:00
AmadeusGhost
5e437f378a mtwifi: bump to 5.0.4.0
Source code: https://github.com/MeIsReallyBa/mt7615-dbdc-linux5.4
2020-07-03 12:28:23 +08:00
coolsnowwolf
0c95d8abf1 ipq40xx: rework with new v5.4 essedma eth setting 2020-07-03 12:17:04 +08:00
AmadeusGhost
6b8c4c3bbb ramips: re-add devices and use wpad-openssl
Re-add devices: XiaoMi Wifi R3/R4/AC2100, JDCloud

Signed-off-by: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com>
2020-07-03 12:06:27 +08:00
AmadeusGhost
3fcc387312 generic/5.4: change thermal to tristate
fix #4922
2020-07-03 11:16:08 +08:00
coolsnowwolf
0e4fe04e67 mac80211: enable wifi by default 2020-07-03 01:32:16 +08:00
coolsnowwolf
41965f2d26 x86: acpi support 2020-07-03 00:44:03 +08:00
coolsnowwolf
c7c02dfae9 rockchip: add support for NanoPi R2S arm64 router board 2020-07-02 23:34:55 +08:00
coolsnowwolf
9c8da88756 Merge branch 'master' of https://github.com/coolsnowwolf/lede 2020-07-02 23:31:25 +08:00
coolsnowwolf
33abeff31c Sync to snapshot kernel 5.4 version 2020-07-02 23:30:56 +08:00
coolsnowwolf
33f7cb7353 Merge pull request #4917 from AmadeusGhost/amend
wol: fix build on x86
2020-07-02 21:31:46 +08:00
AmadeusGhost
c1b910fa8f wol: fix build on x86 2020-07-02 21:00:28 +08:00
coolsnowwolf
cc2ddb220a Revert "ksmbd: replace samba in ipq40xx and x86"
This reverts commit 82d03e87a0.
2020-07-02 19:21:50 +08:00
coolsnowwolf
f695ce42f3 Merge branch 'master' of https://github.com/coolsnowwolf/lede 2020-07-02 17:57:19 +08:00
coolsnowwolf
790ae11ef8 luci-theme-netgear: revert link 2020-07-02 17:52:08 +08:00
coolsnowwolf
d62e5121de Merge pull request #4915 from Mandi-Sa/master
linux-firmware: intel: Downgrade wifi firmware version for k4.19
2020-07-02 17:50:15 +08:00
coolsnowwolf
a15e62191a wol: add package 2020-07-02 17:01:41 +08:00
coolsnowwolf
82d03e87a0 ksmbd: replace samba in ipq40xx and x86 2020-07-02 16:36:37 +08:00
coolsnowwolf
919a46c8dd ksmbd: bump version and update luci 2020-07-02 16:35:09 +08:00
阿菌•未霜
47b81244ad linux-firmware: intel: Downgrade wifi firmware version for k4.19 2020-07-02 16:11:23 +08:00
coolsnowwolf
09d432ba31 squashfs: make mkfs with multi-cpus speedup 2020-07-02 14:35:44 +08:00
coolsnowwolf
beb94a6f37 UnblockNeteaseMusicGo: revert version 2020-07-02 02:10:32 +08:00
coolsnowwolf
ed735bab75 ipq40xx: switch to kernel 4.14 2020-07-02 01:29:53 +08:00
coolsnowwolf
f053883d08 Revert "ipq40xx: import irq-balance script from presisco/openwrt-irq-balance"
This reverts commit defe460d44.
2020-07-02 01:28:20 +08:00
coolsnowwolf
6b2e7c13fd enable GOPROXY by default for Golang 2020-07-02 01:09:35 +08:00
coolsnowwolf
f0aa5e27f1 vidio: enable HSA_AMD 2020-07-02 00:57:44 +08:00
coolsnowwolf
36204c7110 IPSec: fix kernel modules 2020-07-02 00:55:25 +08:00
coolsnowwolf
f0fb43ea11 Merge pull request #4908 from asushugo/master
Bump redsocks2 to lastest version fix config error
2020-07-02 00:02:17 +08:00
coolsnowwolf
b63a1fc81e Merge pull request #4909 from xsm1997/master
UnblockNeteaseMusicGo: bump version to 0.2.1
2020-07-02 00:01:01 +08:00
Shimin Xiong
fce9e709ac UnblockNeteaseMusicGo: bump version to 0.2.1 2020-07-01 23:02:57 +08:00
asushugo
0c7fe2ad25 Bump redsocks2 to lastest version fix config error 2020-07-01 20:57:18 +08:00
coolsnowwolf
77a8d007cf shortcut-fe:added support for Linux kernel 4.19 2020-07-01 19:26:58 +08:00
coolsnowwolf
215c2f8309 Merge branch 'master' of https://github.com/coolsnowwolf/lede 2020-07-01 18:30:00 +08:00
coolsnowwolf
6e14ee33cd kernel: Remove chash.ko from kmod-drm-amdgpu 2020-07-01 18:29:47 +08:00
coolsnowwolf
129f29e24a Merge pull request #4905 from AmadeusGhost/modified
kernel: revert some config
2020-07-01 17:26:04 +08:00
coolsnowwolf
de00eff01a x64:add support for AMD Zen2 APU (renoir) DRM video engine 2020-07-01 17:16:50 +08:00
coolsnowwolf
8d7204e1ea linux-firmware: add support for AMD Zen2 APU (renoir) firmware 20.10 2020-07-01 17:14:56 +08:00
AmadeusGhost
e4ecf8a5c0 kernel: cake: add missing backport to 4.19 patches 2020-07-01 17:12:37 +08:00
AmadeusGhost
6ea19a20b7 kernel: revert some config 2020-07-01 17:05:30 +08:00
coolsnowwolf
689dd9a678 kernel: refresh upsteam modules 2020-07-01 16:10:53 +08:00
coolsnowwolf
d669a371b6 UnblockNeteaseMusicGo: using single app to proccess windows client unblock 2020-07-01 14:33:50 +08:00
coolsnowwolf
defe460d44 ipq40xx: import irq-balance script from presisco/openwrt-irq-balance 2020-07-01 12:49:28 +08:00
coolsnowwolf
63bc209d7d Version Update to R20.7.1 2020-07-01 11:08:42 +08:00
coolsnowwolf
d11a7c9e78 kernel: bump 4.19 to 4.19.123 2020-07-01 10:52:01 +08:00
coolsnowwolf
0c0d41fcd7 kernel: drop kernel 4.9 support and add 5.4 placeholder 2020-07-01 10:51:09 +08:00
coolsnowwolf
cac9227e54 Merge pull request #4902 from ricksuzade-maker/patch-2
Bump v2ray-plugin to version 1.3.2
2020-07-01 10:46:14 +08:00
ricksuzade-maker
9f8f4afe36 Bump v2ray-plugin to version 1.3.2
Bump v2ray-plugin to the newest version
2020-07-01 10:17:46 +08:00
coolsnowwolf
cdca955c8e shortcut-fe:added support for Linux kernel 4.14 2020-07-01 02:56:41 +08:00
coolsnowwolf
c0f3364974 baidupcs-web: move to my source 2020-06-29 23:41:08 +08:00
coolsnowwolf
cd8708c26f Merge pull request #4865 from liuran001/patch-1
fix baidupcs-go
2020-06-29 23:36:24 +08:00
coolsnowwolf
617ae6c4a7 Merge pull request #4862 from deadlineOvO/patch-1
/sbin/mtkwifi 777 to 755
2020-06-29 23:28:25 +08:00
coolsnowwolf
fb6aeafd18 redsocks2: disable ss 2020-06-29 23:26:33 +08:00
coolsnowwolf
9aa56199f0 Merge pull request #4875 from 1715173329/redsocks2-openssl
redsocks2: fix compatible with openssl 1.1.x, support reuseport
2020-06-29 23:23:36 +08:00
coolsnowwolf
b82cf78797 gmediarender: move folder 2020-06-29 23:21:16 +08:00
coolsnowwolf
32c6e61376 Merge pull request #4743 from dingpengyu/zh_CN
fix lede zh-cn.po
2020-06-28 16:14:48 +08:00
coolsnowwolf
8d1ac15934 Merge pull request #4880 from DoveKi/master
ramips: mt7621: add support for Xiaomi Mi Router 4
2020-06-28 11:02:19 +08:00
doveki
0d171461ff ramips: mt7621: add support for Xiaomi Mi Router 4 2020-06-25 20:54:14 +08:00
coolsnowwolf
c2134e0e18 x64: Mellanox Connect-X 40Gbps card by default 2020-06-25 16:20:13 +08:00
coolsnowwolf
fc0f1ec5c5 Merge pull request #4867 from ricksuzade-maker/patch-1
Bump wireguard to 1.0.20200623
2020-06-25 15:38:43 +08:00
coolsnowwolf
fdc2fee363 Merge pull request #4868 from smallprogram/patch-1
update v2ray version to 4.25.1
2020-06-25 15:38:25 +08:00
coolsnowwolf
a780c6257d Merge pull request #4866 from goldkeyber112/master
add RTL8125B(S) 2.5G support
2020-06-25 15:38:09 +08:00
coolsnowwolf
b499b71dd1 Merge pull request #4870 from AmadeusGhost/amend
ramips: add support for Xiaomi R2100 (Black)
2020-06-25 15:37:43 +08:00
CN_SZTL
ab025ed8d3 redsocks2: fix compatible with openssl 1.1.x, support reuseport 2020-06-24 19:40:17 +08:00
zhusir
fc6930876d update v2ray version to 4.25.1 2020-06-24 09:11:10 +08:00
ricksuzade-maker
c6bb4b7e88 Bump wireguard to 1.0.20200623
Bump wireguard to the newest version
2020-06-24 08:51:46 +08:00
goldkeyber112
f3225f6770 bump to 9.003.05
add RTL8125B(S) support
2020-06-24 05:25:15 +08:00
coolsnowwolf
378ca0f03e x64: add EFI Image boot from emmc SSD support 2020-06-23 23:44:27 +08:00
liuran001
5be827d9f9 fix baidupcs-go
修复baidupcs-go下载链接
2020-06-23 23:12:25 +08:00
goldkeyber112
6e2c293610 Merge pull request #1 from coolsnowwolf/master
update fork
2020-06-23 21:57:07 +08:00
coolsnowwolf
d9dc1d4605 Merge pull request #4840 from AmadeusGhost/modified
r8168: Cancel default selection
2020-06-23 15:55:41 +08:00
AmadeusGhost
e0305c807a r8168: cancel default selection 2020-06-23 10:45:16 +08:00
coolsnowwolf
0f7ae686e5 fix uci bug which involed in 0326b4 2020-06-23 10:16:52 +08:00
dingpengyu
3fb5845276 Merge branch 'master' into zh_CN 2020-06-23 10:04:08 +08:00
deadlineOvO
420e0e8579 /sbin/mtkwifi 777 to 755
只是认为 777 没有必要
2020-06-23 09:39:20 +08:00
coolsnowwolf
d72f523497 Merge branch 'master' of https://github.com/coolsnowwolf/lede 2020-06-22 18:27:37 +08:00
coolsnowwolf
663762352a add gmrender-resurrect UPNP render for media content (audio, video and images) 2020-06-22 18:27:23 +08:00
coolsnowwolf
c0326b44af Merge pull request #4839 from BoBppy/master
fix build with GCC10
2020-06-22 12:25:46 +08:00
coolsnowwolf
7c4258284b Merge pull request #4846 from goomadao/fix-ACL
Add ACL file to luci-app-frps
2020-06-22 01:46:23 +08:00
coolsnowwolf
9915faa78b Merge pull request #4844 from accors/master
Update v2ray version to 4.25.0
2020-06-22 01:46:03 +08:00
coolsnowwolf
f1a270dfbd Merge pull request #4850 from xkstudio/dev
npc: bump version to v0.26.8
2020-06-22 01:44:33 +08:00
Xiaok
bd29eb1a35 npc: bump version to v0.26.8 2020-06-21 16:17:49 +08:00
AmadeusGhost
5240af2247 ramips: add support for Xiaomi R2100 (Black) 2020-06-21 16:09:39 +08:00
madao
617e7f9918 Add ACL file 2020-06-20 16:16:43 +08:00
accors
e0b2fde78e Update v2ray version to 4.25.0 2020-06-20 10:05:57 +08:00
BoBppy
f317ed5b5d Add files via upload 2020-06-19 17:19:49 +08:00
BoBppy
3ace77ac4f Add files via upload 2020-06-19 17:19:16 +08:00
BoBppy
c1cd85e1b4 Add files via upload 2020-06-19 17:18:42 +08:00
BoBppy
e03d060d1c Add files via upload 2020-06-19 17:17:39 +08:00
BoBppy
98ac6365ae Add files via upload 2020-06-19 17:17:11 +08:00
BoBppy
bd2aaaea2c libubox:fix array out of bounds GCC 10 warning 2020-06-19 17:16:24 +08:00
BoBppy
7915610933 tools: squashfskit4: fix build with GCC10
In order to build squashfskit with GCC10, this backport from upstream is needed.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
[increase PKG_RELEASE]
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
2020-06-19 17:12:34 +08:00
BoBppy
d665cad5f2 squashfs: Fix compile with GCC 10
Fixes the following build error with GCC 10:
	/usr/bin/ld: read_fs.o:(.bss+0x0): multiple definition of `swap'; mksquashfs.o:(.bss+0x1b2a88): first defined here
And a compile warning.

Fixes: FS#3104, FS#3119
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 1bbc1aa)
2020-06-19 17:09:24 +08:00
BoBppy
94929f76ac build: add GCC 10 version detection
Lets add GCC 10 detection to the build system as distributions like Fedora 32 have started shipping with it.
Some tools like mtd-utils need work to compile under GCC10, but that will be next step.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2020-06-19 17:07:37 +08:00
dingpengyu
a8cb3a3fbd Merge branch 'master' into zh_CN 2020-06-19 14:28:58 +08:00
coolsnowwolf
ba8a697b76 Merge pull request #4835 from martin0607/master
add Realtek r8168 GBE eth support
2020-06-19 10:58:48 +08:00
coolsnowwolf
763184143e firewall: refresh 900-filter-aaaa.patch (#4698)
Signed-off-by: Chuck <fanck0605@qq.com>
2020-06-19 10:58:10 +08:00
coolsnowwolf
7e3bbbd936 Revert "dnsmasq: add auto multiple service instances for dns performance boost"
This reverts commit 3a0adfef15.
2020-06-19 10:57:41 +08:00
martin_ni
5051acc2c2 README.md 2020-06-18 16:57:02 +08:00
martin_ni
4da8bc1134 x86: add Realtek r8168 GBE eth support
Realtek r8111/8168
2020-06-18 16:55:34 +08:00
martin_ni
fab88b3b99 bump to 8.048.03 2020-06-18 16:52:10 +08:00
martin_ni
9ea9b0ce22 bump to 8.048.03 2020-06-18 16:51:07 +08:00
dingpengyu
01fe82a2d9 Merge branch 'master' into zh_CN 2020-06-18 04:23:53 +08:00
dingpengyu
7b9d809ba7 修改 Lazy Rule 和 Video Rule条目 2020-06-18 04:16:52 +08:00
coolsnowwolf
ecbbfcf25e ar71xx: unlock GL.net uboot part 2020-06-17 17:50:02 +08:00
coolsnowwolf
d3cc42cad8 ipt2socks:bump to 1.1.3 2020-06-17 11:36:13 +08:00
coolsnowwolf
3a0adfef15 dnsmasq: add auto multiple service instances for dns performance boost 2020-06-16 18:37:34 +08:00
coolsnowwolf
acb822180e luci-app-unblockmusic:change default Nodejs version value 2020-06-16 12:08:11 +08:00
coolsnowwolf
c252faf64e Version bump to R20.6.18 2020-06-16 11:58:20 +08:00
coolsnowwolf
887ca47154 Merge branch 'master' of https://github.com/coolsnowwolf/lede 2020-06-16 11:57:10 +08:00
coolsnowwolf
95d52b6014 luci-app-unblockmusic: fix golang version can't unlock iOS newversion issue 2020-06-16 11:56:59 +08:00
Lienol
70a9891f4a luci-app-kodexplorer: update api new version (#4788) 2020-06-14 18:26:17 +08:00
AmadeusGhost
f4e6ac28a7 verysync: add auto select latest version support (#4790) 2020-06-14 18:25:50 +08:00
ElonH
55c5c30b48 rclone: Bump version to 1.52.1 (#4805)
Changelog

   v1.52.1 - 2020-06-10

[See commits](https://github.com/rclone/rclone/compare/v1.52.0...v1.52.1)

* Bug Fixes
    * lib/file: Fix SetSparse on Windows 7 which fixes downloads of files > 250MB (Nick Craig-Wood)
    * build
        * Update go.mod to go1.14 to enable -mod=vendor build (Nick Craig-Wood)
        * Remove quicktest from Dockerfile (Nick Craig-Wood)
        * Build Docker images with GitHub actions (Matteo Pietro Dazzi)
        * Update Docker build workflows (Nick Craig-Wood)
        * Set user_allow_other in /etc/fuse.conf in the Docker image (Nick Craig-Wood)
        * Fix xgo build after go1.14 go.mod update (Nick Craig-Wood)
    * docs
        * Add link to source and modified time to footer of every page (Nick Craig-Wood)
        * Remove manually set dates and use git dates instead (Nick Craig-Wood)
        * Minor tense, punctuation, brevity and positivity changes for the home page (edwardxml)
        * Remove leading slash in page reference in footer when present (Nick Craig-Wood)
        * Note commands which need obscured input in the docs (Nick Craig-Wood)
        * obscure: Write more help as we are referencing it elsewhere (Nick Craig-Wood)
* VFS
    * Fix OS vs Unix path confusion - fixes ChangeNotify on Windows (Nick Craig-Wood)
* Drive
    * Fix missing items when listing using --fast-list / ListR (Nick Craig-Wood)
* Putio
    * Fix panic on Object.Open (Cenk Alti)
* S3
    * Fix upload of single files into buckets without create permission (Nick Craig-Wood)
    * Fix --header-upload (Nick Craig-Wood)
* Tardigrade
    * Fix listing bug by upgrading to v1.0.7
    * Set UserAgent to rclone (Caleb Case)

   v1.52.0 - 2020-05-27

Special thanks to Martin Michlmayr for proof reading and correcting
all the docs and Edward Barker for helping re-write the front page.

[See commits](https://github.com/rclone/rclone/compare/v1.51.0...v1.52.0)

* New backends
    * [Tardigrade](/tardigrade/) backend for use with storj.io (Caleb Case)
    * [Union](/union/) re-write to have multiple writable remotes (Max Sum)
    * [Seafile](/seafile) for Seafile server (Fred @creativeprojects)
* New commands
    * backend: command for backend specific commands (see backends) (Nick Craig-Wood)
    * cachestats: Deprecate in favour of `rclone backend stats cache:` (Nick Craig-Wood)
    * dbhashsum: Deprecate in favour of `rclone hashsum DropboxHash` (Nick Craig-Wood)
* New Features
    * Add `--header-download` and `--header-upload` flags for setting HTTP headers when uploading/downloading (Tim Gallant)
    * Add `--header` flag to add HTTP headers to every HTTP transaction (Nick Craig-Wood)
    * Add `--check-first` to do all checking before starting transfers (Nick Craig-Wood)
    * Add `--track-renames-strategy` for configurable matching criteria for `--track-renames` (Bernd Schoolmann)
    * Add `--cutoff-mode` hard,soft,catious (Shing Kit Chan & Franklyn Tackitt)
    * Filter flags (eg `--files-from -`) can read from stdin (fishbullet)
    * Add `--error-on-no-transfer` option (Jon Fautley)
    * Implement `--order-by xxx,mixed` for copying some small and some big files (Nick Craig-Wood)
    * Allow `--max-backlog` to be negative meaning as large as possible (Nick Craig-Wood)
    * Added `--no-unicode-normalization` flag to allow Unicode filenames to remain unique (Ben Zenker)
    * Allow `--min-age`/`--max-age` to take a date as well as a duration (Nick Craig-Wood)
    * Add rename statistics for file and directory renames (Nick Craig-Wood)
    * Add statistics output to JSON log (reddi)
    * Make stats be printed on non-zero exit code (Nick Craig-Wood)
    * When running `--password-command` allow use of stdin (Sébastien Gross)
    * Stop empty strings being a valid remote path (Nick Craig-Wood)
    * accounting: support WriterTo for less memory copying (Nick Craig-Wood)
    * build
        * Update to use go1.14 for the build (Nick Craig-Wood)
        * Add `-trimpath` to release build for reproduceable builds (Nick Craig-Wood)
        * Remove GOOS and GOARCH from Dockerfile (Brandon Philips)
    * config
        * Fsync the config file after writing to save more reliably (Nick Craig-Wood)
        * Add `--obscure` and `--no-obscure` flags to `config create`/`update` (Nick Craig-Wood)
        * Make `config show` take `remote:` as well as `remote` (Nick Craig-Wood)
    * copyurl: Add `--no-clobber` flag (Denis)
    * delete: Added `--rmdirs` flag to delete directories as well (Kush)
    * filter: Added `--files-from-raw` flag (Ankur Gupta)
    * genautocomplete: Add support for fish shell (Matan Rosenberg)
    * log: Add support for syslog LOCAL facilities (Patryk Jakuszew)
    * lsjson: Add `--hash-type` parameter and use it in lsf to speed up hashing (Nick Craig-Wood)
    * rc
        * Add `-o`/`--opt` and `-a`/`--arg` for more structured input (Nick Craig-Wood)
        * Implement `backend/command` for running backend specific commands remotely (Nick Craig-Wood)
        * Add `mount/mount` command for starting `rclone mount` via the API (Chaitanya)
    * rcd: Add Prometheus metrics support (Gary Kim)
    * serve http
        * Added a `--template` flag for user defined markup (calistri)
        * Add Last-Modified headers to files and directories (Nick Craig-Wood)
    * serve sftp: Add support for multiple host keys by repeating `--key` flag (Maxime Suret)
    * touch: Add `--localtime` flag to make `--timestamp` localtime not UTC (Nick Craig-Wood)
* Bug Fixes
    * accounting
        * Restore "Max number of stats groups reached" log line (Michał Matczuk)
        * Correct exitcode on Transfer Limit Exceeded flag. (Anuar Serdaliyev)
        * Reset bytes read during copy retry (Ankur Gupta)
        * Fix race clearing stats (Nick Craig-Wood)
    * copy: Only create empty directories when they don't exist on the remote (Ishuah Kariuki)
    * dedupe: Stop dedupe deleting files with identical IDs (Nick Craig-Wood)
    * oauth
        * Use custom http client so that `--no-check-certificate` is honored by oauth token fetch (Mark Spieth)
        * Replace deprecated oauth2.NoContext (Lars Lehtonen)
    * operations
        * Fix setting the timestamp on Windows for multithread copy (Nick Craig-Wood)
        * Make rcat obey `--ignore-checksum` (Nick Craig-Wood)
        * Make `--max-transfer` more accurate (Nick Craig-Wood)
    * rc
        * Fix dropped error (Lars Lehtonen)
        * Fix misplaced http server config (Xiaoxing Ye)
        * Disable duplicate log (ElonH)
    * serve dlna
        * Cds: don't specify childCount at all when unknown (Dan Walters)
        * Cds: use modification time as date in dlna metadata (Dan Walters)
    * serve restic: Fix tests after restic project removed vendoring (Nick Craig-Wood)
    * sync
        * Fix incorrect "nothing to transfer" message using `--delete-before` (Nick Craig-Wood)
        * Only create empty directories when they don't exist on the remote (Ishuah Kariuki)
* Mount
    * Add `--async-read` flag to disable asynchronous reads (Nick Craig-Wood)
    * Ignore `--allow-root` flag with a warning as it has been removed upstream (Nick Craig-Wood)
    * Warn if `--allow-non-empty` used on Windows and clarify docs (Nick Craig-Wood)
    * Constrain to go1.13 or above otherwise bazil.org/fuse fails to compile (Nick Craig-Wood)
    * Fix fail because of too long volume name (evileye)
    * Report 1PB free for unknown disk sizes (Nick Craig-Wood)
    * Map more rclone errors into file systems errors (Nick Craig-Wood)
    * Fix disappearing cwd problem (Nick Craig-Wood)
    * Use ReaddirPlus on Windows to improve directory listing performance (Nick Craig-Wood)
    * Send a hint as to whether the filesystem is case insensitive or not (Nick Craig-Wood)
    * Add rc command `mount/types` (Nick Craig-Wood)
    * Change maximum leaf name length to 1024 bytes (Nick Craig-Wood)
* VFS
    * Add `--vfs-read-wait` and `--vfs-write-wait` flags to control time waiting for a sequential read/write (Nick Craig-Wood)
    * Change default `--vfs-read-wait` to 20ms (it was 5ms and not configurable) (Nick Craig-Wood)
    * Make `df` output more consistent on a rclone mount. (Yves G)
    * Report 1PB free for unknown disk sizes (Nick Craig-Wood)
    * Fix race condition caused by unlocked reading of Dir.path (Nick Craig-Wood)
    * Make File lock and Dir lock not overlap to avoid deadlock (Nick Craig-Wood)
    * Implement lock ordering between File and Dir to eliminate deadlocks (Nick Craig-Wood)
    * Factor the vfs cache into its own package (Nick Craig-Wood)
    * Pin the Fs in use in the Fs cache (Nick Craig-Wood)
    * Add SetSys() methods to Node to allow caching stuff on a node (Nick Craig-Wood)
    * Ignore file not found errors from Hash in Read.Release (Nick Craig-Wood)
    * Fix hang in read wait code (Nick Craig-Wood)
* Local
    * Speed up multi thread downloads by using sparse files on Windows (Nick Craig-Wood)
    * Implement `--local-no-sparse` flag for disabling sparse files (Nick Craig-Wood)
    * Implement `rclone backend noop` for testing purposes (Nick Craig-Wood)
    * Fix "file not found" errors on post transfer Hash calculation (Nick Craig-Wood)
* Cache
    * Implement `rclone backend stats` command (Nick Craig-Wood)
    * Fix Server Side Copy with Temp Upload (Brandon McNama)
    * Remove Unused Functions (Lars Lehtonen)
    * Disable race tests until bbolt is fixed (Nick Craig-Wood)
    * Move methods used for testing into test file (greatroar)
    * Add Pin and Unpin and canonicalised lookup (Nick Craig-Wood)
    * Use proper import path go.etcd.io/bbolt (Robert-André Mauchin)
* Crypt
    * Calculate hashes for uploads from local disk (Nick Craig-Wood)
        * This allows crypted Jottacloud uploads without using local disk
        * This means crypted s3/b2 uploads will now have hashes
    * Added `rclone backend decode`/`encode` commands to replicate functionality of `cryptdecode` (Anagh Kumar Baranwal)
    * Get rid of the unused Cipher interface as it obfuscated the code (Nick Craig-Wood)
* Azure Blob
    * Implement streaming of unknown sized files so `rcat` is now supported (Nick Craig-Wood)
    * Implement memory pooling to control memory use (Nick Craig-Wood)
    * Add `--azureblob-disable-checksum` flag (Nick Craig-Wood)
    * Retry `InvalidBlobOrBlock` error as it may indicate block concurrency problems (Nick Craig-Wood)
    * Remove unused `Object.parseTimeString()` (Lars Lehtonen)
    * Fix permission error on SAS URL limited to container (Nick Craig-Wood)
* B2
    * Add support for `--header-upload` and `--header-download` (Tim Gallant)
    * Ignore directory markers at the root also (Nick Craig-Wood)
    * Force the case of the SHA1 to lowercase (Nick Craig-Wood)
    * Remove unused `largeUpload.clearUploadURL()` (Lars Lehtonen)
* Box
    * Add support for `--header-upload` and `--header-download` (Tim Gallant)
    * Implement About to read size used (Nick Craig-Wood)
    * Add token renew function for jwt auth (David Bramwell)
    * Added support for interchangeable root folder for Box backend (Sunil Patra)
    * Remove unnecessary iat from jws claims (David)
* Drive
    * Follow shortcuts by default, skip with `--drive-skip-shortcuts` (Nick Craig-Wood)
    * Implement `rclone backend shortcut` command for creating shortcuts (Nick Craig-Wood)
    * Added `rclone backend` command to change `service_account_file` and `chunk_size` (Anagh Kumar Baranwal)
    * Fix missing files when using `--fast-list` and `--drive-shared-with-me` (Nick Craig-Wood)
    * Fix duplicate items when using `--drive-shared-with-me` (Nick Craig-Wood)
    * Extend `--drive-stop-on-upload-limit` to respond to `teamDriveFileLimitExceeded`. (harry)
    * Don't delete files with multiple parents to avoid data loss (Nick Craig-Wood)
    * Server side copy docs use default description if empty (Nick Craig-Wood)
* Dropbox
    * Make error insufficient space to be fatal (harry)
    * Add info about required redirect url (Elan Ruusamäe)
* Fichier
    * Add support for `--header-upload` and `--header-download` (Tim Gallant)
    * Implement custom pacer to deal with the new rate limiting (buengese)
* FTP
    * Fix lockup when using concurrency limit on failed connections (Nick Craig-Wood)
    * Fix lockup on failed upload when using concurrency limit (Nick Craig-Wood)
    * Fix lockup on Close failures when using concurrency limit (Nick Craig-Wood)
    * Work around pureftp sending spurious 150 messages (Nick Craig-Wood)
* Google Cloud Storage
    * Add support for `--header-upload` and `--header-download` (Nick Craig-Wood)
    * Add `ARCHIVE` storage class to help (Adam Stroud)
    * Ignore directory markers at the root (Nick Craig-Wood)
* Googlephotos
    * Make the start year configurable (Daven)
    * Add support for `--header-upload` and `--header-download` (Tim Gallant)
    * Create feature/favorites directory (Brandon Philips)
    * Fix "concurrent map write" error (Nick Craig-Wood)
    * Don't put an image in error message (Nick Craig-Wood)
* HTTP
    * Improved directory listing with new template from Caddy project (calisro)
* Jottacloud
    * Implement `--jottacloud-trashed-only` (buengese)
    * Add support for `--header-upload` and `--header-download` (Tim Gallant)
    * Use `RawURLEncoding` when decoding base64 encoded login token (buengese)
    * Implement cleanup (buengese)
    * Update docs regarding cleanup, removed remains from old auth, and added warning about special mountpoints. (albertony)
* Mailru
    * Describe 2FA requirements (valery1707)
* Onedrive
    * Implement `--onedrive-server-side-across-configs` (Nick Craig-Wood)
    * Add support for `--header-upload` and `--header-download` (Tim Gallant)
    * Fix occasional 416 errors on multipart uploads (Nick Craig-Wood)
    * Added maximum chunk size limit warning in the docs (Harry)
    * Fix missing drive on config (Nick Craig-Wood)
    * Make error `quotaLimitReached` to be fatal (harry)
* Opendrive
    * Add support for `--header-upload` and `--header-download` (Tim Gallant)
* Pcloud
    * Added support for interchangeable root folder for pCloud backend (Sunil Patra)
    * Add support for `--header-upload` and `--header-download` (Tim Gallant)
    * Fix initial config "Auth state doesn't match" message (Nick Craig-Wood)
* Premiumizeme
    * Add support for `--header-upload` and `--header-download` (Tim Gallant)
    * Prune unused functions (Lars Lehtonen)
* Putio
    * Add support for `--header-upload` and `--header-download` (Nick Craig-Wood)
    * Make downloading files use the rclone http Client (Nick Craig-Wood)
    * Fix parsing of remotes with leading and trailing / (Nick Craig-Wood)
* Qingstor
    * Make `rclone cleanup` remove pending multipart uploads older than 24h (Nick Craig-Wood)
    * Try harder to cancel failed multipart uploads (Nick Craig-Wood)
    * Prune `multiUploader.list()` (Lars Lehtonen)
    * Lint fix (Lars Lehtonen)
* S3
    * Add support for `--header-upload` and `--header-download` (Tim Gallant)
    * Use memory pool for buffer allocations (Maciej Zimnoch)
    * Add SSE-C support for AWS, Ceph, and MinIO (Jack Anderson)
    * Fail fast multipart upload (Michał Matczuk)
    * Report errors on bucket creation (mkdir) correctly (Nick Craig-Wood)
    * Specify that Minio supports URL encoding in listings (Nick Craig-Wood)
    * Added 500 as retryErrorCode (Michał Matczuk)
    * Use `--low-level-retries` as the number of SDK retries (Aleksandar Janković)
    * Fix multipart abort context (Aleksandar Jankovic)
    * Replace deprecated `session.New()` with `session.NewSession()` (Lars Lehtonen)
    * Use the provided size parameter when allocating a new memory pool (Joachim Brandon LeBlanc)
    * Use rclone's low level retries instead of AWS SDK to fix listing retries (Nick Craig-Wood)
    * Ignore directory markers at the root also (Nick Craig-Wood)
    * Use single memory pool (Michał Matczuk)
    * Do not resize buf on put to memBuf (Michał Matczuk)
    * Improve docs for `--s3-disable-checksum` (Nick Craig-Wood)
    * Don't leak memory or tokens in edge cases for multipart upload (Nick Craig-Wood)
* Seafile
    * Implement 2FA (Fred)
* SFTP
    * Added `--sftp-pem-key` to support inline key files (calisro)
    * Fix post transfer copies failing with 0 size when using `set_modtime=false` (Nick Craig-Wood)
* Sharefile
    * Add support for `--header-upload` and `--header-download` (Tim Gallant)
* Sugarsync
    * Add support for `--header-upload` and `--header-download` (Tim Gallant)
* Swift
    * Add support for `--header-upload` and `--header-download` (Nick Craig-Wood)
    * Fix cosmetic issue in error message (Martin Michlmayr)
* Union
    * Implement multiple writable remotes (Max Sum)
    * Fix server-side copy (Max Sum)
    * Implement ListR (Max Sum)
    * Enable ListR when upstreams contain local (Max Sum)
* WebDAV
    * Add support for `--header-upload` and `--header-download` (Tim Gallant)
    * Fix `X-OC-Mtime` header for Transip compatibility (Nick Craig-Wood)
    * Report full and consistent usage with `about` (Yves G)
* Yandex
    * Add support for `--header-upload` and `--header-download` (Tim Gallant)
2020-06-14 18:25:17 +08:00
ElonH
4db833bfbe RcloneNg: bump version to 0.3.2 (#4810)
* RcloneNg: bump version to 0.3.1

  Changelog

    [0.3.1](https://github.com/ElonH/RcloneNg/compare/v0.3.0...v0.3.1) (2020-06-13)

    Features

* **about:** show changelog ([9d7bea5](9d7bea5f62))
* **breadcurmb:** edit mode, double click to edit path. double again, back to normal ([60c57b4](60c57b4368))
* **file.detail:** enable download file ([1f578f7](1f578f7d54))
* **file.detail:** show spaces usage in file detail if selected is directory ([ff27df9](ff27df9161))
* **list-view:** expend click area of checkbox to improving user experience ([988a219](988a219dbb))
* **manager:** push a message to toastr before creating directory ([9e1091a](9e1091a1f1))
* **pages:** add star button ([5c23b9b](5c23b9bfe3))
* **server-setting:** adding more description in schema ([4eee2f5](4eee2f55d9))
* **server-setting:** provide a powerful schema for server setting ([67223bf](67223bf7e4))

    Bug Fixes

* check if "rc.Serve" is enabled in server options before downloading file ([6a484ca](6a484ca3a7))
* remove debug code ([b5cb23c](b5cb23c9db))
* **breadcurmb:** set cursor as poniter in breadcurmb item ([f014edc](f014edc11e))
* **changelog.md:** copy RcloneNg CHANGELOG.md only ([ef76e1e](ef76e1e589))
* **list-view:** disable double click in manipulations column ([0e0d825](0e0d825f57))
* **list-view:** disable double click surrounding area of checkbox ([bf03dd1](bf03dd173f))
* **list-view:** disable select types icon ([2ea540e](2ea540ec15))
* **manager:** show detail button when right sidebar is expended ([d69179e](d69179e36e))

* RcloneNg: bump version to 0.3.2

 Changelog

    [0.3.2](https://github.com/ElonH/RcloneNg/compare/v0.3.1...v0.3.2) (2020-06-14)

    Features

* **jobs-manager:** add animation on refresh button ([b7cc817](b7cc817b23))

    Bug Fixes

* **list-view:** table index except first page ([b9d7fcf](b9d7fcfb1c))
2020-06-14 18:25:00 +08:00
dingpengyu
925abfd272 更新 more.zh-cn.po
修复
restart 翻译 — 中文(中国): 重启, ID: 150
start 翻译 — 中文(中国): 启动, ID: 151
stop 翻译 — 中文(中国): 关闭, ID: 152
三个字符串的翻译错误
2020-06-14 05:29:12 +08:00
coolsnowwolf
cad7fb2a5a luci-app-ps3netsrv: add package luci 2020-06-13 00:27:53 +08:00
swxk
5715e22bbb Update trojan 1.16.0 (#4772)
* Update Makefile

* Update Makefile
2020-06-12 12:18:51 +08:00
ricksuzade-maker
e7e68c3352 Bump wireguard to v1.0.20200611 (#4778)
Bump wireguard to the newest version
2020-06-12 12:18:29 +08:00
ElonH
ad0a71dadc luci-app-nps: monitor uci configuration changes (#4784)
when uci configuration about nps has been changed, service doesn't
restart itself
2020-06-12 12:18:15 +08:00
hyird
299da0ae6c Update Makefile (#4776) 2020-06-11 17:19:12 +08:00
Jun Liu
8bf7ff9168 V2ray hash fix (#4773) 2020-06-11 17:18:52 +08:00
barton0426
468b3f5653 Update v2ray version to v4.24.2 (#4771) 2020-06-11 11:33:36 +08:00
AmadeusGhost
e707c9fb1b verysync: update to 1.4.1 (#4765) 2020-06-10 23:33:17 +08:00
coolsnowwolf
4676dd368c luci-app-unblockmusic: allow revert to <320Kbps mp3 2020-06-10 16:03:00 +08:00
coolsnowwolf
4798e5314b luci-app-unblockmusic: fix update version display 2020-06-10 16:01:15 +08:00
ElonH
2369979053 RcloneNg: bump version to 0.3.0 (#4757) 2020-06-10 13:10:29 +08:00
HiGarfield
e0c345df71 ppp: syncppp: further fix grep's regex match (#4623)
/etc/config/network这个文件里的写法可以各种各样,pppoe外面可以有引号,也可以没引号。proto与pppoe之间可以有不同类型、不同数量的空格(或Tab)。用uci show,可以把输出格式统一掉,省得考虑配置文件不同写法的区别。
2020-06-09 16:14:26 +08:00
hyird
bae6e7fc28 luci-app-frpc: add plugin "https2http" (#4754)
* Update config.lua

* Update frp

* Update frp.po
2020-06-09 16:11:41 +08:00
dingpengyu
5e37e2fdce Merge branch 'master' into zh_CN 2020-06-08 05:49:48 +08:00
Chuck
901efc2d12 default-settings: i18n: add space between Chinese and English characters (#4616) 2020-06-07 21:52:06 +08:00
dingpengyu
da331c5b34 更新 webadmin.po
修复符号
2020-06-07 11:28:14 +08:00
dingpengyu
5d4990f226 更新 vsftpd.po
修复符号
2020-06-07 11:26:36 +08:00
dingpengyu
5d17318c36 更新 samba4.po
修复符号
2020-06-07 11:21:55 +08:00
dingpengyu
af7295a7e2 remove 2020-06-07 11:20:25 +08:00
dingpengyu
c721c2768b 更新 luci-app-rclone.po
修复条目排序
2020-06-07 11:19:48 +08:00
dingpengyu
626b393bf0 统一翻译目录结构 2020-06-07 11:16:50 +08:00
dingpengyu
90e04aa14f 更新 qbittorrent.po
翻译新条目
修复符号
2020-06-07 11:11:09 +08:00
dingpengyu
edb9353889 更新 pppoe-relay.po
修复符号
2020-06-07 10:47:33 +08:00
dingpengyu
9e09f3fbd5 更新 nft-qos.po
修复符号
2020-06-07 10:45:38 +08:00
dingpengyu
1fd9d1de3f 更新 forked-daapd.po
修复符号
2020-06-07 10:42:50 +08:00
dingpengyu
0e98610329 更新 kodexplorer.po
修复符号
2020-06-07 10:41:09 +08:00
dingpengyu
c01f66c913 更新 filetransfer.po
优化翻译
2020-06-07 10:36:20 +08:00
dingpengyu
8dc4c4bf01 更新 cpufreq.po
修复翻译排序
2020-06-07 10:31:47 +08:00
dingpengyu
7453ca8d06 更新 adbyby.po
修复符号
2020-06-07 10:25:42 +08:00
dingpengyu
4832be27f6 更新 luci-i18n-sqm.po
修复翻译条目
2020-06-07 10:22:49 +08:00
dingpengyu
c873f61bb3 Poedit 自动修复了“more.zh-cn.po”文件中的无效内容。
该文件中包含重复的项目,这是不允许的,并且影响了该文件被使用。Poedit 修复了该问题,但您应该审阅任何已被标记为“需要处理”的翻译和纠正它们(如有必要)。
2020-06-07 10:18:02 +08:00
AmadeusGhost
f892bcdf96 treewide: adjust sysupgrade script (#4720)
This commit fix sysupgrade failed for bcm27xx.
2020-06-06 12:36:21 +08:00
ElonH
6ac928f1d5 Rclone-OpenWRT: upgrade (#4737)
* feat(rcloneng): an angular web application for rclone
* feat(backup): backup rclone configuration files during system upgrade
* 🐛 luci-app-rclone: rclone service without bash
* 🔇 filter out duplicate log
* 🐛 luci-app-rclone: proxy work around
* 📄 add license header
* rclone: set /etc/rclone/rclone.conf as default config path
2020-06-06 12:36:01 +08:00
coolsnowwolf
340f1bffaa ps3netsrv: add ps3netsrv allows you to stream games and ISOs over the network to your CFW PlayStation(R) 3 system 2020-06-04 16:38:42 +08:00
hyird
4b97e2a826 luci-app-frpc:fix translate (#4726)
Co-authored-by: hyird <1326606797@qq.com>
2020-06-04 15:48:42 +08:00
Aaron-lv
ee958e2bd3 Update v2ray-core to 4.23.4 (#4725) 2020-06-04 15:48:17 +08:00
Zeezorn
e2bbcd5ac2 update v2ray-core to 4.23.3 (#4716)
Fix
Issued an emergency fix for VMess weakness described in https://github.com/v2ray/v2ray-core/issues/2523
This fix can significantly hindrance attack based on the weakness described. Only servers need to be updated to apply this emergency fix, it not expected for well-behaved clients to be influenced. A more permanent solution is underway.
2020-06-03 12:10:15 +08:00
Max Zhao
d42b563e2f v2ray-plugin: update to 1.3.1 (#4709) 2020-06-01 22:01:44 +08:00
Max Zhao
939405f2cc v2ray: update v2ray-core to 4.23.2 (#4705) 2020-06-01 10:48:20 +08:00
Chuck
929f3953dd firewall: refresh 900-filter-aaaa.patch
Signed-off-by: Chuck <fanck0605@qq.com>
2020-05-31 15:39:00 +08:00
Kuma
ef2ebeeec4 Update UnblockNeteaseMusicGo server.crt (#4697) 2020-05-31 10:45:33 +08:00
R3pl4c3r
297a116933 luci-app-docker: rename dockerman (#4704) 2020-05-31 10:43:37 +08:00
AmadeusGhost
0f9db42950 baidupcs-web: correct download for arm (#4695) 2020-05-29 12:06:23 +08:00
coolsnowwolf
ab7e53e9ce baidupcs-web: fix token and add aira2 support 2020-05-28 17:35:38 +08:00
coolsnowwolf
1be41d9899 ipt2socks: bump to 1.1.2 fix udp relay bug 2020-05-27 12:46:18 +08:00
coolsnowwolf
bbe99b4fdf mac80211:update ath10k upstream patches 2020-05-27 11:58:24 +08:00
AmadeusGhost
6105915786 Wireless: rollback with mac80211 (#4683)
mt76: fix build
ath10k-ct: rollback to 4.19
Revert "iw/iwinfo/mwlwifi: bump version"
Revert "mac80211/5.4: fix build on kernel 4.9"
Revert "mac80211: switch to upstream owl-loader driver"
2020-05-27 11:45:56 +08:00
coolsnowwolf
d1f2153ca4 hostapd: disable wifi-reload 2020-05-27 00:17:15 +08:00
coolsnowwolf
bb3276ef05 mac80211: fix RT-ACRH17 2.4Ghz wifi performance issus 2020-05-26 23:18:25 +08:00
coolsnowwolf
458564b2b9 luci-app-adbyby-plus: add block douyin option 2020-05-26 19:09:01 +08:00
coolsnowwolf
f3339baf3c luci-app-unblockmusic: add force replace lower than 320kbps option 2020-05-26 18:33:09 +08:00
coolsnowwolf
052720804c Merge branch 'master' of https://github.com/coolsnowwolf/lede 2020-05-26 17:43:52 +08:00
coolsnowwolf
b32a75ed69 luci-app-unblockmusic: fix unlock PC and iOS at the same time in nodejs version 2020-05-26 17:43:43 +08:00
ricksuzade-maker
c289a1c598 Bump wireguard to 1.0.20200520 (#4675) 2020-05-26 15:29:36 +08:00
coolsnowwolf
dd25de3730 ramips: add redmi ac2100 pb-boot factory ubi format support 2020-05-26 15:17:00 +08:00
coolsnowwolf
79c0755674 Revert "luci-app-ipsec-vpnd: fix outboud rules with some China android phones"
This reverts commit 9206d58b34.
2020-05-25 23:01:48 +08:00
John Smith
6c741494f1 Update README.md (#4670)
纯净的ubuntu在搭建编译环境时会提示没有安装wget
2020-05-25 22:15:29 +08:00
AmadeusGhost
e54db866ab ar71xx: wdr8500: fix build on 4.14 (#4668) 2020-05-25 19:28:22 +08:00
monsterzzzz
db57362a97 make luci cifsd force_root option work (#4657) 2020-05-24 23:01:25 +08:00
AmadeusGhost
097f36d48c ipq40xx: fix dtc warning (#4660)
arch/arm/boot/dts/qcom-ipq4019-cm520-79f.dtb: Warning (reg_format):
"reg" property in /led_spi/led_gpio@0 has invalid length (4 bytes)
(#address-cells == 1, #size-cells == 1)
arch/arm/boot/dts/qcom-ipq4019-cm520-79f.dtb: Warning
(avoid_default_addr_size): Relying on default #size-cells value for
/led_spi/led_gpio@0
arch/arm/boot/dts/qcom-ipq4019-wpj419.dtb: Warning (reg_format):
/soc/spi@78b5000/flash0@0/partitions/partition@0:reg: property has
invalid length (8 bytes) (#size-cells == 1)

Signed-off-by: AmadeusGhost <amadeus@jmu.edu.cn>
2020-05-24 13:05:57 +08:00
coolsnowwolf
cd6e66d6e1 ramips:improve R6850 support 2020-05-23 00:14:36 +08:00
NivalXer
5ae70efb04 ramips: add support for Linksys EA7500 v2 (#4646)
* ramips: add support for Linksys EA7500 v2

* fix build

* fix build

* update build config
2020-05-22 10:53:12 +08:00
coolsnowwolf
35d87d547a ksmbd: bump version 2020-05-20 17:44:29 +08:00
coolsnowwolf
93c72e99da default-settings: replace 18.06.8 luci seed 2020-05-20 10:25:03 +08:00
lyin
01045fbb60 add fuse-utils (#4621)
缺少fuse-utils模块,导致rclone 无法运行。
2020-05-20 10:02:29 +08:00
Hugo Yuan
31cc9922ac luci-app-unblockmusic: Refresh ipset music list when ifup (#4576)
* luci-app-unblockmusic: Refresh ipset music list when ifup

* Update 099-unblockmusic
2020-05-20 10:02:10 +08:00
AmadeusGhost
1457fa8e97 ar71xx: add support for TP-LINK TL-WDR8500 v1 (#4615)
This commit add support for the TP-LINK TL-WDR8500 v1

SOC:	Qualcomm QCA9563 775MHz
RAM:    128MB M14D1G1664A-2.5B DDR2
FLASH:  8MB Winbond 25Q64FVSIG
WLAN1:  QCA9563 2.4GHz 802.11b/g/n 3x3
WLAN2:  QCA9984 5GHz 802.11 n/ac 4x4
Ethernet: 5 x 1000Mbps (1wan, 4lan)

Installation via breed:
Flash into breed-qca956x-uart_rx18_tx22-reset1.bin,
and then edit the environment variables:
  Field: autoboot.command
  Value: boot mem 0x9f020200

From https://www.right.com.cn/forum/thread-328619-1-1.html

Signed-off-by: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com>
2020-05-20 10:00:51 +08:00
Hugo Yuan
4685f86c44 UnblockNeteaseMusic: bump to 0.25.3 (#4624) 2020-05-20 09:59:50 +08:00
MkfsSion
684c112b40 gdb: Fix build on AArch64 (#4619)
* Tested on RaspberryPi 4B(bcm2711)

Signed-off-by: MkfsSion <mkfssion@mkfssion.com>
2020-05-18 09:37:14 +08:00
Chuck
8f9bc86de1 ppp: syncppp: fix grep's regex match (#4609) 2020-05-15 20:10:48 +08:00
ricksuzade-maker
e48e438b08 Bump wireguard-tool to 1.0.20200513 (#4608) 2020-05-14 15:32:39 +08:00
coolsnowwolf
a71c8a8edd add Xiaoma v1 small photo 2020-05-14 15:30:44 +08:00
coolsnowwolf
6fa059ada4 add Xiaoma v1 small photo 2020-05-14 15:28:39 +08:00
coolsnowwolf
eabac3a457 add Xiaoma v1 small photo 2020-05-14 15:25:09 +08:00
coolsnowwolf
1fda4b59b1 add Xiaoma v1 recommendation 2020-05-14 15:22:39 +08:00
coolsnowwolf
ed5b3a43bf add Xiaoma v1 recommendation 2020-05-14 15:20:50 +08:00
ricksuzade-maker
7fe52a9f0b Bump wireguard-tools to 1.0.20200510 (#4598) 2020-05-13 13:28:58 +08:00
AmadeusGhost
c985a54a61 kernel: bump to 4.9.223, 4.14.180, 4.19.122 (#4600)
* kernel: bump 4.9 to 4.9.223

Refreshed all patches.

Fixes:
- CVE-2020-12114

Compile-tested on: ar71xx
Runtime-tested on: ar71xx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>

* kernel: bump 4.14 to 4.14.180

Refreshed all patches.

Fixes:
- CVE-2020-12114
- CVE-2020-11669

Compile-tested on: pistachio
Runtime-tested on: none

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>

* kernel: bump 4.19 to 4.19.122

Refreshed all patches.

Remove upstreamed:
- 551-loop-Better-discard-support-for-block-devices.patch

Fixed:
- CVE-2020-11884
- CVE-2020-12114
- CVE-2019-3016
- CVE-2020-11669

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>

Co-authored-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2020-05-13 13:28:43 +08:00
HQ Ong
8ad037aed4 luci-app-frpc: Add ACL rule to compliance with new Luci (#4586)
New Luci sucks...
2020-05-12 19:00:33 +08:00
AmadeusGhost
5591c36728 Revert "ipq40xx: update ath10k firmware" (#4590)
This reverts commit 2c37fa71f9.
2020-05-12 18:58:46 +08:00
coolsnowwolf
1428e0eeed ipq40xx: ignore some debug info 2020-05-11 16:22:05 +08:00
coolsnowwolf
bd00ced2f6 brcm47xx: let K3 using 160Mhz firmware 2020-05-11 15:52:49 +08:00
AmadeusGhost
839522a0c7 mac80211: correct target name for bcm (#4575) 2020-05-11 15:42:59 +08:00
coolsnowwolf
b65f1ebf00 mt76: bump to lastest version 2020-05-09 16:48:42 +08:00
coolsnowwolf
f26c892a0b Version bump to R20.5.9 2020-05-09 15:39:00 +08:00
coolsnowwolf
58d4e7f906 Merge branch 'master' of https://github.com/coolsnowwolf/lede 2020-05-09 15:36:59 +08:00
coolsnowwolf
de279cbd29 ramips: unlock Bootloader for Redmi AC2100 2020-05-09 15:36:49 +08:00
AmadeusGhost
9c732c877d ipq40xx: adjust switch configuration for netgear ex61x0v2 (#4550) 2020-05-09 15:05:57 +08:00
manyeechen
7c2d28fbae npc:bump version to 0.26.7 (#4569)
add:
api /client/list 添加获取服务端连接host和连接类型 #483
添加自定义客户端断开时间 #485
fix:
web手机浏览输入框或者按钮被遮挡问题,感谢 @kekxv
android客户端无法粘贴的问题 #479
p2p 由于上个版本的一些改动造成无法使用的问题 #515
2020-05-09 15:05:39 +08:00
Hugo Yuan
b7be5fd5fa UnblockNeteaseMusic: bump to 0.25.0 (#4570) 2020-05-09 15:05:25 +08:00
coolsnowwolf
f231323db5 luci-app-frps: fix disable when upgrade 2020-05-09 15:03:44 +08:00
coolsnowwolf
2c37fa71f9 ipq40xx: update ath10k firmware 2020-05-09 14:36:43 +08:00
HiGarfield
82792a1d11 luci-app-openvpn-server: avoid repeated forwarding rules (#4558)
Fix the bug that flashing firmware multiple times will cause repeated forwarding rules in firewall.
2020-05-08 20:43:27 +08:00
ricksuzade-maker
585ca34a6b Bump wireguard to version 1.0.20200506 (#4560) 2020-05-08 20:42:57 +08:00
lunatickochiya
b689600046 luci-app-openvpn-server:add lan to vpn forwarding (#4553)
we can control client directly by adding this forwarding 
also use uci -q batch commands can lead start router faster
2020-05-06 23:34:18 +08:00
lunatickochiya
b80d00eede luci-app-openvpn-server:fix start crash in AR9341 (#4540)
just one uci commit in script 
too many commits may crash start in AR9341 routers
2020-05-06 00:13:25 +08:00
ricksuzade-maker
5b88caedf6 Bump wireguard to 1.0.20200429 (#4536) 2020-05-04 18:24:01 +08:00
LitingLin
d71dc69844 make compatible with new upstream Luci requirement (#4529) 2020-05-04 10:55:07 +08:00
AmadeusGhost
9f90d1abd4 Redmi AC2100: adjust switch configuration (#4528) 2020-05-04 00:43:17 +08:00
AmadeusGhost
23378ed9a4 netifd: add dynamic wireless reconfiguration (#4518)
Set new option 'reconf' in 'wifi-device' section to enable dynamic re-configuration on that radio. Also fix wifi relay and 'netifd: radio1 (9654): Command failed'.
2020-05-02 19:11:45 +08:00
AmadeusGhost
1a44b8d74f ramips: fix build error (#4508) 2020-05-02 07:30:25 +08:00
AmadeusGhost
3c510baf47 ramips: fix support for Redmi AC2100 (#4500)
This commit fix switch and image config for Redmi AC2100.

Signed-off-by: AmadeusGhost <amadeus@jmu.edu.cn>
2020-05-01 22:37:45 +08:00
coolsnowwolf
01aeb5df0e ramips: Add support for Xiaomi Redmi Router AC2100 (RM2100) 2020-05-01 12:23:28 +08:00
coolsnowwolf
d0cc3d0230 luci-app-qbittorrent: update python3 for search 2020-05-01 11:53:30 +08:00
ardanzhu
21b36d6f9f Update to frp 0.33.0 version (#4486) 2020-05-01 11:48:08 +08:00
AmadeusGhost
a5c4c8899c linux-firmware: enable qca4019 (#4488) 2020-05-01 11:47:50 +08:00
coolsnowwolf
f2f84a682e jquery v3.5.0 mark 2020-04-30 11:31:31 +08:00
coolsnowwolf
e3e03876c2 add rclone package and luci-app-rclone 2020-04-30 10:14:30 +08:00
coolsnowwolf
6cdf4ded1f ath10k-firmware: move CT firmwares to new package 2020-04-30 10:11:11 +08:00
AmadeusGhost
4b53337af7 ipq40xx: correct device packages (#4450) 2020-04-29 13:32:07 +08:00
lunatickochiya
11848e8b43 shadowsocksr-libev:reduce file size (#4467)
参数来源:c54a826086 (diff-517378957dd5ecc51358b1ae79836edb)
经测试,对于ssr也可以优化
测试平台:ar71xx ramips
2020-04-28 13:58:13 +08:00
coolsnowwolf
cbba577f6d Merge branch 'master' of https://github.com/coolsnowwolf/lede 2020-04-27 12:50:13 +08:00
coolsnowwolf
4787dbaf3c mac80211: ath10k: increase rx buffer size to 2048 2020-04-27 12:49:57 +08:00
Chuck
55e06fdb00 dropbear: only bind lan by default (#4456) 2020-04-27 12:31:07 +08:00
coolsnowwolf
a818d7e5da Merge branch 'master' of https://github.com/coolsnowwolf/lede 2020-04-27 12:30:33 +08:00
coolsnowwolf
404ec5fa84 ipq40xx: adjust pacakge 2020-04-27 12:30:22 +08:00
Mattraks
a561416254 v2ray-plugin:Add GOPROXY support (#4421) 2020-04-27 00:57:24 +08:00
coolsnowwolf
b0fd180162 Revert "mac80211 ath10k: increase rx buffer size to 2048"
This reverts commit 2c0a9d403e.
2020-04-26 16:37:04 +08:00
coolsnowwolf
9206d58b34 luci-app-ipsec-vpnd: fix outboud rules with some China android phones 2020-04-26 16:20:39 +08:00
coolsnowwolf
fcfde03578 UnblockNeteaseMusic: update search api 2020-04-26 16:09:40 +08:00
coolsnowwolf
4306c245cf generic: fix flow table hw offload 2020-04-26 15:36:41 +08:00
coolsnowwolf
f43d194449 Merge branch 'master' of https://github.com/coolsnowwolf/lede 2020-04-26 15:28:01 +08:00
coolsnowwolf
2c0a9d403e mac80211 ath10k: increase rx buffer size to 2048 2020-04-26 15:27:50 +08:00
wybb
ceb6d06fd0 fix xlnetacc logout (#4422)
迅雷快鸟openwrt的原作者项目:https://github.com/sensec/luci-app-xlnetacc/blob/master/files/root/etc/init.d/xlnetacc
原项目并没有采用kill -9的强杀方式
lean项目中迁移后的版本使用kill -9会导致不能正确注销,从而产生如下问题。
1、luci 快鸟web界面中切换从“启用”切换为“不启用”后,短期内无法停止提速效果(因为只是强杀xlnetacc.sh)
2、强杀将导致未注销就丢失了最近一次的sessionid(该变量为xlnetacc.sh的临时变量,强杀后就丢失了)。根据迅雷快鸟的官方规则,在前一次未注销的情况下,假如ip变化,那么新ip在24小时内将无法再次加速。
所以导致了在
a.重启路由
b.重启光猫
c.重新插拔光猫网线
d.web界面中手工停用快鸟后又进行了重新拨号

这些操作都将导致24小时内无法再次提速

原始项目中采用不加-9的kill能够安全发送信号导致注销操作
2020-04-26 15:25:46 +08:00
R3pl4c3r
a7664194db README.md: Add dependent package for Ubuntu 20.04 (#4432) 2020-04-25 11:08:22 +08:00
AmadeusGhost
463b6ac050 mac80211: fixed slow wireless startup (#4420)
* hostapd: reduce to a single instance per service

* mac80211: sync upstream source code

* iw: bump to 5.4
2020-04-23 16:42:46 +08:00
CN_SZTL
fc7ff01576 openssl: bump to 1.1.1g (#4415)
Fixes NULL dereference in SSL_check_chain() for TLS 1.3, marked with
high severity, assigned CVE-2020-1967.

Ref: https://www.openssl.org/news/secadv/20200421.txt

Cherry-pick from openwrt/openwrt@3773ae1.
Also add mirror for mainland China user in this commit.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>

Co-authored-by: Petr Štetiar <ynezz@true.cz>
2020-04-23 10:47:31 +08:00
lunatickochiya
f1c10fda60 gcc:use the main make jobserver to install gcc (#3690)
This can speed up building toolchain
2020-04-21 15:36:07 +08:00
CN_SZTL
3bb1af32ad mbedtls: update to 2.16.6 (#4387)
Security fixes for:
* CVE-2020-10932
* a potentially remotely exploitable buffer overread in a DTLS client
* bug in DTLS handling of new associations with the same parameters

Full release announement:
https://tls.mbed.org/tech-updates/releases/mbedtls-2.16.6-and-2.7.15-released

Cherry-pick from: openwrt/openwrt@02fcbe2.

Signed-off-by: Magnus Kroken <mkroken@gmail.com>
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>

Co-authored-by: Magnus Kroken <mkroken@gmail.com>
2020-04-20 21:04:48 +08:00
CN_SZTL
b20f9a70dc luci-app-unblockmusic: drop outdated server (#4386) 2020-04-20 21:02:20 +08:00
AmadeusGhost
c33118190f bcm63xx: refresh patches (#4372) 2020-04-19 14:31:01 +08:00
Kui Wu
b7e9fc662c luci-app-frpc: add proxy_protocol_version option for proxy config (#4370) 2020-04-18 20:20:40 +08:00
ricksuzade-maker
b8f8afb7d0 Bump wireguard to 1.0.20200413 (#4361)
Bump to the newest version of wireguard
2020-04-18 11:20:24 +08:00
Xiaok
639f3631e8 n2n: update to v2.6.0-stable (#4349) 2020-04-17 11:51:15 +08:00
AmadeusGhost
9448672845 kernel: bump to 4.9.219, 4.14.176, 4.19.115 (#4350)
* kernel: bump 4.14 to 4.14.176

Refreshed all patches.

Remove upstreamed:
- 0001-net-thunderx-workaround-BGX-TX-Underflow-issue.patch
- 600-ipv6-addrconf-call-ipv6_mc_up-for-non-Ethernet-inter.patch
- 184-USB-serial-option-add-Wistron-Neweb-D19Q1.patch

Fixes:
- CVE-2020-8648 (potentially)
- CVE-2020-8647
- CVE-2020-8649

Compile-tested on: cns3xxx, octeontx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>

* kernel: bump 4.19 to 4.19.115

Remove upstreamed:
- 600-ipv6-addrconf-call-ipv6_mc_up-for-non-Ethernet-inter.patch
- 184-USB-serial-option-add-Wistron-Neweb-D19Q1.patch

Fixes:
- CVE-2020-8647
- CVE-2020-8648 (potentially)
- CVE-2020-8649

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>

* kernel: bump 4.9 to 4.9.219

Refreshed all patches.

Altered patches:
- 0026-NET-multi-phy-support.patch

Fixes:
- CVE-2020-8647
- CVE-2020-8648 (Potentially)
- CVE-2020-8649

Compile-tested on: ar71xx
Runtime-tested on: ar71xx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2020-04-17 11:50:34 +08:00
Chongnuo Ji
6b142baa3d Update README.md (#4290)
Correct the make download command: V should be in capital to work.
2020-04-17 00:45:25 +08:00
Chuck
5f3f4e3566 netdevices.mk: fix SFC9x00 config(#4271) (#4328) 2020-04-17 00:45:03 +08:00
Xiaok
a5570642c6 frp: bump version to v0.32.1 and dos2unix for Makefile (#4338) 2020-04-16 16:12:16 +08:00
coolsnowwolf
d16a020193 update openwrt-ci.yml 2020-04-16 13:23:45 +08:00
coolsnowwolf
036efba3c1 hostapd: backport usleep patch 2020-04-16 12:59:49 +08:00
coolsnowwolf
af803f2569 update feeds.conf.default 2020-04-16 12:40:07 +08:00
fw876@outlook.com
be87dd430a Merge branch 'master' of https://github.com/coolsnowwolf/lede 2020-04-16 12:27:33 +08:00
fw876@outlook.com
988acf9daa remove obsolete package 2020-04-16 12:27:11 +08:00
AmadeusGhost
cc689609d6 ipq806x: 4.19: correct dts for m520 (#4330)
Signed-off-by: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com>
2020-04-16 11:28:05 +08:00
lean
6c8c96cedf Merge branch 'master' of https://github.com/coolsnowwolf/lede 2020-04-15 20:42:34 +08:00
lean
7262d9503e luci-app-ssr-plus:hide ssr server option when shadowsocks-libev-ss-server is not installed 2020-04-15 20:42:20 +08:00
HQ Ong
2284f0da80 Add ACL rule to compatible with trunk Luci requirement (#4323)
Add ACL rule to compatible with trunk Luci requirement
2020-04-15 20:40:07 +08:00
lean
2125e805d1 luci-app-ssr-plus: revert lock feature 2020-04-15 20:39:16 +08:00
Mattraks
8a02b49078 luci-app-ssr-plus:Fix Socks5 startup errors (#4310)
* luci-app-ssr-plus:Fix Socks5 startup errors

* luci-app-ssr-plus:Fix pdnsd EOF warning errors

* luci-app-ssr-plus: ssr-switch Adjust Output

* luci-app-ssr-plus: Data Update
2020-04-15 00:48:29 +08:00
CN_SZTL
3ad7a35c91 luci-app-ssr-plus: use "&" to instead of "-d" (daemon mode) (#4307) 2020-04-14 09:25:59 +08:00
Mattraks
9cf7ebae5f luci-app-ssr-plus:Fix kcptun startup errors (#4303)
* Fix Errors

* Updated version

* luci-app-ssr-plus:require "luci.model.uci"

* luci-app-ssr-plus:Revised explanation
2020-04-14 09:25:17 +08:00
AmadeusGhost
f7cdc54602 ipq40xx: add missing device config for rt-ac1300uhp (#4300) 2020-04-14 09:22:11 +08:00
hyird
f4a9966616 luci-app-unblockmusic: add flac switch for nodejs (#4302)
* Update unblockmusic.lua

* Update unblockmusic
2020-04-14 09:21:40 +08:00
Mattraks
b97c4e8bb5 luci-app-ssr-plus:Fix SS running status (#4289)
* luci-app-ssr-plus:Code optimization and Fix Bug

* luci-app-ssr-plus:Adjust reference data location

* luci-app-ssr-plus:revert subscribe.lua

* luci-app-ssr-plus:Fix SS running status

* luci-app-ssr-plus:Updated version

* luci-app-ssr-plus:Revised interpretation
2020-04-13 01:44:03 +08:00
Mattraks
66e6e853be luci-app-ssr-plus:revert subscribe.lua (#4282)
* luci-app-ssr-plus:Code optimization and Fix Bug

* luci-app-ssr-plus:Adjust reference data location

* luci-app-ssr-plus:revert subscribe.lua
2020-04-12 12:04:25 +08:00
AmadeusGhost
00d40a40ac ipq40xx: fix support for Asus RT-AC1300UHP in 4.19 (#4285)
RT-AC1300UHP has 256M memory and does not need to use ath10k-ct-smallbuffers.

Signed-off-by: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com>
2020-04-12 12:04:02 +08:00
Mattraks
a10390cc21 luci-app-ssr-plus:Code optimization and Fix Bug (#4253)
* luci-app-ssr-plus:Code optimization and Fix Bug

* luci-app-ssr-plus:Adjust reference data location
2020-04-11 21:53:11 +08:00
ZhenYu
ce326f078b Update openwrt-ci.yml (#4254) 2020-04-10 00:43:01 +08:00
守望星空
593d812a47 Update Kcptun (#4243) 2020-04-09 14:01:58 +08:00
xinxijishuwyq
3dd0a3e177 simple-obfs: bump to latest version to Fix FTBFS under GCC-9 (#4241)
Signed-off-by: Ken Wong <xinxijishuwyq@gmail.com>
2020-04-09 14:01:14 +08:00
AmadeusGhost
2cdcee23fb ipq40xx: device: switch to ath10k-ct (#4239) 2020-04-09 14:00:56 +08:00
10539 changed files with 2088288 additions and 1126165 deletions

View File

@@ -1,33 +1,34 @@
#
# This is free software, lisence use MIT.
#
# Copyright (C) 2019 P3TERX <https://p3terx.com>
# Copyright (C) 2019 KFERMercer <KFER.Mercer@gmail.com>
#
# <https://github.com/KFERMercer/OpenWrt-CI>
#
#
# Copyright (C) 2019 P3TERX
#
# Copyright (C) 2020 KFERMercer
#
name: OpenWrt-CI
on:
schedule:
- cron: 0 20 * * *
watch:
types: started
release:
types: [published]
jobs:
build:
build_openwrt:
name: Build OpenWrt firmware
runs-on: ubuntu-latest
if: github.event.repository.owner.id == github.event.sender.id
steps:
- name: Checkout
uses: actions/checkout@master
uses: actions/checkout@v2
with:
ref: master
fetch-depth: 1000000
- name: Space cleanup
env:
@@ -35,25 +36,17 @@ jobs:
run: |
docker rmi `docker images -q`
sudo rm -rf /usr/share/dotnet /etc/mysql /etc/php /etc/apt/sources.list.d
sudo -E apt-get -y purge azure-cli ghc* zulu* hhvm llvm* firefox google* dotnet* powershell openjdk* mysql* php*
sudo -E apt-get -y purge azure-cli ghc* zulu* hhvm llvm* firefox google* dotnet* powershell openjdk* mysql* php* android*
sudo -E apt-get update
sudo -E apt-get -y install build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch python3 unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex uglifyjs gcc-multilib g++-multilib p7zip p7zip-full msmtp libssl-dev texinfo libglib2.0-dev xmlto qemu-utils upx libelf-dev autoconf automake libtool autopoint device-tree-compiler antlr3 gperf
sudo -E apt-get -y install build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch python3 unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex uglifyjs gcc-multilib g++-multilib p7zip p7zip-full msmtp libssl-dev texinfo libglib2.0-dev xmlto qemu-utils upx libelf-dev autoconf automake libtool autopoint device-tree-compiler antlr3 gperf swig
sudo -E apt-get -y autoremove --purge
sudo -E apt-get clean
# 利用挂载在 /mnt/ 的 14G 额外空间:
# sudo mkdir -p -m 777 /mnt/openwrt/bin /mnt/openwrt/build_dir/host /mnt/openwrt/build_dir/hostpkg /mnt/openwrt/dl /mnt/openwrt/feeds /mnt/openwrt/staging_dir
# ln -s /mnt/openwrt/bin ./bin
# mkdir -p ./build_dir/host && ln -s /mnt/openwrt/build_dir/host ./build_dir/host
# mkdir -p ./build_dir/host && ln -s /mnt/openwrt/build_dir/hostpkg ./build_dir/hostpkg
# ln -s /mnt/openwrt/dl ./dl
# ln -s /mnt/openwrt/feeds ./feeds
# ln -s /mnt/openwrt/staging_dir ./staging_dir
df -h
- name: Update feeds
run: |
sed -i 's/#src-git helloworld/src-git helloworld/g' ./feeds.conf.default
./scripts/feeds update -a
./scripts/feeds install -a
@@ -78,10 +71,39 @@ jobs:
du -h --max-depth=1 ./bin
- name: Prepare artifact
run: find ./bin/targets/ -type d -name "packages" | xargs rm -rf {}
run: |
mkdir -p ./artifact/firmware
mkdir -p ./artifact/package
mkdir -p ./artifact/buildinfo
rm -rf $(find ./bin/targets/ -type d -name "packages")
cp -rf $(find ./bin/targets/ -type f) ./artifact/firmware/
cp -rf $(find ./bin/packages/ -type f -name "*.ipk") ./artifact/package/
cp -rf $(find ./bin/targets/ -type f -name "*.buildinfo" -o -name "*.manifest") ./artifact/buildinfo/
- name: Upload artifact
uses: actions/upload-artifact@master
- name: Deliver buildinfo
uses: actions/upload-artifact@v2
with:
name: OpenWrt_buildinfo
path: ./artifact/buildinfo/
- name: Deliver package
uses: actions/upload-artifact@v2
with:
name: OpenWrt_package
path: ./artifact/package/
- name: Deliver firmware
uses: actions/upload-artifact@v2
with:
name: OpenWrt_firmware
path: ./bin/targets/
- name: Upload release asset
if: github.event == 'release'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.YOURTOKEN }}
file: ./artifact/firmware/*
tag: ${{ github.ref }}
file_glob: true

3
.gitignore vendored
View File

@@ -25,4 +25,5 @@ key-build*
.emacs.desktop*
TAGS*~
git-src
.git-credentials
.git-credentials
/*.log

View File

@@ -18,6 +18,7 @@ $(if $(findstring $(space),$(TOPDIR)),$(error ERROR: The path to the OpenWrt dir
world:
DISTRO_PKG_CONFIG:=$(shell which -a pkg-config | grep -E '\/usr' | head -n 1)
export PATH:=$(TOPDIR)/staging_dir/host/bin:$(PATH)
ifneq ($(OPENWRT_BUILD),1)
@@ -59,6 +60,7 @@ clean: FORCE
dirclean: clean
rm -rf $(STAGING_DIR_HOST) $(STAGING_DIR_HOSTPKG) $(TOOLCHAIN_DIR) $(BUILD_DIR_BASE)/host $(BUILD_DIR_BASE)/hostpkg $(BUILD_DIR_TOOLCHAIN)
rm -rf $(TMP_DIR)
$(MAKE) -C $(TOPDIR)/scripts/config clean
ifndef DUMP_TARGET_DB
$(BUILD_DIR)/.prepared: Makefile
@@ -86,18 +88,36 @@ prereq: $(target/stamp-prereq) tmp/.prereq_packages
exit 1; \
fi
$(BIN_DIR)/profiles.json: FORCE
$(if $(CONFIG_JSON_OVERVIEW_IMAGE_INFO), \
WORK_DIR=$(BUILD_DIR)/json_info_files \
$(SCRIPT_DIR)/json_overview_image_info.py $@ \
)
json_overview_image_info: $(BIN_DIR)/profiles.json
checksum: FORCE
$(call sha256sums,$(BIN_DIR),$(CONFIG_BUILDBOT))
buildversion: FORCE
$(SCRIPT_DIR)/getver.sh > $(BIN_DIR)/version.buildinfo
feedsversion: FORCE
$(SCRIPT_DIR)/feeds list -fs > $(BIN_DIR)/feeds.buildinfo
diffconfig: FORCE
mkdir -p $(BIN_DIR)
$(SCRIPT_DIR)/diffconfig.sh > $(BIN_DIR)/config.seed
$(SCRIPT_DIR)/diffconfig.sh > $(BIN_DIR)/config.buildinfo
buildinfo: FORCE
$(_SINGLE)$(SUBMAKE) -r diffconfig buildversion feedsversion
prepare: .config $(tools/stamp-compile) $(toolchain/stamp-compile)
$(_SINGLE)$(SUBMAKE) -r diffconfig
$(_SINGLE)$(SUBMAKE) -r buildinfo
world: prepare $(target/stamp-compile) $(package/stamp-compile) $(package/stamp-install) $(target/stamp-install) FORCE
$(_SINGLE)$(SUBMAKE) -r package/index
$(_SINGLE)$(SUBMAKE) -r json_overview_image_info
$(_SINGLE)$(SUBMAKE) -r checksum
.PHONY: clean dirclean prereq prepare world package/symlinks package/symlinks-install package/symlinks-clean

View File

@@ -16,7 +16,7 @@ Welcome to Lean's git source of OpenWrt and packages
2. 命令行输入 `sudo apt-get update` ,然后输入
`
sudo apt-get -y install build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch python3.5 unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex uglifyjs git-core gcc-multilib p7zip p7zip-full msmtp libssl-dev texinfo libglib2.0-dev xmlto qemu-utils upx libelf-dev autoconf automake libtool autopoint device-tree-compiler g++-multilib antlr3 gperf
sudo apt-get -y install build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch python3 python2.7 unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex uglifyjs git-core gcc-multilib p7zip p7zip-full msmtp libssl-dev texinfo libglib2.0-dev xmlto qemu-utils upx libelf-dev autoconf automake libtool autopoint device-tree-compiler g++-multilib antlr3 gperf wget curl swig rsync
`
3. 使用 `git clone https://github.com/coolsnowwolf/lede` 命令下载好源代码,然后 `cd lede` 进入目录
@@ -27,7 +27,7 @@ sudo apt-get -y install build-essential asciidoc binutils bzip2 gawk gettext git
make menuconfig
```
5. `make -j8 download v=s` 下载dl库国内请尽量全局科学上网
5. `make -j8 download V=s` 下载dl库国内请尽量全局科学上网
6. 输入 `make -j1 V=s` -j1 后面是线程数。第一次编译推荐用单线程)即可开始编译你要的固件了。
@@ -65,6 +65,13 @@ make -j$(($(nproc) + 1)) V=s
3.想学习OpenWrt开发但是摸不着门道自学没毅力基础太差怕太难学不会跟着佐大学OpenWrt开发入门培训班助你能学有所成
报名地址:[点击报名](http://forgotfun.org/2018/04/openwrt-training-2018.html "报名")
## 软路由介绍
友情推荐不恰饭:如果你在寻找一个低功耗小体积性能不错的 x86/x64 路由器,我个人建议可以考虑
小马v1 的铝合金版本 (N3710 4千兆)[页面介绍](https://item.taobao.com/item.htm?spm=a230r.1.14.20.144c763fRkK0VZ&id=561126544764 " 小马v1 的铝合金版本")
![xm1](doc/xm5.jpg)
![xm2](doc/xm6.jpg)
## Donate
如果你觉得此项目对你有帮助,可以捐助我们,以鼓励项目能持续发展,更加完善
@@ -95,7 +102,7 @@ Next you need gcc, binutils, bzip2, flex, python3.5+, perl, make, find, grep, di
To install these program, please login root users and type
`
sudo apt-get -y install build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch python3.5 unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex uglifyjs git-core gcc-multilib p7zip p7zip-full msmtp libssl-dev texinfo libglib2.0-dev xmlto qemu-utils upx libelf-dev autoconf automake libtool autopoint device-tree-compiler g++-multilib
sudo apt-get -y install build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch python3.5 python2.7 unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex uglifyjs git-core gcc-multilib p7zip p7zip-full msmtp libssl-dev texinfo libglib2.0-dev xmlto qemu-utils upx libelf-dev autoconf automake libtool autopoint device-tree-compiler g++-multilib antlr3 gperf wget swig rsync
`
in terminal
@@ -115,7 +122,7 @@ Use `make menuconfig` to configure your image.
Simply running `make` will build your firmware.
It will download all sources, build the cross-compile toolchain,
the kernel and all choosen applications.
the kernel and all chosen applications.
To build your own firmware you need to have access to a Linux, BSD or MacOSX system
(case-sensitive filesystem required). Cygwin will not be supported because of

View File

@@ -7,12 +7,13 @@
menu "Global build settings"
config JSON_ADD_IMAGE_INFO
bool "Create JSON info files per build image"
config JSON_OVERVIEW_IMAGE_INFO
bool "Create JSON info file overview per target"
default BUILDBOT
help
The JSON info files contain information about the device and
build images, stored next to the firmware images.
Create a JSON info file called profiles.json in the target
directory containing machine readable list of built profiles
and resulting images.
config ALL_NONSHARED
bool "Select all target specific packages by default"
@@ -39,7 +40,7 @@ menu "Global build settings"
config SIGNED_PACKAGES
bool "Cryptographically signed package lists"
default n
default y
config SIGNATURE_CHECK
bool "Enable signature checking in opkg"
@@ -47,12 +48,21 @@ menu "Global build settings"
comment "General build options"
config TESTING_KERNEL
bool "Use the testing kernel version"
depends on HAS_TESTING_KERNEL
default n
help
If the target supports a newer kernel version than the default,
you can use this config option to enable it
config DISPLAY_SUPPORT
bool "Show packages that require graphics support (local or remote)"
default n
config BUILD_PATENTED
default y
default n
bool "Compile with support for patented functionality"
help
When this option is disabled, software which provides patented functionality
@@ -79,11 +89,19 @@ menu "Global build settings"
This removes all ipkg/opkg status data files from the target directory
before building the root filesystem.
config IPK_FILES_CHECKSUMS
bool
prompt "Record files checksums in package metadata"
default n
help
This makes file checksums part of package metadata. It increases size
but provides you with pkg_check command to check for flash coruptions.
config INCLUDE_CONFIG
bool "Include build configuration in firmware" if DEVEL
default n
help
If enabled, config.seed will be stored in /etc/build.config of firmware.
If enabled, buildinfo files will be stored in /etc/build.* of firmware.
config COLLECT_KERNEL_DEBUG
bool
@@ -182,6 +200,7 @@ menu "Global build settings"
config USE_LIBCXX
bool "libc++"
depends on !USE_UCLIBC
config USE_LIBSTDCXX
bool "libstdc++"
@@ -230,7 +249,6 @@ menu "Global build settings"
choice
prompt "User space Stack-Smashing Protection"
depends on USE_MUSL
default PKG_CC_STACKPROTECTOR_REGULAR
help
Enable GCC Stack Smashing Protection (SSP) for userspace applications
@@ -238,19 +256,15 @@ menu "Global build settings"
bool "None"
config PKG_CC_STACKPROTECTOR_REGULAR
bool "Regular"
select GCC_LIBSSP if !USE_MUSL
depends on KERNEL_CC_STACKPROTECTOR_REGULAR
config PKG_CC_STACKPROTECTOR_STRONG
bool "Strong"
select GCC_LIBSSP if !USE_MUSL
depends on !GCC_VERSION_4_8
depends on KERNEL_CC_STACKPROTECTOR_STRONG
endchoice
choice
prompt "Kernel space Stack-Smashing Protection"
default KERNEL_CC_STACKPROTECTOR_REGULAR
depends on USE_MUSL || !(x86_64 || i386)
help
Enable GCC Stack-Smashing Protection (SSP) for the kernel
config KERNEL_CC_STACKPROTECTOR_NONE
@@ -258,7 +272,6 @@ menu "Global build settings"
config KERNEL_CC_STACKPROTECTOR_REGULAR
bool "Regular"
config KERNEL_CC_STACKPROTECTOR_STRONG
depends on !GCC_VERSION_4_8
bool "Strong"
endchoice

View File

@@ -105,6 +105,13 @@ menuconfig DEVEL
help
If enabled, log files will be written to the ./log directory.
config BUILD_LOG_DIR
string "Log folder" if DEVEL
default ""
help
Store build logs in this directory.
If not set, uses './logs'
config SRC_TREE_OVERRIDE
bool "Enable package source tree override" if DEVEL
help

View File

@@ -16,10 +16,11 @@ menu "Target Images"
prompt "Compression"
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_apm821xx
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_ar71xx
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_ipq40xx
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_ath79_mikrotik
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_lantiq
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_mpc85xx
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_ramips
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_ipq40xx
default TARGET_INITRAMFS_COMPRESSION_NONE
depends on TARGET_ROOTFS_INITRAMFS
help
@@ -79,7 +80,7 @@ menu "Target Images"
menuconfig TARGET_ROOTFS_EXT4FS
bool "ext4"
default n
default y if USES_EXT4
help
Build an ext4 root filesystem.
@@ -121,13 +122,6 @@ menu "Target Images"
help
Create an ext4 filesystem with a journal.
config TARGET_ROOTFS_ISO
bool "iso"
default n
depends on TARGET_x86_generic
help
Create a bootable ISO image.
config TARGET_ROOTFS_JFFS2
bool "jffs2"
depends on USES_JFFS2
@@ -192,33 +186,32 @@ menu "Target Images"
config GRUB_IMAGES
bool "Build GRUB images (Linux x86 or x86_64 host only)"
depends on TARGET_x86
depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_ISO || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS
depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS
select PACKAGE_grub2
default y
config EFI_IMAGES
bool "Build EFI GRUB images (Linux x86 or x86_64 host only)"
config GRUB_EFI_IMAGES
bool "Build GRUB EFI images (Linux x86 or x86_64 host only)"
depends on TARGET_x86
depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_ISO || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS
depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS
select PACKAGE_grub2
select PACKAGE_grub2-efi
default n
select PACKAGE_kmod-fs-vfat
default y
config GRUB_CONSOLE
bool "Use Console Terminal (in addition to Serial)"
depends on GRUB_IMAGES || EFI_IMAGES
default n if (TARGET_x86_generic_Soekris45xx || TARGET_x86_generic_Soekris48xx || TARGET_x86_net5501 || TARGET_x86_geos || TARGET_x86_alix2)
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
default y
config GRUB_SERIAL
string "Serial port device"
depends on GRUB_IMAGES || EFI_IMAGES
default "hvc0" if TARGET_x86_xen_domu
default "ttyS0" if ! TARGET_x86_xen_domu
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
default "ttyS0"
config GRUB_BAUDRATE
int "Serial port baud rate"
depends on GRUB_IMAGES || EFI_IMAGES
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
default 38400 if TARGET_x86_generic
default 115200
@@ -229,65 +222,46 @@ menu "Target Images"
config GRUB_BOOTOPTS
string "Extra kernel boot options"
depends on GRUB_IMAGES || EFI_IMAGES
default "xencons=hvc" if TARGET_x86_xen_domu
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
help
If you don't know, just leave it blank.
config GRUB_TIMEOUT
string "Seconds to wait before booting the default entry"
depends on GRUB_IMAGES || EFI_IMAGES
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
default "0"
help
If you don't know, 5 seconds is a reasonable default.
config GRUB_TITLE
string "Title for the menu entry in GRUB"
depends on GRUB_IMAGES || EFI_IMAGES
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
default "OpenWrt"
help
This is the title of the GRUB menu entry.
If unspecified, it defaults to OpenWrt.
config ISO_IMAGES
bool "Build LiveCD image (ISO)"
depends on TARGET_x86
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
config VDI_IMAGES
bool "Build VirtualBox image files (VDI)"
depends on TARGET_x86 || TARGET_x86_64
select GRUB_IMAGES
select TARGET_IMAGES_PAD
depends on TARGET_x86
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
select PACKAGE_kmod-e1000
config VMDK_IMAGES
bool "Build VMware image files (VMDK)"
depends on TARGET_x86 || TARGET_x86_64
select GRUB_IMAGES
select TARGET_IMAGES_PAD
select PACKAGE_kmod-e1000
depends on TARGET_x86
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
default y
config VHD_IMAGES
bool "Build Hyper-V image files (VHD)"
depends on TARGET_x86 || TARGET_x86_64
depends on GRUB_IMAGES || EFI_IMAGES
select TARGET_IMAGES_PAD
select PACKAGE_kmod-tulip
default n
config QCOW2_IMAGES
bool "Build PVE/KVM image files (QCOW2)"
depends on TARGET_x86 || TARGET_x86_64
depends on GRUB_IMAGES || EFI_IMAGES
select TARGET_IMAGES_PAD
select PACKAGE_kmod-e1000
default n
config TARGET_IMAGES_PAD
bool "Pad images to filesystem size (for JFFS2)"
depends on GRUB_IMAGES || EFI_IMAGES
default y
config TARGET_IMAGES_GZIP
bool "GZip images"
depends on TARGET_IMAGES_PAD || TARGET_ROOTFS_EXT4FS || TARGET_x86
depends on TARGET_ROOTFS_EXT4FS || TARGET_x86 || TARGET_armvirt || TARGET_malta
default n
comment "Image Options"
@@ -296,21 +270,21 @@ menu "Target Images"
config TARGET_KERNEL_PARTSIZE
int "Kernel partition size (in MB)"
depends on GRUB_IMAGES || EFI_IMAGES || USES_BOOT_PART
depends on USES_BOOT_PART
default 8 if TARGET_apm821xx_sata
default 64 if TARGET_bcm27xx
default 16
config TARGET_ROOTFS_PARTSIZE
int "Root filesystem partition size (in MB)"
depends on GRUB_IMAGES || EFI_IMAGES || USES_ROOTFS_PART || TARGET_ROOTFS_EXT4FS || TARGET_mvebu || TARGET_rb532 || TARGET_sunxi || TARGET_uml
depends on USES_ROOTFS_PART || TARGET_ROOTFS_EXT4FS || TARGET_omap || TARGET_rb532 || TARGET_sunxi || TARGET_uml
default 160
help
Select the root filesystem partition size.
config TARGET_ROOTFS_PARTNAME
string "Root partition on target device"
depends on GRUB_IMAGES || EFI_IMAGES
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
help
Override the root partition on the final device. If left empty,
it will be mounted by PARTUUID which makes the kernel find the

View File

@@ -44,11 +44,16 @@ config KERNEL_DEBUG_FS
write to these files. Many common debugging facilities, such as
ftrace, require the existence of debugfs.
# remove KERNEL_MIPS_FPU_EMULATOR after kernel 4.14 and 4.14 are gone
config KERNEL_MIPS_FPU_EMULATOR
bool "Compile the kernel with MIPS FPU Emulator"
default y
depends on (mips || mipsel || mips64 || mips64el)
config KERNEL_MIPS_FP_SUPPORT
bool
default y if KERNEL_MIPS_FPU_EMULATOR
config KERNEL_ARM_PMU
bool
default n
@@ -85,6 +90,126 @@ config KERNEL_PROFILING
Enable the extended profiling support mechanisms used by profilers such
as OProfile.
config KERNEL_UBSAN
bool "Compile the kernel with undefined behaviour sanity checker"
help
This option enables undefined behaviour sanity checker
Compile-time instrumentation is used to detect various undefined
behaviours in runtime. Various types of checks may be enabled
via boot parameter ubsan_handle
(see: Documentation/dev-tools/ubsan.rst).
config KERNEL_UBSAN_SANITIZE_ALL
bool "Enable instrumentation for the entire kernel"
depends on KERNEL_UBSAN
default y
help
This option activates instrumentation for the entire kernel.
If you don't enable this option, you have to explicitly specify
UBSAN_SANITIZE := y for the files/directories you want to check for UB.
Enabling this option will get kernel image size increased
significantly.
config KERNEL_UBSAN_ALIGNMENT
bool "Enable checking of pointers alignment"
depends on KERNEL_UBSAN
help
This option enables detection of unaligned memory accesses.
Enabling this option on architectures that support unaligned
accesses may produce a lot of false positives.
config KERNEL_UBSAN_NULL
bool "Enable checking of null pointers"
depends on KERNEL_UBSAN
help
This option enables detection of memory accesses via a
null pointer.
config KERNEL_KASAN
bool "Compile the kernel with KASan: runtime memory debugger"
select KERNEL_SLUB_DEBUG
depends on (x86_64 || aarch64)
help
Enables kernel address sanitizer - runtime memory debugger,
designed to find out-of-bounds accesses and use-after-free bugs.
This is strictly a debugging feature and it requires a gcc version
of 4.9.2 or later. Detection of out of bounds accesses to stack or
global variables requires gcc 5.0 or later.
This feature consumes about 1/8 of available memory and brings about
~x3 performance slowdown.
For better error detection enable CONFIG_STACKTRACE.
Currently CONFIG_KASAN doesn't work with CONFIG_DEBUG_SLAB
(the resulting kernel does not boot).
config KERNEL_KASAN_EXTRA
bool "KAsan: extra checks"
depends on KERNEL_KASAN && KERNEL_DEBUG_KERNEL
help
This enables further checks in the kernel address sanitizer, for now
it only includes the address-use-after-scope check that can lead
to excessive kernel stack usage, frame size warnings and longer
compile time.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81715 has more
choice
prompt "Instrumentation type"
depends on KERNEL_KASAN
default KERNEL_KASAN_OUTLINE
config KERNEL_KASAN_OUTLINE
bool "Outline instrumentation"
help
Before every memory access compiler insert function call
__asan_load*/__asan_store*. These functions performs check
of shadow memory. This is slower than inline instrumentation,
however it doesn't bloat size of kernel's .text section so
much as inline does.
config KERNEL_KASAN_INLINE
bool "Inline instrumentation"
help
Compiler directly inserts code checking shadow memory before
memory accesses. This is faster than outline (in some workloads
it gives about x2 boost over outline instrumentation), but
make kernel's .text size much bigger.
This requires a gcc version of 5.0 or later.
endchoice
config KERNEL_KCOV
bool "Compile the kernel with code coverage for fuzzing"
select KERNEL_DEBUG_FS
help
KCOV exposes kernel code coverage information in a form suitable
for coverage-guided fuzzing (randomized testing).
If RANDOMIZE_BASE is enabled, PC values will not be stable across
different machines and across reboots. If you need stable PC values,
disable RANDOMIZE_BASE.
For more details, see Documentation/kcov.txt.
config KERNEL_KCOV_ENABLE_COMPARISONS
bool "Enable comparison operands collection by KCOV"
depends on KERNEL_KCOV
help
KCOV also exposes operands of every comparison in the instrumented
code along with operand sizes and PCs of the comparison instructions.
These operands can be used by fuzzing engines to improve the quality
of fuzzing coverage.
config KERNEL_KCOV_INSTRUMENT_ALL
bool "Instrument all code by default"
depends on KERNEL_KCOV
default y if KERNEL_KCOV
help
If you are doing generic system call fuzzing (like e.g. syzkaller),
then you will want to instrument the whole kernel and you should
say y here. If you are doing more targeted fuzzing (like e.g.
filesystem fuzzing with AFL) then you will want to enable coverage
for more specific subsets of files, and should say n here.
config KERNEL_TASKSTATS
bool "Compile the kernel with task resource/io statistics and accounting"
default n
@@ -244,21 +369,6 @@ config KERNEL_DEBUG_GPIO
bool "Compile the kernel with gpio debugging"
select KERNEL_DEBUG_KERNEL
choice
prompt "Algorithms enabled for QCE acceleration"
default KERNEL_CRYPTO_DEV_QCE_ENABLE_ALL
depends on TARGET_ipq40xx
config KERNEL_CRYPTO_DEV_QCE_ENABLE_ALL
bool "All supported algorithms"
config KERNEL_CRYPTO_DEV_QCE_ENABLE_BLKCIPHER
bool "Block ciphers only"
config KERNEL_CRYPTO_DEV_QCE_ENABLE_SHA
bool "Hash/HMAC only"
endchoice
config KERNEL_COREDUMP
bool
@@ -272,6 +382,74 @@ config KERNEL_PROVE_LOCKING
select KERNEL_DEBUG_KERNEL
default n
config KERNEL_LOCKUP_DETECTOR
bool "Compile the kernel with detect Hard and Soft Lockups"
depends on KERNEL_DEBUG_KERNEL
help
Say Y here to enable the kernel to act as a watchdog to detect
hard and soft lockups.
Softlockups are bugs that cause the kernel to loop in kernel
mode for more than 20 seconds, without giving other tasks a
chance to run. The current stack trace is displayed upon
detection and the system will stay locked up.
Hardlockups are bugs that cause the CPU to loop in kernel mode
for more than 10 seconds, without letting other interrupts have a
chance to run. The current stack trace is displayed upon detection
and the system will stay locked up.
The overhead should be minimal. A periodic hrtimer runs to
generate interrupts and kick the watchdog task every 4 seconds.
An NMI is generated every 10 seconds or so to check for hardlockups.
The frequency of hrtimer and NMI events and the soft and hard lockup
thresholds can be controlled through the sysctl watchdog_thresh.
config KERNEL_DETECT_HUNG_TASK
bool "Compile the kernel with detect Hung Tasks"
depends on KERNEL_DEBUG_KERNEL
default KERNEL_LOCKUP_DETECTOR
help
Say Y here to enable the kernel to detect "hung tasks",
which are bugs that cause the task to be stuck in
uninterruptible "D" state indefinitely.
When a hung task is detected, the kernel will print the
current stack trace (which you should report), but the
task will stay in uninterruptible state. If lockdep is
enabled then all held locks will also be reported. This
feature has negligible overhead.
config KERNEL_WQ_WATCHDOG
bool "Compile the kernel with detect Workqueue Stalls"
depends on KERNEL_DEBUG_KERNEL
help
Say Y here to enable stall detection on workqueues. If a
worker pool doesn't make forward progress on a pending work
item for over a given amount of time, 30s by default, a
warning message is printed along with dump of workqueue
state. This can be configured through kernel parameter
"workqueue.watchdog_thresh" and its sysfs counterpart.
config KERNEL_DEBUG_ATOMIC_SLEEP
bool "Compile the kernel with sleep inside atomic section checking"
depends on KERNEL_DEBUG_KERNEL
help
If you say Y here, various routines which may sleep will become very
noisy if they are called inside atomic sections: when a spinlock is
held, inside an rcu read side critical section, inside preempt disabled
sections, inside an interrupt, etc...
config KERNEL_DEBUG_VM
bool "Compile the kernel with debug VM"
depends on KERNEL_DEBUG_KERNEL
help
Enable this to turn on extended checks in the virtual-memory system
that may impact performance.
If unsure, say N.
config KERNEL_PRINTK_TIME
bool "Enable printk timestamps"
default y
@@ -299,10 +477,14 @@ config KERNEL_KEXEC
config KERNEL_PROC_VMCORE
bool
config KERNEL_PROC_KCORE
bool
config KERNEL_CRASH_DUMP
depends on i386 || x86_64 || arm || armeb
select KERNEL_KEXEC
select KERNEL_PROC_VMCORE
select KERNEL_PROC_KCORE
bool "Enable support for kexec crashdump"
default y
@@ -584,7 +766,7 @@ if KERNEL_CGROUPS
bool "Control Group Classifier"
default y
config KERNEL_NETPRIO_CGROUP
config KERNEL_CGROUP_NET_PRIO
bool "Network priority cgroup"
default y
@@ -596,7 +778,7 @@ endif
config KERNEL_NAMESPACES
bool "Enable kernel namespaces"
default n
default y if !SMALL_FLASH
if KERNEL_NAMESPACES
@@ -665,13 +847,13 @@ config KERNEL_POSIX_MQUEUE
config KERNEL_SECCOMP_FILTER
bool
default n
default y if !SMALL_FLASH
config KERNEL_SECCOMP
bool "Enable seccomp support"
depends on !(TARGET_uml)
select KERNEL_SECCOMP_FILTER
default n
default y if !SMALL_FLASH
help
Build kernel with support for seccomp.
@@ -797,7 +979,7 @@ menu "Filesystem ACL and attr support options"
select KERNEL_FS_POSIX_ACL
default y if USE_FS_ACL_ATTR
config KERNEL_HFSPLUG_FS_POSIX_ACL
config KERNEL_HFSPLUS_FS_POSIX_ACL
bool "Enable POSIX ACL for HFS+ Filesystems"
select KERNEL_FS_POSIX_ACL
default y if USE_FS_ACL_ATTR

BIN
doc/xm5.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
doc/xm6.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

View File

@@ -1,4 +1,11 @@
src-git packages https://github.com/coolsnowwolf/packages
src-git luci https://github.com/coolsnowwolf/luci
src-git routing https://git.openwrt.org/feed/routing.git;openwrt-19.07
#src-git telephony https://git.openwrt.org/feed/telephony.git;openwrt-19.07
src-git routing https://git.openwrt.org/feed/routing.git
src-git telephony https://git.openwrt.org/feed/telephony.git
src-git freifunk https://github.com/freifunk/openwrt-packages.git
#src-git video https://github.com/openwrt/video.git
#src-git targets https://github.com/openwrt/targets.git
#src-git management https://github.com/openwrt-management/packages.git
#src-git oldpackages http://git.openwrt.org/packages.git
#src-link custom /usr/src/openwrt/custom-feed
#src-git helloworld https://github.com/fw876/helloworld

View File

@@ -50,6 +50,7 @@ endef
dl_pack/bz2=bzip2 -c > $(1)
dl_pack/gz=gzip -nc > $(1)
dl_pack/xz=xz -zc -7e > $(1)
dl_pack/zst=zstd -T0 --ultra -20 -c > $(1)
dl_pack/unknown=$(error ERROR: Unknown pack format for file $(1))
define dl_pack
$(if $(dl_pack/$(call ext,$(1))),$(dl_pack/$(call ext,$(1))),$(dl_pack/unknown))

View File

@@ -269,7 +269,7 @@ define Build/xor-image
endef
define Build/check-size
@[ $$(($(subst k,* 1024,$(subst m, * 1024k,$(1))))) -ge "$$(stat -c%s $@)" ] || { \
@[ $$(($(subst k,* 1024,$(subst m, * 1024k,$(if $(1),$(1),$(IMAGE_SIZE)))))) -ge "$$(stat -c%s $@)" ] || { \
echo "WARNING: Image file $@ is too big" >&2; \
rm -f $@; \
}
@@ -310,6 +310,13 @@ define Build/openmesh-image
"$(call param_get_default,rootfs,$(1),$@)" "rootfs"
endef
define Build/qsdk-ipq-factory-mmc
$(TOPDIR)/scripts/mkits-qsdk-ipq-image.sh \
$@.its kernel $(IMAGE_KERNEL) rootfs $(IMAGE_ROOTFS)
PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.new
@mv $@.new $@
endef
define Build/qsdk-ipq-factory-nand
$(TOPDIR)/scripts/mkits-qsdk-ipq-image.sh \
$@.its ubi $@
@@ -319,7 +326,7 @@ endef
define Build/qsdk-ipq-factory-nor
$(TOPDIR)/scripts/mkits-qsdk-ipq-image.sh \
$@.its kernel $(IMAGE_KERNEL) rootfs $(IMAGE_ROOTFS)
$@.its hlos $(IMAGE_KERNEL) rootfs $(IMAGE_ROOTFS)
PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.new
@mv $@.new $@
endef
@@ -414,3 +421,10 @@ define Build/kernel2minor
kernel2minor -k $@ -r $@.new $(1)
mv $@.new $@
endef
# Convert a raw image into a $1 type image.
# E.g. | qemu-image vdi
define Build/qemu-image
qemu-img convert -f raw -O $1 $@ $@.new
@mv $@.new $@
endef

View File

@@ -45,6 +45,7 @@ IMG_PREFIX:=$(VERSION_DIST_SANITIZED)-$(IMG_PREFIX_VERNUM)$(IMG_PREFIX_VERCODE)$
IMG_ROOTFS:=$(IMG_PREFIX)-rootfs
IMG_COMBINED:=$(IMG_PREFIX)-combined
IMG_PART_SIGNATURE:=$(shell echo $(SOURCE_DATE_EPOCH)$(LINUX_VERMAGIC) | mkhash md5 | cut -b1-8)
IMG_PART_DISKGUID:=$(shell echo $(SOURCE_DATE_EPOCH)$(LINUX_VERMAGIC) | mkhash md5 | sed -E 's/(.{8})(.{4})(.{4})(.{4})(.{10})../\1-\2-\3-\4-\500/')
MKFS_DEVTABLE_OPT := -D $(INCLUDE_DIR)/device_table.txt
@@ -93,7 +94,6 @@ fs-types-$(CONFIG_TARGET_ROOTFS_SQUASHFS) += squashfs
fs-types-$(CONFIG_TARGET_ROOTFS_JFFS2) += $(addprefix jffs2-,$(JFFS2_BLOCKSIZE))
fs-types-$(CONFIG_TARGET_ROOTFS_JFFS2_NAND) += $(addprefix jffs2-nand-,$(NAND_BLOCKSIZE))
fs-types-$(CONFIG_TARGET_ROOTFS_EXT4FS) += ext4
fs-types-$(CONFIG_TARGET_ROOTFS_ISO) += iso
fs-types-$(CONFIG_TARGET_ROOTFS_UBIFS) += ubifs
fs-subtypes-$(CONFIG_TARGET_ROOTFS_JFFS2) += $(addsuffix -raw,$(addprefix jffs2-,$(JFFS2_BLOCKSIZE)))
@@ -238,7 +238,7 @@ define Image/mkfs/squashfs
$(STAGING_DIR_HOST)/bin/mksquashfs4 $(call mkfs_target_dir,$(1)) $@ \
-nopad -noappend -root-owned \
-comp $(SQUASHFSCOMP) $(SQUASHFSOPT) \
-processors 1
-processors $(shell nproc)
endef
# $(1): board name
@@ -381,13 +381,13 @@ define Device/Init
DEVICE_NAME := $(1)
KERNEL:=
KERNEL_INITRAMFS = $$(KERNEL)
KERNEL_SIZE:=
CMDLINE:=
IMAGES :=
ARTIFACTS :=
IMAGE_PREFIX := $(IMG_PREFIX)-$(1)
IMAGE_NAME = $$(IMAGE_PREFIX)-$$(1)-$$(2)
IMAGE_SIZE :=
KERNEL_PREFIX = $$(IMAGE_PREFIX)
KERNEL_SUFFIX := -kernel.bin
KERNEL_INITRAMFS_SUFFIX = $$(KERNEL_SUFFIX)
@@ -434,8 +434,8 @@ DEFAULT_DEVICE_VARS := \
CMDLINE UBOOTENV_IN_UBI KERNEL_IN_UBI BLOCKSIZE PAGESIZE SUBPAGESIZE \
VID_HDR_OFFSET UBINIZE_OPTS UBINIZE_PARTS MKUBIFS_OPTS DEVICE_DTS \
DEVICE_DTS_CONFIG DEVICE_DTS_DIR SOC BOARD_NAME UIMAGE_NAME SUPPORTED_DEVICES \
IMAGE_METADATA KERNEL_ENTRY KERNEL_LOADADDR UBOOT_PATH DEVICE_VENDOR \
DEVICE_MODEL DEVICE_VARIANT \
IMAGE_METADATA KERNEL_ENTRY KERNEL_LOADADDR UBOOT_PATH IMAGE_SIZE \
DEVICE_VENDOR DEVICE_MODEL DEVICE_VARIANT \
DEVICE_ALT0_VENDOR DEVICE_ALT0_MODEL DEVICE_ALT0_VARIANT \
DEVICE_ALT1_VENDOR DEVICE_ALT1_MODEL DEVICE_ALT1_VARIANT \
DEVICE_ALT2_VENDOR DEVICE_ALT2_MODEL DEVICE_ALT2_VARIANT
@@ -545,8 +545,11 @@ endef
define Device/Build/image
GZ_SUFFIX := $(if $(filter %dtb %gz,$(2)),,$(if $(and $(findstring ext4,$(1)),$(CONFIG_TARGET_IMAGES_GZIP)),.gz))
$$(_TARGET): $(BIN_DIR)/$(call IMAGE_NAME,$(1),$(2))$$(GZ_SUFFIX)
$$(_TARGET): $(if $(CONFIG_JSON_OVERVIEW_IMAGE_INFO), \
$(BUILD_DIR)/json_info_files/$(call IMAGE_NAME,$(1),$(2)).json, \
$(BIN_DIR)/$(call IMAGE_NAME,$(1),$(2))$$(GZ_SUFFIX))
$(eval $(call Device/Export,$(KDIR)/tmp/$(call IMAGE_NAME,$(1),$(2)),$(1)))
ROOTFS/$(1)/$(3) := \
$(KDIR)/root.$(1)$$(strip \
$$(if $$(FS_OPTIONS/$(1)),+fs=$$(call param_mangle,$$(FS_OPTIONS/$(1)))) \
@@ -568,32 +571,34 @@ define Device/Build/image
$(BIN_DIR)/$(call IMAGE_NAME,$(1),$(2)): $(KDIR)/tmp/$(call IMAGE_NAME,$(1),$(2))
cp $$^ $$@
$(if $(CONFIG_JSON_ADD_IMAGE_INFO), \
DEVICE_ID="$(DEVICE_NAME)" \
BIN_DIR="$(BIN_DIR)" \
IMAGE_NAME="$(IMAGE_NAME)" \
IMAGE_TYPE=$(word 1,$(subst ., ,$(2))) \
IMAGE_PREFIX="$(IMAGE_PREFIX)" \
DEVICE_VENDOR="$(DEVICE_VENDOR)" \
DEVICE_MODEL="$(DEVICE_MODEL)" \
DEVICE_VARIANT="$(DEVICE_VARIANT)" \
DEVICE_ALT0_VENDOR="$(DEVICE_ALT0_VENDOR)" \
DEVICE_ALT0_MODEL="$(DEVICE_ALT0_MODEL)" \
DEVICE_ALT0_VARIANT="$(DEVICE_ALT0_VARIANT)" \
DEVICE_ALT1_VENDOR="$(DEVICE_ALT1_VENDOR)" \
DEVICE_ALT1_MODEL="$(DEVICE_ALT1_MODEL)" \
DEVICE_ALT1_VARIANT="$(DEVICE_ALT1_VARIANT)" \
DEVICE_ALT2_VENDOR="$(DEVICE_ALT2_VENDOR)" \
DEVICE_ALT2_MODEL="$(DEVICE_ALT2_MODEL)" \
DEVICE_ALT2_VARIANT="$(DEVICE_ALT2_VARIANT)" \
DEVICE_TITLE="$(DEVICE_TITLE)" \
TARGET="$(BOARD)" \
SUBTARGET="$(if $(SUBTARGET),$(SUBTARGET),generic)" \
VERSION_NUMBER="$(VERSION_NUMBER)" \
VERSION_CODE="$(VERSION_CODE)" \
SUPPORTED_DEVICES="$(SUPPORTED_DEVICES)" \
$(TOPDIR)/scripts/json_add_image_info.py \
)
$(BUILD_DIR)/json_info_files/$(call IMAGE_NAME,$(1),$(2)).json: $(BIN_DIR)/$(call IMAGE_NAME,$(1),$(2))$$(GZ_SUFFIX)
@mkdir -p $$(shell dirname $$@)
DEVICE_ID="$(DEVICE_NAME)" \
BIN_DIR="$(BIN_DIR)" \
IMAGE_NAME="$(IMAGE_NAME)" \
IMAGE_TYPE=$(word 1,$(subst ., ,$(2))) \
IMAGE_PREFIX="$(IMAGE_PREFIX)" \
DEVICE_VENDOR="$(DEVICE_VENDOR)" \
DEVICE_MODEL="$(DEVICE_MODEL)" \
DEVICE_VARIANT="$(DEVICE_VARIANT)" \
DEVICE_ALT0_VENDOR="$(DEVICE_ALT0_VENDOR)" \
DEVICE_ALT0_MODEL="$(DEVICE_ALT0_MODEL)" \
DEVICE_ALT0_VARIANT="$(DEVICE_ALT0_VARIANT)" \
DEVICE_ALT1_VENDOR="$(DEVICE_ALT1_VENDOR)" \
DEVICE_ALT1_MODEL="$(DEVICE_ALT1_MODEL)" \
DEVICE_ALT1_VARIANT="$(DEVICE_ALT1_VARIANT)" \
DEVICE_ALT2_VENDOR="$(DEVICE_ALT2_VENDOR)" \
DEVICE_ALT2_MODEL="$(DEVICE_ALT2_MODEL)" \
DEVICE_ALT2_VARIANT="$(DEVICE_ALT2_VARIANT)" \
DEVICE_TITLE="$(DEVICE_TITLE)" \
DEVICE_PACKAGES="$(DEVICE_PACKAGES)" \
TARGET="$(BOARD)" \
SUBTARGET="$(if $(SUBTARGET),$(SUBTARGET),generic)" \
VERSION_NUMBER="$(VERSION_NUMBER)" \
VERSION_CODE="$(VERSION_CODE)" \
SUPPORTED_DEVICES="$(SUPPORTED_DEVICES)" \
$(TOPDIR)/scripts/json_add_image_info.py $$@
endef
@@ -612,8 +617,6 @@ define Device/Build/artifact
endef
define Device/Build
$(shell rm -f $(BIN_DIR)/$(IMG_PREFIX)-$(1).json)
$(if $(CONFIG_TARGET_ROOTFS_INITRAMFS),$(call Device/Build/initramfs,$(1)))
$(call Device/Build/kernel,$(1))
@@ -699,6 +702,7 @@ define BuildImage
image_prepare: compile
mkdir -p $(BIN_DIR) $(KDIR)/tmp
rm -rf $(BUILD_DIR)/json_info_files
$(call Image/Prepare)
legacy-images-prepare-make: image_prepare

View File

@@ -70,7 +70,7 @@ ifdef CONFIG_COLLECT_KERNEL_DEBUG
$(FIND) $(KERNEL_BUILD_DIR)/debug -type f | $(XARGS) $(KERNEL_CROSS)strip --only-keep-debug
$(TAR) c -C $(KERNEL_BUILD_DIR) debug \
$(if $(SOURCE_DATE_EPOCH),--mtime="@$(SOURCE_DATE_EPOCH)") \
| bzip2 -c -9 > $(BIN_DIR)/kernel-debug.tar.bz2
| zstd -T0 -f -o $(BIN_DIR)/kernel-debug.tar.zst
endef
endif
@@ -162,7 +162,11 @@ define BuildKernel
rm -f $(STAMP_CONFIGURED)
$(LINUX_RECONF_CMD) > $(LINUX_DIR)/.config
$(_SINGLE)$(KERNEL_MAKE) \
$(if $(findstring Darwin,$(HOST_OS)),HOST_LOADLIBES="-L$(STAGING_DIR_HOST)/lib -lncurses") \
$(if $(findstring Darwin,$(HOST_OS)), \
HOST_LOADLIBES="-L$(STAGING_DIR_HOST)/lib -lncurses" \
HOSTLDLIBS_mconf="-L$(STAGING_DIR_HOST)/lib -lncurses" \
filechk_conf_cfg=" :" \
) \
YACC=$(STAGING_DIR_HOST)/bin/bison \
$$@
$(LINUX_RECONF_DIFF) $(LINUX_DIR)/.config | \

View File

@@ -6,13 +6,13 @@ ifdef CONFIG_TESTING_KERNEL
KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
endif
LINUX_VERSION-4.9 = .215
LINUX_VERSION-4.14 = .172
LINUX_VERSION-4.19 = .108
LINUX_VERSION-4.14 = .195
LINUX_VERSION-4.19 = .138
LINUX_VERSION-5.4 = .61
LINUX_KERNEL_HASH-4.9.215 = 236f2f47853700f22b9925cb17917d97ff7120fcc8110ec827c5a030a8129f48
LINUX_KERNEL_HASH-4.14.172 = 2318a1ab937580a079351ed20557c336a3d95b664f667b14e3ba49e3271b217a
LINUX_KERNEL_HASH-4.19.108 = 09aeeca5b08efea2f54b977b2999afb60d42f93b9f65b2b0111969f183f750a3
LINUX_KERNEL_HASH-4.14.195 = 394f28798670240baacd9e2cce521fbd79f8da5e1fc191695b0e11381445a021
LINUX_KERNEL_HASH-4.19.138 = d15c27d05f6c527269b75b30cc72972748e55720e7e00ad8abbaa4fe3b1d5e02
LINUX_KERNEL_HASH-5.4.61 = 86f13d050f6389c5a1727fa81510ee8eceac795297bc584f443354609617fea4
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
@@ -40,4 +40,4 @@ KERNEL_PATCHVER ?= $(KERNEL)
# disable the md5sum check for unknown kernel versions
LINUX_KERNEL_HASH:=$(LINUX_KERNEL_HASH-$(strip $(LINUX_VERSION)))
LINUX_KERNEL_HASH?=x
LINUX_KERNEL_HASH?=x

View File

@@ -138,11 +138,13 @@ endif
PKG_EXTMOD_SUBDIRS ?= .
PKG_SYMVERS_DIR = $(KERNEL_BUILD_DIR)/symvers
define populate_module_symvers
@mkdir -p $(PKG_INFO_DIR)
cat /dev/null > $(PKG_INFO_DIR)/$(PKG_NAME).symvers; \
@mkdir -p $(PKG_SYMVERS_DIR)
cat /dev/null > $(PKG_SYMVERS_DIR)/$(PKG_NAME).symvers; \
for subdir in $(PKG_EXTMOD_SUBDIRS); do \
cat $(PKG_INFO_DIR)/*.symvers 2>/dev/null > $(PKG_BUILD_DIR)/$$$$subdir/Module.symvers; \
cat $(PKG_SYMVERS_DIR)/*.symvers 2>/dev/null > $(PKG_BUILD_DIR)/$$$$subdir/Module.symvers; \
done
endef
@@ -154,7 +156,7 @@ define collect_module_symvers
grep -F $$$$realdir $(PKG_BUILD_DIR)/$$$$subdir/Module.symvers >> $(PKG_BUILD_DIR)/Module.symvers.tmp; \
done; \
sort -u $(PKG_BUILD_DIR)/Module.symvers.tmp > $(PKG_BUILD_DIR)/Module.symvers; \
mv $(PKG_BUILD_DIR)/Module.symvers $(PKG_INFO_DIR)/$(PKG_NAME).symvers
mv $(PKG_BUILD_DIR)/Module.symvers $(PKG_SYMVERS_DIR)/$(PKG_NAME).symvers
endef
define KernelPackage/hooks

View File

@@ -185,7 +185,7 @@ $(eval $(call nf_add,IPT_IPV6_EXTRA,CONFIG_IP6_NF_MATCH_RT, $(P_V6)ip6t_rt))
# kernel only
$(eval $(if $(NF_KMOD),$(call nf_add,NF_NAT,CONFIG_NF_NAT, $(P_XT)nf_nat),))
$(eval $(if $(NF_KMOD),$(call nf_add,NF_NAT,CONFIG_NF_NAT_REDIRECT, $(P_XT)nf_nat_redirect, ge 3.19.0),))
$(eval $(if $(NF_KMOD),$(call nf_add,NF_NAT,CONFIG_NF_NAT_REDIRECT, $(P_XT)nf_nat_redirect),))
$(eval $(if $(NF_KMOD),$(call nf_add,NF_NAT,CONFIG_NF_NAT_IPV4, $(P_V4)nf_nat_ipv4),))
$(eval $(if $(NF_KMOD),$(call nf_add,NF_NAT,CONFIG_NF_NAT_MASQUERADE_IPV4, $(P_V4)nf_nat_masquerade_ipv4, lt 4.18),))
@@ -195,7 +195,7 @@ $(eval $(if $(NF_KMOD),$(call nf_add,NF_NAT6,CONFIG_NF_NAT_MASQUERADE_IPV6, $(P_
$(eval $(if $(NF_KMOD),$(call nf_add,IPT_NAT,CONFIG_NETFILTER_XT_NAT, $(P_XT)xt_nat),))
$(eval $(if $(NF_KMOD),$(call nf_add,IPT_NAT,CONFIG_IP_NF_NAT, $(P_V4)iptable_nat),))
$(eval $(if $(NF_KMOD),$(call nf_add,IPT_NAT6,CONFIG_IP6_NF_NAT, $(P_V6)ip6table_nat),))
$(eval $(if $(NF_KMOD),$(call nf_add,IPT_NAT6,CONFIG_IP6_NF_TARGET_MASQUERADE, $(P_V6)ip6t_MASQUERADE),))
$(eval $(if $(NF_KMOD),$(call nf_add,IPT_NAT6,CONFIG_IP6_NF_TARGET_MASQUERADE, $(P_V6)ip6t_MASQUERADE, lt 5.2),))
$(eval $(if $(NF_KMOD),$(call nf_add,IPT_NAT6,CONFIG_IP6_NF_TARGET_NPT, $(P_V6)ip6t_NPT),))
# userland only
@@ -261,8 +261,8 @@ $(eval $(call nf_add,IPT_DEBUG,CONFIG_NETFILTER_XT_TARGET_TRACE, $(P_XT)xt_TRACE
# tproxy
$(eval $(call nf_add,IPT_TPROXY,CONFIG_NETFILTER_XT_MATCH_SOCKET, $(P_XT)xt_socket))
$(eval $(call nf_add,IPT_TPROXY,CONFIG_NF_SOCKET_IPV4, $(P_V4)nf_socket_ipv4, ge 4.10))
$(eval $(call nf_add,IPT_TPROXY,CONFIG_NF_SOCKET_IPV6, $(P_V6)nf_socket_ipv6, ge 4.10))
$(eval $(call nf_add,IPT_TPROXY,CONFIG_NF_SOCKET_IPV4, $(P_V4)nf_socket_ipv4))
$(eval $(call nf_add,IPT_TPROXY,CONFIG_NF_SOCKET_IPV6, $(P_V6)nf_socket_ipv6))
$(eval $(call nf_add,IPT_TPROXY,CONFIG_NETFILTER_XT_TARGET_TPROXY, $(P_XT)xt_TPROXY))
$(eval $(call nf_add,IPT_TPROXY,CONFIG_NF_TPROXY_IPV4, $(P_V4)nf_tproxy_ipv4, ge 4.18))
$(eval $(call nf_add,IPT_TPROXY,CONFIG_NF_TPROXY_IPV6, $(P_V6)nf_tproxy_ipv6, ge 4.18))
@@ -273,8 +273,8 @@ $(eval $(call nf_add,IPT_LED,CONFIG_NETFILTER_XT_TARGET_LED, $(P_XT)xt_LED))
# tee
$(eval $(call nf_add,IPT_TEE,CONFIG_NETFILTER_XT_TARGET_TEE, $(P_XT)xt_TEE))
$(eval $(if $(NF_KMOD),$(call nf_add,IPT_TEE,CONFIG_NF_DUP_IPV4, $(P_V4)nf_dup_ipv4, ge 4.3),))
$(eval $(if $(NF_KMOD),$(call nf_add,IPT_TEE,CONFIG_NF_DUP_IPV6, $(P_V6)nf_dup_ipv6, ge 4.3),))
$(eval $(if $(NF_KMOD),$(call nf_add,IPT_TEE,CONFIG_NF_DUP_IPV4, $(P_V4)nf_dup_ipv4),))
$(eval $(if $(NF_KMOD),$(call nf_add,IPT_TEE,CONFIG_NF_DUP_IPV6, $(P_V6)nf_dup_ipv6),))
# u32
@@ -336,25 +336,26 @@ $(eval $(call nf_add,EBTABLES_WATCHERS,CONFIG_BRIDGE_EBT_NFQUEUE, $(P_EBT)ebt_nf
# nftables
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NF_TABLES, $(P_XT)nf_tables),))
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NF_TABLES_INET, $(P_XT)nf_tables_inet, lt 4.17),))
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_EXTHDR, $(P_XT)nft_exthdr),))
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_META, $(P_XT)nft_meta),))
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_NUMGEN, $(P_XT)nft_numgen, ge 4.9.0),))
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_CT, $(P_XT)nft_ct),))
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_SET_RBTREE, $(P_XT)nft_set_rbtree, ge 4.9.0),))
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_RBTREE, $(P_XT)nft_rbtree, lt 4.9.0),))
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_SET_HASH, $(P_XT)nft_set_hash, ge 4.9.0),))
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_HASH, $(P_XT)nft_hash, lt 4.9.0),))
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NF_TABLES_IPV4, $(P_V4)nf_tables_ipv4, lt 4.17),))
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NF_TABLES_IPV6, $(P_V6)nf_tables_ipv6, lt 4.17),))
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NF_TABLES_SET, $(P_XT)nf_tables_set, ge 4.18),))
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_CHAIN_ROUTE_IPV4, $(P_V4)nft_chain_route_ipv4),))
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_CHAIN_ROUTE_IPV6, $(P_V6)nft_chain_route_ipv6),))
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_COUNTER, $(P_XT)nft_counter),))
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_LOG, $(P_XT)nft_log),))
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_CT, $(P_XT)nft_ct),))
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_EXTHDR, $(P_XT)nft_exthdr),))
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_HASH, $(P_XT)nft_hash),))
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_LIMIT, $(P_XT)nft_limit),))
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_LOG, $(P_XT)nft_log),))
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_META, $(P_XT)nft_meta),))
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_NUMGEN, $(P_XT)nft_numgen),))
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_OBJREF, $(P_XT)nft_objref),))
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_QUOTA, $(P_XT)nft_quota),))
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_REDIR, $(P_XT)nft_redir),))
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_REJECT, $(P_XT)nft_reject $(P_V4)nft_reject_ipv4 $(P_V6)nft_reject_ipv6),))
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_REJECT_INET, $(P_XT)nft_reject_inet),))
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NF_TABLES_IPV4, $(P_V4)nf_tables_ipv4, lt 4.17),))
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_CHAIN_ROUTE_IPV4, $(P_V4)nft_chain_route_ipv4),))
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NF_TABLES_IPV6, $(P_V6)nf_tables_ipv6, lt 4.17),))
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_CHAIN_ROUTE_IPV6, $(P_V6)nft_chain_route_ipv6),))
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_REDIR, $(P_XT)nft_redir, ge 3.19.0),))
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_QUOTA, $(P_XT)nft_quota, ge 4.9.0),))
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_SET_HASH, $(P_XT)nft_set_hash, lt 4.18),))
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_SET_RBTREE, $(P_XT)nft_set_rbtree, lt 4.18),))
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_ARP,CONFIG_NF_TABLES_ARP, $(P_V4)nf_tables_arp, lt 4.17),))
@@ -364,11 +365,11 @@ $(eval $(if $(NF_KMOD),$(call nf_add,NFT_BRIDGE,CONFIG_NFT_BRIDGE_REJECT, $(P_EB
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT,CONFIG_NFT_NAT, $(P_XT)nft_nat),))
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT,CONFIG_NFT_CHAIN_NAT_IPV4, $(P_V4)nft_chain_nat_ipv4),))
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT,CONFIG_NFT_REDIR_IPV4, $(P_V4)nft_redir_ipv4, ge 3.19.0),))
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT,CONFIG_NFT_REDIR_IPV4, $(P_V4)nft_redir_ipv4),))
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT,CONFIG_NFT_MASQ, $(P_XT)nft_masq),))
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT,CONFIG_NFT_MASQ_IPV4, $(P_V4)nft_masq_ipv4),))
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT6,CONFIG_NFT_REDIR_IPV6, $(P_V6)nft_redir_ipv6, ge 3.19.0),))
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT6,CONFIG_NFT_REDIR_IPV6, $(P_V6)nft_redir_ipv6),))
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT6,CONFIG_NFT_CHAIN_NAT_IPV6, $(P_V6)nft_chain_nat_ipv6),))
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT6,CONFIG_NFT_MASQ_IPV6, $(P_V6)nft_masq_ipv6),))

View File

@@ -5,7 +5,7 @@
# See /LICENSE for more information.
#
PKG_DEFAULT_DEPENDS = +libc +GCC_LIBSSP:libssp +USE_GLIBC:librt +USE_GLIBC:libpthread
PKG_DEFAULT_DEPENDS = +libc +USE_GLIBC:librt +USE_GLIBC:libpthread
ifneq ($(PKG_NAME),toolchain)
PKG_FIXUP_DEPENDS = $(if $(filter kmod-%,$(1)),$(2),$(PKG_DEFAULT_DEPENDS) $(filter-out $(PKG_DEFAULT_DEPENDS),$(2)))

View File

@@ -173,6 +173,7 @@ $$(call addfield,Depends,$$(Package/$(1)/DEPENDS)
)$$(call addfield,LicenseFiles,$(LICENSE_FILES)
)$$(call addfield,Section,$(SECTION)
)$$(call addfield,Require-User,$(USERID)
)$(if $(PKG_CPE_ID),CPE-ID: $(PKG_CPE_ID)
)$(if $(filter hold,$(PKG_FLAGS)),Status: unknown hold not-installed
)$(if $(filter essential,$(PKG_FLAGS)),Essential: yes
)$(if $(MAINTAINER),Maintainer: $(MAINTAINER)

View File

@@ -223,7 +223,7 @@ define Build/CoreTargets
$(STAMP_INSTALLED) : export PATH=$$(TARGET_PATH_PKG)
$(STAMP_INSTALLED): $(STAMP_BUILT)
rm -rf $(TMP_DIR)/stage-$(PKG_DIR_NAME)
mkdir -p $(TMP_DIR)/stage-$(PKG_DIR_NAME)/host $(STAGING_DIR)/packages $(STAGING_DIR_HOST)/packages
mkdir -p $(TMP_DIR)/stage-$(PKG_DIR_NAME)/host $(STAGING_DIR)/packages
$(foreach hook,$(Hooks/InstallDev/Pre),\
$(call $(hook),$(TMP_DIR)/stage-$(PKG_DIR_NAME),$(TMP_DIR)/stage-$(PKG_DIR_NAME)/host)$(sep)\
)
@@ -342,9 +342,9 @@ clean-build: $(if $(wildcard $(PKG_BUILD_DIR)/.autoremove),force-clean-build)
clean: force-clean-build
$(CleanStaging)
$(call Build/UninstallDev,$(STAGING_DIR),$(STAGING_DIR_HOST))
$(call Build/UninstallDev,$(STAGING_DIR),$(STAGING_DIR)/host)
$(Build/Clean)
rm -f $(STAGING_DIR)/packages/$(STAGING_FILES_LIST) $(STAGING_DIR_HOST)/packages/$(STAGING_FILES_LIST)
rm -f $(STAGING_DIR)/packages/$(STAGING_FILES_LIST)
dist:
$(Build/Dist)

View File

@@ -14,8 +14,8 @@ PKG_NAME:=Build dependency
# Required for the toolchain
$(eval $(call TestHostCommand,working-make, \
Please install GNU make v3.81 or later. (This version has bugs), \
$(MAKE) -v | grep -E 'Make (3\.8[1-9]|3\.9[0-9]|[4-9]\.)'))
Please install GNU make v3.82 or later. (This version has bugs), \
$(MAKE) -v | grep -E 'Make (3\.8[2-9]|3\.9[0-9]|[4-9]\.)'))
$(eval $(call TestHostCommand,case-sensitive-fs, \
OpenWrt can only be built on a case-sensitive filesystem, \
@@ -28,15 +28,8 @@ $(eval $(call TestHostCommand,proper-umask, \
$(eval $(call SetupHostCommand,gcc, \
Please install the GNU C Compiler (gcc) 4.8 or later, \
$(CC) -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?)', \
gcc -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?)', \
gcc48 --version | grep gcc, \
gcc49 --version | grep gcc, \
gcc5 --version | grep gcc, \
gcc6 --version | grep gcc, \
gcc7 --version | grep gcc, \
gcc8 --version | grep gcc, \
gcc9 --version | grep gcc, \
$(CC) -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|10\.?)', \
gcc -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|10\.?)', \
gcc --version | grep -E 'Apple.(LLVM|clang)' ))
$(eval $(call TestHostCommand,working-gcc, \
@@ -47,15 +40,8 @@ $(eval $(call TestHostCommand,working-gcc, \
$(eval $(call SetupHostCommand,g++, \
Please install the GNU C++ Compiler (g++) 4.8 or later, \
$(CXX) -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?)', \
g++ -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?)', \
g++48 --version | grep g++, \
g++49 --version | grep g++, \
g++5 --version | grep g++, \
g++6 --version | grep g++, \
g++7 --version | grep g++, \
g++8 --version | grep g++, \
g++9 --version | grep g++, \
$(CXX) -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|10\.?)', \
g++ -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|10\.?)', \
g++ --version | grep -E 'Apple.(LLVM|clang)' ))
$(eval $(call TestHostCommand,working-g++, \
@@ -65,10 +51,12 @@ $(eval $(call TestHostCommand,working-g++, \
g++ -x c++ -o $(TMP_DIR)/a.out - -lstdc++ && \
$(TMP_DIR)/a.out))
ifndef IB
$(eval $(call TestHostCommand,ncurses, \
Please install ncurses. (Missing libncurses.so or ncurses.h), \
echo 'int main(int argc, char **argv) { initscr(); return 0; }' | \
gcc -include ncurses.h -x c -o $(TMP_DIR)/a.out - -lncurses))
endif
ifeq ($(HOST_OS),Linux)
zlib_link_flags := -Wl,-Bstatic -lz -Wl,-Bdynamic
@@ -76,6 +64,10 @@ else
zlib_link_flags := -lz
endif
$(eval $(call TestHostCommand,perl-data-dumper, \
Please install the Perl Data::Dumper module, \
perl -MData::Dumper -e 1))
$(eval $(call TestHostCommand,perl-thread-queue, \
Please install the Perl Thread::Queue module, \
perl -MThread::Queue -e 1))
@@ -93,6 +85,11 @@ $(eval $(call SetupHostCommand,find,Please install GNU 'find', \
$(eval $(call SetupHostCommand,bash,Please install GNU 'bash', \
bash --version 2>&1 | grep GNU))
$(eval $(call SetupHostCommand,xargs, \
Please install 'xargs' that supports '-r/--no-run-if-empty', \
gxargs -r --version, \
xargs -r --version))
$(eval $(call SetupHostCommand,patch,Please install GNU 'patch', \
gpatch --version 2>&1 | grep 'Free Software Foundation', \
patch --version 2>&1 | grep 'Free Software Foundation'))
@@ -120,7 +117,6 @@ $(eval $(call SetupHostCommand,grep,Please install GNU 'grep', \
$(eval $(call SetupHostCommand,getopt, \
Please install an extended getopt version that supports --long, \
gnugetopt -o t --long test -- --test | grep '^ *--test *--', \
/usr/local/bin/getopt -o t --long test -- --test | grep '^ *--test *--', \
getopt -o t --long test -- --test | grep '^ *--test *--'))
$(eval $(call SetupHostCommand,stat,Cannot find a file stat utility, \

View File

@@ -15,16 +15,17 @@ DEVICE_TYPE?=router
# Default packages - the really basic set
DEFAULT_PACKAGES:=base-files libc libgcc busybox dropbear mtd uci opkg netifd fstools uclient-fetch logd urandom-seed urngd \
block-mount coremark kmod-nf-nathelper kmod-nf-nathelper-extra kmod-ipt-raw wget libustream-openssl ca-certificates \
default-settings luci luci-app-ddns luci-app-upnp luci-app-adbyby-plus luci-app-autoreboot \
default-settings luci luci-app-ddns luci-app-upnp luci-app-autoreboot luci-app-webadmin \
luci-app-filetransfer luci-app-vsftpd luci-app-ssr-plus luci-app-unblockmusic \
luci-app-arpbind luci-app-vlmcsd luci-app-wol luci-app-ramfree \
luci-app-sfe luci-app-flowoffload luci-app-nlbwmon luci-app-accesscontrol luci-app-cpufreq \
luci-app-sfe luci-app-nlbwmon luci-app-accesscontrol luci-app-cpufreq \
ddns-scripts_aliyun ddns-scripts_dnspod
# For the basic set
DEFAULT_PACKAGES.basic:=
# For nas targets
DEFAULT_PACKAGES.nas:=block-mount fdisk lsblk mdadm
# For router targets
DEFAULT_PACKAGES.router:=dnsmasq-full iptables ppp ppp-mod-pppoe firewall kmod-ipt-offload kmod-tcp-bbr
DEFAULT_PACKAGES.bootloader:=
DEFAULT_PACKAGES.router:=dnsmasq-full iptables ppp ppp-mod-pppoe firewall
ifneq ($(DUMP),)
all: dumpinfo
@@ -61,7 +62,7 @@ endif
DEFAULT_PACKAGES += $(DEFAULT_PACKAGES.$(DEVICE_TYPE))
filter_packages = $(filter-out -% $(patsubst -%,%,$(filter -%,$(1))),$(1))
extra_packages = $(if $(filter wpad-mini wpad-basic wpad nas,$(1)),iwinfo)
extra_packages = $(if $(filter wpad-mini wpad-basic wpad-basic-wolfssl wpad nas,$(1)),iwinfo)
define ProfileDefault
NAME:=

View File

@@ -99,25 +99,22 @@ prepare-tmpinfo: FORCE
$(_SINGLE)$(NO_TRACE_MAKE) menuconfig $(PREP_MK); \
fi
ifneq ($(DISTRO_PKG_CONFIG),)
scripts/config/mconf: export PATH:=$(dir $(DISTRO_PKG_CONFIG)):$(PATH)
ifeq ($(RECURSIVE_DEP_IS_ERROR),1)
KCONF_FLAGS=--fatalrecursive
endif
scripts/config/mconf:
@$(_SINGLE)$(SUBMAKE) -s -C scripts/config all CC="$(HOSTCC_WRAPPER)"
ifneq ($(DISTRO_PKG_CONFIG),)
scripts/config/%onf: export PATH:=$(dir $(DISTRO_PKG_CONFIG)):$(PATH)
endif
scripts/config/%onf: CFLAGS+= -O2
scripts/config/%onf:
@$(_SINGLE)$(SUBMAKE) $(if $(findstring s,$(OPENWRT_VERBOSE)),,-s) \
-C scripts/config $(notdir $@) CC="$(HOSTCC_WRAPPER)"
$(eval $(call rdep,scripts/config,scripts/config/mconf))
scripts/config/qconf:
@$(_SINGLE)$(SUBMAKE) -s -C scripts/config qconf \
CC="$(HOSTCC_WRAPPER)" \
DISTRO-PKG-CONFIG="$(DISTRO_PKG_CONFIG)"
scripts/config/conf:
@$(_SINGLE)$(SUBMAKE) -s -C scripts/config conf CC="$(HOSTCC_WRAPPER)"
config: scripts/config/conf prepare-tmpinfo FORCE
[ -L .config ] && export KCONFIG_OVERWRITECONFIG=1; \
$< Config.in
$< $(KCONF_FLAGS) Config.in
config-clean: FORCE
$(_SINGLE)$(NO_TRACE_MAKE) -C scripts/config clean
@@ -126,7 +123,7 @@ defconfig: scripts/config/conf prepare-tmpinfo FORCE
touch .config
@if [ ! -s .config -a -e $(HOME)/.openwrt/defconfig ]; then cp $(HOME)/.openwrt/defconfig .config; fi
[ -L .config ] && export KCONFIG_OVERWRITECONFIG=1; \
$< --defconfig=.config Config.in
$< $(KCONF_FLAGS) --defconfig=.config Config.in
confdefault-y=allyes
confdefault-m=allmod
@@ -135,7 +132,7 @@ confdefault:=$(confdefault-$(CONFDEFAULT))
oldconfig: scripts/config/conf prepare-tmpinfo FORCE
[ -L .config ] && export KCONFIG_OVERWRITECONFIG=1; \
$< --$(if $(confdefault),$(confdefault),old)config Config.in
$< $(KCONF_FLAGS) --$(if $(confdefault),$(confdefault),old)config Config.in
menuconfig: scripts/config/mconf prepare-tmpinfo FORCE
if [ \! -e .config -a -e $(HOME)/.openwrt/defconfig ]; then \
@@ -216,7 +213,7 @@ ifeq ($(SDK),1)
%::
@+$(PREP_MK) $(NO_TRACE_MAKE) -r -s prereq
@./scripts/config/conf --defconfig=.config Config.in
@./scripts/config/conf $(KCONF_FLAGS) --defconfig=.config Config.in
@+$(ULIMIT_FIX) $(SUBMAKE) -r $@
else
@@ -225,7 +222,7 @@ else
@+$(PREP_MK) $(NO_TRACE_MAKE) -r -s prereq
@( \
cp .config tmp/.config; \
./scripts/config/conf --defconfig=tmp/.config -w tmp/.config Config.in > /dev/null 2>&1; \
./scripts/config/conf $(KCONF_FLAGS) --defconfig=tmp/.config -w tmp/.config Config.in > /dev/null 2>&1; \
if ./scripts/kconfig.pl '>' .config tmp/.config | grep -q CONFIG; then \
printf "$(_R)WARNING: your configuration is out of sync. Please run make menuconfig, oldconfig or defconfig!$(_N)\n" >&2; \
fi \

View File

@@ -3,7 +3,8 @@ PKG_NAME ?= u-boot
ifndef PKG_SOURCE_PROTO
PKG_SOURCE = $(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL = \
https://sources.openwrt.org \
https://mirror.cyberbits.eu/u-boot \
https://ftp.denx.de/pub/u-boot \
ftp://ftp.denx.de/pub/u-boot
endif

View File

@@ -31,6 +31,10 @@ ifeq ($(strip $(UNPACK_CMD)),)
EXT:=$(call ext,$(PKG_SOURCE:.$(EXT)=))
DECOMPRESS_CMD:=xzcat $(DL_DIR)/$(PKG_SOURCE) |
endif
ifeq (zst,$(EXT))
EXT:=$(call ext,$(PKG_SOURCE:.$(EXT)=))
DECOMPRESS_CMD:=zstdcat $(DL_DIR)/$(PKG_SOURCE) |
endif
ifeq ($(filter tgz tbz tbz2 txz,$(EXT1)),$(EXT1))
EXT:=tar
endif

View File

@@ -12,7 +12,7 @@ include $(INCLUDE_DIR)/version.mk
include $(INCLUDE_DIR)/feeds.mk
PKG_NAME:=base-files
PKG_RELEASE:=200
PKG_RELEASE:=224
PKG_FLAGS:=nonshared
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
@@ -63,6 +63,7 @@ define Package/base-files/conffiles
/etc/services
/etc/shadow
/etc/shells
/etc/shinit
/etc/sysctl.conf
/etc/sysupgrade.conf
$(call $(TARGET)/conffiles)
@@ -108,12 +109,14 @@ ifdef CONFIG_SIGNED_PACKAGES
endef
ifndef CONFIG_BUILDBOT
define Package/base-files/install-key
mkdir -p $(1)/etc/opkg/keys
$(CP) $(BUILD_KEY).pub $(1)/etc/opkg/keys/`$(STAGING_DIR_HOST)/bin/usign -F -p $(BUILD_KEY).pub`
endef
endif
endif
ifeq ($(CONFIG_NAND_SUPPORT),)
define Package/base-files/nand-support
@@ -189,12 +192,16 @@ define Package/base-files/install
$(if $(CONFIG_INCLUDE_CONFIG), \
echo -e "# Build configuration for board $(BOARD)/$(SUBTARGET)/$(PROFILE)\n" >$(1)/etc/build.config; \
cat $(BIN_DIR)/config.seed >>$(1)/etc/build.config)
cat $(BIN_DIR)/config.buildinfo >>$(1)/etc/build.config; \
cat $(BIN_DIR)/feeds.buildinfo >>$(1)/etc/build.feeds; \
cat $(BIN_DIR)/version.buildinfo >>$(1)/etc/build.version)
$(if $(CONFIG_CLEAN_IPKG),, \
mkdir -p $(1)/etc/opkg; \
$(call FeedSourcesAppend,$(1)/etc/opkg/distfeeds.conf); \
$(VERSION_SED_SCRIPT) $(1)/etc/opkg/distfeeds.conf)
$(if $(CONFIG_IPK_FILES_CHECKSUMS),, \
rm -f $(1)/sbin/pkg_check)
endef
ifneq ($(DUMP),1)

View File

@@ -85,12 +85,16 @@ generate_network() {
set network.$1.proto='none'
EOF
[ -n "$macaddr" ] && uci -q batch <<-EOF
delete network.$1_dev
set network.$1_dev='device'
set network.$1_dev.name='$ifname'
set network.$1_dev.macaddr='$macaddr'
EOF
if [ -n "$macaddr" ]; then
for name in $ifname; do
uci -q batch <<-EOF
delete network.$1_${name/./_}_dev
set network.$1_${name/./_}_dev='device'
set network.$1_${name/./_}_dev.name='$name'
set network.$1_${name/./_}_dev.macaddr='$macaddr'
EOF
done
fi
case "$protocol" in
static)
@@ -213,7 +217,8 @@ generate_switch() {
json_select switch
json_select "$key"
json_get_vars enable reset blinkrate cpu_port
json_get_vars enable reset blinkrate cpu_port \
ar8xxx_mib_type ar8xxx_mib_poll_interval
uci -q batch <<-EOF
add network switch
@@ -221,6 +226,8 @@ generate_switch() {
set network.@switch[-1].reset='$reset'
set network.@switch[-1].enable_vlan='$enable'
set network.@switch[-1].blinkrate='$blinkrate'
set network.@switch[-1].ar8xxx_mib_type='$ar8xxx_mib_type'
set network.@switch[-1].ar8xxx_mib_poll_interval='$ar8xxx_mib_poll_interval'
EOF
generate_switch_vlans_ports "$1"
@@ -247,7 +254,7 @@ generate_static_system() {
add_list system.ntp.server='ntp1.aliyun.com'
add_list system.ntp.server='time1.cloud.tencent.com'
add_list system.ntp.server='time.ustc.edu.cn'
add_list system.ntp.server='pool.ntp.org'
add_list system.ntp.server='cn.pool.ntp.org'
EOF
if json_is_a system object; then
@@ -419,6 +426,8 @@ generate_gpioswitch() {
json_init
json_load "$(cat ${CFG})"
umask 077
if [ ! -s /etc/config/network ]; then
touch /etc/config/network
generate_static_network

View File

@@ -37,6 +37,8 @@ set_led_state() {
;;
done)
status_led_off
[ "$status_led" != "$running" ] && \
status_led_restore_trigger "boot"
[ -n "$running" ] && {
status_led="$running"
status_led_on

View File

@@ -1,8 +1,8 @@
root:x:0:
daemon:x:1:
adm:x:4:
tty:x:5:
mail:x:8:
dialout:x:20:
audio:x:29:
www-data:x:33:
ftp:x:55:

View File

@@ -2,7 +2,7 @@
# Copyright (C) 2006-2011 OpenWrt.org
START=10
STOP=98
STOP=90
uci_apply_defaults() {
. /lib/functions/system.sh
@@ -31,15 +31,16 @@ boot() {
chmod 0700 /tmp/.uci
touch /var/log/wtmp
touch /var/log/lastlog
touch /tmp/resolv.conf.auto
ln -sf /tmp/resolv.conf.auto /tmp/resolv.conf
mkdir -p /tmp/resolv.conf.d
touch /tmp/resolv.conf.d/resolv.conf.auto
ln -sf /tmp/resolv.conf.d/resolv.conf.auto /tmp/resolv.conf
grep -q debugfs /proc/filesystems && /bin/mount -o noatime -t debugfs debugfs /sys/kernel/debug
[ "$FAILSAFE" = "true" ] && touch /tmp/.failsafe
/sbin/kmodloader
[ ! -f /etc/config/wireless ] && {
# compat for brcm47xx and mvebu
# compat for bcm47xx and mvebu
sleep 1
}

View File

@@ -4,7 +4,7 @@
START=95
boot() {
mount_root done
rm -f /sysupgrade.tgz
rm -f /sysupgrade.tgz && sync
# process user commands
[ -f /etc/rc.local ] && {

View File

@@ -16,21 +16,39 @@ load_gpio_switch()
config_get name "$1" name
config_get value "$1" value 0
local gpio_path="/sys/class/gpio/gpio${gpio_pin}"
# export GPIO pin for access
[ -d "$gpio_path" ] || {
echo "$gpio_pin" >/sys/class/gpio/export
# we need to wait a bit until the GPIO appears
[ -d "$gpio_path" ] || sleep 1
[ -z "$gpio_pin" ] && {
echo >&2 "Skipping gpio_switch '$name' due to missing gpio_pin"
return 1
}
# direction attribute only exists if the kernel supports changing the
# direction of a GPIO
if [ -e "${gpio_path}/direction" ]; then
# set the pin to output with high or low pin value
{ [ "$value" = "0" ] && echo "low" || echo "high"; } >"$gpio_path/direction"
local gpio_path
if [ -n "$(echo "$gpio_pin" | grep -E "^[0-9]+$")" ]; then
gpio_path="/sys/class/gpio/gpio${gpio_pin}"
# export GPIO pin for access
[ -d "$gpio_path" ] || {
echo "$gpio_pin" >/sys/class/gpio/export
# we need to wait a bit until the GPIO appears
[ -d "$gpio_path" ] || sleep 1
}
# direction attribute only exists if the kernel supports changing the
# direction of a GPIO
if [ -e "${gpio_path}/direction" ]; then
# set the pin to output with high or low pin value
{ [ "$value" = "0" ] && echo "low" || echo "high"; } \
>"$gpio_path/direction"
else
{ [ "$value" = "0" ] && echo "0" || echo "1"; } \
>"$gpio_path/value"
fi
else
{ [ "$value" = "0" ] && echo "0" || echo "1"; } >"$gpio_path/value"
gpio_path="/sys/class/gpio/${gpio_pin}"
[ -d "$gpio_path" ] && {
{ [ "$value" = "0" ] && echo "0" || echo "1"; } \
>"$gpio_path/value"
}
fi
}

View File

@@ -6,7 +6,7 @@ USE_PROCD=1
validate_system_section()
{
uci_validate_section system system "${1}" \
uci_load_validate system system "$1" "$2" \
'hostname:string:OpenWrt' \
'conloglevel:uinteger' \
'buffersize:uinteger' \
@@ -15,11 +15,7 @@ validate_system_section()
}
system_config() {
local cfg="$1"
local hostname conloglevel buffersize timezone zonename
validate_system_section "${1}" || {
[ "$2" = 0 ] || {
echo "validation failed"
return 1
}
@@ -31,12 +27,12 @@ system_config() {
ln -sf "/usr/share/zoneinfo/$zonename" /tmp/localtime && rm -f /tmp/TZ
# apply timezone to kernel
date -k
busybox date -k
}
reload_service() {
config_load system
config_foreach system_config system
config_foreach validate_system_section system system_config
}
service_triggers()

View File

@@ -1,7 +1,12 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2006 OpenWrt.org
STOP=99
STOP=90
restart() {
:
}
stop() {
sync
/bin/umount -a -d -r

View File

@@ -1,4 +1,3 @@
#!/bin/sh
[ -e /tmp/.failsafe ] && export FAILSAFE=1
[ -f /etc/banner ] && cat /etc/banner
@@ -13,6 +12,7 @@ export PATH="%PATH%"
export HOME=$(grep -e "^${USER:-root}:" /etc/passwd | cut -d ":" -f 6)
export HOME=${HOME:-/root}
export PS1='\u@\h:\w\$ '
export ENV=/etc/shinit
case "$TERM" in
xterm*|rxvt*)
@@ -20,16 +20,6 @@ case "$TERM" in
;;
esac
[ -x /bin/more ] || alias more=less
[ -x /usr/bin/vim ] && alias vi=vim || alias vim=vi
alias ll='ls -alF --color=auto'
[ -z "$KSH_VERSION" -o \! -s /etc/mkshrc ] || . /etc/mkshrc
[ -x /usr/bin/arp -o -x /sbin/arp ] || arp() { cat /proc/net/arp; }
[ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 $*; }
[ -n "$FAILSAFE" ] || {
for FILE in /etc/profile.d/*.sh; do
[ -e "$FILE" ] && . "$FILE"
@@ -48,12 +38,3 @@ in order to prevent unauthorized SSH logins.
--------------------------------------------------
EOF
fi
service() {
[ -f "/etc/init.d/$1" ] || {
echo "service "'"'"$1"'"'" not found, the following services are available:"
ls "/etc/init.d"
return 1
}
/etc/init.d/$@
}

View File

@@ -0,0 +1,12 @@
#!/bin/sh
[ "${ACTION}" = "released" ] || exit 0
if [ "$SEEN" -ge 5 ]
then
echo "REBOOT" > /dev/console
sync
reboot
fi
return 0

View File

@@ -73,6 +73,7 @@ Available commands:
reload Reload configuration files (or restart if service does not implement reload)
enable Enable service autostart
disable Disable service autostart
enabled Check if service is started on boot
$EXTRA_HELP
EOF
}
@@ -95,7 +96,9 @@ service_data() {
}
service_running() {
return 0
local service="${1:-$(basename $initscript)}"
local instance="${2:-*}"
procd_running "$service" "$instance" "$@"
}
${INIT_TRACE:+set -x}
@@ -103,7 +106,11 @@ ${INIT_TRACE:+set -x}
. "$initscript"
[ -n "$USE_PROCD" ] && {
EXTRA_COMMANDS="${EXTRA_COMMANDS} running trace"
EXTRA_COMMANDS="${EXTRA_COMMANDS} running status trace"
EXTRA_HELP="\
running Check if service is running
status Service status
${EXTRA_HELP}"
. $IPKG_INSTROOT/lib/functions/procd.sh
basescript=$(readlink "$initscript")
@@ -131,6 +138,9 @@ ${INIT_TRACE:+set -x}
procd_lock
stop_service "$@"
procd_kill "$(basename ${basescript:-$initscript})" "$1"
if eval "type service_stopped" 2>/dev/null >/dev/null; then
service_stopped
fi
}
reload() {
@@ -145,6 +155,14 @@ ${INIT_TRACE:+set -x}
running() {
service_running "$@"
}
status() {
if eval "type status_service" 2>/dev/null >/dev/null; then
status_service "$@"
else
_procd_status "$(basename ${basescript:-$initscript})" "$1"
fi
}
}
ALL_COMMANDS="start stop reload restart boot shutdown enable disable enabled depends ${EXTRA_COMMANDS}"

View File

@@ -0,0 +1,21 @@
[ -x /bin/more ] || alias more=less
[ -x /usr/bin/vim ] && alias vi=vim || alias vim=vi
alias ll='ls -alF --color=auto'
[ -z "$KSH_VERSION" -o \! -s /etc/mkshrc ] || . /etc/mkshrc
[ -x /usr/bin/arp -o -x /sbin/arp ] || arp() { cat /proc/net/arp; }
[ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 $*; }
service() {
[ -f "/etc/init.d/$1" ] || {
echo "service "'"'"$1"'"'" not found, the following services are available:"
ls "/etc/init.d"
return 1
}
/etc/init.d/$@
}
[ -n "$KSH_VERSION" -o \! -s "$HOME/.shinit" ] || . "$HOME/.shinit"
[ -z "$KSH_VERSION" -o \! -s "$HOME/.mkshrc" ] || . "$HOME/.mkshrc"

View File

@@ -8,6 +8,8 @@ fs.suid_dumpable=2
fs.protected_hardlinks=1
fs.protected_symlinks=1
net.core.bpf_jit_enable=1
net.ipv4.conf.default.arp_ignore=1
net.ipv4.conf.all.arp_ignore=1
net.ipv4.ip_forward=1

View File

@@ -1,5 +1,3 @@
#!/bin/sh
ppwd="$(sed -ne '/^root:/s/^root:\([^:]*\):.*$/\1/p' /etc/passwd)"
spwd="$(sed -ne '/^root:/s/^root:\([^:]*\):.*$/\1/p' /etc/shadow)"

View File

@@ -1,5 +1,3 @@
#!/bin/sh
[ "$(uci -q get network.globals.ula_prefix)" != "auto" ] && exit 0
r1=$(dd if=/dev/urandom bs=1 count=1 |hexdump -e '1/1 "%02x"')

View File

@@ -0,0 +1,9 @@
. /lib/functions.sh
for file in `grep -sl Require-User /usr/lib/opkg/info/*.control`; do
file="${file##*/}"
file="${file%.control}"
add_group_and_user "${file}"
done
exit 0

View File

@@ -1,11 +0,0 @@
#!/bin/sh
. /lib/functions.sh
for file in `grep -sl Require-User /usr/lib/opkg/info/*.control`; do
file="${file##*/}"
file="${file%.control}"
add_group_and_user "${file}"
done
exit 0

View File

@@ -17,6 +17,22 @@ NO_EXPORT=1
LOAD_STATE=1
LIST_SEP=" "
# xor multiple hex values of the same length
xor() {
local val
local ret="0x$1"
local retlen=${#1}
shift
while [ -n "$1" ]; do
val="0x$1"
ret=$((ret ^ val))
shift
done
printf "%0${retlen}x" "$ret"
}
append() {
local var="$1"
local value="$2"
@@ -54,7 +70,7 @@ config () {
local cfgtype="$1"
local name="$2"
export ${NO_EXPORT:+-n} CONFIG_NUM_SECTIONS=$(($CONFIG_NUM_SECTIONS + 1))
export ${NO_EXPORT:+-n} CONFIG_NUM_SECTIONS=$((CONFIG_NUM_SECTIONS + 1))
name="${name:-cfg$CONFIG_NUM_SECTIONS}"
append CONFIG_SECTIONS "$name"
export ${NO_EXPORT:+-n} CONFIG_SECTION="$name"
@@ -77,7 +93,7 @@ list() {
config_get len "$CONFIG_SECTION" "${varname}_LENGTH" 0
[ $len = 0 ] && append CONFIG_LIST_STATE "${CONFIG_SECTION}_${varname}"
len=$(($len + 1))
len=$((len + 1))
config_set "$CONFIG_SECTION" "${varname}_ITEM$len" "$value"
config_set "$CONFIG_SECTION" "${varname}_LENGTH" "$len"
append "CONFIG_${CONFIG_SECTION}_${varname}" "$value" "$LIST_SEP"
@@ -92,7 +108,7 @@ config_unset() {
# config_get <section> <option>
config_get() {
case "$3" in
"") eval echo "\${CONFIG_${1}_${2}:-\${4}}";;
"") eval echo "\"\${CONFIG_${1}_${2}:-\${4}}\"";;
*) eval export ${NO_EXPORT:+-n} -- "${1}=\${CONFIG_${2}_${3}:-\${4}}";;
esac
}
@@ -127,7 +143,7 @@ config_foreach() {
[ -z "$CONFIG_SECTIONS" ] && return 0
for section in ${CONFIG_SECTIONS}; do
config_get cfgtype "$section" TYPE
[ -n "$___type" -a "x$cfgtype" != "x$___type" ] && continue
[ -n "$___type" ] && [ "x$cfgtype" != "x$___type" ] && continue
eval "$___function \"\$section\" \"\$@\""
done
}
@@ -146,7 +162,7 @@ config_list_foreach() {
while [ $c -le "$len" ]; do
config_get val "${section}" "${option}_ITEM$c"
eval "$function \"\$val\" \"\$@\""
c="$(($c + 1))"
c="$((c + 1))"
done
}
@@ -213,6 +229,7 @@ add_group_and_user() {
default_postinst() {
local root="${IPKG_INSTROOT}"
local pkgname="$(basename ${1%.*})"
local filelist="/usr/lib/opkg/info/${pkgname}.list"
local ret=0
add_group_and_user "${pkgname}"
@@ -227,23 +244,28 @@ default_postinst() {
rm -fR $root/rootfs-overlay/
fi
if [ -z "$root" ] && grep -q -s "^/etc/modules.d/" "/usr/lib/opkg/info/${pkgname}.list"; then
kmodloader
fi
if [ -z "$root" ]; then
if grep -m1 -q -s "^/etc/modules.d/" "$filelist"; then
kmodloader
fi
if [ -z "$root" ] && grep -q -s "^/etc/uci-defaults/" "/usr/lib/opkg/info/${pkgname}.list"; then
. /lib/functions/system.sh
[ -d /tmp/.uci ] || mkdir -p /tmp/.uci
for i in $(grep -s "^/etc/uci-defaults/" "/usr/lib/opkg/info/${pkgname}.list"); do
( [ -f "$i" ] && cd "$(dirname $i)" && . "$i" ) && rm -f "$i"
done
uci commit
fi
if grep -m1 -q -s "^/etc/sysctl.d/" "$filelist"; then
/etc/init.d/sysctl restart
fi
[ -n "$root" ] || rm -f /tmp/luci-indexcache 2>/dev/null
if grep -m1 -q -s "^/etc/uci-defaults/" "$filelist"; then
[ -d /tmp/.uci ] || mkdir -p /tmp/.uci
for i in $(grep -s "^/etc/uci-defaults/" "$filelist"); do
( [ -f "$i" ] && cd "$(dirname $i)" && . "$i" ) && rm -f "$i"
done
uci commit
fi
rm -f /tmp/luci-indexcache
fi
local shell="$(which bash)"
for i in $(grep -s "^/etc/init.d/" "$root/usr/lib/opkg/info/${pkgname}.list"); do
for i in $(grep -s "^/etc/init.d/" "$root$filelist"); do
if [ -n "$root" ]; then
${shell:-/bin/sh} "$root/etc/rc.common" "$root$i" enable
else
@@ -301,10 +323,10 @@ group_add_next() {
echo $gid
return
fi
gids=$(cat ${IPKG_INSTROOT}/etc/group | cut -d: -f3)
gids=$(cut -d: -f3 ${IPKG_INSTROOT}/etc/group)
gid=65536
while [ -n "$(echo "$gids" | grep "^$gid$")" ] ; do
gid=$((gid + 1))
while echo "$gids" | grep -q "^$gid$"; do
gid=$((gid + 1))
done
group_add $1 $gid
echo $gid
@@ -313,8 +335,8 @@ group_add_next() {
group_add_user() {
local grp delim=","
grp=$(grep -s "^${1}:" ${IPKG_INSTROOT}/etc/group)
[ -z "$(echo $grp | cut -d: -f4 | grep $2)" ] || return
[ -n "$(echo $grp | grep ":$")" ] && delim=""
echo "$grp" | cut -d: -f4 | grep -q $2 && return
echo "$grp" | grep -q ":$" && delim=""
[ -n "$IPKG_INSTROOT" ] || lock /var/lock/passwd
sed -i "s/$grp/$grp$delim$2/g" ${IPKG_INSTROOT}/etc/group
[ -n "$IPKG_INSTROOT" ] || lock -u /var/lock/passwd
@@ -329,10 +351,10 @@ user_add() {
local shell="${6:-/bin/false}"
local rc
[ -z "$uid" ] && {
uids=$(cat ${IPKG_INSTROOT}/etc/passwd | cut -d: -f3)
uids=$(cut -d: -f3 ${IPKG_INSTROOT}/etc/passwd)
uid=65536
while [ -n "$(echo "$uids" | grep "^$uid$")" ] ; do
uid=$((uid + 1))
while echo "$uids" | grep -q "^$uid$"; do
uid=$((uid + 1))
done
}
[ -z "$gid" ] && gid=$uid
@@ -351,4 +373,4 @@ board_name() {
[ -e /tmp/sysinfo/board_name ] && cat /tmp/sysinfo/board_name || echo "generic"
}
[ -z "$IPKG_INSTROOT" -a -f /lib/config/uci.sh ] && . /lib/config/uci.sh
[ -z "$IPKG_INSTROOT" ] && [ -f /lib/config/uci.sh ] && . /lib/config/uci.sh

View File

@@ -0,0 +1,158 @@
# Copyright (C) 2019 OpenWrt.org
. /lib/functions.sh
. /lib/functions/system.sh
caldata_die() {
echo "caldata: " "$*"
exit 1
}
caldata_extract() {
local part=$1
local offset=$(($2))
local count=$(($3))
local mtd
mtd=$(find_mtd_chardev $part)
[ -n "$mtd" ] || caldata_die "no mtd device found for partition $part"
dd if=$mtd of=/lib/firmware/$FIRMWARE iflag=skip_bytes bs=$count skip=$offset count=1 2>/dev/null || \
caldata_die "failed to extract calibration data from $mtd"
}
caldata_extract_ubi() {
local part=$1
local offset=$(($2))
local count=$(($3))
local ubidev
local ubi
. /lib/upgrade/nand.sh
ubidev=$(nand_find_ubi $CI_UBIPART)
ubi=$(nand_find_volume $ubidev $part)
[ -n "$ubi" ] || caldata_die "no UBI volume found for $part"
dd if=/dev/$ubi of=/lib/firmware/$FIRMWARE iflag=skip_bytes bs=$count skip=$offset count=1 2>/dev/null || \
caldata_die "failed to extract calibration data from $ubi"
}
caldata_extract_reverse() {
local part=$1
local offset=$2
local count=$(($3))
local mtd
local reversed
local caldata
mtd=$(find_mtd_chardev "$part")
reversed=$(hexdump -v -s $offset -n $count -e '/1 "%02x "' $mtd)
for byte in $reversed; do
caldata="\x${byte}${caldata}"
done
printf "%b" "$caldata" > /lib/firmware/$FIRMWARE
}
caldata_from_file() {
local source=$1
local offset=$(($2))
local count=$(($3))
local target=$4
[ -n "$target" ] || target=/lib/firmware/$FIRMWARE
# dd doesn't handle partial reads from special files: use cat
cat $source | dd of=$target iflag=skip_bytes bs=$count skip=$offset count=1 2>/dev/null || \
caldata_die "failed to extract calibration data from $source"
}
caldata_sysfsload_from_file() {
local source=$1
local offset=$(($2))
local count=$(($3))
# dd doesn't handle partial reads from special files: use cat
# test extract to /dev/null first
cat $source | dd of=/dev/null iflag=skip_bytes bs=$count skip=$offset count=1 2>/dev/null || \
caldata_die "failed to extract calibration data from $source"
# can't fail now
echo 1 > /sys/$DEVPATH/loading
cat $source | dd of=/sys/$DEVPATH/data iflag=skip_bytes bs=$count skip=$offset count=1 2>/dev/null
echo 0 > /sys/$DEVPATH/loading
}
caldata_valid() {
local expected="$1"
local target=$2
[ -n "$target" ] || target=/lib/firmware/$FIRMWARE
magic=$(hexdump -v -n 2 -e '1/1 "%02x"' $target)
[ "$magic" = "$expected" ]
return $?
}
caldata_patch_chksum() {
local mac=$1
local mac_offset=$(($2))
local chksum_offset=$(($3))
local target=$4
local xor_mac
local xor_fw_mac
local xor_fw_chksum
xor_mac=${mac//:/}
xor_mac="${xor_mac:0:4} ${xor_mac:4:4} ${xor_mac:8:4}"
xor_fw_mac=$(hexdump -v -n 6 -s $mac_offset -e '/1 "%02x"' /lib/firmware/$FIRMWARE)
xor_fw_mac="${xor_fw_mac:0:4} ${xor_fw_mac:4:4} ${xor_fw_mac:8:4}"
xor_fw_chksum=$(hexdump -v -n 2 -s $chksum_offset -e '/1 "%02x"' /lib/firmware/$FIRMWARE)
xor_fw_chksum=$(xor $xor_fw_chksum $xor_fw_mac $xor_mac)
printf "%b" "\x${xor_fw_chksum:0:2}\x${xor_fw_chksum:2:2}" | \
dd of=$target conv=notrunc bs=1 seek=$chksum_offset count=2
}
caldata_patch_mac() {
local mac=$1
local mac_offset=$(($2))
local chksum_offset=$3
local target=$4
[ -z "$mac" -o -z "$mac_offset" ] && return
[ -n "$target" ] || target=/lib/firmware/$FIRMWARE
[ -n "$chksum_offset" ] && caldata_patch_chksum "$mac" "$mac_offset" "$chksum_offset" "$target"
macaddr_2bin $mac | dd of=$target conv=notrunc oflag=seek_bytes bs=6 seek=$mac_offset count=1 || \
caldata_die "failed to write MAC address to eeprom file"
}
ath9k_patch_mac() {
local mac=$1
local target=$2
caldata_patch_mac "$mac" 0x2 "" "$target"
}
ath9k_patch_mac_crc() {
local mac=$1
local mac_offset=$2
local chksum_offset=$((mac_offset - 10))
local target=$4
caldata_patch_mac "$mac" "$mac_offset" "$chksum_offset" "$target"
}
ath10k_patch_mac() {
local mac=$1
local target=$2
caldata_patch_mac "$mac" 0x6 0x2 "$target"
}

View File

@@ -1,16 +1,24 @@
#!/bin/sh
# Copyright (C) 2013 OpenWrt.org
get_dt_led() {
local label
get_dt_led_path() {
local ledpath
local basepath="/proc/device-tree"
local nodepath="$basepath/aliases/led-$1"
[ -f "$nodepath" ] && ledpath=$(cat "$nodepath")
[ -n "$ledpath" ] && ledpath="$basepath$ledpath"
echo "$ledpath"
}
get_dt_led() {
local label
local ledpath=$(get_dt_led_path $1)
[ -n "$ledpath" ] && \
label=$(cat "$basepath$ledpath/label" 2>/dev/null) || \
label=$(cat "$basepath$ledpath/chan-name" 2>/dev/null)
label=$(cat "$ledpath/label" 2>/dev/null) || \
label=$(cat "$ledpath/chan-name" 2>/dev/null)
echo "$label"
}
@@ -35,6 +43,17 @@ led_off() {
led_set_attr $1 "brightness" 0
}
status_led_restore_trigger() {
local trigger
local ledpath=$(get_dt_led_path $1)
[ -n "$ledpath" ] && \
trigger=$(cat "$ledpath/linux,default-trigger" 2>/dev/null)
[ -n "$trigger" ] && \
led_set_attr "$(get_dt_led $1)" "trigger" "$trigger"
}
status_led_set_timer() {
led_timer $status_led "$1" "$2"
[ -n "$status_led2" ] && led_timer $status_led2 "$1" "$2"

View File

@@ -0,0 +1,39 @@
#!/bin/sh
. /lib/functions.sh
migrate_led_sysfs() {
local cfg="$1"; shift
local tuples="$@"
local sysfs
local name
config_get sysfs ${cfg} sysfs
config_get name ${cfg} name
[ -z "${sysfs}" ] && return
for tuple in ${tuples}; do
local old=${tuple%=*}
local new=${tuple#*=}
local new_sysfs
new_sysfs=$(echo ${sysfs} | sed "s/${old}/${new}/")
[ "${new_sysfs}" = "${sysfs}" ] && continue
uci set system.${cfg}.sysfs="${new_sysfs}"
logger -t led-migration "sysfs option of LED \"${name}\" updated to ${new_sysfs}"
done;
}
migrate_leds() {
config_load system
config_foreach migrate_led_sysfs led "$@"
}
migrations_apply() {
local realm="$1"
[ -n "$(uci changes ${realm})" ] && uci -q commit ${realm}
}

View File

@@ -271,6 +271,11 @@ network_is_up()
# 2: interface
network_get_protocol() { __network_ifstatus "$1" "$2" ".proto"; }
# determine the uptime of the given logical interface
# 1: destination variable
# 2: interface
network_get_uptime() { __network_ifstatus "$1" "$2" ".uptime"; }
# determine the metric of the given logical interface
# 1: destination variable
# 2: interface

View File

@@ -1,10 +1,13 @@
# Copyright (C) 2006-2013 OpenWrt.org
. /lib/functions.sh
. /usr/share/libubox/jshn.sh
get_mac_binary() {
local path="$1"
local offset="$2"
if [ -z "$path" ]; then
if ! [ -e "$path" ]; then
echo "get_mac_binary: file $path not found!" >&2
return
fi
@@ -12,6 +15,44 @@ get_mac_binary() {
hexdump -v -n 6 -s $offset -e '5/1 "%02x:" 1/1 "%02x"' $path 2>/dev/null
}
get_mac_label_dt() {
local basepath="/proc/device-tree"
local macdevice="$(cat "$basepath/aliases/label-mac-device" 2>/dev/null)"
local macaddr
[ -n "$macdevice" ] || return
macaddr=$(get_mac_binary "$basepath/$macdevice/mac-address" 0 2>/dev/null)
[ -n "$macaddr" ] || macaddr=$(get_mac_binary "$basepath/$macdevice/local-mac-address" 0 2>/dev/null)
echo $macaddr
}
get_mac_label_json() {
local cfg="/etc/board.json"
local macaddr
[ -s "$cfg" ] || return
json_init
json_load "$(cat $cfg)"
if json_is_a system object; then
json_select system
json_get_var macaddr label_macaddr
json_select ..
fi
echo $macaddr
}
get_mac_label() {
local macaddr=$(get_mac_label_dt)
[ -n "$macaddr" ] || macaddr=$(get_mac_label_json)
echo $macaddr
}
find_mtd_chardev() {
local INDEX=$(find_mtd_index "$1")
local PREFIX=/dev/mtd
@@ -40,7 +81,7 @@ mtd_get_mac_ascii() {
mtd_get_mac_text() {
local mtdname=$1
local offset=$2
local offset=$(($2))
local part
local mac_dirty
@@ -79,12 +120,7 @@ mtd_get_mac_binary_ubi() {
local ubidev=$(nand_find_ubi $CI_UBIPART)
local part=$(nand_find_volume $ubidev $1)
if [ -z "$part" ]; then
echo "mtd_get_mac_binary: ubi volume $mtdname not found!" >&2
return
fi
hexdump -v -n 6 -s $offset -e '5/1 "%02x:" 1/1 "%02x"' /dev/$part 2>/dev/null
get_mac_binary "/dev/$part" "$offset"
}
mtd_get_part_size() {
@@ -105,16 +141,35 @@ macaddr_add() {
local oui=${mac%:*:*:*}
local nic=${mac#*:*:*:}
nic=$(printf "%06x" $((0x${nic//:/} + $val & 0xffffff)) | sed 's/^\(.\{2\}\)\(.\{2\}\)\(.\{2\}\)/\1:\2:\3/')
nic=$(printf "%06x" $((0x${nic//:/} + val & 0xffffff)) | sed 's/^\(.\{2\}\)\(.\{2\}\)\(.\{2\}\)/\1:\2:\3/')
echo $oui:$nic
}
macaddr_geteui() {
local mac=$1
local sep=$2
echo ${mac:9:2}$sep${mac:12:2}$sep${mac:15:2}
}
macaddr_setbit_la() {
local mac=$1
printf "%02x:%s" $((0x${mac%%:*} | 0x02)) ${mac#*:}
}
macaddr_unsetbit_mc() {
local mac=$1
printf "%02x:%s" $((0x${mac%%:*} & ~0x01)) ${mac#*:}
}
macaddr_random() {
local randsrc=$(get_mac_binary /dev/urandom 0)
echo "$(macaddr_unsetbit_mc "$(macaddr_setbit_la "${randsrc}")")"
}
macaddr_2bin() {
local mac=$1

View File

@@ -182,6 +182,19 @@ _ucidef_finish_switch_roles() {
done
}
ucidef_set_ar8xxx_switch_mib() {
local name="$1"
local type="$2"
local interval="$3"
json_select_object switch
json_select_object "$name"
json_add_int ar8xxx_mib_type $type
json_add_int ar8xxx_mib_poll_interval $interval
json_select ..
json_select ..
}
ucidef_add_switch() {
local name="$1"; shift
local port num role device index need_tag prev_role
@@ -294,6 +307,14 @@ ucidef_set_interface_macaddr() {
ucidef_set_interface "$network" macaddr "$macaddr"
}
ucidef_set_label_macaddr() {
local macaddr="$1"
json_select_object system
json_add_string label_macaddr "$macaddr"
json_select ..
}
ucidef_add_atm_bridge() {
local vpi="$1"
local vci="$2"
@@ -383,7 +404,7 @@ ucidef_set_led_gpio() {
}
ucidef_set_led_ide() {
_ucidef_set_led_trigger "$1" "$2" "$3" ide-disk
_ucidef_set_led_trigger "$1" "$2" "$3" disk-activity
}
ucidef_set_led_netdev() {
@@ -463,6 +484,7 @@ _ucidef_set_led_timer() {
_ucidef_set_led_common "$1" "$2" "$3"
json_add_string type "$trigger_name"
json_add_string trigger "$trigger_name"
json_add_int delayon "$delayon"
json_add_int delayoff "$delayoff"
@@ -551,7 +573,7 @@ ucidef_add_gpio_switch() {
json_select_object gpioswitch
json_select_object "$cfg"
json_add_string name "$name"
json_add_int pin "$pin"
json_add_string pin "$pin"
json_add_int default "$default"
json_select ..
json_select ..
@@ -593,6 +615,5 @@ board_config_update() {
}
board_config_flush() {
json_dump -i > /tmp/.board.json
mv /tmp/.board.json ${CFG}
json_dump -i -o ${CFG}
}

View File

@@ -33,6 +33,11 @@ preinit_config_switch() {
json_get_vars enable reset
if [ "$reset" -eq "1" ]; then
swconfig dev $name set reset
fi
swconfig dev $name set enable_vlan $enable
if json_is_a roles array; then
json_get_keys roles roles
json_select roles
@@ -43,19 +48,15 @@ preinit_config_switch() {
json_select ..
if [ "$device" = "$lan_if" ]; then
if [ "$reset" -eq "1" ]; then
swconfig dev $name set reset
fi
swconfig dev $name set enable_vlan $enable
swconfig dev $name vlan $role set ports "$ports"
swconfig dev $name set apply
fi
done
json_select ..
fi
swconfig dev $name set apply
json_select ..
json_select ..
}

View File

@@ -31,6 +31,8 @@ fs_wait_for_key () {
lock $keypress_wait
{
while [ $timer -gt 0 ]; do
pi_failsafe_net_message=true \
preinit_net_echo "Please press button now to enter failsafe"
echo "$timer" >$keypress_sec
timer=$(($timer - 1))
sleep 1
@@ -88,9 +90,6 @@ failsafe_wait() {
}
grep -q 'failsafe=' /proc/cmdline && FAILSAFE=true && export FAILSAFE
if [ "$FAILSAFE" != "true" ]; then
pi_failsafe_net_message=true
preinit_net_echo "Please press button now to enter failsafe"
pi_failsafe_net_message=false
fs_wait_for_key f 'to enter failsafe mode' $fs_failsafe_wait_timeout && FAILSAFE=true
[ -f "/tmp/failsafe_button" ] && FAILSAFE=true && echo "- failsafe button "`cat /tmp/failsafe_button`" was pressed -"
[ "$FAILSAFE" = "true" ] && export FAILSAFE && touch /tmp/failsafe

View File

@@ -9,6 +9,8 @@ do_mount_root() {
echo "- config restore -"
cd /
tar xzf /sysupgrade.tgz
# Prevent configuration corruption on a power loss
sync
}
}

View File

@@ -2,11 +2,6 @@
# Copyright (C) 2006-2015 OpenWrt.org
# Copyright (C) 2010 Vertical Communications
failsafe_netlogin () {
dropbearkey -t rsa -s 1024 -f /tmp/dropbear_failsafe_host_key
dropbear -r /tmp/dropbear_failsafe_host_key <> /dev/null 2>&1
}
failsafe_shell() {
local console="$(sed -e 's/ /\n/g' /proc/cmdline | grep '^console=' | head -1 | sed -e 's/^console=//' -e 's/,.*//')"
[ -n "$console" ] || console=console
@@ -17,5 +12,4 @@ failsafe_shell() {
done &
}
boot_hook_add failsafe failsafe_netlogin
boot_hook_add failsafe failsafe_shell

View File

@@ -2,8 +2,10 @@
RAM_ROOT=/tmp/root
export BACKUP_FILE=sysupgrade.tgz # file extracted by preinit
[ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 $*; }
libs() { ldd $* 2>/dev/null | sed -r 's/(.* => )?(.*) .*/\2/'; }
libs() { ldd $* 2>/dev/null | sed -E 's/(.* => )?(.*) .*/\2/'; }
install_file() { # <file> [ <file> ... ]
local target dest dir
@@ -62,7 +64,7 @@ ask_bool() {
}
v() {
[ "$VERBOSE" -ge 1 ] && echo "$@"
[ -n "$VERBOSE" ] && [ "$VERBOSE" -ge 1 ] && echo "$@"
}
json_string() {
@@ -100,54 +102,83 @@ get_magic_long() {
(get_image "$@" | dd bs=4 count=1 | hexdump -v -n 4 -e '1/1 "%02x"') 2>/dev/null
}
get_magic_gpt() {
(get_image "$@" | dd bs=8 count=1 skip=64) 2>/dev/null
}
get_magic_vfat() {
(get_image "$@" | dd bs=1 count=3 skip=54) 2>/dev/null
}
part_magic_efi() {
local magic=$(get_magic_gpt "$@")
[ "$magic" = "EFI PART" ]
}
part_magic_fat() {
local magic=$(get_magic_vfat "$@")
[ "$magic" = "FAT" ]
}
export_bootdevice() {
local cmdline uuid disk uevent line
local cmdline bootdisk rootpart uuid blockdev uevent line class
local MAJOR MINOR DEVNAME DEVTYPE
if read cmdline < /proc/cmdline; then
case "$cmdline" in
*block2mtd=*)
disk="${cmdline##*block2mtd=}"
disk="${disk%%,*}"
bootdisk="${cmdline##*block2mtd=}"
bootdisk="${bootdisk%%,*}"
;;
*root=*)
disk="${cmdline##*root=}"
disk="${disk%% *}"
rootpart="${cmdline##*root=}"
rootpart="${rootpart%% *}"
;;
esac
case "$disk" in
PARTUUID=[A-F0-9][A-F0-9][A-F0-9][A-F0-9][A-F0-9][A-F0-9][A-F0-9][A-F0-9]-[A-F0-9][A-F0-9][A-F0-9][A-F0-9]-[A-F0-9][A-F0-9][A-F0-9][A-F0-9]-[A-F0-9][A-F0-9][A-F0-9][A-F0-9]-[A-F0-9][A-F0-9][A-F0-9][A-F0-9][A-F0-9][A-F0-9][A-F0-9][A-F0-9]0002)
uuid="${disk#PARTUUID=}"
uuid="${uuid%0002}0002"
for disk in $(find /dev -type b); do
set -- $(dd if=$disk bs=1 skip=$((2*512+256+128+16)) count=16 2>/dev/null | hexdump -v -e '4/1 "%02x"' | awk '{ \
for(i=1;i<9;i=i+2) first=substr($0,i,1) substr($0,i+1,1) first; \
for(i=9;i<13;i=i+2) second=substr($0,i,1) substr($0,i+1,1) second; \
for(i=13;i<16;i=i+2) third=substr($0,i,1) substr($0,i+1,1) third; \
fourth = substr($0,17,4); \
five = substr($0,21,12); \
} END { print toupper(first"-"second"-"third"-"fourth"-"five) }')
if [ "$1" = "$uuid" ]; then
uevent="/sys/class/block/${disk##*/}/uevent"
export SAVE_PARTITIONS=0
case "$bootdisk" in
/dev/*)
uevent="/sys/class/block/${bootdisk##*/}/uevent"
;;
esac
case "$rootpart" in
PARTUUID=[a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9]-[a-f0-9][a-f0-9])
uuid="${rootpart#PARTUUID=}"
uuid="${uuid%-[a-f0-9][a-f0-9]}"
for blockdev in $(find /dev -type b); do
set -- $(dd if=$blockdev bs=1 skip=440 count=4 2>/dev/null | hexdump -v -e '4/1 "%02x "')
if [ "$4$3$2$1" = "$uuid" ]; then
uevent="/sys/class/block/${blockdev##*/}/uevent"
break
fi
done
;;
PARTUUID=[a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9]-02)
uuid="${disk#PARTUUID=}"
uuid="${uuid%-02}"
PARTUUID=????????-????-????-????-??????????02)
uuid="${rootpart#PARTUUID=}"
uuid="${uuid%02}00"
for disk in $(find /dev -type b); do
set -- $(dd if=$disk bs=1 skip=440 count=4 2>/dev/null | hexdump -v -e '4/1 "%02x "')
if [ "$4$3$2$1" = "$uuid" ]; then
set -- $(dd if=$disk bs=1 skip=568 count=16 2>/dev/null | hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"')
if [ "$4$3$2$1-$6$5-$8$7-$9" = "$uuid" ]; then
uevent="/sys/class/block/${disk##*/}/uevent"
break
fi
done
;;
/dev/*)
uevent="/sys/class/block/${disk##*/}/uevent"
uevent="/sys/class/block/${rootpart##*/}/../uevent"
;;
0x[a-f0-9][a-f0-9][a-f0-9] | 0x[a-f0-9][a-f0-9][a-f0-9][a-f0-9] | \
[a-f0-9][a-f0-9][a-f0-9] | [a-f0-9][a-f0-9][a-f0-9][a-f0-9])
rootpart=0x${rootpart#0x}
for class in /sys/class/block/*; do
while read line; do
export -n "$line"
done < "$class/uevent"
if [ $((rootpart/256)) = $MAJOR -a $((rootpart%256)) = $MINOR ]; then
uevent="$class/../uevent"
fi
done
;;
esac
@@ -205,27 +236,34 @@ get_partitions() { # <device> <filename>
rm -f "/tmp/partmap.$filename"
local part
for part in 1 2 3 4; do
set -- $(hexdump -v -n 12 -s "$((0x1B2 + $part * 16))" -e '3/4 "0x%08X "' "$disk")
part_magic_efi "$disk" && {
#export_partdevice will fail when partition number is greater than 15, as
#the partition major device number is not equal to the disk major device number
for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; do
set -- $(hexdump -v -n 48 -s "$((0x380 + $part * 0x80))" -e '4/4 "%08x"" "4/4 "%08x"" "4/4 "0x%08X "' "$disk")
local type="$(( $(hex_le32_to_cpu $1) % 256))"
local lba="$(( $(hex_le32_to_cpu $2) ))"
local num="$(( $(hex_le32_to_cpu $3) ))"
local type="$1"
local lba="$(( $(hex_le32_to_cpu $4) * 0x100000000 + $(hex_le32_to_cpu $3) ))"
local end="$(( $(hex_le32_to_cpu $6) * 0x100000000 + $(hex_le32_to_cpu $5) ))"
local num="$(( $end - $lba ))"
[ $type -gt 0 ] || continue
[ "$type" = "00000000000000000000000000000000" ] && continue
printf "%2d %5d %7d\n" $part $lba $num >> "/tmp/partmap.$filename"
done
fi
}
printf "%2d %5d %7d\n" $part $lba $num >> "/tmp/partmap.$filename"
done
} || {
for part in 1 2 3 4; do
set -- $(hexdump -v -n 12 -s "$((0x1B2 + $part * 16))" -e '3/4 "0x%08X "' "$disk")
jffs2_copy_config() {
if grep rootfs_data /proc/mtd >/dev/null; then
# squashfs+jffs2
mtd -e rootfs_data jffs2write "$CONF_TAR" rootfs_data
else
# jffs2
mtd jffs2write "$CONF_TAR" rootfs
local type="$(( $(hex_le32_to_cpu $1) % 256))"
local lba="$(( $(hex_le32_to_cpu $2) ))"
local num="$(( $(hex_le32_to_cpu $3) ))"
[ $type -gt 0 ] || continue
printf "%2d %5d %7d\n" $part $lba $num >> "/tmp/partmap.$filename"
done
}
fi
}
@@ -240,34 +278,10 @@ indicate_upgrade() {
# $(2): (optional) pipe command to extract firmware, e.g. dd bs=n skip=m
default_do_upgrade() {
sync
if [ "$SAVE_CONFIG" -eq 1 ]; then
get_image "$1" "$2" | mtd $MTD_CONFIG_ARGS -j "$CONF_TAR" write - "${PART_NAME:-image}"
if [ -n "$UPGRADE_BACKUP" ]; then
get_image "$1" "$2" | mtd $MTD_ARGS $MTD_CONFIG_ARGS -j "$UPGRADE_BACKUP" write - "${PART_NAME:-image}"
else
get_image "$1" "$2" | mtd write - "${PART_NAME:-image}"
get_image "$1" "$2" | mtd $MTD_ARGS write - "${PART_NAME:-image}"
fi
[ $? -ne 0 ] && exit 1
}
do_upgrade_stage2() {
v "Performing system upgrade..."
if [ -n "$do_upgrade" ]; then
eval "$do_upgrade"
elif type 'platform_do_upgrade' >/dev/null 2>/dev/null; then
platform_do_upgrade "$IMAGE"
else
default_do_upgrade "$IMAGE"
fi
if [ "$SAVE_CONFIG" -eq 1 ] && type 'platform_copy_config' >/dev/null 2>/dev/null; then
platform_copy_config
fi
v "Upgrade completed"
sleep 1
v "Rebooting system..."
umount -a
reboot -f
sleep 5
echo b 2>/dev/null >/proc/sysrq-trigger
}

View File

@@ -0,0 +1,25 @@
#!/bin/sh
. /lib/functions.sh
include /lib/upgrade
v "Performing system upgrade..."
if type 'platform_do_upgrade' >/dev/null 2>/dev/null; then
platform_do_upgrade "$IMAGE"
else
default_do_upgrade "$IMAGE"
fi
if [ -n "$UPGRADE_BACKUP" ] && type 'platform_copy_config' >/dev/null 2>/dev/null; then
platform_copy_config
fi
v "Upgrade completed"
sleep 1
v "Rebooting system..."
umount -a
reboot -f
sleep 5
echo b 2>/dev/null >/proc/sysrq-trigger

View File

@@ -9,7 +9,7 @@ fwtool_check_signature() {
fi
}
if ! fwtool -q -t -s /tmp/sysupgrade.ucert "$1"; then
if ! fwtool -q -s /tmp/sysupgrade.ucert "$1"; then
echo "Image signature not found"
[ "$REQUIRE_IMAGE_SIGNATURE" = 1 -a "$FORCE" != 1 ] && {
echo "Use sysupgrade -F to override this check when downgrading or flashing to vendor firmware"
@@ -18,7 +18,8 @@ fwtool_check_signature() {
return 0
fi
ucert -V -m "$1" -c "/tmp/sysupgrade.ucert" -P /etc/opkg/keys
fwtool -q -T -s /dev/null "$1" | \
ucert -V -m - -c "/tmp/sysupgrade.ucert" -P /etc/opkg/keys
return $?
}

View File

@@ -6,5 +6,6 @@
/etc/profile
/etc/shadow
/etc/shells
/etc/shinit
/etc/sysctl.conf
/etc/rc.local

View File

@@ -109,7 +109,7 @@ nand_restore_config() {
rmdir /tmp/new_root
return 1
fi
mv "$1" "/tmp/new_root/sysupgrade.tgz"
mv "$1" "/tmp/new_root/$BACKUP_FILE"
umount /tmp/new_root
sync
rmdir /tmp/new_root
@@ -280,21 +280,8 @@ nand_upgrade_tar() {
# Recognize type of passed file and start the upgrade process
nand_do_upgrade() {
if [ -n "$IS_PRE_UPGRADE" ]; then
# Previously, nand_do_upgrade was called from the platform_pre_upgrade
# hook; this piece of code handles scripts that haven't been
# updated. All scripts should gradually move to call nand_do_upgrade
# from platform_do_upgrade instead.
export do_upgrade="nand_do_upgrade '$1'"
return
fi
local file_type=$(identify $1)
if type 'platform_nand_pre_upgrade' >/dev/null 2>/dev/null; then
platform_nand_pre_upgrade "$1"
fi
[ ! "$(find_mtd_index "$CI_UBIPART")" ] && CI_UBIPART="rootfs"
case "$file_type" in

View File

@@ -6,24 +6,13 @@
export IMAGE="$1"
COMMAND="$2"
export ARGV="$IMAGE"
export ARGC=1
export SAVE_CONFIG=1
export SAVE_PARTITIONS=1
export INTERACTIVE=0
export VERBOSE=1
export CONFFILES=/tmp/sysupgrade.conffiles
export CONF_TAR=/tmp/sysupgrade.tgz
RAMFS_COPY_BIN= # extra programs for temporary ramfs root
RAMFS_COPY_DATA= # extra data files
[ -f "$CONF_TAR" ] || export SAVE_CONFIG=0
[ -f /tmp/sysupgrade.always.overwrite.bootdisk.partmap ] && export SAVE_PARTITIONS=0
include /lib/upgrade
@@ -50,7 +39,7 @@ switch_to_ramfs() {
md5sum hexdump cat zcat bzcat dd tar \
ls basename find cp mv rm mkdir rmdir mknod touch chmod \
'[' printf wc grep awk sed cut \
mtd partx losetup mkfs.ext4 \
mtd partx losetup mkfs.ext4 nandwrite flash_erase \
ubiupdatevol ubiattach ubiblock ubiformat \
ubidetach ubirsvol ubirmvol ubimkvol \
snapshot snapshot_tool \
@@ -59,7 +48,7 @@ switch_to_ramfs() {
local file="$(which "$binary" 2>/dev/null)"
[ -n "$file" ] && install_bin "$file"
done
install_file /etc/resolv.conf /lib/*.sh /lib/functions/*.sh /lib/upgrade/*.sh $RAMFS_COPY_DATA
install_file /etc/resolv.conf /lib/*.sh /lib/functions/*.sh /lib/upgrade/*.sh /lib/upgrade/do_stage2 /usr/share/libubox/jshn.sh $RAMFS_COPY_DATA
[ -L "/lib64" ] && ln -s /lib $RAM_ROOT/lib64
@@ -136,10 +125,7 @@ sleep 1
if [ -n "$IMAGE" ] && type 'platform_pre_upgrade' >/dev/null 2>/dev/null; then
IS_PRE_UPGRADE=1 platform_pre_upgrade "$IMAGE"
# Needs to be unset again because of busybox weirdness ...
IS_PRE_UPGRADE=
platform_pre_upgrade "$IMAGE"
fi
if [ -n "$(rootfs_type)" ]; then

View File

@@ -15,4 +15,4 @@ if [ \! -z "$1" -a -d /etc/hotplug.d/$1 ]; then
for script in $(ls /etc/hotplug.d/$1/* 2>&-); do (
[ -f $script ] && . $script
); done
fi
fi

View File

@@ -0,0 +1,130 @@
#!/bin/sh
#
# Package checksums checking script
# (C) 2018 CZ.NIC, z.s.p.o.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
ERRFATAL="no"
QUIET="yes"
MISSING=""
SUMMARY=""
NL="
"
# Arguments parsing
while expr "x$1" : "x-" > /dev/null; do
if [ "x$1" = "x-s" ]; then
ERRFATAL="yes"
shift
elif [ "x$1" = "x-v" ]; then
QUIET=" no"
shift
else
echo "Usage: $(basename $0) [-s] [-v] [pkg1 pkg2 ...]"
echo
echo " -s Stop on first change"
echo " -v Verbose"
if [ "x$1" = "x-h" ]; then
exit 0
else
echo
echo "ERROR: Unknown option '$1'"
exit 1
fi
fi
done
# Check all packages by default
if [ -z "$1" ]; then
set $(cd /usr/lib/opkg/info/; for i in *.files-sha256sum; do basename $i .files-sha256sum; done)
fi
# Iterate over packages
while [ "$1" ]; do
if [ \! -f "/usr/lib/opkg/info/$1.files-sha256sum" ]; then
if [ "$ERRFATAL" = no ]; then
echo " * No checksums for $1 - skipping"
echo
else
echo " * No checksums for $1 - exiting"
exit 1
fi
if [ -z "$MISSING" ]; then
MISSING="$1"
else
MISSING="$MISSING, $1"
fi
shift
continue
fi
[ $QUIET = yes ] || echo " * Checking package $1:"
ERR=""
CHECK="`sha256sum -c /usr/lib/opkg/info/$1.files-sha256sum 2> /dev/null`"
# Are the changed files config files?
if [ $? -ne 0 ] && [ "`cat "/usr/lib/opkg/info/$1.files-sha256sum"`" ]; then
NEWCHECK="`echo "$CHECK" | grep '^.*: OK$'`"
for i in `echo "$CHECK" | sed -n 's|^\(.*\): FAILED$|\1|p'`; do
if [ "`grep "^$i\$" "/usr/lib/opkg/info/$1.conffiles" 2> /dev/null`" ] || \
[ "`echo "$i" | grep "^/etc/uci-defaults/"`" ]; then
NEWCHECK="${NEWCHECK}${NL}${i}: CONFIGURED"
else
NEWCHECK="${NEWCHECK}${NL}${i}: FAILED"
ERR="y"
fi
done
CHECK="$NEWCHECK"
fi
# Do we have changed files or not?
if [ -z "$ERR" ]; then
[ $QUIET = yes ] || [ -z "`cat "/usr/lib/opkg/info/$1.files-sha256sum"`" ] || echo "$CHECK" | sed 's|^| - |'
[ $QUIET = yes ] || echo " * Package $1 is ok"
[ $QUIET = yes ] || echo
else
if [ $QUIET = yes ]; then
echo " * Changes found in package $1:"
echo "$CHECK" | sed -n 's|^\(.*:[[:blank:]]*FAILED\)$| - \1|p'
else
echo "$CHECK" | sed 's|^| - |'
echo " * Changes found in package $1!"
fi
if [ "$ERRFATAL" = yes ]; then
echo
echo "Exiting on first change found!"
exit 1
fi
for i in `echo "$CHECK" | sed -n 's|^\(.*\): FAILED$|\1|p'`; do
SUMMARY="${SUMMARY}${NL} - $1: $i"
done
echo
fi
shift
done
# If there are changed files, report them
if [ "$SUMMARY" ]; then
echo "Some packages contain changed files!"
echo "Maybe something worth looking into?"
echo "Here is the list of packages and changed files:"
echo "$SUMMARY"
fi
if [ "$MISSING" ]; then
echo "Following packages are missing checksums: $MISSING"
fi
if [ "$MISSING" ] || [ "$SUMMARY" ]; then
exit 1
fi

View File

@@ -5,6 +5,7 @@
. /usr/share/libubox/jshn.sh
# initialize defaults
export MTD_ARGS=""
export MTD_CONFIG_ARGS=""
export INTERACTIVE=0
export VERBOSE=1
@@ -126,7 +127,7 @@ list_changed_conffiles() {
list_conffiles | while read file csum; do
[ -r "$file" ] || continue
echo "${csum} ${file}" | sha256sum -sc - || echo "$file"
echo "${csum} ${file}" | busybox sha256sum -sc - || echo "$file"
done
}
@@ -191,9 +192,6 @@ add_overlayfiles() {
return 0
}
# hooks
sysupgrade_image_check="fwtool_check_signature fwtool_check_image platform_check_image"
if [ $SAVE_OVERLAY = 1 ]; then
[ ! -d /overlay/upper/etc ] && {
echo "Cannot find '/overlay/upper/etc', required for '-c'" >&2
@@ -250,7 +248,7 @@ do_save_conffiles() {
v "Saving config files..."
[ "$VERBOSE" -gt 1 ] && TAR_V="v" || TAR_V=""
tar c${TAR_V}zpf "$conf_tar" -T "$CONFFILES" 2>/dev/null
tar c${TAR_V}zf "$conf_tar" -T "$CONFFILES" 2>/dev/null
if [ "$?" -ne 0 ]; then
echo "Failed to create the configuration backup."
rm -f "$conf_tar"
@@ -296,7 +294,7 @@ type platform_check_image >/dev/null 2>/dev/null || {
case "$IMAGE" in
http://*|\
https://*)
wget -O/tmp/sysupgrade.img "$IMAGE"
wget -O/tmp/sysupgrade.img "$IMAGE" || exit 1
IMAGE=/tmp/sysupgrade.img
;;
esac
@@ -316,20 +314,19 @@ case "$IMAGE" in
;;
esac
export ARGV="$IMAGE"
export ARGC=1
for check in $sysupgrade_image_check; do
( $check "$IMAGE" ) || {
if [ $FORCE -eq 1 ]; then
echo "Image check '$check' failed but --force given - will update anyway!" >&2
break
else
echo "Image check '$check' failed." >&2
exit 1
fi
}
done
json_load "$(/usr/libexec/validate_firmware_image "$IMAGE")" || {
echo "Failed to check image"
exit 1
}
json_get_var valid "valid"
[ "$valid" -eq 0 ] && {
if [ $FORCE -eq 1 ]; then
echo "Image check failed but --force given - will update anyway!" >&2
else
echo "Image check failed." >&2
exit 1
fi
}
if [ -n "$CONF_IMAGE" ]; then
case "$(get_magic_word $CONF_IMAGE cat)" in
@@ -354,16 +351,10 @@ if [ $TEST -eq 1 ]; then
exit 0
fi
if [ $SAVE_PARTITIONS -eq 0 ]; then
touch /tmp/sysupgrade.always.overwrite.bootdisk.partmap
else
rm -f /tmp/sysupgrade.always.overwrite.bootdisk.partmap
fi
install_bin /sbin/upgraded
v "Commencing upgrade. Closing all shell sessions."
COMMAND='. /lib/functions.sh; include /lib/upgrade; do_upgrade_stage2'
COMMAND='/lib/upgrade/do_stage2'
if [ -n "$FAILSAFE" ]; then
printf '%s\x00%s\x00%s' "$RAM_ROOT" "$IMAGE" "$COMMAND" >/tmp/sysupgrade

View File

@@ -6,7 +6,7 @@
usage() {
cat <<EOF
Usage: $0 [config|up|down|reload|status]
Usage: $0 [config|up|down|reconf|reload|status]
enables (default), disables or configures devices not yet configured.
EOF
exit 1

View File

@@ -9,14 +9,14 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=arm-trusted-firmware-mvebu
PKG_VERSION:=2.2
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_RELEASE).tar.xz
PKG_SOURCE_URL:=https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git
PKG_SOURCE_DATE:=2019-10-22
PKG_SOURCE_VERSION:=a04808c16cfc126d9fe572ae7c4b5a3d39de5796
PKG_MIRROR_HASH:=ff93aad67227ca96db54e92288f61b4ff3abbaad291fc88ad95c29cd3dd3588c
PKG_SOURCE_DATE:=2020-01-21
PKG_SOURCE_VERSION:=3b3d406ebc6f5dae6b5c9170c674183026e7301b
PKG_MIRROR_HASH:=7c63da237c52808e1fe49458d5a4ac804a8eb4c365e26c6b2b709256e8fc041f
PKG_MAINTAINER:=Vladimir Vid <vladimir.vid@sartura.hr>

View File

@@ -0,0 +1,49 @@
#
# Copyright (C) 2020 Tobias Maedel <openwrt@tbspace.de>
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=arm-trusted-firmware-rockchip
PKG_VERSION:=2.3
PKG_RELEASE:=1
PKG_SOURCE:=atf-v$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/atf-builds/atf/releases/download/v$(PKG_VERSION)/atf-v$(PKG_VERSION).tar.gz?
PKG_HASH:=bf352298743aed594cf2958dd588e06ab6713fc514bb6f809bf55a85a87134c1
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=license.md
PKG_MAINTAINER:=Tobias Maedel <openwrt@tbspace.de>
MAKE_PATH:=$(PKG_NAME)
include $(INCLUDE_DIR)/package.mk
define Package/arm-trusted-firmware-rockchip
SECTION:=boot
CATEGORY:=Boot Loaders
TITLE:=ARM Trusted Firmware for Rockchip
DEPENDS:=@TARGET_rockchip_armv8
endef
define Build/Prepare
$(TAR) -C $(PKG_BUILD_DIR) -xf $(DL_DIR)/$(PKG_SOURCE)
endef
define Build/Compile
endef
define Build/InstallDev
$(INSTALL_DIR) -p $(STAGING_DIR_IMAGE)
$(CP) $(PKG_BUILD_DIR)/rk*.elf $(STAGING_DIR_IMAGE)/
endef
define Package/arm-trusted-firmware-rockchip/install
endef
$(eval $(call BuildPackage,arm-trusted-firmware-rockchip))

157
package/boot/grub2/Makefile Normal file
View File

@@ -0,0 +1,157 @@
#
# Copyright (C) 2006-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=grub
PKG_CPE_ID:=cpe:/a:gnu:grub2
PKG_VERSION:=2.04
PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNU/grub
PKG_HASH:=e5292496995ad42dabe843a0192cf2a2c502e7ffcc7479398232b10a472df77d
HOST_BUILD_PARALLEL:=1
PKG_BUILD_DEPENDS:=grub2/host
PKG_ASLR_PIE:=0
PKG_SSP:=0
PKG_FLAGS:=nonshared
include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/package.mk
define Package/grub2/Default
CATEGORY:=Boot Loaders
SECTION:=boot
TITLE:=GRand Unified Bootloader ($(1))
URL:=http://www.gnu.org/software/grub/
DEPENDS:=@TARGET_x86
VARIANT:=$(1)
endef
Package/grub2=$(call Package/grub2/Default,pc)
Package/grub2-efi=$(call Package/grub2/Default,efi)
define Package/grub2-editenv
CATEGORY:=Utilities
SECTION:=utils
SUBMENU:=Boot Loaders
TITLE:=Grub2 Environment editor
URL:=http://www.gnu.org/software/grub/
DEPENDS:=@TARGET_x86
VARIANT:=pc
endef
define Package/grub2-editenv/description
Edit grub2 environment files.
endef
HOST_BUILD_PREFIX := $(STAGING_DIR_HOST)
CONFIGURE_VARS += \
grub_build_mkfont_excuse="don't want fonts"
CONFIGURE_ARGS += \
--target=$(REAL_GNU_TARGET_NAME) \
--disable-werror \
--disable-nls \
--disable-device-mapper \
--disable-libzfs \
--disable-grub-mkfont \
--with-platform=$(BUILD_VARIANT)
HOST_CONFIGURE_VARS += \
grub_build_mkfont_excuse="don't want fonts"
HOST_CONFIGURE_ARGS += \
--disable-grub-mkfont \
--target=$(REAL_GNU_TARGET_NAME) \
--sbindir="$(STAGING_DIR_HOST)/bin" \
--disable-werror \
--disable-libzfs \
--disable-nls \
--with-platform=none
HOST_MAKE_FLAGS += \
TARGET_RANLIB=$(TARGET_RANLIB) \
LIBLZMA=$(STAGING_DIR_HOST)/lib/liblzma.a
TARGET_CFLAGS := $(filter-out -fno-plt,$(TARGET_CFLAGS))
define Host/Configure
$(SED) 's,(RANLIB),(TARGET_RANLIB),' $(HOST_BUILD_DIR)/grub-core/Makefile.in
$(Host/Configure/Default)
endef
define Package/grub2/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/grub-bios-setup $(1)/usr/sbin/
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)/grub2
$(CP) $(PKG_BUILD_DIR)/grub-core/boot.img $(STAGING_DIR_IMAGE)/grub2/
$(CP) $(PKG_BUILD_DIR)/grub-core/cdboot.img $(STAGING_DIR_IMAGE)/grub2/
sed 's#msdos1#gpt1#g' ./files/grub-early.cfg >$(PKG_BUILD_DIR)/grub-early.cfg
$(STAGING_DIR_HOST)/bin/grub-mkimage \
-d $(PKG_BUILD_DIR)/grub-core \
-p /boot/grub \
-O i386-pc \
-c $(PKG_BUILD_DIR)/grub-early.cfg \
-o $(STAGING_DIR_IMAGE)/grub2/gpt-core.img \
at_keyboard biosdisk boot chain configfile fat linux ls part_gpt reboot serial vga
$(STAGING_DIR_HOST)/bin/grub-mkimage \
-d $(PKG_BUILD_DIR)/grub-core \
-p /boot/grub \
-O i386-pc \
-c ./files/grub-early.cfg \
-o $(STAGING_DIR_IMAGE)/grub2/generic-core.img \
at_keyboard biosdisk boot chain configfile ext2 linux ls part_msdos reboot serial vga
$(STAGING_DIR_HOST)/bin/grub-mkimage \
-d $(PKG_BUILD_DIR)/grub-core \
-p /boot/grub \
-O i386-pc \
-c ./files/grub-early.cfg \
-o $(STAGING_DIR_IMAGE)/grub2/eltorito.img \
at_keyboard biosdisk boot chain configfile iso9660 linux ls part_msdos reboot serial test vga
$(STAGING_DIR_HOST)/bin/grub-mkimage \
-d $(PKG_BUILD_DIR)/grub-core \
-p /boot/grub \
-O i386-pc \
-c ./files/grub-early.cfg \
-o $(STAGING_DIR_IMAGE)/grub2/legacy-core.img \
biosdisk boot chain configfile ext2 linux ls part_msdos reboot serial vga
endef
define Package/grub2-efi/install
sed 's#msdos1#gpt1#g' ./files/grub-early.cfg >$(PKG_BUILD_DIR)/grub-early.cfg
$(STAGING_DIR_HOST)/bin/grub-mkimage \
-d $(PKG_BUILD_DIR)/grub-core \
-p /boot/grub \
-O $(CONFIG_ARCH)-efi \
-c $(PKG_BUILD_DIR)/grub-early.cfg \
-o $(STAGING_DIR_IMAGE)/grub2/boot$(if $(CONFIG_x86_64),x64,ia32).efi \
at_keyboard boot chain configfile fat linux ls part_gpt reboot serial efi_gop efi_uga
$(STAGING_DIR_HOST)/bin/grub-mkimage \
-d $(PKG_BUILD_DIR)/grub-core \
-p /boot/grub \
-O $(CONFIG_ARCH)-efi \
-c ./files/grub-early.cfg \
-o $(STAGING_DIR_IMAGE)/grub2/iso-boot$(if $(CONFIG_x86_64),x64,ia32).efi \
at_keyboard boot chain configfile fat iso9660 linux ls part_msdos part_gpt reboot serial test efi_gop efi_uga
endef
define Package/grub2-editenv/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/grub-editenv $(1)/usr/sbin/
endef
$(eval $(call HostBuild))
$(eval $(call BuildPackage,grub2))
$(eval $(call BuildPackage,grub2-efi))
$(eval $(call BuildPackage,grub2-editenv))

View File

@@ -1,73 +0,0 @@
#
# Copyright (C) 2006-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_CPE_ID:=cpe:/a:gnu:grub2
PKG_VERSION:=2.04
PKG_RELEASE:=1
PKG_SOURCE:=grub-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNU/grub
PKG_HASH:=e5292496995ad42dabe843a0192cf2a2c502e7ffcc7479398232b10a472df77d
HOST_BUILD_PARALLEL:=1
PKG_SSP:=0
PKG_FLAGS:=nonshared
PATCH_DIR := ../patches
HOST_PATCH_DIR := ../patches
HOST_BUILD_DIR := $(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/package.mk
define Package/grub2/Default
CATEGORY:=Boot Loaders
SECTION:=boot
TITLE:=GRand Unified Bootloader
URL:=http://www.gnu.org/software/grub/
DEPENDS:=@TARGET_x86||TARGET_x86_64
endef
HOST_BUILD_PREFIX := $(STAGING_DIR_HOST)
CONFIGURE_VARS += \
grub_build_mkfont_excuse="don't want fonts"
CONFIGURE_ARGS += \
--target=$(REAL_GNU_TARGET_NAME) \
--disable-werror \
--disable-nls \
--disable-device-mapper \
--disable-libzfs \
--disable-grub-mkfont \
--with-platform=none
HOST_CONFIGURE_VARS += \
grub_build_mkfont_excuse="don't want fonts"
HOST_CONFIGURE_ARGS += \
--disable-grub-mkfont \
--target=$(REAL_GNU_TARGET_NAME) \
--sbindir="$(STAGING_DIR_HOST)/bin" \
--disable-werror \
--disable-libzfs \
--disable-nls
HOST_MAKE_FLAGS += \
TARGET_RANLIB=$(TARGET_RANLIB) \
LIBLZMA=$(STAGING_DIR_HOST)/lib/liblzma.a
define Host/Configure
$(SED) 's,(RANLIB),(TARGET_RANLIB),' $(HOST_BUILD_DIR)/grub-core/Makefile.in
$(Host/Configure/Default)
endef

View File

@@ -1,23 +0,0 @@
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=grub-efi
include ../common.mk
TAR_OPTIONS:= --transform 's/grub-${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}/' $(TAR_OPTIONS)
PKG_BUILD_DEPENDS:=grub2-efi/host
CONFIGURE_ARGS += --with-platform=efi
HOST_CONFIGURE_ARGS += --with-platform=efi --program-suffix=-efi
HOST_BUILD_DIR := $(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION)
define Package/grub2-efi
$(call Package/grub2/Default)
HIDDEN:=1
TITLE += (with EFI support)
endef
$(eval $(call HostBuild))
$(eval $(call BuildPackage,grub2-efi))

View File

@@ -1,33 +0,0 @@
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=grub
include ../common.mk
PKG_BUILD_DEPENDS:=grub2/host
define Package/grub2
$(call Package/grub2/Default)
endef
define Package/grub2-editenv
CATEGORY:=Utilities
SECTION:=utils
TITLE:=Grub2 Environment editor
URL:=http://www.gnu.org/software/grub/
DEPENDS:=@TARGET_x86||TARGET_x86_64
endef
define Package/grub2-editenv/description
Edit grub2 environment files.
endef
define Package/grub2-editenv/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/grub-editenv $(1)/usr/sbin/
endef
$(eval $(call HostBuild))
$(eval $(call BuildPackage,grub2))
$(eval $(call BuildPackage,grub2-editenv))

View File

@@ -0,0 +1,31 @@
From: David Michael <fedora.dm0@gmail.com>
Date: Fri, 5 Jul 2019 07:45:59 -0400
Subject: [PATCH] verifiers: Blocklist fallout cleanup
Blocklist fallout cleanup after commit 5c6f9bc15 (generic/blocklist: Fix
implicit declaration of function grub_file_filter_disable_compression()).
Signed-off-by: David Michael <fedora.dm0@gmail.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
---
--- a/grub-core/osdep/generic/blocklist.c
+++ b/grub-core/osdep/generic/blocklist.c
@@ -59,7 +59,7 @@ grub_install_get_blocklist (grub_device_
grub_disk_cache_invalidate_all ();
- file = grub_file_open (core_path_dev, GRUB_FILE_TYPE_NONE | FILE_TYPE_NO_DECOMPRESS);
+ file = grub_file_open (core_path_dev, GRUB_FILE_TYPE_NONE | GRUB_FILE_TYPE_NO_DECOMPRESS);
if (file)
{
if (grub_file_size (file) != core_size)
@@ -116,7 +116,7 @@ grub_install_get_blocklist (grub_device_
grub_file_t file;
/* Now read the core image to determine where the sectors are. */
- file = grub_file_open (core_path_dev, GRUB_FILE_TYPE_NONE | FILE_TYPE_NO_DECOMPRESS);
+ file = grub_file_open (core_path_dev, GRUB_FILE_TYPE_NONE | GRUB_FILE_TYPE_NO_DECOMPRESS);
if (! file)
grub_util_error ("%s", grub_errmsg);

View File

@@ -42,7 +42,7 @@
--- a/util/setup.c
+++ b/util/setup.c
@@ -247,13 +247,12 @@ identify_partmap (grub_disk_t disk __att
@@ -252,13 +252,12 @@ identify_partmap (grub_disk_t disk __att
void
SETUP (const char *dir,
const char *boot_file, const char *core_file,

View File

@@ -32,7 +32,7 @@ Signed-off-by: Ismael Ripoll-Ripoll <iripoll@disca.upv.es>
@@ -172,7 +172,7 @@ grub_username_get (char buf[], unsigned
break;
}
- if (key == GRUB_TERM_BACKSPACE)
+ if (key == GRUB_TERM_BACKSPACE && cur_len)
{

View File

@@ -1,10 +1,22 @@
#!/bin/sh
# kB disable if mem low than 256MB
memtotal=`grep MemTotal /proc/meminfo | awk '{print $2}'`
if test $memtotal -le 262144; then
exit 0
fi
KZ=128
if test $memtotal -ge 8388608; then
KZ=512
elif test $memtotal -ge 4194304; then
KZ=256
fi
case $(uname -m) in
i?86|x86_64)
if ! grep -q crashkernel /boot/grub/grub.cfg; then
mount /boot -o remount,rw
sed -i 's/linux.*/& crashkernel=32M@32M/' /boot/grub/grub.cfg
sed -i "s/linux.*/& crashkernel=${KZ}M/" /boot/grub/grub.cfg
mount /boot -o remount,ro
fi
;;

View File

@@ -3,6 +3,8 @@
START=41
STOP=90
BOOT_IMAGE=/boot/vmlinuz
EXTRA_COMMANDS="status"
EXTRA_HELP=" status Print crashkernel status"

View File

@@ -0,0 +1,14 @@
diff --git a/kexec/arch/x86_64/kexec-elf-rel-x86_64.c b/kexec/arch/x86_64/kexec-elf-rel-x86_64.c
index 7fdde73..af33689 100644
--- a/kexec/arch/x86_64/kexec-elf-rel-x86_64.c
+++ b/kexec/arch/x86_64/kexec-elf-rel-x86_64.c
@@ -78,7 +78,8 @@ void machine_apply_elf_rel(struct mem_ehdr *UNUSED(ehdr),
if ((int64_t)value != *(int32_t *)location)
goto overflow;
break;
- case R_X86_64_PC32:
+ case R_X86_64_PC32:
+ case R_X86_64_PLT32:
*(uint32_t *)location = value - address;
break;
default:

View File

@@ -0,0 +1,61 @@
#
# Copyright © 2020 David Woodhouse <dwmw2@infradead.org>
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=mt7623n-preloader
PKG_VERSION:=2020-03-11
PKG_RELEASE:=b27114e184449a33b5d875fda14198f5e6fee2bb
PKG_MAINTAINER:=David Woodhouse <dwmw2@infradead.org>
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)/$(PKG_NAME)-$(PKG_RELEASE)
PKG_FLAGS:=nonshared
include $(INCLUDE_DIR)/package.mk
BPI_PRELOADER_URL:=@GITHUB/BPI-SINOVOIP/BPI-files/$(PKG_RELEASE)/SD/100MB/
BPI_PRELOADER_PREFIX:=bpi-preloader-$(PKG_RELEASE)
define Download/BPI-R2-preloader-2k.img.gz
FILE:=$(BPI_PRELOADER_PREFIX)-BPI-R2-preloader-DDR1600-20191024-2k.img.gz
URL:=$(BPI_PRELOADER_URL)
URL_FILE:=BPI-R2-preloader-DDR1600-20191024-2k.img.gz
HASH:=c731cc166c912c84846e2ed5faf727504e4dec1463754baa6328e9908c84a373
endef
$(eval $(call Download,BPI-R2-preloader-2k.img.gz))
define Package/mt7623n-preloader
SECTION:=boot
CATEGORY:=Boot Loaders
DEPENDS:=@TARGET_mediatek_mt7623
TITLE:=mt7623n-preloader
DEFAULT:=y if TARGET_mediatek
endef
define Package/mt7623n-preloader/description
Preloader image for mt7623n based boards like Banana Pi R2.
endef
define Build/Prepare
rm -rf $(PKG_BUILD_DIR)
mkdir -p $(PKG_BUILD_DIR)
cp $(DL_DIR)/$(BPI_PRELOADER_PREFIX)-BPI-R2-preloader-DDR1600-20191024-2k.img.gz $(PKG_BUILD_DIR)/mt7623n_bpir2-preloader.bin.gz
endef
define Build/Compile
true
endef
define Build/InstallDev
mkdir -p $(STAGING_DIR_IMAGE)
gunzip -c $(PKG_BUILD_DIR)/mt7623n_bpir2-preloader.bin.gz > $(STAGING_DIR_IMAGE)/mt7623n_bpir2-preloader.bin
endef
$(eval $(call BuildPackage,mt7623n-preloader))

View File

@@ -1,47 +0,0 @@
#
# Copyright (C) 2010 Gabor Juhos <juhosg@openwrt.org>
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=rbcfg
PKG_RELEASE:=2
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
PKG_FLAGS:=nonshared
include $(INCLUDE_DIR)/package.mk
define Package/rbcfg
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=Boot Loaders
TITLE:=RouterBOOT configuration tool
DEPENDS:=@(TARGET_ar71xx||TARGET_ath79)
endef
define Package/rbcfg/description
This package contains an utility to manipulate RouterBOOT configuration on the
MikroTIK RB-4XX devices.
endef
define Build/Configure
endef
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
CC="$(TARGET_CC)" \
CFLAGS="$(TARGET_CFLAGS) -Wall" \
LDFLAGS="$(TARGET_LDFLAGS)"
endef
define Package/rbcfg/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/rbcfg $(1)/usr/sbin/
endef
$(eval $(call BuildPackage,rbcfg))

View File

@@ -1,14 +0,0 @@
CC = gcc
CFLAGS = -Wall
OBJS = main.o cyg_crc32.o
all: rbcfg
%.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
rbcfg: $(OBJS)
$(CC) -o $@ $(OBJS)
clean:
rm -f rbcfg *.o

View File

@@ -1,109 +0,0 @@
//==========================================================================
//
// crc.h
//
// Interface for the CRC algorithms.
//
//==========================================================================
//####ECOSGPLCOPYRIGHTBEGIN####
// -------------------------------------------
// This file is part of eCos, the Embedded Configurable Operating System.
// Copyright (C) 2002 Andrew Lunn
//
// eCos is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2 or (at your option) any later version.
//
// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
// for more details.
//
// You should have received a copy of the GNU General Public License along
// with eCos; if not, write to the Free Software Foundation, Inc.,
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
//
// As a special exception, if other files instantiate templates or use macros
// or inline functions from this file, or you compile this file and link it
// with other works to produce a work based on this file, this file does not
// by itself cause the resulting work to be covered by the GNU General Public
// License. However the source code for this file must still be made available
// in accordance with section (3) of the GNU General Public License.
//
// This exception does not invalidate any other reasons why a work based on
// this file might be covered by the GNU General Public License.
//
// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
// at http://sources.redhat.com/ecos/ecos-license/
// -------------------------------------------
//####ECOSGPLCOPYRIGHTEND####
//==========================================================================
//#####DESCRIPTIONBEGIN####
//
// Author(s): Andrew Lunn
// Contributors: Andrew Lunn
// Date: 2002-08-06
// Purpose:
// Description:
//
// This code is part of eCos (tm).
//
//####DESCRIPTIONEND####
//
//==========================================================================
#ifndef _SERVICES_CRC_CRC_H_
#define _SERVICES_CRC_CRC_H_
#if 0
#include <cyg/infra/cyg_type.h>
#else
#include <stdint.h>
typedef uint32_t cyg_uint32;
typedef uint16_t cyg_uint16;
#endif
#ifndef __externC
# ifdef __cplusplus
# define __externC extern "C"
# else
# define __externC extern
# endif
#endif
// Compute a CRC, using the POSIX 1003 definition
__externC cyg_uint32
cyg_posix_crc32(unsigned char *s, int len);
// Gary S. Brown's 32 bit CRC
__externC cyg_uint32
cyg_crc32(unsigned char *s, int len);
// Gary S. Brown's 32 bit CRC, but accumulate the result from a
// previous CRC calculation
__externC cyg_uint32
cyg_crc32_accumulate(cyg_uint32 crc, unsigned char *s, int len);
// Ethernet FCS Algorithm
__externC cyg_uint32
cyg_ether_crc32(unsigned char *s, int len);
// Ethernet FCS algorithm, but accumulate the result from a previous
// CRC calculation.
__externC cyg_uint32
cyg_ether_crc32_accumulate(cyg_uint32 crc, unsigned char *s, int len);
// 16 bit CRC with polynomial x^16+x^12+x^5+1
__externC cyg_uint16
cyg_crc16(unsigned char *s, int len);
#endif // _SERVICES_CRC_CRC_H_

View File

@@ -1,172 +0,0 @@
//==========================================================================
//
// crc32.c
//
// Gary S. Brown's 32 bit CRC
//
//==========================================================================
//####ECOSGPLCOPYRIGHTBEGIN####
// -------------------------------------------
// This file is part of eCos, the Embedded Configurable Operating System.
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
// Copyright (C) 2002 Gary Thomas
//
// eCos is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2 or (at your option) any later version.
//
// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
// for more details.
//
// You should have received a copy of the GNU General Public License along
// with eCos; if not, write to the Free Software Foundation, Inc.,
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
//
// As a special exception, if other files instantiate templates or use macros
// or inline functions from this file, or you compile this file and link it
// with other works to produce a work based on this file, this file does not
// by itself cause the resulting work to be covered by the GNU General Public
// License. However the source code for this file must still be made available
// in accordance with section (3) of the GNU General Public License.
//
// This exception does not invalidate any other reasons why a work based on
// this file might be covered by the GNU General Public License.
//
// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
// at http://sources.redhat.com/ecos/ecos-license/
// -------------------------------------------
//####ECOSGPLCOPYRIGHTEND####
//==========================================================================
//#####DESCRIPTIONBEGIN####
//
// Author(s): gthomas
// Contributors: gthomas,asl
// Date: 2001-01-31
// Purpose:
// Description:
//
// This code is part of eCos (tm).
//
//####DESCRIPTIONEND####
//
//==========================================================================
#if 0
#include <cyg/crc/crc.h>
#else
#include "cyg_crc.h"
#endif
/* ====================================================================== */
/* COPYRIGHT (C) 1986 Gary S. Brown. You may use this program, or */
/* code or tables extracted from it, as desired without restriction. */
/* */
/* First, the polynomial itself and its table of feedback terms. The */
/* polynomial is */
/* X^32+X^26+X^23+X^22+X^16+X^12+X^11+X^10+X^8+X^7+X^5+X^4+X^2+X^1+X^0 */
/* */
/* ====================================================================== */
static const cyg_uint32 crc32_tab[] = {
0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, 0x076dc419L,
0x706af48fL, 0xe963a535L, 0x9e6495a3L, 0x0edb8832L, 0x79dcb8a4L,
0xe0d5e91eL, 0x97d2d988L, 0x09b64c2bL, 0x7eb17cbdL, 0xe7b82d07L,
0x90bf1d91L, 0x1db71064L, 0x6ab020f2L, 0xf3b97148L, 0x84be41deL,
0x1adad47dL, 0x6ddde4ebL, 0xf4d4b551L, 0x83d385c7L, 0x136c9856L,
0x646ba8c0L, 0xfd62f97aL, 0x8a65c9ecL, 0x14015c4fL, 0x63066cd9L,
0xfa0f3d63L, 0x8d080df5L, 0x3b6e20c8L, 0x4c69105eL, 0xd56041e4L,
0xa2677172L, 0x3c03e4d1L, 0x4b04d447L, 0xd20d85fdL, 0xa50ab56bL,
0x35b5a8faL, 0x42b2986cL, 0xdbbbc9d6L, 0xacbcf940L, 0x32d86ce3L,
0x45df5c75L, 0xdcd60dcfL, 0xabd13d59L, 0x26d930acL, 0x51de003aL,
0xc8d75180L, 0xbfd06116L, 0x21b4f4b5L, 0x56b3c423L, 0xcfba9599L,
0xb8bda50fL, 0x2802b89eL, 0x5f058808L, 0xc60cd9b2L, 0xb10be924L,
0x2f6f7c87L, 0x58684c11L, 0xc1611dabL, 0xb6662d3dL, 0x76dc4190L,
0x01db7106L, 0x98d220bcL, 0xefd5102aL, 0x71b18589L, 0x06b6b51fL,
0x9fbfe4a5L, 0xe8b8d433L, 0x7807c9a2L, 0x0f00f934L, 0x9609a88eL,
0xe10e9818L, 0x7f6a0dbbL, 0x086d3d2dL, 0x91646c97L, 0xe6635c01L,
0x6b6b51f4L, 0x1c6c6162L, 0x856530d8L, 0xf262004eL, 0x6c0695edL,
0x1b01a57bL, 0x8208f4c1L, 0xf50fc457L, 0x65b0d9c6L, 0x12b7e950L,
0x8bbeb8eaL, 0xfcb9887cL, 0x62dd1ddfL, 0x15da2d49L, 0x8cd37cf3L,
0xfbd44c65L, 0x4db26158L, 0x3ab551ceL, 0xa3bc0074L, 0xd4bb30e2L,
0x4adfa541L, 0x3dd895d7L, 0xa4d1c46dL, 0xd3d6f4fbL, 0x4369e96aL,
0x346ed9fcL, 0xad678846L, 0xda60b8d0L, 0x44042d73L, 0x33031de5L,
0xaa0a4c5fL, 0xdd0d7cc9L, 0x5005713cL, 0x270241aaL, 0xbe0b1010L,
0xc90c2086L, 0x5768b525L, 0x206f85b3L, 0xb966d409L, 0xce61e49fL,
0x5edef90eL, 0x29d9c998L, 0xb0d09822L, 0xc7d7a8b4L, 0x59b33d17L,
0x2eb40d81L, 0xb7bd5c3bL, 0xc0ba6cadL, 0xedb88320L, 0x9abfb3b6L,
0x03b6e20cL, 0x74b1d29aL, 0xead54739L, 0x9dd277afL, 0x04db2615L,
0x73dc1683L, 0xe3630b12L, 0x94643b84L, 0x0d6d6a3eL, 0x7a6a5aa8L,
0xe40ecf0bL, 0x9309ff9dL, 0x0a00ae27L, 0x7d079eb1L, 0xf00f9344L,
0x8708a3d2L, 0x1e01f268L, 0x6906c2feL, 0xf762575dL, 0x806567cbL,
0x196c3671L, 0x6e6b06e7L, 0xfed41b76L, 0x89d32be0L, 0x10da7a5aL,
0x67dd4accL, 0xf9b9df6fL, 0x8ebeeff9L, 0x17b7be43L, 0x60b08ed5L,
0xd6d6a3e8L, 0xa1d1937eL, 0x38d8c2c4L, 0x4fdff252L, 0xd1bb67f1L,
0xa6bc5767L, 0x3fb506ddL, 0x48b2364bL, 0xd80d2bdaL, 0xaf0a1b4cL,
0x36034af6L, 0x41047a60L, 0xdf60efc3L, 0xa867df55L, 0x316e8eefL,
0x4669be79L, 0xcb61b38cL, 0xbc66831aL, 0x256fd2a0L, 0x5268e236L,
0xcc0c7795L, 0xbb0b4703L, 0x220216b9L, 0x5505262fL, 0xc5ba3bbeL,
0xb2bd0b28L, 0x2bb45a92L, 0x5cb36a04L, 0xc2d7ffa7L, 0xb5d0cf31L,
0x2cd99e8bL, 0x5bdeae1dL, 0x9b64c2b0L, 0xec63f226L, 0x756aa39cL,
0x026d930aL, 0x9c0906a9L, 0xeb0e363fL, 0x72076785L, 0x05005713L,
0x95bf4a82L, 0xe2b87a14L, 0x7bb12baeL, 0x0cb61b38L, 0x92d28e9bL,
0xe5d5be0dL, 0x7cdcefb7L, 0x0bdbdf21L, 0x86d3d2d4L, 0xf1d4e242L,
0x68ddb3f8L, 0x1fda836eL, 0x81be16cdL, 0xf6b9265bL, 0x6fb077e1L,
0x18b74777L, 0x88085ae6L, 0xff0f6a70L, 0x66063bcaL, 0x11010b5cL,
0x8f659effL, 0xf862ae69L, 0x616bffd3L, 0x166ccf45L, 0xa00ae278L,
0xd70dd2eeL, 0x4e048354L, 0x3903b3c2L, 0xa7672661L, 0xd06016f7L,
0x4969474dL, 0x3e6e77dbL, 0xaed16a4aL, 0xd9d65adcL, 0x40df0b66L,
0x37d83bf0L, 0xa9bcae53L, 0xdebb9ec5L, 0x47b2cf7fL, 0x30b5ffe9L,
0xbdbdf21cL, 0xcabac28aL, 0x53b39330L, 0x24b4a3a6L, 0xbad03605L,
0xcdd70693L, 0x54de5729L, 0x23d967bfL, 0xb3667a2eL, 0xc4614ab8L,
0x5d681b02L, 0x2a6f2b94L, 0xb40bbe37L, 0xc30c8ea1L, 0x5a05df1bL,
0x2d02ef8dL
};
/* This is the standard Gary S. Brown's 32 bit CRC algorithm, but
accumulate the CRC into the result of a previous CRC. */
cyg_uint32
cyg_crc32_accumulate(cyg_uint32 crc32val, unsigned char *s, int len)
{
int i;
for (i = 0; i < len; i++) {
crc32val = crc32_tab[(crc32val ^ s[i]) & 0xff] ^ (crc32val >> 8);
}
return crc32val;
}
/* This is the standard Gary S. Brown's 32 bit CRC algorithm */
cyg_uint32
cyg_crc32(unsigned char *s, int len)
{
return (cyg_crc32_accumulate(0,s,len));
}
/* Return a 32-bit CRC of the contents of the buffer accumulating the
result from a previous CRC calculation. This uses the Ethernet FCS
algorithm.*/
cyg_uint32
cyg_ether_crc32_accumulate(cyg_uint32 crc32val, unsigned char *s, int len)
{
int i;
if (s == 0) return 0L;
crc32val = crc32val ^ 0xffffffff;
for (i = 0; i < len; i++) {
crc32val = crc32_tab[(crc32val ^ s[i]) & 0xff] ^ (crc32val >> 8);
}
return crc32val ^ 0xffffffff;
}
/* Return a 32-bit CRC of the contents of the buffer, using the
Ethernet FCS algorithm. */
cyg_uint32
cyg_ether_crc32(unsigned char *s, int len)
{
return cyg_ether_crc32_accumulate(0,s,len);
}

View File

@@ -1,922 +0,0 @@
/*
* RouterBOOT configuration utility
*
* Copyright (C) 2010 Gabor Juhos <juhosg@openwrt.org>
* Copyright (C) 2017 Thibaut VARENE <varenet@parisc-linux.org>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published
* by the Free Software Foundation.
*
*/
#include <stdlib.h>
#include <stdio.h>
#include <stddef.h>
#include <stdint.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/stat.h>
#include <linux/limits.h>
#include "rbcfg.h"
#include "cyg_crc.h"
#define RBCFG_TMP_FILE "/tmp/.rbcfg"
#define RBCFG_MTD_NAME "soft_config"
#define RB_ERR_NOTFOUND 1
#define RB_ERR_INVALID 2
#define RB_ERR_NOMEM 3
#define RB_ERR_IO 4
#define RB_ERR_NOTWANTED 5
#define ARRAY_SIZE(_a) (sizeof((_a)) / sizeof((_a)[0]))
struct rbcfg_ctx {
char *mtd_device;
char *tmp_file;
char *buf;
unsigned buflen;
};
struct rbcfg_value {
const char *name;
const char *desc;
union {
uint32_t u32;
const char *raw;
} val;
};
#define RBCFG_ENV_TYPE_U32 0
struct rbcfg_env {
const char *name;
int type;
uint16_t id;
const struct rbcfg_value *values;
int num_values;
};
#define CMD_FLAG_USES_CFG 0x01
struct rbcfg_command {
const char *command;
const char *usage;
int flags;
int (*exec)(int argc, const char *argv[]);
};
struct rbcfg_soc {
const char *needle;
const int type;
};
static void usage(void);
/* Globals */
static struct rbcfg_ctx *rbcfg_ctx;
static char *rbcfg_name;
#define CFG_U32(_name, _desc, _val) { \
.name = (_name), \
.desc = (_desc), \
.val.u32 = (_val), \
}
static const struct rbcfg_value rbcfg_boot_delay[] = {
CFG_U32("1", "1 second", RB_BOOT_DELAY_1SEC),
CFG_U32("2", "2 seconds", RB_BOOT_DELAY_2SEC),
CFG_U32("3", "3 seconds", RB_BOOT_DELAY_3SEC),
CFG_U32("4", "4 seconds", RB_BOOT_DELAY_4SEC),
CFG_U32("5", "5 seconds", RB_BOOT_DELAY_5SEC),
CFG_U32("6", "6 seconds", RB_BOOT_DELAY_6SEC),
CFG_U32("7", "7 seconds", RB_BOOT_DELAY_7SEC),
CFG_U32("8", "8 seconds", RB_BOOT_DELAY_8SEC),
CFG_U32("9", "9 seconds", RB_BOOT_DELAY_9SEC),
};
static const struct rbcfg_value rbcfg_boot_device[] = {
CFG_U32("eth", "boot over Ethernet",
RB_BOOT_DEVICE_ETHER),
CFG_U32("nandeth", "boot from NAND, if fail then Ethernet",
RB_BOOT_DEVICE_NANDETH),
CFG_U32("ethnand", "boot Ethernet once, then NAND",
RB_BOOT_DEVICE_ETHONCE),
CFG_U32("nand", "boot from NAND only",
RB_BOOT_DEVICE_NANDONLY),
CFG_U32("flash", "boot in flash configuration mode",
RB_BOOT_DEVICE_FLASHCFG),
CFG_U32("flashnand", "boot in flash configuration mode once, then NAND",
RB_BOOT_DEVICE_FLSHONCE),
};
static const struct rbcfg_value rbcfg_boot_key[] = {
CFG_U32("any", "any key", RB_BOOT_KEY_ANY),
CFG_U32("del", "<Delete> key only", RB_BOOT_KEY_DEL),
};
static const struct rbcfg_value rbcfg_boot_protocol[] = {
CFG_U32("bootp", "BOOTP protocol", RB_BOOT_PROTOCOL_BOOTP),
CFG_U32("dhcp", "DHCP protocol", RB_BOOT_PROTOCOL_DHCP),
};
static const struct rbcfg_value rbcfg_uart_speed[] = {
CFG_U32("115200", "", RB_UART_SPEED_115200),
CFG_U32("57600", "", RB_UART_SPEED_57600),
CFG_U32("38400", "", RB_UART_SPEED_38400),
CFG_U32("19200", "", RB_UART_SPEED_19200),
CFG_U32("9600", "", RB_UART_SPEED_9600),
CFG_U32("4800", "", RB_UART_SPEED_4800),
CFG_U32("2400", "", RB_UART_SPEED_2400),
CFG_U32("1200", "", RB_UART_SPEED_1200),
CFG_U32("off", "disable console output", RB_UART_SPEED_OFF),
};
static const struct rbcfg_value rbcfg_cpu_mode[] = {
CFG_U32("powersave", "power save", RB_CPU_MODE_POWERSAVE),
CFG_U32("regular", "regular (better for -0c environment)",
RB_CPU_MODE_REGULAR),
};
static const struct rbcfg_value rbcfg_cpu_freq_dummy[] = {
};
static const struct rbcfg_value rbcfg_cpu_freq_qca953x[] = {
CFG_U32("-2", "-100MHz", RB_CPU_FREQ_L2),
CFG_U32("-1", "- 50MHz", RB_CPU_FREQ_L1),
CFG_U32("0", "Factory", RB_CPU_FREQ_N0),
CFG_U32("+1", "+ 50MHz", RB_CPU_FREQ_H1),
CFG_U32("+2", "+100MHz", RB_CPU_FREQ_H2),
};
static const struct rbcfg_value rbcfg_cpu_freq_ar9344[] = {
CFG_U32("-2", "-100MHz", RB_CPU_FREQ_L2),
CFG_U32("-1", "- 50MHz", RB_CPU_FREQ_L1),
CFG_U32("0", "Factory", RB_CPU_FREQ_N0),
CFG_U32("+1", "+ 50MHz", RB_CPU_FREQ_H1),
CFG_U32("+2", "+100MHz", RB_CPU_FREQ_H2),
CFG_U32("+3", "+150MHz", RB_CPU_FREQ_H3),
};
static const struct rbcfg_value rbcfg_booter[] = {
CFG_U32("regular", "load regular booter", RB_BOOTER_REGULAR),
CFG_U32("backup", "force backup-booter loading", RB_BOOTER_BACKUP),
};
static struct rbcfg_env rbcfg_envs[] = {
{
.name = "boot_delay",
.id = RB_ID_BOOT_DELAY,
.type = RBCFG_ENV_TYPE_U32,
.values = rbcfg_boot_delay,
.num_values = ARRAY_SIZE(rbcfg_boot_delay),
}, {
.name = "boot_device",
.id = RB_ID_BOOT_DEVICE,
.type = RBCFG_ENV_TYPE_U32,
.values = rbcfg_boot_device,
.num_values = ARRAY_SIZE(rbcfg_boot_device),
}, {
.name = "boot_key",
.id = RB_ID_BOOT_KEY,
.type = RBCFG_ENV_TYPE_U32,
.values = rbcfg_boot_key,
.num_values = ARRAY_SIZE(rbcfg_boot_key),
}, {
.name = "boot_protocol",
.id = RB_ID_BOOT_PROTOCOL,
.type = RBCFG_ENV_TYPE_U32,
.values = rbcfg_boot_protocol,
.num_values = ARRAY_SIZE(rbcfg_boot_protocol),
}, {
.name = "booter",
.id = RB_ID_BOOTER,
.type = RBCFG_ENV_TYPE_U32,
.values = rbcfg_booter,
.num_values = ARRAY_SIZE(rbcfg_booter),
}, {
.name = "cpu_mode",
.id = RB_ID_CPU_MODE,
.type = RBCFG_ENV_TYPE_U32,
.values = rbcfg_cpu_mode,
.num_values = ARRAY_SIZE(rbcfg_cpu_mode),
}, {
.name = "cpu_freq",
.id = RB_ID_CPU_FREQ,
.type = RBCFG_ENV_TYPE_U32,
.values = rbcfg_cpu_freq_dummy,
.num_values = ARRAY_SIZE(rbcfg_cpu_freq_dummy),
}, {
.name = "uart_speed",
.id = RB_ID_UART_SPEED,
.type = RBCFG_ENV_TYPE_U32,
.values = rbcfg_uart_speed,
.num_values = ARRAY_SIZE(rbcfg_uart_speed),
}
};
static inline uint16_t
get_u16(const void *buf)
{
const uint8_t *p = buf;
return ((uint16_t) p[1] + ((uint16_t) p[0] << 8));
}
static inline uint32_t
get_u32(const void *buf)
{
const uint8_t *p = buf;
return ((uint32_t) p[3] + ((uint32_t) p[2] << 8) +
((uint32_t) p[1] << 16) + ((uint32_t) p[0] << 24));
}
static inline void
put_u32(void *buf, uint32_t val)
{
uint8_t *p = buf;
p[3] = val & 0xff;
p[2] = (val >> 8) & 0xff;
p[1] = (val >> 16) & 0xff;
p[0] = (val >> 24) & 0xff;
}
static int
rbcfg_find_tag(struct rbcfg_ctx *ctx, uint16_t tag_id, uint16_t *tag_len,
void **tag_data)
{
uint16_t id;
uint16_t len;
char *buf = ctx->buf;
unsigned int buflen = ctx->buflen;
int ret = RB_ERR_NOTFOUND;
/* skip magic and CRC value */
buf += 8;
buflen -= 8;
while (buflen > 2) {
len = get_u16(buf);
buf += 2;
buflen -= 2;
if (buflen < 2)
break;
id = get_u16(buf);
buf += 2;
buflen -= 2;
if (id == RB_ID_TERMINATOR) {
ret = RB_ERR_NOTWANTED;
break;
}
if (buflen < len)
break;
if (id == tag_id) {
*tag_len = len;
*tag_data = buf;
ret = 0;
break;
}
buf += len;
buflen -= len;
}
if (RB_ERR_NOTFOUND == ret)
fprintf(stderr, "no tag found with id=%u\n", tag_id);
return ret;
}
static int
rbcfg_get_u32(struct rbcfg_ctx *ctx, uint16_t id, uint32_t *val)
{
void *tag_data;
uint16_t tag_len;
int err;
err = rbcfg_find_tag(ctx, id, &tag_len, &tag_data);
if (err)
return err;
*val = get_u32(tag_data);
return 0;
}
static int
rbcfg_set_u32(struct rbcfg_ctx *ctx, uint16_t id, uint32_t val)
{
void *tag_data;
uint16_t tag_len;
int err;
err = rbcfg_find_tag(ctx, id, &tag_len, &tag_data);
if (err)
return err;
put_u32(tag_data, val);
return 0;
}
char *rbcfg_find_mtd(const char *name, int *erase_size)
{
FILE *f;
int mtd_num;
char dev[PATH_MAX];
char *ret = NULL;
struct stat s;
int err;
f = fopen("/proc/mtd", "r");
if (!f)
return NULL;
while (1) {
char *p;
p = fgets(dev, sizeof(dev), f);
if (!p)
break;
if (!strstr(dev, name))
continue;
err = sscanf(dev, "mtd%d: %08x", &mtd_num, erase_size);
if (err != 2)
break;
sprintf(dev, "/dev/mtdblock%d", mtd_num);
err = stat(dev, &s);
if (err < 0)
break;
if ((s.st_mode & S_IFBLK) == 0)
break;
ret = malloc(strlen(dev) + 1);
if (ret == NULL)
break;
strncpy(ret, dev, strlen(dev) + 1);
break;
}
fclose(f);
return ret;
}
static int
rbcfg_check_tmp(struct rbcfg_ctx *ctx)
{
struct stat s;
int err;
err = stat(ctx->tmp_file, &s);
if (err < 0)
return 0;
if ((s.st_mode & S_IFREG) == 0)
return 0;
if (s.st_size != ctx->buflen)
return 0;
return 1;
}
static int
rbcfg_load(struct rbcfg_ctx *ctx)
{
uint32_t magic;
uint32_t crc_orig, crc;
char *name;
int tmp;
int fd;
int err;
tmp = rbcfg_check_tmp(ctx);
name = (tmp) ? ctx->tmp_file : ctx->mtd_device;
fd = open(name, O_RDONLY);
if (fd < 0) {
fprintf(stderr, "unable to open %s\n", name);
err = RB_ERR_IO;
goto err;
}
err = read(fd, ctx->buf, ctx->buflen);
if (err != ctx->buflen) {
fprintf(stderr, "unable to read from %s\n", name);
err = RB_ERR_IO;
goto err_close;
}
magic = get_u32(ctx->buf);
if (magic != RB_MAGIC_SOFT) {
fprintf(stderr, "invalid configuration\n");
err = RB_ERR_INVALID;
goto err_close;
}
crc_orig = get_u32(ctx->buf + 4);
put_u32(ctx->buf + 4, 0);
crc = cyg_ether_crc32((unsigned char *) ctx->buf, ctx->buflen);
if (crc != crc_orig) {
fprintf(stderr, "configuration has CRC error\n");
err = RB_ERR_INVALID;
goto err_close;
}
err = 0;
err_close:
close(fd);
err:
return err;
}
static int
rbcfg_open()
{
char *mtd_device;
struct rbcfg_ctx *ctx;
int buflen;
int err;
mtd_device = rbcfg_find_mtd(RBCFG_MTD_NAME, &buflen);
if (!mtd_device) {
fprintf(stderr, "unable to find configuration\n");
return RB_ERR_NOTFOUND;
}
ctx = malloc(sizeof(struct rbcfg_ctx) + buflen);
if (ctx == NULL) {
err = RB_ERR_NOMEM;
goto err_free_mtd;
}
ctx->mtd_device = mtd_device;
ctx->tmp_file = RBCFG_TMP_FILE;
ctx->buflen = buflen;
ctx->buf = (char *) &ctx[1];
err = rbcfg_load(ctx);
if (err)
goto err_free_ctx;
rbcfg_ctx = ctx;
return 0;
err_free_ctx:
free(ctx);
err_free_mtd:
free(mtd_device);
return err;
}
static int
rbcfg_update(int tmp)
{
struct rbcfg_ctx *ctx = rbcfg_ctx;
char *name;
uint32_t crc;
int fd;
int err;
put_u32(ctx->buf, RB_MAGIC_SOFT);
put_u32(ctx->buf + 4, 0);
crc = cyg_ether_crc32((unsigned char *) ctx->buf, ctx->buflen);
put_u32(ctx->buf + 4, crc);
name = (tmp) ? ctx->tmp_file : ctx->mtd_device;
fd = open(name, O_WRONLY | O_CREAT);
if (fd < 0) {
fprintf(stderr, "unable to open %s for writing\n", name);
err = RB_ERR_IO;
goto out;
}
err = write(fd, ctx->buf, ctx->buflen);
if (err != ctx->buflen) {
err = RB_ERR_IO;
goto out_close;
}
fsync(fd);
err = 0;
out_close:
close(fd);
out:
return err;
}
static void
rbcfg_close(void)
{
struct rbcfg_ctx *ctx;
ctx = rbcfg_ctx;
free(ctx->mtd_device);
free(ctx);
}
static const struct rbcfg_value *
rbcfg_env_find(const struct rbcfg_env *env, const char *name)
{
unsigned i;
for (i = 0; i < env->num_values; i++) {
const struct rbcfg_value *v = &env->values[i];
if (strcmp(v->name, name) == 0)
return v;
}
return NULL;
}
static const struct rbcfg_value *
rbcfg_env_find_u32(const struct rbcfg_env *env, uint32_t val)
{
unsigned i;
for (i = 0; i < env->num_values; i++) {
const struct rbcfg_value *v = &env->values[i];
if (v->val.u32 == val)
return v;
}
return NULL;
}
static const char *
rbcfg_env_get_u32(const struct rbcfg_env *env)
{
const struct rbcfg_value *v;
uint32_t val;
int err;
err = rbcfg_get_u32(rbcfg_ctx, env->id, &val);
if (err)
return NULL;
v = rbcfg_env_find_u32(env, val);
if (v == NULL) {
fprintf(stderr, "unknown value %08x found for %s\n",
val, env->name);
return NULL;
}
return v->name;
}
static int
rbcfg_env_set_u32(const struct rbcfg_env *env, const char *data)
{
const struct rbcfg_value *v;
int err;
v = rbcfg_env_find(env, data);
if (v == NULL) {
fprintf(stderr, "invalid value '%s'\n", data);
return RB_ERR_INVALID;
}
err = rbcfg_set_u32(rbcfg_ctx, env->id, v->val.u32);
return err;
}
static const char *
rbcfg_env_get(const struct rbcfg_env *env)
{
const char *ret = NULL;
switch (env->type) {
case RBCFG_ENV_TYPE_U32:
ret = rbcfg_env_get_u32(env);
break;
}
return ret;
}
static int
rbcfg_env_set(const struct rbcfg_env *env, const char *data)
{
int ret = 0;
switch (env->type) {
case RBCFG_ENV_TYPE_U32:
ret = rbcfg_env_set_u32(env, data);
break;
}
return ret;
}
static int
rbcfg_cmd_apply(int argc, const char *argv[])
{
return rbcfg_update(0);
}
static int
rbcfg_cmd_help(int argc, const char *argv[])
{
usage();
return 0;
}
static int
rbcfg_cmd_get(int argc, const char *argv[])
{
int err = RB_ERR_NOTFOUND;
int i;
if (argc != 1) {
usage();
return RB_ERR_INVALID;
}
for (i = 0; i < ARRAY_SIZE(rbcfg_envs); i++) {
const struct rbcfg_env *env = &rbcfg_envs[i];
const char *value;
if (strcmp(env->name, argv[0]))
continue;
value = rbcfg_env_get(env);
if (value) {
fprintf(stdout, "%s\n", value);
err = 0;
}
break;
}
return err;
}
static int
rbcfg_cmd_set(int argc, const char *argv[])
{
int err = RB_ERR_INVALID;
int i;
if (argc != 2) {
/* not enough parameters */
usage();
return RB_ERR_INVALID;
}
for (i = 0; i < ARRAY_SIZE(rbcfg_envs); i++) {
const struct rbcfg_env *env = &rbcfg_envs[i];
if (strcmp(env->name, argv[0]))
continue;
err = rbcfg_env_set(env, argv[1]);
if (err == 0)
err = rbcfg_update(1);
break;
}
return err;
}
static int
rbcfg_cmd_show(int argc, const char *argv[])
{
int i;
if (argc != 0) {
usage();
return RB_ERR_INVALID;
}
for (i = 0; i < ARRAY_SIZE(rbcfg_envs); i++) {
const struct rbcfg_env *env = &rbcfg_envs[i];
const char *value;
value = rbcfg_env_get(env);
if (value)
fprintf(stdout, "%s=%s\n", env->name, value);
}
return 0;
}
static const struct rbcfg_command rbcfg_commands[] = {
{
.command = "apply",
.usage = "apply\n"
"\t- write configuration to the mtd device",
.flags = CMD_FLAG_USES_CFG,
.exec = rbcfg_cmd_apply,
}, {
.command = "help",
.usage = "help\n"
"\t- show this screen",
.exec = rbcfg_cmd_help,
}, {
.command = "get",
.usage = "get <name>\n"
"\t- get value of the configuration option <name>",
.flags = CMD_FLAG_USES_CFG,
.exec = rbcfg_cmd_get,
}, {
.command = "set",
.usage = "set <name> <value>\n"
"\t- set value of the configuration option <name> to <value>",
.flags = CMD_FLAG_USES_CFG,
.exec = rbcfg_cmd_set,
}, {
.command = "show",
.usage = "show\n"
"\t- show value of all configuration options",
.flags = CMD_FLAG_USES_CFG,
.exec = rbcfg_cmd_show,
}
};
static void
usage(void)
{
char buf[255];
int len;
int i;
fprintf(stderr, "Usage: %s <command>\n", rbcfg_name);
fprintf(stderr, "\nCommands:\n");
for (i = 0; i < ARRAY_SIZE(rbcfg_commands); i++) {
const struct rbcfg_command *cmd;
cmd = &rbcfg_commands[i];
len = snprintf(buf, sizeof(buf), "%s", cmd->usage);
buf[len] = '\0';
fprintf(stderr, "%s\n", buf);
}
fprintf(stderr, "\nConfiguration options:\n");
for (i = 0; i < ARRAY_SIZE(rbcfg_envs); i++) {
const struct rbcfg_env *env;
int j;
env = &rbcfg_envs[i];
fprintf(stderr, "\n%s:\n", env->name);
for (j = 0; j < env->num_values; j++) {
const struct rbcfg_value *v = &env->values[j];
fprintf(stderr, "\t%-12s %s\n", v->name, v->desc);
}
}
fprintf(stderr, "\n");
}
#define RBCFG_SOC_UNKNOWN 0
#define RBCFG_SOC_QCA953X 1
#define RBCFG_SOC_AR9344 2
static const struct rbcfg_soc rbcfg_socs[] = {
{
.needle = "QCA953",
.type = RBCFG_SOC_QCA953X,
}, {
.needle = "AR9344",
.type = RBCFG_SOC_AR9344,
},
};
#define CPUINFO_BUFSIZE 128 /* lines of interest are < 80 chars */
static int cpuinfo_find_soc(void)
{
FILE *fp;
char temp[CPUINFO_BUFSIZE];
char *haystack, *needle;
int i, found = 0, soc_type = RBCFG_SOC_UNKNOWN;
fp = fopen("/proc/cpuinfo", "r");
if (!fp)
goto end;
/* first, extract the system type line */
needle = "system type";
while(fgets(temp, CPUINFO_BUFSIZE, fp)) {
if (!strncmp(temp, needle, strlen(needle))) {
found = 1;
break;
}
}
fclose(fp);
/* failsafe in case cpuinfo format changes */
if (!found)
goto end;
/* skip the field header */
haystack = strchr(temp, ':');
/* then, try to identify known SoC, stop at first match */
for (i = 0; i < ARRAY_SIZE(rbcfg_socs); i++) {
if ((strstr(haystack, rbcfg_socs[i].needle))) {
soc_type = rbcfg_socs[i].type;
break;
}
}
end:
return soc_type;
}
static void fixup_rbcfg_envs(void)
{
int i, num_val, soc_type;
const struct rbcfg_value * env_value;
/* detect SoC */
soc_type = cpuinfo_find_soc();
/* update rbcfg_envs */
switch (soc_type) {
case RBCFG_SOC_QCA953X:
env_value = rbcfg_cpu_freq_qca953x;
num_val = ARRAY_SIZE(rbcfg_cpu_freq_qca953x);
break;
case RBCFG_SOC_AR9344:
env_value = rbcfg_cpu_freq_ar9344;
num_val = ARRAY_SIZE(rbcfg_cpu_freq_ar9344);
break;
}
for (i = 0; i < ARRAY_SIZE(rbcfg_envs); i++) {
if (RB_ID_CPU_FREQ == rbcfg_envs[i].id) {
if (RBCFG_SOC_UNKNOWN == soc_type)
rbcfg_envs[i].id = RB_ID_TERMINATOR;
else {
rbcfg_envs[i].values = env_value;
rbcfg_envs[i].num_values = num_val;
}
break;
}
}
}
int main(int argc, const char *argv[])
{
const struct rbcfg_command *cmd = NULL;
int ret;
int i;
rbcfg_name = (char *) argv[0];
fixup_rbcfg_envs();
if (argc < 2) {
usage();
return EXIT_FAILURE;
}
for (i = 0; i < ARRAY_SIZE(rbcfg_commands); i++) {
if (strcmp(rbcfg_commands[i].command, argv[1]) == 0) {
cmd = &rbcfg_commands[i];
break;
}
}
if (cmd == NULL) {
fprintf(stderr, "unknown command '%s'\n", argv[1]);
usage();
return EXIT_FAILURE;
}
argc -= 2;
argv += 2;
if (cmd->flags & CMD_FLAG_USES_CFG) {
ret = rbcfg_open();
if (ret)
return EXIT_FAILURE;
}
ret = cmd->exec(argc, argv);
if (cmd->flags & CMD_FLAG_USES_CFG)
rbcfg_close();
if (ret)
return EXIT_FAILURE;
return EXIT_SUCCESS;
}

View File

@@ -1,85 +0,0 @@
/*
* Mikrotik's RouterBOOT configuration defines
*
* Copyright (C) 2010 Gabor Juhos <juhosg@openwrt.org>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published
* by the Free Software Foundation.
*
*/
#ifndef _RBCFG_H
#define _RBCFG_H
/*
* Magic numbers
*/
#define RB_MAGIC_SOFT 0x74666f53 /* 'Soft' */
/*
* ID values for Software settings
*/
#define RB_ID_TERMINATOR 0
#define RB_ID_UART_SPEED 1
#define RB_ID_BOOT_DELAY 2
#define RB_ID_BOOT_DEVICE 3
#define RB_ID_BOOT_KEY 4
#define RB_ID_CPU_MODE 5
#define RB_ID_FW_VERSION 6
#define RB_ID_SOFT_07 7
#define RB_ID_SOFT_08 8
#define RB_ID_BOOT_PROTOCOL 9
#define RB_ID_SOFT_10 10
#define RB_ID_SOFT_11 11
#define RB_ID_CPU_FREQ 12
#define RB_ID_BOOTER 13
#define RB_UART_SPEED_115200 0
#define RB_UART_SPEED_57600 1
#define RB_UART_SPEED_38400 2
#define RB_UART_SPEED_19200 3
#define RB_UART_SPEED_9600 4
#define RB_UART_SPEED_4800 5
#define RB_UART_SPEED_2400 6
#define RB_UART_SPEED_1200 7
#define RB_UART_SPEED_OFF 8
#define RB_BOOT_DELAY_1SEC 1
#define RB_BOOT_DELAY_2SEC 2
#define RB_BOOT_DELAY_3SEC 3
#define RB_BOOT_DELAY_4SEC 4
#define RB_BOOT_DELAY_5SEC 5
#define RB_BOOT_DELAY_6SEC 6
#define RB_BOOT_DELAY_7SEC 7
#define RB_BOOT_DELAY_8SEC 8
#define RB_BOOT_DELAY_9SEC 9
#define RB_BOOT_DEVICE_ETHER 0
#define RB_BOOT_DEVICE_NANDETH 1
#define RB_BOOT_DEVICE_CFCARD 2
#define RB_BOOT_DEVICE_ETHONCE 3
#define RB_BOOT_DEVICE_NANDONLY 5
#define RB_BOOT_DEVICE_FLASHCFG 7
#define RB_BOOT_DEVICE_FLSHONCE 8
#define RB_BOOT_KEY_ANY 0
#define RB_BOOT_KEY_DEL 1
#define RB_CPU_MODE_POWERSAVE 0
#define RB_CPU_MODE_REGULAR 1
#define RB_BOOT_PROTOCOL_BOOTP 0
#define RB_BOOT_PROTOCOL_DHCP 1
#define RB_CPU_FREQ_L2 (0 << 3)
#define RB_CPU_FREQ_L1 (1 << 3)
#define RB_CPU_FREQ_N0 (2 << 3)
#define RB_CPU_FREQ_H1 (3 << 3)
#define RB_CPU_FREQ_H2 (4 << 3)
#define RB_CPU_FREQ_H3 (5 << 3)
#define RB_BOOTER_REGULAR 0
#define RB_BOOTER_BACKUP 1
#endif /* _RBCFG_H */

View File

@@ -8,50 +8,18 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=tfa-layerscape
PKG_VERSION:=lsdk-1903
PKG_RELEASE:=1
PKG_VERSION:=LSDK-20.04
PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://source.codeaurora.org/external/qoriq/qoriq-components/atf
PKG_SOURCE_VERSION:=7e34aebe658c7c3439d2d68b0ce6b9776e8e6996
PKG_MIRROR_HASH:=9cf0bc32fa589a0ee7c48c87898679e645341f29da1253d0ba5d2e82c6ea074d
PKG_BUILD_DEPENDS:=uboot-layerscape tfa-layerscape/host
PKG_SOURCE_VERSION:=4a82c939a0211196e2b80a495f966383803753bb
PKG_MIRROR_HASH:=31c264551ce800b646d7dcc5baa62cfbb4c8fa3299a93931c7ef71dc3e88380d
PKG_BUILD_DEPENDS:=tfa-layerscape/host
include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/package.mk
define Package/tfa-layerscape/Config
define Package/tfa-$(1)
SECTION:=boot
CATEGORY:=Boot Loaders
TITLE:=$(2)
DEPENDS:=@TARGET_layerscape_armv8_64b +layerscape-rcw-$(1)
HIDDEN:=1
VARIANT:=$(1)
BIN_BL2:=$(3)
BIN_FIP:=$(4)
endef
endef
define Package/tfa-layerscape/Install
define Package/tfa-$(1)/install
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
$(CP) $(PKG_BUILD_DIR)/$(BIN_BL2) $(STAGING_DIR_IMAGE)/$(1)-bl2.pbl
$(CP) $(PKG_BUILD_DIR)/$(BIN_FIP) $(STAGING_DIR_IMAGE)/$(1)-fip.bin
endef
endef
define Build/Compile
$(eval $(Package/tfa-layerscape/$(BUILD_VARIANT))) \
$(MAKE) -C $(PKG_BUILD_DIR) CROSS_COMPILE=$(TARGET_CROSS) \
fip pbl PLAT=$(PLAT) BOOT_MODE=$(BOOT_MODE) \
RCW=$(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-rcw.bin \
BL33=$(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-uboot.bin \
FIPTOOL=$(STAGING_DIR_HOST)/bin/tfa-fiptool \
CREATE_PBL=$(STAGING_DIR_HOST)/bin/tfa-create-pbl \
BYTE_SWAP=$(STAGING_DIR_HOST)/bin/tfa-byte-swap
endef
HOST_CFLAGS += -Wall -Werror -pedantic -std=c99
define Host/Compile
$(MAKE) -C \
@@ -69,93 +37,115 @@ define Host/Install
$(INSTALL_BIN) $(HOST_BUILD_DIR)/plat/nxp/tools/byte_swap $(STAGING_DIR_HOST)/bin/tfa-byte-swap
endef
define Package/tfa-layerscape/ls1012ardb
define Package/tfa-generic
SECTION:=boot
CATEGORY:=Boot Loaders
DEPENDS:=@TARGET_layerscape_armv8_64b +layerscape-rcw +u-boot-fsl_$(subst tfa-,,$(1))
VARIANT:=$(subst tfa-,,$(1))
endef
define Package/tfa-ls1012a-frdm
$(Package/tfa-generic)
TITLE:=NXP LS1012AFRDM Trusted Firmware
PLAT:=ls1012afrdm
BOOT_MODE:=qspi
endef
define Package/tfa-ls1012a-rdb
$(Package/tfa-generic)
TITLE:=NXP LS1012ARDB Trusted Firmware
PLAT:=ls1012ardb
BOOT_MODE:=qspi
BIN_BL2:=build/ls1012ardb/release/bl2_qspi.pbl
BIN_FIP:=build/ls1012ardb/release/fip.bin
endef
define Package/tfa-layerscape/ls1012afrwy
define Package/tfa-ls1012a-frwy-sdboot
$(Package/tfa-generic)
TITLE:=NXP LS1012AFRWY Trusted Firmware
PLAT:=ls1012afrwy
BOOT_MODE:=qspi
BIN_BL2:=build/ls1012afrwy/release/bl2_qspi.pbl
BIN_FIP:=build/ls1012afrwy/release/fip.bin
endef
define Package/tfa-layerscape/ls1043ardb
define Package/tfa-ls1043a-rdb
$(Package/tfa-generic)
TITLE:=NXP LS1043ARDB Trusted Firmware
PLAT:=ls1043ardb
BOOT_MODE:=nor
BIN_BL2:=build/ls1043ardb/release/bl2_nor.pbl
BIN_FIP:=build/ls1043ardb/release/fip.bin
endef
define Package/tfa-layerscape/ls1043ardb-sdboot
define Package/tfa-ls1043a-rdb-sdboot
$(Package/tfa-generic)
TITLE:=NXP LS1043ARDB SD Boot Trusted Firmware
PLAT:=ls1043ardb
BOOT_MODE:=sd
BIN_BL2:=build/ls1043ardb/release/bl2_sd.pbl
BIN_FIP:=build/ls1043ardb/release/fip.bin
endef
define Package/tfa-layerscape/ls1046ardb
define Package/tfa-ls1046a-rdb
$(Package/tfa-generic)
TITLE:=NXP LS1046ARDB Trusted Firmware
PLAT:=ls1046ardb
BOOT_MODE:=qspi
BIN_BL2:=build/ls1046ardb/release/bl2_qspi.pbl
BIN_FIP:=build/ls1046ardb/release/fip.bin
endef
define Package/tfa-layerscape/ls1046ardb-sdboot
define Package/tfa-ls1046a-rdb-sdboot
$(Package/tfa-generic)
TITLE:=NXP LS1046ARDB SD Boot Trusted Firmware
PLAT:=ls1046ardb
BOOT_MODE:=sd
BIN_BL2:=build/ls1046ardb/release/bl2_sd.pbl
BIN_FIP:=build/ls1046ardb/release/fip.bin
endef
define Package/tfa-layerscape/ls1088ardb
define Package/tfa-ls1088a-rdb
$(Package/tfa-generic)
TITLE:=NXP LS1088ARDB Trusted Firmware
PLAT:=ls1088ardb
BOOT_MODE:=qspi
BIN_BL2:=build/ls1088ardb/release/bl2_qspi.pbl
BIN_FIP:=build/ls1088ardb/release/fip.bin
endef
define Package/tfa-layerscape/ls1088ardb-sdboot
define Package/tfa-ls1088a-rdb-sdboot
$(Package/tfa-generic)
TITLE:=NXP LS1088ARDB SD Boot Trusted Firmware
PLAT:=ls1088ardb
BOOT_MODE:=sd
BIN_BL2:=build/ls1088ardb/release/bl2_sd.pbl
BIN_FIP:=build/ls1088ardb/release/fip.bin
endef
define Package/tfa-layerscape/ls2088ardb
define Package/tfa-ls2088a-rdb
$(Package/tfa-generic)
TITLE:=NXP LS2088ARDB Trusted Firmware
PLAT:=ls2088ardb
BOOT_MODE:=nor
BIN_BL2:=build/ls2088ardb/release/bl2_nor.pbl
BIN_FIP:=build/ls2088ardb/release/fip.bin
endef
define Build/InstallDev
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
$(CP) $(PKG_BUILD_DIR)/build/$(PLAT)/release/bl2_$(BOOT_MODE).pbl \
$(STAGING_DIR_IMAGE)/fsl_$(BUILD_VARIANT)-bl2.pbl
$(CP) $(PKG_BUILD_DIR)/build/$(PLAT)/release/fip.bin \
$(STAGING_DIR_IMAGE)/fsl_$(BUILD_VARIANT)-fip.bin
endef
define Build/Compile
$(eval $(Package/tfa-$(BUILD_VARIANT))) \
$(MAKE) -C $(PKG_BUILD_DIR) CROSS_COMPILE=$(TARGET_CROSS) \
fip pbl PLAT=$(PLAT) BOOT_MODE=$(BOOT_MODE) \
RCW=$(STAGING_DIR_IMAGE)/fsl_$(BUILD_VARIANT)-rcw.bin \
BL33=$(STAGING_DIR_IMAGE)/fsl_$(BUILD_VARIANT)-uboot.bin \
FIPTOOL=$(STAGING_DIR_HOST)/bin/tfa-fiptool \
CREATE_PBL=$(STAGING_DIR_HOST)/bin/tfa-create-pbl \
BYTE_SWAP=$(STAGING_DIR_HOST)/bin/tfa-byte-swap
endef
TFAS := \
ls1012ardb \
ls1012afrwy \
ls1043ardb \
ls1043ardb-sdboot \
ls1046ardb \
ls1046ardb-sdboot \
ls1088ardb \
ls1088ardb-sdboot \
ls2088ardb
ls1012a-frdm \
ls1012a-rdb \
ls1012a-frwy-sdboot \
ls1043a-rdb \
ls1043a-rdb-sdboot \
ls1046a-rdb \
ls1046a-rdb-sdboot \
ls1088a-rdb \
ls1088a-rdb-sdboot \
ls2088a-rdb
$(eval $(call HostBuild))
$(foreach tfa,$(TFAS), \
$(eval $(Package/tfa-layerscape/$(tfa))) \
$(eval $(call Package/tfa-layerscape/Config,$(tfa),$(TITLE),$(BIN_BL2),$(BIN_FIP))) \
$(eval $(call Package/tfa-layerscape/Install,$(tfa))) \
$(eval $(call BuildPackage,tfa-$(tfa))) \
$(eval $(call BuildPackage,tfa-$(tfa))) \
)

View File

@@ -1,30 +0,0 @@
From 65e9a722b44bf28b98fe25b3b174761b47ec7dbd Mon Sep 17 00:00:00 2001
From: Biwen Li <biwen.li@nxp.com>
Date: Mon, 1 Apr 2019 13:41:55 +0800
Subject: [PATCH 2/3] plat/nxp/tools: fix a makefile bug that will use default
implicit rules
The patch fix a makefile bug that will use default implicit rules,
because do not have explicit rules for the destination files.
Signed-off-by: Biwen Li <biwen.li@nxp.com>
---
plat/nxp/tools/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plat/nxp/tools/Makefile b/plat/nxp/tools/Makefile
index 2095294b..0082a0be 100644
--- a/plat/nxp/tools/Makefile
+++ b/plat/nxp/tools/Makefile
@@ -53,7 +53,7 @@ ${PROJECT_2}: ${OBJECTS_2} Makefile
@echo "Built $@ successfully"
@${ECHO_BLANK_LINE}
-%.o: %.c %.h Makefile
+%.o: %.c Makefile
@echo " CC $<"
${Q}${HOSTCC} -c ${CPPFLAGS} ${CFLAGS} ${INCLUDE_PATHS} $< -o $@
--
2.17.1

View File

@@ -9,16 +9,17 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=uboot-envtools
PKG_DISTNAME:=u-boot
PKG_VERSION:=2019.07
PKG_RELEASE:=2
PKG_VERSION:=2020.04
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:= \
https://ftp.denx.de/pub/u-boot \
https://mirror.cyberbits.eu/u-boot \
ftp://ftp.denx.de/pub/u-boot
PKG_HASH:=fe732aaf037d9cc3c0909bad8362af366ae964bbdac6913a34081ff4ad565372
PKG_SOURCE_SUBDIR:=$(PKG_DISTNAME)-$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_DISTNAME)-$(PKG_VERSION)
PKG_SOURCE_URL:=https://git.denx.de/u-boot.git
PKG_SOURCE_VERSION:=e5aee22e4be75e75a854ab64503fc80598bc2004
PKG_MIRROR_HASH:=58c1ecaf901b6bf65c5e872b5449b642694ae5acebf61f91f0d4bc20b4c654b7
PKG_BUILD_DEPENDS:=fstools

View File

@@ -47,6 +47,7 @@ mr600v2|\
mr900|\
mr900v2|\
n5q|\
nbg6616|\
nbg6716|\
om5p|\
om5p-ac|\

View File

@@ -14,13 +14,12 @@ board=$(board_name)
case "$board" in
alfa-network,ap121f|\
allnet,all-wap02860ac|\
arduino,yun|\
buffalo,bhr-4grv2|\
devolo,magic-2-wifi|\
engenius,ecb1750|\
etactica,eg200|\
glinet,gl-ar300m-lite|\
glinet,gl-ar300m-nand|\
glinet,gl-ar300m-nor|\
glinet,gl-ar300m16|\
glinet,gl-ar750s-nor|\
glinet,gl-ar750s-nor-nand|\
librerouter,librerouter-v1|\
@@ -36,23 +35,39 @@ netgear,wnr612-v2|\
ocedo,koala|\
ocedo,raccoon|\
openmesh,om5p-ac-v2|\
ubnt,nanostation-m|\
yuncore,a770|\
yuncore,a782|\
yuncore,xd4200)
yuncore,xd4200|\
zyxel,nbg6616)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
;;
buffalo,wzr-hp-ag300h)
ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x10000" "0x10000"
;;
domywifi,dw33d)
ubootenv_add_uci_config "/dev/mtd4" "0x0" "0x10000" "0x10000"
;;
glinet,gl-ar150)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x8000" "0x10000"
;;
glinet,gl-ar300m-lite|\
glinet,gl-ar300m-nand|\
glinet,gl-ar300m-nor|\
glinet,gl-ar300m16)
idx="$(find_mtd_index u-boot-env)"
[ -n "$idx" ] && \
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000"
;;
netgear,wndr3700|\
netgear,wndr3700-v2)
netgear,wndr3700-v2|\
netgear,wndrmac-v1)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x10000"
;;
netgear,wndr3700-v4|\
netgear,wndr4300)
netgear,wndr4300|\
netgear,wndr4300tn|\
netgear,wndr4300sw)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x20000"
;;
qihoo,c301)

View File

@@ -14,10 +14,31 @@ touch /etc/config/ubootenv
board=$(board_name)
case "$board" in
apalis*)
ubootenv_add_uci_config $(bootdev_from_uuid)boot0 -0x2200 0x2000 0x200 10
;;
*gw5*)
gw,imx6dl-gw51xx |\
gw,imx6dl-gw52xx |\
gw,imx6dl-gw53xx |\
gw,imx6dl-gw54xx |\
gw,imx6dl-gw551x |\
gw,imx6dl-gw552x |\
gw,imx6dl-gw553x |\
gw,imx6dl-gw5904 |\
gw,imx6dl-gw5907 |\
gw,imx6dl-gw5910 |\
gw,imx6dl-gw5912 |\
gw,imx6dl-gw5913 |\
gw,imx6q-gw51xx |\
gw,imx6q-gw52xx |\
gw,imx6q-gw53xx |\
gw,imx6q-gw5400-a |\
gw,imx6q-gw54xx |\
gw,imx6q-gw551x |\
gw,imx6q-gw552x |\
gw,imx6q-gw553x |\
gw,imx6q-gw5904 |\
gw,imx6q-gw5907 |\
gw,imx6q-gw5910 |\
gw,imx6q-gw5912 |\
gw,imx6q-gw5913 )
if [ -c /dev/mtd1 ]; then
# board boots from NAND
ubootenv_add_uci_config /dev/mtd1 0x0 0x20000 0x40000
@@ -28,7 +49,12 @@ apalis*)
ubootenv_add_uci_config /dev/mmcblk0 0xd1400 0x20000
fi
;;
wandboard)
toradex,apalis_imx6q-eval |\
toradex,apalis_imx6q-ixora |\
toradex,apalis_imx6q-ixora-v1.1 )
ubootenv_add_uci_config $(bootdev_from_uuid)boot0 -0x2200 0x2000 0x200 10
;;
wand,imx6dl-wandboard)
ubootenv_add_uci_config "/dev/mmcblk0" "0x60000" "0x2000" "0x2000"
;;
esac

View File

@@ -31,6 +31,7 @@ ubootenv_mtdinfo () {
}
case "$board" in
linksys,ea7500-v1 |\
linksys,ea8500)
ubootenv_add_uci_config "/dev/mtd10" "0x0" "0x20000" "0x20000"
;;

View File

@@ -13,17 +13,20 @@ touch /etc/config/ubootenv
board=$(board_name)
case "$board" in
checkpoint,l-50|\
cloudengines,pogoe02|\
cloudengines,pogoplugv4|\
iom,ix2-200|\
linksys,viper|\
linksys,e4200-v2|\
linksys,ea4500|\
raidsonic,ib-nas62x0|\
seagate,dockstar|\
zyxel,nsa310b|\
zyxel,nsa310s|\
zyxel,nsa325)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
;;
linksys,audi)
linksys,ea3500)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x4000" "0x4000"
;;
esac

View File

@@ -17,23 +17,27 @@ case "$board" in
cznic,turris-omnia)
ubootenv_add_uci_config "/dev/mtd0" "0xC0000" "0x10000" "0x40000"
;;
glinet,gl-mv1000)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x8000" "0x8000" "1"
;;
globalscale,espressobin|\
globalscale,espressobin-emmc|\
globalscale,espressobin-v7|\
globalscale,espressobin-v7-emmc|\
marvell,armada8040-mcbin)
marvell,armada8040-mcbin-doubleshot|\
marvell,armada8040-mcbin-singleshot)
ubootenv_add_uci_config "/dev/mtd0" "0x3f0000" "0x10000" "0x10000" "1"
;;
linksys,caiman|\
linksys,cobra|\
linksys,shelby)
linksys,wrt1200ac|\
linksys,wrt1900ac-v2|\
linksys,wrt1900acs)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x40000"
;;
linksys,mamba)
linksys,wrt1900ac-v1)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x20000"
;;
linksys,rango|\
linksys,venom)
linksys,wrt3200acm|\
linksys,wrt32x)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
;;
methode,udpu)

View File

@@ -17,6 +17,9 @@ i2se,duckbill)
ubootenv_add_uci_config "/dev/mmcblk0" "0x20000" "0x20000"
ubootenv_add_uci_config "/dev/mmcblk0" "0x40000" "0x20000"
;;
olimex,imx23-olinuxino)
ubootenv_add_uci_config "/dev/mmcblk0" "0x40000" "0x4000"
;;
esac
config_load ubootenv

View File

@@ -33,9 +33,14 @@ xiaomi,miwifi-nano|\
zbtlink,zbt-wg2626)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
;;
linksys,ea7300-v1|\
linksys,ea7500-v2|\
xiaomi,mir3p|\
xiaomi,mir3g|\
xiaomi,miwifi-r3)
xiaomi,mir4|\
xiaomi,miwifi-r3|\
xiaomi,mi-router-ac2100|\
xiaomi,redmi-router-ac2100)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
;;
esac

View File

@@ -7,10 +7,10 @@
include $(TOPDIR)/rules.mk
PKG_VERSION:=2019.04
PKG_VERSION:=2020.04
PKG_RELEASE:=1
PKG_HASH:=76b7772d156b3ddd7644c8a1736081e55b78828537ff714065d21dbade229bef
PKG_HASH:=fe732aaf037d9cc3c0909bad8362af366ae964bbdac6913a34081ff4ad565372
include $(INCLUDE_DIR)/u-boot.mk
include $(INCLUDE_DIR)/package.mk

View File

@@ -0,0 +1,37 @@
From 630b39c46b29de1874149c6b2c18c64966a0fabf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20=C5=A0tetiar?= <ynezz@true.cz>
Date: Sun, 1 Mar 2020 22:47:31 +0100
Subject: [PATCH] apalis_imx6_defconfig: enable some useful commands
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
partition table info, EXT4 write support, support for FAT and generic FS
commands like load/ls that work for multiple FS types.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
---
configs/apalis_imx6_defconfig | 5 +++++
1 file changed, 5 insertions(+)
--- a/configs/apalis_imx6_defconfig
+++ b/configs/apalis_imx6_defconfig
@@ -44,6 +44,7 @@ CONFIG_CMD_GPIO=y
CONFIG_CMD_GPT=y
CONFIG_CMD_I2C=y
CONFIG_CMD_MMC=y
+CONFIG_CMD_PART=y
CONFIG_CMD_USB=y
CONFIG_CMD_USB_SDP=y
CONFIG_CMD_USB_MASS_STORAGE=y
@@ -53,6 +54,10 @@ CONFIG_CMD_PMIC=y
CONFIG_CMD_REGULATOR=y
CONFIG_OF_CONTROL=y
CONFIG_DEFAULT_DEVICE_TREE="imx6-apalis"
+CONFIG_CMD_EXT4=y
+CONFIG_CMD_EXT4_WRITE=y
+CONFIG_CMD_FAT=y
+CONFIG_CMD_FS_GENERIC=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y

View File

@@ -1,123 +0,0 @@
From 42cc2cffb6d550fbb21dad033d2564d4da571015 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20=C5=A0tetiar?= <ynezz@true.cz>
Date: Sat, 1 Dec 2018 12:46:37 +0100
Subject: [PATCH] imx6: apalis: Make the boot process more generic
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
I'm preparing support for Apalis imx6 boards in OpenWrt and I've ended
up with quite huge patchset against upstream U-Boot 2018.03, so I'm
trying to propose more generic way of boot process handling.
In OpenWrt we usually have kernel, dtbs and U-Boot boot script in boot
partition with ext4fs, so for some use cases it would be handy to be
able to replace some of the files in the boot partion, that's why I've
added write support to the ext4.
I've added `set_blkcnt` environment variable which is needed for every
`mmc write` command as we need to always specify size in block count.
This is copy&pasted from official Toradex's flashing scripts, so all the
credits for this work belongs to them.
Currently the rootfs location is passed via mmcblk number and the
problem with this approach is that the mmcblk number for the boot device
changes depending on the kernel version and imx6 SoC type. In order to
avoid such issues, use the UUID method to specify the rootfs location.
I've added new boot sequence, where we first try to load and run boot
script defined in the new `script` variable, so the boot process could
be more generic and overridden by the distro. When the boot script isn't
loaded, it will use the previous boot sequence so it should be backward
compatible.
For the recovery purposes and better end user experience I've added boot
from SDP as the last boot command if every other boot option fails. I
plan to use SDP as official flashing/recovery procedure in OpenWrt for
Apalis imx6 boards.
I've copy&pasted almost everything from the `f086812a mx6sxsabresd: Use
PARTUUID to specify the rootfs location` commit, so credits for the rest
of this patch belongs to Fabio.
Cc: Stefan Agner <stefan.agner@toradex.com>
Cc: Max Krummenacher <max.krummenacher@toradex.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
---
configs/apalis_imx6_defconfig | 2 ++
include/configs/apalis_imx6.h | 26 +++++++++++++++++++++-----
2 files changed, 23 insertions(+), 5 deletions(-)
--- a/configs/apalis_imx6_defconfig
+++ b/configs/apalis_imx6_defconfig
@@ -40,6 +40,7 @@ CONFIG_CMD_DFU=y
CONFIG_CMD_GPIO=y
CONFIG_CMD_I2C=y
CONFIG_CMD_MMC=y
+CONFIG_CMD_PART=y
CONFIG_CMD_USB=y
CONFIG_CMD_USB_SDP=y
CONFIG_CMD_USB_MASS_STORAGE=y
@@ -49,6 +50,7 @@ CONFIG_CMD_PING=y
CONFIG_CMD_BMP=y
CONFIG_CMD_CACHE=y
CONFIG_CMD_EXT4=y
+CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
CONFIG_ENV_IS_IN_MMC=y
--- a/include/configs/apalis_imx6.h
+++ b/include/configs/apalis_imx6.h
@@ -138,9 +138,9 @@
"imx6q-colibri-cam-eval-v3.dtb fat 0 1"
#define EMMC_BOOTCMD \
- "emmcargs=ip=off root=/dev/mmcblk0p2 rw,noatime rootfstype=ext3 " \
+ "emmcargs=ip=off root=PARTUUID=${uuid} rw,noatime rootfstype=ext3 " \
"rootwait\0" \
- "emmcboot=run setup; " \
+ "emmcboot=run setup; run finduuid;" \
"setenv bootargs ${defargs} ${emmcargs} ${setupargs} " \
"${vidargs}; echo Booting from internal eMMC chip...; " \
"run emmcdtbload; load mmc 0:1 ${kernel_addr_r} " \
@@ -197,10 +197,17 @@
#define FDT_FILE "imx6q-apalis_v1_0-eval.dtb"
#endif
#define CONFIG_EXTRA_ENV_SETTINGS \
- "bootcmd=run emmcboot ; echo ; echo emmcboot failed ; " \
+ "script=boot.scr\0" \
+ "finduuid=part uuid mmc 0:2 uuid\0" \
+ "loadbootscript=" \
+ "load mmc 0:1 ${loadaddr} ${script};\0" \
+ "bootscript=echo Running bootscript from mmc ...; " \
+ "source\0" \
+ "bootcmd_default=run emmcboot ; echo ; echo emmcboot failed ; " \
"run nfsboot ; echo ; echo nfsboot failed ; " \
"usb start ;" \
- "setenv stdout serial,vga ; setenv stdin serial,usbkbd\0" \
+ "setenv stdout serial,vga ; setenv stdin serial,usbkbd;" \
+ "sdp 0\0" \
"boot_file=uImage\0" \
"console=ttymxc0\0" \
"defargs=enable_wait_mode=off vmalloc=400M\0" \
@@ -228,7 +235,16 @@
"vidargs=mxc_hdmi.only_cea=1 " \
"video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24 " \
"video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off " \
- "fbmem=32M\0 "
+ "fbmem=32M\0 " \
+ "set_blkcnt=setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200\0"
+
+#define CONFIG_BOOTCOMMAND \
+ "mmc dev 0;" \
+ "if run loadbootscript; then " \
+ "run bootscript; " \
+ "else " \
+ "run bootcmd_default; " \
+ "fi; "
/* Miscellaneous configurable options */
#undef CONFIG_SYS_CBSIZE
--
1.9.1

View File

@@ -1,17 +0,0 @@
--- a/configs/wandboard_defconfig
+++ b/configs/wandboard_defconfig
@@ -30,7 +30,7 @@ CONFIG_CMD_I2C=y
CONFIG_CMD_MMC=y
CONFIG_CMD_SATA=y
CONFIG_CMD_USB=y
-CONFIG_CMD_CACHE=y
+# CONFIG_CMD_CACHE is not set
CONFIG_CMD_EXT4_WRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
@@ -44,3 +44,5 @@ CONFIG_USB=y
CONFIG_VIDEO=y
# CONFIG_VIDEO_SW_CURSOR is not set
CONFIG_OF_LIBFDT=y
+CONFIG_FIT=y
+CONFIG_FIT_VERBOSE=y

Some files were not shown because too many files have changed in this diff Show More