diff --git a/.github/update.log b/.github/update.log index 7075cb929e..edf45e1fa5 100644 --- a/.github/update.log +++ b/.github/update.log @@ -825,3 +825,4 @@ Update On Mon Nov 11 19:36:15 CET 2024 Update On Tue Nov 12 19:37:38 CET 2024 Update On Wed Nov 13 19:34:22 CET 2024 Update On Thu Nov 14 19:39:40 CET 2024 +Update On Fri Nov 15 19:36:45 CET 2024 diff --git a/clash-nyanpasu/backend/Cargo.lock b/clash-nyanpasu/backend/Cargo.lock index dd39e248ed..919c93d926 100644 --- a/clash-nyanpasu/backend/Cargo.lock +++ b/clash-nyanpasu/backend/Cargo.lock @@ -2895,9 +2895,9 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.34" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0" +checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" dependencies = [ "crc32fast", "miniz_oxide 0.8.0", diff --git a/clash-nyanpasu/frontend/nyanpasu/package.json b/clash-nyanpasu/frontend/nyanpasu/package.json index 4e0f70ca9a..6b139ba7d9 100644 --- a/clash-nyanpasu/frontend/nyanpasu/package.json +++ b/clash-nyanpasu/frontend/nyanpasu/package.json @@ -54,9 +54,9 @@ "@emotion/react": "11.13.3", "@iconify/json": "2.2.272", "@monaco-editor/react": "4.6.0", - "@tanstack/react-router": "1.81.5", - "@tanstack/router-devtools": "1.81.5", - "@tanstack/router-plugin": "1.79.0", + "@tanstack/react-router": "1.81.9", + "@tanstack/router-devtools": "1.81.9", + "@tanstack/router-plugin": "1.81.9", "@tauri-apps/plugin-clipboard-manager": "2.0.0", "@tauri-apps/plugin-dialog": "2.0.1", "@tauri-apps/plugin-fs": "2.0.2", diff --git a/clash-nyanpasu/manifest/version.json b/clash-nyanpasu/manifest/version.json index 888a696330..36152d07a4 100644 --- a/clash-nyanpasu/manifest/version.json +++ b/clash-nyanpasu/manifest/version.json @@ -2,7 +2,7 @@ "manifest_version": 1, "latest": { "mihomo": "v1.18.10", - "mihomo_alpha": "alpha-792f162", + "mihomo_alpha": "alpha-de19f92", "clash_rs": "v0.7.1", "clash_premium": "2023-09-05-gdcc8d87", "clash_rs_alpha": "0.7.1-alpha+sha.5f2306a" @@ -69,5 +69,5 @@ "linux-armv7hf": "clash-armv7-unknown-linux-gnueabihf" } }, - "updated_at": "2024-11-11T22:20:37.824Z" + "updated_at": "2024-11-14T22:20:48.929Z" } diff --git a/clash-nyanpasu/package.json b/clash-nyanpasu/package.json index 18b7bd9337..473bda37ce 100644 --- a/clash-nyanpasu/package.json +++ b/clash-nyanpasu/package.json @@ -76,7 +76,7 @@ "eslint-import-resolver-alias": "1.1.2", "eslint-plugin-html": "8.1.2", "eslint-plugin-import": "2.31.0", - "eslint-plugin-n": "17.13.1", + "eslint-plugin-n": "17.13.2", "eslint-plugin-prettier": "5.2.1", "eslint-plugin-promise": "7.1.0", "eslint-plugin-react": "7.37.2", @@ -100,11 +100,11 @@ "stylelint-declaration-block-no-ignored-properties": "2.8.0", "stylelint-order": "6.0.4", "stylelint-scss": "6.9.0", - "tailwindcss": "3.4.14", + "tailwindcss": "3.4.15", "tsx": "4.19.2", "typescript": "5.6.3" }, - "packageManager": "pnpm@9.13.0+sha512.beb9e2a803db336c10c9af682b58ad7181ca0fbd0d4119f2b33d5f2582e96d6c0d93c85b23869295b765170fbdaa92890c0da6ada457415039769edf3c959efe", + "packageManager": "pnpm@9.13.2+sha512.88c9c3864450350e65a33587ab801acf946d7c814ed1134da4a924f6df5a2120fd36b46aab68f7cd1d413149112d53c7db3a4136624cfd00ff1846a0c6cef48a", "engines": { "node": "22.11.0" }, diff --git a/clash-nyanpasu/pnpm-lock.yaml b/clash-nyanpasu/pnpm-lock.yaml index e4cb969046..9d584442c4 100644 --- a/clash-nyanpasu/pnpm-lock.yaml +++ b/clash-nyanpasu/pnpm-lock.yaml @@ -67,7 +67,7 @@ importers: version: 9.1.0(eslint@8.57.1) eslint-config-standard: specifier: 17.1.0 - version: 17.1.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.14.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1))(eslint-plugin-n@17.13.1(eslint@8.57.1))(eslint-plugin-promise@7.1.0(eslint@8.57.1))(eslint@8.57.1) + version: 17.1.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.14.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1))(eslint-plugin-n@17.13.2(eslint@8.57.1))(eslint-plugin-promise@7.1.0(eslint@8.57.1))(eslint@8.57.1) eslint-import-resolver-alias: specifier: 1.1.2 version: 1.1.2(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.14.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)) @@ -78,8 +78,8 @@ importers: specifier: 2.31.0 version: 2.31.0(@typescript-eslint/parser@8.14.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1) eslint-plugin-n: - specifier: 17.13.1 - version: 17.13.1(eslint@8.57.1) + specifier: 17.13.2 + version: 17.13.2(eslint@8.57.1) eslint-plugin-prettier: specifier: 5.2.1 version: 5.2.1(eslint-config-prettier@9.1.0(eslint@8.57.1))(eslint@8.57.1)(prettier@3.3.3) @@ -150,8 +150,8 @@ importers: specifier: 6.9.0 version: 6.9.0(stylelint@16.10.0(typescript@5.6.3)) tailwindcss: - specifier: 3.4.14 - version: 3.4.14 + specifier: 3.4.15 + version: 3.4.15 tsx: specifier: 4.19.2 version: 4.19.2 @@ -166,16 +166,16 @@ importers: version: 2.1.1 ahooks: specifier: 3.8.1 - version: 3.8.1(react@19.0.0-rc-7ac8e612-20241113) + version: 3.8.1(react@19.0.0-rc-b01722d5-20241114) ofetch: specifier: 1.4.1 version: 1.4.1 react: specifier: rc - version: 19.0.0-rc-7ac8e612-20241113 + version: 19.0.0-rc-b01722d5-20241114 swr: specifier: 2.2.5 - version: 2.2.5(react@19.0.0-rc-7ac8e612-20241113) + version: 2.2.5(react@19.0.0-rc-b01722d5-20241114) devDependencies: '@types/react': specifier: npm:types-react@rc @@ -185,16 +185,16 @@ importers: dependencies: '@dnd-kit/core': specifier: 6.1.0 - version: 6.1.0(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113) + version: 6.1.0(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114) '@dnd-kit/sortable': specifier: 8.0.0 - version: 8.0.0(@dnd-kit/core@6.1.0(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113) + version: 8.0.0(@dnd-kit/core@6.1.0(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114) '@dnd-kit/utilities': specifier: 3.2.2 - version: 3.2.2(react@19.0.0-rc-7ac8e612-20241113) + version: 3.2.2(react@19.0.0-rc-b01722d5-20241114) '@emotion/styled': specifier: 11.13.0 - version: 11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) + version: 11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) '@juggle/resize-observer': specifier: 3.4.0 version: 3.4.0 @@ -203,13 +203,13 @@ importers: version: 0.3.0 '@mui/icons-material': specifier: 6.1.7 - version: 6.1.7(@mui/material@6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) + version: 6.1.7(@mui/material@6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) '@mui/lab': specifier: 6.0.0-beta.15 - version: 6.0.0-beta.15(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(@mui/material@6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) + version: 6.0.0-beta.15(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(@mui/material@6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) '@mui/material': specifier: 6.1.7 - version: 6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) + version: 6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) '@nyanpasu/interface': specifier: workspace:^ version: link:../interface @@ -218,7 +218,7 @@ importers: version: link:../ui '@tanstack/router-zod-adapter': specifier: 1.81.5 - version: 1.81.5(@tanstack/react-router@1.81.5(@tanstack/router-generator@1.79.0)(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113))(zod@3.23.8) + version: 1.81.5(@tanstack/react-router@1.81.9(@tanstack/router-generator@1.81.9)(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114))(zod@3.23.8) '@tauri-apps/api': specifier: 2.1.1 version: 2.1.1 @@ -227,10 +227,10 @@ importers: version: 7.0.15 ahooks: specifier: 3.8.1 - version: 3.8.1(react@19.0.0-rc-7ac8e612-20241113) + version: 3.8.1(react@19.0.0-rc-b01722d5-20241114) allotment: specifier: 1.20.2 - version: 1.20.2(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113) + version: 1.20.2(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114) country-code-emoji: specifier: 2.3.0 version: 2.3.0 @@ -239,58 +239,58 @@ importers: version: 1.11.13 framer-motion: specifier: 12.0.0-alpha.1 - version: 12.0.0-alpha.1(@emotion/is-prop-valid@1.3.0)(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113) + version: 12.0.0-alpha.1(@emotion/is-prop-valid@1.3.0)(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114) i18next: specifier: 23.16.5 version: 23.16.5 jotai: specifier: 2.10.2 - version: 2.10.2(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) + version: 2.10.2(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) json-schema: specifier: 0.4.0 version: 0.4.0 material-react-table: specifier: 3.0.1 - version: 3.0.1(u57lr24knr5e3r4x2lcbnwq4ky) + version: 3.0.1(7rlni7wlschvjzcib5ynx7xdr4) monaco-editor: specifier: 0.52.0 version: 0.52.0 mui-color-input: specifier: 5.0.1 - version: 5.0.1(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(@mui/material@6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) + version: 5.0.1(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(@mui/material@6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) react: specifier: rc - version: 19.0.0-rc-7ac8e612-20241113 + version: 19.0.0-rc-b01722d5-20241114 react-dom: specifier: rc - version: 19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113) + version: 19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114) react-error-boundary: specifier: 4.1.2 - version: 4.1.2(react@19.0.0-rc-7ac8e612-20241113) + version: 4.1.2(react@19.0.0-rc-b01722d5-20241114) react-fast-marquee: specifier: 1.6.5 - version: 1.6.5(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113) + version: 1.6.5(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114) react-hook-form-mui: specifier: 7.4.0 - version: 7.4.0(eo2cymeyrphpxbqnoughhosimq) + version: 7.4.0(omrmg3wjhnirawgnnz42g5mssm) react-i18next: specifier: 15.1.1 - version: 15.1.1(i18next@23.16.5)(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113) + version: 15.1.1(i18next@23.16.5)(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114) react-markdown: specifier: 9.0.1 - version: 9.0.1(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) + version: 9.0.1(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) react-split-grid: specifier: 1.0.4 - version: 1.0.4(react@19.0.0-rc-7ac8e612-20241113) + version: 1.0.4(react@19.0.0-rc-b01722d5-20241114) react-use: specifier: 17.5.1 - version: 17.5.1(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113) + version: 17.5.1(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114) swr: specifier: 2.2.5 - version: 2.2.5(react@19.0.0-rc-7ac8e612-20241113) + version: 2.2.5(react@19.0.0-rc-b01722d5-20241114) virtua: specifier: 0.36.3 - version: 0.36.3(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113) + version: 0.36.3(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114) vite-bundle-visualizer: specifier: 1.2.1 version: 1.2.1(rollup@4.21.0) @@ -303,22 +303,22 @@ importers: version: 11.12.0 '@emotion/react': specifier: 11.13.3 - version: 11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) + version: 11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) '@iconify/json': specifier: 2.2.272 version: 2.2.272 '@monaco-editor/react': specifier: 4.6.0 - version: 4.6.0(monaco-editor@0.52.0)(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113) + version: 4.6.0(monaco-editor@0.52.0)(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114) '@tanstack/react-router': - specifier: 1.81.5 - version: 1.81.5(@tanstack/router-generator@1.79.0)(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113) + specifier: 1.81.9 + version: 1.81.9(@tanstack/router-generator@1.81.9)(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114) '@tanstack/router-devtools': - specifier: 1.81.5 - version: 1.81.5(@tanstack/react-router@1.81.5(@tanstack/router-generator@1.79.0)(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113))(csstype@3.1.3)(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113) + specifier: 1.81.9 + version: 1.81.9(@tanstack/react-router@1.81.9(@tanstack/router-generator@1.81.9)(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114))(csstype@3.1.3)(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114) '@tanstack/router-plugin': - specifier: 1.79.0 - version: 1.79.0(vite@5.4.11(@types/node@22.9.0)(less@4.2.0)(sass-embedded@1.78.0)(sass@1.80.7)(stylus@0.62.0)(terser@5.36.0))(webpack-sources@3.2.3) + specifier: 1.81.9 + version: 1.81.9(vite@5.4.11(@types/node@22.9.0)(less@4.2.0)(sass-embedded@1.78.0)(sass@1.80.7)(stylus@0.62.0)(terser@5.36.0)) '@tauri-apps/plugin-clipboard-manager': specifier: 2.0.0 version: 2.0.0 @@ -423,19 +423,19 @@ importers: version: 0.3.0 '@mui/icons-material': specifier: 6.1.7 - version: 6.1.7(@mui/material@6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) + version: 6.1.7(@mui/material@6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) '@mui/lab': specifier: 6.0.0-beta.15 - version: 6.0.0-beta.15(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(@mui/material@6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) + version: 6.0.0-beta.15(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(@mui/material@6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) '@mui/material': specifier: 6.1.7 - version: 6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) + version: 6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) '@radix-ui/react-portal': specifier: 1.1.2 - version: 1.1.2(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) + version: 1.1.2(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) '@radix-ui/react-scroll-area': specifier: 1.2.1 - version: 1.2.1(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) + version: 1.2.1(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) '@tauri-apps/api': specifier: 2.1.1 version: 2.1.1 @@ -450,28 +450,28 @@ importers: version: 4.3.3(vite@5.4.11(@types/node@22.9.0)(less@4.2.0)(sass-embedded@1.78.0)(sass@1.80.7)(stylus@0.62.0)(terser@5.36.0)) ahooks: specifier: 3.8.1 - version: 3.8.1(react@19.0.0-rc-7ac8e612-20241113) + version: 3.8.1(react@19.0.0-rc-b01722d5-20241114) d3: specifier: 7.9.0 version: 7.9.0 framer-motion: specifier: 12.0.0-alpha.1 - version: 12.0.0-alpha.1(@emotion/is-prop-valid@1.3.0)(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113) + version: 12.0.0-alpha.1(@emotion/is-prop-valid@1.3.0)(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114) react: specifier: rc - version: 19.0.0-rc-7ac8e612-20241113 + version: 19.0.0-rc-b01722d5-20241114 react-dom: specifier: rc - version: 19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113) + version: 19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114) react-error-boundary: specifier: 4.1.2 - version: 4.1.2(react@19.0.0-rc-7ac8e612-20241113) + version: 4.1.2(react@19.0.0-rc-b01722d5-20241114) react-i18next: specifier: 15.1.1 - version: 15.1.1(i18next@23.16.5)(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113) + version: 15.1.1(i18next@23.16.5)(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114) react-use: specifier: 17.5.1 - version: 17.5.1(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113) + version: 17.5.1(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114) vite: specifier: 5.4.11 version: 5.4.11(@types/node@22.9.0)(less@4.2.0)(sass-embedded@1.78.0)(sass@1.80.7)(stylus@0.62.0)(terser@5.36.0) @@ -481,7 +481,7 @@ importers: devDependencies: '@emotion/react': specifier: 11.13.3 - version: 11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) + version: 11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) '@types/d3-interpolate-path': specifier: 2.0.3 version: 2.0.3 @@ -519,8 +519,8 @@ importers: specifier: 10.1.6 version: 10.1.6 p-retry: - specifier: 6.2.0 - version: 6.2.0 + specifier: 6.2.1 + version: 6.2.1 devDependencies: '@octokit/types': specifier: 13.6.1 @@ -614,10 +614,6 @@ packages: resolution: {integrity: sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w==} engines: {node: '>=6.9.0'} - '@babel/generator@7.25.7': - resolution: {integrity: sha512-5Dqpl5fyV9pIAD62yK9P7fcA768uVPUyrQmqpqstHWgMma4feF1x/oFysBCVZLY5wJ2GkMUCdsNDnGZrPoR6rA==} - engines: {node: '>=6.9.0'} - '@babel/generator@7.26.2': resolution: {integrity: sha512-zevQbhbau95nkoxSq3f/DC/SC+EEOUZd3DYqfSkMhY2/wfSeaHV1Ew4vk8e+x8lja31IbyuUa2uQ3JONqKbysw==} engines: {node: '>=6.9.0'} @@ -739,10 +735,6 @@ packages: resolution: {integrity: sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==} engines: {node: '>=6.9.0'} - '@babel/helper-string-parser@7.25.7': - resolution: {integrity: sha512-CbkjYdsJNHFk8uqpEkpCvRs3YRp9tY6FmFY7wLMSYuGYkrdUi7r2lc4/wqsvlHoMznX3WJ9IP8giGPq68T/Y6g==} - engines: {node: '>=6.9.0'} - '@babel/helper-string-parser@7.25.9': resolution: {integrity: sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==} engines: {node: '>=6.9.0'} @@ -751,10 +743,6 @@ packages: resolution: {integrity: sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==} engines: {node: '>=6.9.0'} - '@babel/helper-validator-identifier@7.25.7': - resolution: {integrity: sha512-AM6TzwYqGChO45oiuPqwL2t20/HdMC1rTPAesnBCgPCSF1x3oN9MVUwQV2iyz4xqWrctwK5RNC8LV22kaQCNYg==} - engines: {node: '>=6.9.0'} - '@babel/helper-validator-identifier@7.25.9': resolution: {integrity: sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==} engines: {node: '>=6.9.0'} @@ -779,11 +767,6 @@ packages: resolution: {integrity: sha512-iYyACpW3iW8Fw+ZybQK+drQre+ns/tKpXbNESfrhNnPLIklLbXr7MYJ6gPEd0iETGLOK+SxMjVvKb/ffmk+FEw==} engines: {node: '>=6.9.0'} - '@babel/parser@7.25.8': - resolution: {integrity: sha512-HcttkxzdPucv3nNFmfOOMfFf64KgdJVqm1KaCm25dPGMLElo9nsLvXeJECQg8UzPuBGLyTSA0ZzqCtDSzKTEoQ==} - engines: {node: '>=6.0.0'} - hasBin: true - '@babel/parser@7.26.1': resolution: {integrity: sha512-reoQYNiAJreZNsJzyrDNzFQ+IQ5JFiIzAHJg9bn94S3l+4++J7RsIhNMoB+lgP/9tpmiAQqspv+xfdxTSzREOw==} engines: {node: '>=6.0.0'} @@ -1206,10 +1189,6 @@ packages: resolution: {integrity: sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==} engines: {node: '>=6.9.0'} - '@babel/template@7.25.7': - resolution: {integrity: sha512-wRwtAgI3bAS+JGU2upWNL9lSlDcRCqD05BZ1n3X2ONLH1WilFP6O1otQjeMK/1g0pvYcXC7b/qVUB1keofjtZA==} - engines: {node: '>=6.9.0'} - '@babel/template@7.25.9': resolution: {integrity: sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg==} engines: {node: '>=6.9.0'} @@ -1218,10 +1197,6 @@ packages: resolution: {integrity: sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==} engines: {node: '>=6.9.0'} - '@babel/traverse@7.25.7': - resolution: {integrity: sha512-jatJPT1Zjqvh/1FyJs6qAHL+Dzb7sTb+xr7Q+gM1b+1oBsMsQQ4FkVKb6dFlJvLlVssqkRzV05Jzervt9yhnzg==} - engines: {node: '>=6.9.0'} - '@babel/traverse@7.25.9': resolution: {integrity: sha512-ZCuvfwOwlz/bawvAuvcj8rrithP2/N55Tzz342AkTvq4qaWbGfmCk/tKhNaV2cthijKrPAA8SRJV5WWe7IBMJw==} engines: {node: '>=6.9.0'} @@ -1234,10 +1209,6 @@ packages: resolution: {integrity: sha512-/l42B1qxpG6RdfYf343Uw1vmDjeNhneUXtzhojE7pDgfpEypmRhI6j1kr17XCVv4Cgl9HdAiQY2x0GwKm7rWCw==} engines: {node: '>=6.9.0'} - '@babel/types@7.25.8': - resolution: {integrity: sha512-JWtuCu8VQsMladxVz/P4HzHUGCAwpuqacmowgXFs5XjxIgKuNjnLokQzuVjlTvIzODaDmpjT3oxcC48vyk9EWg==} - engines: {node: '>=6.9.0'} - '@babel/types@7.26.0': resolution: {integrity: sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==} engines: {node: '>=6.9.0'} @@ -2726,19 +2697,19 @@ packages: resolution: {integrity: sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==} engines: {node: '>=10'} - '@tanstack/history@1.81.3': - resolution: {integrity: sha512-ZNdhkE+Ikv2GPj29m99Bu4qkiH1LeZQkSVjRUbTmNRdvEJmKKrKq1B5p5t1IHlfhoStLu5JIcWeEHHZ88jEfdQ==} + '@tanstack/history@1.81.9': + resolution: {integrity: sha512-9MPknhhnvZKifK4jSvva6NDqYQwsNaptrRzO4ejk6yCLyi4koVG4u3C4VCeClYZY5etLEQbO8wXU9knEFZpMeg==} engines: {node: '>=12'} '@tanstack/match-sorter-utils@8.19.4': resolution: {integrity: sha512-Wo1iKt2b9OT7d+YGhvEPD3DXvPv2etTusIMhMUoG7fbhmxcXCtIjJDEygy91Y2JFlwGyjqiBPRozme7UD8hoqg==} engines: {node: '>=12'} - '@tanstack/react-router@1.81.5': - resolution: {integrity: sha512-7DHFOcbLvvH9ZpWeZ7hWOEUjfzKKEpejLcHFrOoimOnsbiDIVGU8+X4eJqjIppvoRSHLSHpRCrt4u8f1feDc9Q==} + '@tanstack/react-router@1.81.9': + resolution: {integrity: sha512-vQV9ZL6ik+OR8sLrkeuDvgB3gDxVd6nDX+PJ/LHMrpUDTFvnXh+rsjisiL9O1EKlVKaGQ/gq0nUSHreFLuatgQ==} engines: {node: '>=12'} peerDependencies: - '@tanstack/router-generator': 1.79.0 + '@tanstack/router-generator': 1.81.9 react: '>=18' react-dom: '>=18' peerDependenciesMeta: @@ -2764,20 +2735,20 @@ packages: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 - '@tanstack/router-devtools@1.81.5': - resolution: {integrity: sha512-/yGjvk9DBDuCNgj4iMCxm55fb9x4ecFmL65zKmwws2Iu4F0J4dcYTHIWhmC/YzoUYvx3wBSw/4UIhQXtidmwSQ==} + '@tanstack/router-devtools@1.81.9': + resolution: {integrity: sha512-qDO5AXxT+tcjid578ByO4RgslEk7UIA1ysECAHw5cKPdteq/tW6hdflU8EX2kUgbm1/SKmMlIYrW+MevZeRv2w==} engines: {node: '>=12'} peerDependencies: - '@tanstack/react-router': ^1.81.5 + '@tanstack/react-router': ^1.81.9 react: '>=18' react-dom: '>=18' - '@tanstack/router-generator@1.79.0': - resolution: {integrity: sha512-HJxmYs7GAA1AJQzyfy4Hiygmg93qCCDiAxQ//zCRMbzVntwpqtZ96o9UGOPjT3Lw0SxbyzbKgpo3zqCdwlv8Ew==} + '@tanstack/router-generator@1.81.9': + resolution: {integrity: sha512-HiInbc11+E65tg5xlgg0z/hqQJkQBUpr4RCEQeEoortlgQ38Yi+PSuoc2IO+n03XPGSqPMhCS6Q1MiMgfRfwZw==} engines: {node: '>=12'} - '@tanstack/router-plugin@1.79.0': - resolution: {integrity: sha512-dY81YyKxON9KhZQlrkkuxsl688pGpZ4HAF5w40ZkJa+nwmEJdg0b2td+MPXWbtmSd1t1cbYlFvc68k+PUSHN/A==} + '@tanstack/router-plugin@1.81.9': + resolution: {integrity: sha512-u12ibRFI/RpWzUmuFEy8HeyjRObkH8NqzOqEGt8xNa/mSQK3sFQLvfXf+lEFwIqg+C5lnrZtl2RvdmoQpRLwHw==} engines: {node: '>=12'} peerDependencies: '@rsbuild/core': '>=1.0.2' @@ -2808,8 +2779,8 @@ packages: '@tanstack/virtual-core@3.10.6': resolution: {integrity: sha512-1giLc4dzgEKLMx5pgKjL6HlG5fjZMgCjzlKAlpr7yoUtetVPELgER1NtephAI910nMwfPTHNyWKSFmJdHkz2Cw==} - '@tanstack/virtual-file-routes@1.64.0': - resolution: {integrity: sha512-soW+gE9QTmMaqXM17r7y1p8NiQVIIECjdTaYla8BKL5Flj030m3KuxEQoiG1XgjtA0O7ayznFz2YvPcXIy3qDg==} + '@tanstack/virtual-file-routes@1.81.9': + resolution: {integrity: sha512-jV5mWJrsh3QXHpb/by6udSqwva0qK50uYHpIXvKsLaxnlbjbLfflfPjFyRWXbMtZsnzCjSUqp5pm5/p+Wpaerg==} engines: {node: '>=12'} '@taplo/core@0.1.1': @@ -4409,8 +4380,8 @@ packages: '@typescript-eslint/parser': optional: true - eslint-plugin-n@17.13.1: - resolution: {integrity: sha512-97qzhk1z3DdSJNCqT45EslwCu5+LB9GDadSyBItgKUfGsXAmN/aa7LRQ0ZxHffUxUzvgbTPJL27/pE9ZQWHy7A==} + eslint-plugin-n@17.13.2: + resolution: {integrity: sha512-MhBAKkT01h8cOXcTBTlpuR7bxH5OBUNpUXefsvwSVEy46cY4m/Kzr2osUCQvA3zJFD6KuCeNNDv0+HDuWk/OcA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: '>=8.23.0' @@ -5988,8 +5959,8 @@ packages: resolution: {integrity: sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==} engines: {node: '>=10'} - p-retry@6.2.0: - resolution: {integrity: sha512-JA6nkq6hKyWLLasXQXUrO4z8BUZGUt/LjlJxx8Gb2+2ntodU/SS63YZ8b0LUTbQ8ZB9iwOfhEPhg4ykKnn2KsA==} + p-retry@6.2.1: + resolution: {integrity: sha512-hEt02O4hUct5wtwg4H4KcWgDdm+l1bOaEy/hWzd8xtXB9BqxTWBBhb+2ImAtH4Cv4rPjV76xN3Zumqk3k3AhhQ==} engines: {node: '>=16.17'} p-timeout@3.2.0: @@ -6398,10 +6369,10 @@ packages: resolution: {integrity: sha512-B5XGOnOfwH4B7m0chzE1Cv5jlnfbbxF0LoBI+lacQuNj9PMvZ6JS5NCFnDw3zzy7zpOo6leyJNAED8sN3CgLVA==} hasBin: true - react-dom@19.0.0-rc-7ac8e612-20241113: - resolution: {integrity: sha512-bbuSvwR89fSfpRPTSbG+m/Ur2eqHIKwSzhux57AkC+NVVnwARA7TdLLEWp6GmzXLtSbt3yqw4N0HcEoICvjgBg==} + react-dom@19.0.0-rc-b01722d5-20241114: + resolution: {integrity: sha512-g72oEq/SDdCiaT8fN1lMptSD5bszHSwuQFYtYT39sVzD5CkzYeBJcjv3ParjNZfvWPhjfOL7f1Fe+OIJFupsxQ==} peerDependencies: - react: 19.0.0-rc-7ac8e612-20241113 + react: 19.0.0-rc-b01722d5-20241114 react-error-boundary@4.1.2: resolution: {integrity: sha512-GQDxZ5Jd+Aq/qUxbCm1UtzmL/s++V7zKgE8yMktJiCQXCCFZnMZh9ng+6/Ne6PjNSXH0L9CjeOEREfRnq6Duag==} @@ -6490,8 +6461,8 @@ packages: react: '*' react-dom: '*' - react@19.0.0-rc-7ac8e612-20241113: - resolution: {integrity: sha512-/pDTAIK17lYvlY5SUC6Pb/aK/mqn+Biz38pl3lxJV9XjuDdm1EYC7w6pHsORKfiSLuudJtCiV4G8VyMleTbwNw==} + react@19.0.0-rc-b01722d5-20241114: + resolution: {integrity: sha512-VT5vig/1unX2lH2RiEuQoKJkn/wnuQw7xwNndsVeVx7TQPQu+6GUjhBomhyZIW3M1bDgPGG5wEBgjNoIXYkeEQ==} engines: {node: '>=0.10.0'} read-cache@1.0.0: @@ -6811,8 +6782,8 @@ packages: sax@1.3.0: resolution: {integrity: sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==} - scheduler@0.25.0-rc-7ac8e612-20241113: - resolution: {integrity: sha512-9YKvoO+2s+BIkQVn4rlpCfp88nM12R+W4j07OisQ7F7P4zL/gOH9ttqpA7dL4j7mPg+SPLFbNLmMvptIlQXuZA==} + scheduler@0.25.0-rc-b01722d5-20241114: + resolution: {integrity: sha512-8QtAZX1GlxgaI7V9v4vevfGd/+WE8BmBxcizKr7VPZSRyAwd+9uFYj7TKtOBbc9/W0oyuNyOv6Tw8n44P1MjAA==} screenfull@5.2.0: resolution: {integrity: sha512-9BakfsO2aUQN2K9Fdbj87RJIEZ82Q9IGim7FqM5OsebfoFC6ZHXgDq/KvniuLTPdeM8wY2o6Dj3WQ7KeQCj3cA==} @@ -7201,8 +7172,8 @@ packages: engines: {node: '>=8.9.0'} hasBin: true - tailwindcss@3.4.14: - resolution: {integrity: sha512-IcSvOcTRcUtQQ7ILQL5quRDg7Xs93PdJEk1ZLbhhvJc7uj/OAhYOnruEiwnGgBvUtaUAJ8/mhSw1o8L2jCiENA==} + tailwindcss@3.4.15: + resolution: {integrity: sha512-r4MeXnfBmSOuKUWmXe6h2CcyfzJCEk4F0pptO5jlnYSIViUkVmsawj80N5h2lO3gwcmSb4n3PuN+e+GC1Guylw==} engines: {node: '>=14.0.0'} hasBin: true @@ -7896,14 +7867,14 @@ snapshots: dependencies: '@ampproject/remapping': 2.3.0 '@babel/code-frame': 7.25.7 - '@babel/generator': 7.25.7 + '@babel/generator': 7.26.2 '@babel/helper-compilation-targets': 7.25.7 '@babel/helper-module-transforms': 7.25.7(@babel/core@7.25.8) '@babel/helpers': 7.25.7 - '@babel/parser': 7.25.8 - '@babel/template': 7.25.7 - '@babel/traverse': 7.25.7 - '@babel/types': 7.25.8 + '@babel/parser': 7.26.2 + '@babel/template': 7.25.9 + '@babel/traverse': 7.25.9 + '@babel/types': 7.26.0 convert-source-map: 2.0.0 debug: 4.3.7 gensync: 1.0.0-beta.2 @@ -7939,13 +7910,6 @@ snapshots: source-map: 0.5.7 optional: true - '@babel/generator@7.25.7': - dependencies: - '@babel/types': 7.26.0 - '@jridgewell/gen-mapping': 0.3.5 - '@jridgewell/trace-mapping': 0.3.25 - jsesc: 3.0.2 - '@babel/generator@7.26.2': dependencies: '@babel/parser': 7.26.2 @@ -8058,7 +8022,7 @@ snapshots: '@babel/core': 7.25.8 '@babel/helper-module-imports': 7.25.7 '@babel/helper-simple-access': 7.25.7 - '@babel/helper-validator-identifier': 7.25.7 + '@babel/helper-validator-identifier': 7.25.9 '@babel/traverse': 7.25.9 transitivePeerDependencies: - supports-color @@ -8126,14 +8090,10 @@ snapshots: '@babel/helper-string-parser@7.24.8': {} - '@babel/helper-string-parser@7.25.7': {} - '@babel/helper-string-parser@7.25.9': {} '@babel/helper-validator-identifier@7.24.7': {} - '@babel/helper-validator-identifier@7.25.7': {} - '@babel/helper-validator-identifier@7.25.9': {} '@babel/helper-validator-option@7.25.9': {} @@ -8163,10 +8123,6 @@ snapshots: js-tokens: 4.0.0 picocolors: 1.1.1 - '@babel/parser@7.25.8': - dependencies: - '@babel/types': 7.26.0 - '@babel/parser@7.26.1': dependencies: '@babel/types': 7.26.0 @@ -8679,12 +8635,6 @@ snapshots: dependencies: regenerator-runtime: 0.14.1 - '@babel/template@7.25.7': - dependencies: - '@babel/code-frame': 7.25.7 - '@babel/parser': 7.26.2 - '@babel/types': 7.26.0 - '@babel/template@7.25.9': dependencies: '@babel/code-frame': 7.26.0 @@ -8707,18 +8657,6 @@ snapshots: - supports-color optional: true - '@babel/traverse@7.25.7': - dependencies: - '@babel/code-frame': 7.25.7 - '@babel/generator': 7.26.2 - '@babel/parser': 7.26.2 - '@babel/template': 7.25.9 - '@babel/types': 7.26.0 - debug: 4.3.7 - globals: 11.12.0 - transitivePeerDependencies: - - supports-color - '@babel/traverse@7.25.9': dependencies: '@babel/code-frame': 7.26.0 @@ -8743,12 +8681,6 @@ snapshots: '@babel/helper-validator-identifier': 7.24.7 to-fast-properties: 2.0.0 - '@babel/types@7.25.8': - dependencies: - '@babel/helper-string-parser': 7.25.7 - '@babel/helper-validator-identifier': 7.25.7 - to-fast-properties: 2.0.0 - '@babel/types@7.26.0': dependencies: '@babel/helper-string-parser': 7.25.9 @@ -8887,29 +8819,29 @@ snapshots: '@ctrl/tinycolor@4.1.0': {} - '@dnd-kit/accessibility@3.1.0(react@19.0.0-rc-7ac8e612-20241113)': + '@dnd-kit/accessibility@3.1.0(react@19.0.0-rc-b01722d5-20241114)': dependencies: - react: 19.0.0-rc-7ac8e612-20241113 + react: 19.0.0-rc-b01722d5-20241114 tslib: 2.7.0 - '@dnd-kit/core@6.1.0(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)': + '@dnd-kit/core@6.1.0(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)': dependencies: - '@dnd-kit/accessibility': 3.1.0(react@19.0.0-rc-7ac8e612-20241113) - '@dnd-kit/utilities': 3.2.2(react@19.0.0-rc-7ac8e612-20241113) - react: 19.0.0-rc-7ac8e612-20241113 - react-dom: 19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113) + '@dnd-kit/accessibility': 3.1.0(react@19.0.0-rc-b01722d5-20241114) + '@dnd-kit/utilities': 3.2.2(react@19.0.0-rc-b01722d5-20241114) + react: 19.0.0-rc-b01722d5-20241114 + react-dom: 19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114) tslib: 2.7.0 - '@dnd-kit/sortable@8.0.0(@dnd-kit/core@6.1.0(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)': + '@dnd-kit/sortable@8.0.0(@dnd-kit/core@6.1.0(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)': dependencies: - '@dnd-kit/core': 6.1.0(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113) - '@dnd-kit/utilities': 3.2.2(react@19.0.0-rc-7ac8e612-20241113) - react: 19.0.0-rc-7ac8e612-20241113 + '@dnd-kit/core': 6.1.0(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114) + '@dnd-kit/utilities': 3.2.2(react@19.0.0-rc-b01722d5-20241114) + react: 19.0.0-rc-b01722d5-20241114 tslib: 2.7.0 - '@dnd-kit/utilities@3.2.2(react@19.0.0-rc-7ac8e612-20241113)': + '@dnd-kit/utilities@3.2.2(react@19.0.0-rc-b01722d5-20241114)': dependencies: - react: 19.0.0-rc-7ac8e612-20241113 + react: 19.0.0-rc-b01722d5-20241114 tslib: 2.7.0 '@dual-bundle/import-meta-resolve@4.1.0': {} @@ -8958,17 +8890,17 @@ snapshots: '@emotion/memoize@0.9.0': {} - '@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1)': + '@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1)': dependencies: '@babel/runtime': 7.25.6 '@emotion/babel-plugin': 11.12.0 '@emotion/cache': 11.13.1 '@emotion/serialize': 1.3.1 - '@emotion/use-insertion-effect-with-fallbacks': 1.1.0(react@19.0.0-rc-7ac8e612-20241113) + '@emotion/use-insertion-effect-with-fallbacks': 1.1.0(react@19.0.0-rc-b01722d5-20241114) '@emotion/utils': 1.4.0 '@emotion/weak-memoize': 0.4.0 hoist-non-react-statics: 3.3.2 - react: 19.0.0-rc-7ac8e612-20241113 + react: 19.0.0-rc-b01722d5-20241114 optionalDependencies: '@types/react': types-react@19.0.0-rc.1 @@ -8998,16 +8930,16 @@ snapshots: '@emotion/sheet@1.4.0': {} - '@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1)': + '@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1)': dependencies: '@babel/runtime': 7.25.6 '@emotion/babel-plugin': 11.12.0 '@emotion/is-prop-valid': 1.3.0 - '@emotion/react': 11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) + '@emotion/react': 11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) '@emotion/serialize': 1.3.1 - '@emotion/use-insertion-effect-with-fallbacks': 1.1.0(react@19.0.0-rc-7ac8e612-20241113) + '@emotion/use-insertion-effect-with-fallbacks': 1.1.0(react@19.0.0-rc-b01722d5-20241114) '@emotion/utils': 1.4.0 - react: 19.0.0-rc-7ac8e612-20241113 + react: 19.0.0-rc-b01722d5-20241114 optionalDependencies: '@types/react': types-react@19.0.0-rc.1 @@ -9015,9 +8947,9 @@ snapshots: '@emotion/unitless@0.9.0': {} - '@emotion/use-insertion-effect-with-fallbacks@1.1.0(react@19.0.0-rc-7ac8e612-20241113)': + '@emotion/use-insertion-effect-with-fallbacks@1.1.0(react@19.0.0-rc-b01722d5-20241114)': dependencies: - react: 19.0.0-rc-7ac8e612-20241113 + react: 19.0.0-rc-b01722d5-20241114 '@emotion/utils@1.4.0': {} @@ -9205,11 +9137,11 @@ snapshots: '@floating-ui/core': 1.6.1 '@floating-ui/utils': 0.2.2 - '@floating-ui/react-dom@2.1.2(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)': + '@floating-ui/react-dom@2.1.2(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)': dependencies: '@floating-ui/dom': 1.6.5 - react: 19.0.0-rc-7ac8e612-20241113 - react-dom: 19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113) + react: 19.0.0-rc-b01722d5-20241114 + react-dom: 19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114) '@floating-ui/utils@0.2.2': {} @@ -9339,105 +9271,105 @@ snapshots: monaco-editor: 0.52.0 state-local: 1.0.7 - '@monaco-editor/react@4.6.0(monaco-editor@0.52.0)(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)': + '@monaco-editor/react@4.6.0(monaco-editor@0.52.0)(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)': dependencies: '@monaco-editor/loader': 1.4.0(monaco-editor@0.52.0) monaco-editor: 0.52.0 - react: 19.0.0-rc-7ac8e612-20241113 - react-dom: 19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113) + react: 19.0.0-rc-b01722d5-20241114 + react-dom: 19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114) - '@mui/base@5.0.0-beta.61(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1)': + '@mui/base@5.0.0-beta.61(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1)': dependencies: '@babel/runtime': 7.26.0 - '@floating-ui/react-dom': 2.1.2(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113) + '@floating-ui/react-dom': 2.1.2(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114) '@mui/types': 7.2.19(types-react@19.0.0-rc.1) - '@mui/utils': 6.1.7(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) + '@mui/utils': 6.1.7(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) '@popperjs/core': 2.11.8 clsx: 2.1.1 prop-types: 15.8.1 - react: 19.0.0-rc-7ac8e612-20241113 - react-dom: 19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113) + react: 19.0.0-rc-b01722d5-20241114 + react-dom: 19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114) optionalDependencies: '@types/react': types-react@19.0.0-rc.1 '@mui/core-downloads-tracker@6.1.7': {} - '@mui/icons-material@6.1.7(@mui/material@6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1)': + '@mui/icons-material@6.1.7(@mui/material@6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1)': dependencies: '@babel/runtime': 7.26.0 - '@mui/material': 6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) - react: 19.0.0-rc-7ac8e612-20241113 + '@mui/material': 6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) + react: 19.0.0-rc-b01722d5-20241114 optionalDependencies: '@types/react': types-react@19.0.0-rc.1 - '@mui/lab@6.0.0-beta.15(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(@mui/material@6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1)': + '@mui/lab@6.0.0-beta.15(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(@mui/material@6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1)': dependencies: '@babel/runtime': 7.26.0 - '@mui/base': 5.0.0-beta.61(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) - '@mui/material': 6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) - '@mui/system': 6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) + '@mui/base': 5.0.0-beta.61(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) + '@mui/material': 6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) + '@mui/system': 6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) '@mui/types': 7.2.19(types-react@19.0.0-rc.1) - '@mui/utils': 6.1.7(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) + '@mui/utils': 6.1.7(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) clsx: 2.1.1 prop-types: 15.8.1 - react: 19.0.0-rc-7ac8e612-20241113 - react-dom: 19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113) + react: 19.0.0-rc-b01722d5-20241114 + react-dom: 19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114) optionalDependencies: - '@emotion/react': 11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) - '@emotion/styled': 11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) + '@emotion/react': 11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) + '@emotion/styled': 11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) '@types/react': types-react@19.0.0-rc.1 - '@mui/material@6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1)': + '@mui/material@6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1)': dependencies: '@babel/runtime': 7.26.0 '@mui/core-downloads-tracker': 6.1.7 - '@mui/system': 6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) + '@mui/system': 6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) '@mui/types': 7.2.19(types-react@19.0.0-rc.1) - '@mui/utils': 6.1.7(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) + '@mui/utils': 6.1.7(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) '@popperjs/core': 2.11.8 '@types/react-transition-group': 4.4.11 clsx: 2.1.1 csstype: 3.1.3 prop-types: 15.8.1 - react: 19.0.0-rc-7ac8e612-20241113 - react-dom: 19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113) + react: 19.0.0-rc-b01722d5-20241114 + react-dom: 19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114) react-is: 18.3.1 - react-transition-group: 4.4.5(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113) + react-transition-group: 4.4.5(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114) optionalDependencies: - '@emotion/react': 11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) - '@emotion/styled': 11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) + '@emotion/react': 11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) + '@emotion/styled': 11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) '@types/react': types-react@19.0.0-rc.1 - '@mui/private-theming@5.16.6(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1)': + '@mui/private-theming@5.16.6(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1)': dependencies: '@babel/runtime': 7.26.0 - '@mui/utils': 5.16.6(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) + '@mui/utils': 5.16.6(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) prop-types: 15.8.1 - react: 19.0.0-rc-7ac8e612-20241113 + react: 19.0.0-rc-b01722d5-20241114 optionalDependencies: '@types/react': types-react@19.0.0-rc.1 - '@mui/private-theming@6.1.7(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1)': + '@mui/private-theming@6.1.7(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1)': dependencies: '@babel/runtime': 7.26.0 - '@mui/utils': 6.1.7(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) + '@mui/utils': 6.1.7(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) prop-types: 15.8.1 - react: 19.0.0-rc-7ac8e612-20241113 + react: 19.0.0-rc-b01722d5-20241114 optionalDependencies: '@types/react': types-react@19.0.0-rc.1 - '@mui/styled-engine@5.16.6(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)': + '@mui/styled-engine@5.16.6(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)': dependencies: '@babel/runtime': 7.26.0 '@emotion/cache': 11.13.1 csstype: 3.1.3 prop-types: 15.8.1 - react: 19.0.0-rc-7ac8e612-20241113 + react: 19.0.0-rc-b01722d5-20241114 optionalDependencies: - '@emotion/react': 11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) - '@emotion/styled': 11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) + '@emotion/react': 11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) + '@emotion/styled': 11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) - '@mui/styled-engine@6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)': + '@mui/styled-engine@6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)': dependencies: '@babel/runtime': 7.26.0 '@emotion/cache': 11.13.1 @@ -9445,87 +9377,87 @@ snapshots: '@emotion/sheet': 1.4.0 csstype: 3.1.3 prop-types: 15.8.1 - react: 19.0.0-rc-7ac8e612-20241113 + react: 19.0.0-rc-b01722d5-20241114 optionalDependencies: - '@emotion/react': 11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) - '@emotion/styled': 11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) + '@emotion/react': 11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) + '@emotion/styled': 11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) - '@mui/system@5.16.7(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1)': + '@mui/system@5.16.7(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1)': dependencies: '@babel/runtime': 7.26.0 - '@mui/private-theming': 5.16.6(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) - '@mui/styled-engine': 5.16.6(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113) + '@mui/private-theming': 5.16.6(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) + '@mui/styled-engine': 5.16.6(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114) '@mui/types': 7.2.19(types-react@19.0.0-rc.1) - '@mui/utils': 5.16.6(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) + '@mui/utils': 5.16.6(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) clsx: 2.1.1 csstype: 3.1.3 prop-types: 15.8.1 - react: 19.0.0-rc-7ac8e612-20241113 + react: 19.0.0-rc-b01722d5-20241114 optionalDependencies: - '@emotion/react': 11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) - '@emotion/styled': 11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) + '@emotion/react': 11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) + '@emotion/styled': 11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) '@types/react': types-react@19.0.0-rc.1 - '@mui/system@6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1)': + '@mui/system@6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1)': dependencies: '@babel/runtime': 7.26.0 - '@mui/private-theming': 6.1.7(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) - '@mui/styled-engine': 6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113) + '@mui/private-theming': 6.1.7(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) + '@mui/styled-engine': 6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114) '@mui/types': 7.2.19(types-react@19.0.0-rc.1) - '@mui/utils': 6.1.7(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) + '@mui/utils': 6.1.7(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) clsx: 2.1.1 csstype: 3.1.3 prop-types: 15.8.1 - react: 19.0.0-rc-7ac8e612-20241113 + react: 19.0.0-rc-b01722d5-20241114 optionalDependencies: - '@emotion/react': 11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) - '@emotion/styled': 11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) + '@emotion/react': 11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) + '@emotion/styled': 11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) '@types/react': types-react@19.0.0-rc.1 '@mui/types@7.2.19(types-react@19.0.0-rc.1)': optionalDependencies: '@types/react': types-react@19.0.0-rc.1 - '@mui/utils@5.16.6(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1)': + '@mui/utils@5.16.6(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1)': dependencies: '@babel/runtime': 7.26.0 '@mui/types': 7.2.19(types-react@19.0.0-rc.1) '@types/prop-types': 15.7.13 clsx: 2.1.1 prop-types: 15.8.1 - react: 19.0.0-rc-7ac8e612-20241113 + react: 19.0.0-rc-b01722d5-20241114 react-is: 18.3.1 optionalDependencies: '@types/react': types-react@19.0.0-rc.1 - '@mui/utils@6.1.7(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1)': + '@mui/utils@6.1.7(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1)': dependencies: '@babel/runtime': 7.26.0 '@mui/types': 7.2.19(types-react@19.0.0-rc.1) '@types/prop-types': 15.7.13 clsx: 2.1.1 prop-types: 15.8.1 - react: 19.0.0-rc-7ac8e612-20241113 + react: 19.0.0-rc-b01722d5-20241114 react-is: 18.3.1 optionalDependencies: '@types/react': types-react@19.0.0-rc.1 - '@mui/x-date-pickers@7.9.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(@mui/material@6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(dayjs@1.11.13)(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1)': + '@mui/x-date-pickers@7.9.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(@mui/material@6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(dayjs@1.11.13)(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1)': dependencies: '@babel/runtime': 7.26.0 - '@mui/base': 5.0.0-beta.61(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) - '@mui/material': 6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) - '@mui/system': 5.16.7(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) - '@mui/utils': 5.16.6(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) + '@mui/base': 5.0.0-beta.61(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) + '@mui/material': 6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) + '@mui/system': 5.16.7(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) + '@mui/utils': 5.16.6(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) '@types/react-transition-group': 4.4.11 clsx: 2.1.1 prop-types: 15.8.1 - react: 19.0.0-rc-7ac8e612-20241113 - react-dom: 19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113) - react-transition-group: 4.4.5(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113) + react: 19.0.0-rc-b01722d5-20241114 + react-dom: 19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114) + react-transition-group: 4.4.5(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114) optionalDependencies: - '@emotion/react': 11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) - '@emotion/styled': 11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) + '@emotion/react': 11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) + '@emotion/styled': 11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) dayjs: 1.11.13 transitivePeerDependencies: - '@types/react' @@ -9813,82 +9745,82 @@ snapshots: '@radix-ui/primitive@1.1.0': {} - '@radix-ui/react-compose-refs@1.1.0(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1)': + '@radix-ui/react-compose-refs@1.1.0(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1)': dependencies: - react: 19.0.0-rc-7ac8e612-20241113 + react: 19.0.0-rc-b01722d5-20241114 optionalDependencies: '@types/react': types-react@19.0.0-rc.1 - '@radix-ui/react-context@1.1.1(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1)': + '@radix-ui/react-context@1.1.1(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1)': dependencies: - react: 19.0.0-rc-7ac8e612-20241113 + react: 19.0.0-rc-b01722d5-20241114 optionalDependencies: '@types/react': types-react@19.0.0-rc.1 - '@radix-ui/react-direction@1.1.0(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1)': + '@radix-ui/react-direction@1.1.0(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1)': dependencies: - react: 19.0.0-rc-7ac8e612-20241113 + react: 19.0.0-rc-b01722d5-20241114 optionalDependencies: '@types/react': types-react@19.0.0-rc.1 - '@radix-ui/react-portal@1.1.2(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1)': + '@radix-ui/react-portal@1.1.2(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1)': dependencies: - '@radix-ui/react-primitive': 2.0.0(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) - '@radix-ui/react-use-layout-effect': 1.1.0(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) - react: 19.0.0-rc-7ac8e612-20241113 - react-dom: 19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113) + '@radix-ui/react-primitive': 2.0.0(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) + '@radix-ui/react-use-layout-effect': 1.1.0(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) + react: 19.0.0-rc-b01722d5-20241114 + react-dom: 19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114) optionalDependencies: '@types/react': types-react@19.0.0-rc.1 - '@radix-ui/react-presence@1.1.1(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1)': + '@radix-ui/react-presence@1.1.1(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1)': dependencies: - '@radix-ui/react-compose-refs': 1.1.0(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) - '@radix-ui/react-use-layout-effect': 1.1.0(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) - react: 19.0.0-rc-7ac8e612-20241113 - react-dom: 19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113) + '@radix-ui/react-compose-refs': 1.1.0(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) + '@radix-ui/react-use-layout-effect': 1.1.0(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) + react: 19.0.0-rc-b01722d5-20241114 + react-dom: 19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114) optionalDependencies: '@types/react': types-react@19.0.0-rc.1 - '@radix-ui/react-primitive@2.0.0(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1)': + '@radix-ui/react-primitive@2.0.0(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1)': dependencies: - '@radix-ui/react-slot': 1.1.0(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) - react: 19.0.0-rc-7ac8e612-20241113 - react-dom: 19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113) + '@radix-ui/react-slot': 1.1.0(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) + react: 19.0.0-rc-b01722d5-20241114 + react-dom: 19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114) optionalDependencies: '@types/react': types-react@19.0.0-rc.1 - '@radix-ui/react-scroll-area@1.2.1(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1)': + '@radix-ui/react-scroll-area@1.2.1(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1)': dependencies: '@radix-ui/number': 1.1.0 '@radix-ui/primitive': 1.1.0 - '@radix-ui/react-compose-refs': 1.1.0(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) - '@radix-ui/react-context': 1.1.1(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) - '@radix-ui/react-direction': 1.1.0(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) - '@radix-ui/react-presence': 1.1.1(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) - '@radix-ui/react-primitive': 2.0.0(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) - '@radix-ui/react-use-callback-ref': 1.1.0(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) - '@radix-ui/react-use-layout-effect': 1.1.0(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) - react: 19.0.0-rc-7ac8e612-20241113 - react-dom: 19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113) + '@radix-ui/react-compose-refs': 1.1.0(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) + '@radix-ui/react-context': 1.1.1(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) + '@radix-ui/react-direction': 1.1.0(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) + '@radix-ui/react-presence': 1.1.1(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) + '@radix-ui/react-primitive': 2.0.0(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) + '@radix-ui/react-use-callback-ref': 1.1.0(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) + '@radix-ui/react-use-layout-effect': 1.1.0(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) + react: 19.0.0-rc-b01722d5-20241114 + react-dom: 19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114) optionalDependencies: '@types/react': types-react@19.0.0-rc.1 - '@radix-ui/react-slot@1.1.0(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1)': + '@radix-ui/react-slot@1.1.0(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1)': dependencies: - '@radix-ui/react-compose-refs': 1.1.0(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) - react: 19.0.0-rc-7ac8e612-20241113 + '@radix-ui/react-compose-refs': 1.1.0(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) + react: 19.0.0-rc-b01722d5-20241114 optionalDependencies: '@types/react': types-react@19.0.0-rc.1 - '@radix-ui/react-use-callback-ref@1.1.0(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1)': + '@radix-ui/react-use-callback-ref@1.1.0(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1)': dependencies: - react: 19.0.0-rc-7ac8e612-20241113 + react: 19.0.0-rc-b01722d5-20241114 optionalDependencies: '@types/react': types-react@19.0.0-rc.1 - '@radix-ui/react-use-layout-effect@1.1.0(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1)': + '@radix-ui/react-use-layout-effect@1.1.0(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1)': dependencies: - react: 19.0.0-rc-7ac8e612-20241113 + react: 19.0.0-rc-b01722d5-20241114 optionalDependencies: '@types/react': types-react@19.0.0-rc.1 @@ -10153,61 +10085,61 @@ snapshots: dependencies: defer-to-connect: 2.0.1 - '@tanstack/history@1.81.3': {} + '@tanstack/history@1.81.9': {} '@tanstack/match-sorter-utils@8.19.4': dependencies: remove-accents: 0.5.0 - '@tanstack/react-router@1.81.5(@tanstack/router-generator@1.79.0)(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)': + '@tanstack/react-router@1.81.9(@tanstack/router-generator@1.81.9)(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)': dependencies: - '@tanstack/history': 1.81.3 - '@tanstack/react-store': 0.5.6(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113) + '@tanstack/history': 1.81.9 + '@tanstack/react-store': 0.5.6(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114) jsesc: 3.0.2 - react: 19.0.0-rc-7ac8e612-20241113 - react-dom: 19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113) + react: 19.0.0-rc-b01722d5-20241114 + react-dom: 19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114) tiny-invariant: 1.3.3 tiny-warning: 1.0.3 optionalDependencies: - '@tanstack/router-generator': 1.79.0 + '@tanstack/router-generator': 1.81.9 - '@tanstack/react-store@0.5.6(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)': + '@tanstack/react-store@0.5.6(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)': dependencies: '@tanstack/store': 0.5.5 - react: 19.0.0-rc-7ac8e612-20241113 - react-dom: 19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113) - use-sync-external-store: 1.2.2(react@19.0.0-rc-7ac8e612-20241113) + react: 19.0.0-rc-b01722d5-20241114 + react-dom: 19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114) + use-sync-external-store: 1.2.2(react@19.0.0-rc-b01722d5-20241114) - '@tanstack/react-table@8.20.5(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)': + '@tanstack/react-table@8.20.5(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)': dependencies: '@tanstack/table-core': 8.20.5 - react: 19.0.0-rc-7ac8e612-20241113 - react-dom: 19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113) + react: 19.0.0-rc-b01722d5-20241114 + react-dom: 19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114) - '@tanstack/react-virtual@3.10.6(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)': + '@tanstack/react-virtual@3.10.6(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)': dependencies: '@tanstack/virtual-core': 3.10.6 - react: 19.0.0-rc-7ac8e612-20241113 - react-dom: 19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113) + react: 19.0.0-rc-b01722d5-20241114 + react-dom: 19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114) - '@tanstack/router-devtools@1.81.5(@tanstack/react-router@1.81.5(@tanstack/router-generator@1.79.0)(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113))(csstype@3.1.3)(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)': + '@tanstack/router-devtools@1.81.9(@tanstack/react-router@1.81.9(@tanstack/router-generator@1.81.9)(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114))(csstype@3.1.3)(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)': dependencies: - '@tanstack/react-router': 1.81.5(@tanstack/router-generator@1.79.0)(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113) + '@tanstack/react-router': 1.81.9(@tanstack/router-generator@1.81.9)(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114) clsx: 2.1.1 goober: 2.1.16(csstype@3.1.3) - react: 19.0.0-rc-7ac8e612-20241113 - react-dom: 19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113) + react: 19.0.0-rc-b01722d5-20241114 + react-dom: 19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114) transitivePeerDependencies: - csstype - '@tanstack/router-generator@1.79.0': + '@tanstack/router-generator@1.81.9': dependencies: - '@tanstack/virtual-file-routes': 1.64.0 + '@tanstack/virtual-file-routes': 1.81.9 prettier: 3.3.3 tsx: 4.19.2 zod: 3.23.8 - '@tanstack/router-plugin@1.79.0(vite@5.4.11(@types/node@22.9.0)(less@4.2.0)(sass-embedded@1.78.0)(sass@1.80.7)(stylus@0.62.0)(terser@5.36.0))(webpack-sources@3.2.3)': + '@tanstack/router-plugin@1.81.9(vite@5.4.11(@types/node@22.9.0)(less@4.2.0)(sass-embedded@1.78.0)(sass@1.80.7)(stylus@0.62.0)(terser@5.36.0))': dependencies: '@babel/core': 7.26.0 '@babel/generator': 7.26.2 @@ -10217,25 +10149,24 @@ snapshots: '@babel/template': 7.25.9 '@babel/traverse': 7.25.9 '@babel/types': 7.26.0 - '@tanstack/router-generator': 1.79.0 - '@tanstack/virtual-file-routes': 1.64.0 + '@tanstack/router-generator': 1.81.9 + '@tanstack/virtual-file-routes': 1.81.9 '@types/babel__core': 7.20.5 '@types/babel__generator': 7.6.8 '@types/babel__template': 7.4.4 '@types/babel__traverse': 7.20.6 babel-dead-code-elimination: 1.0.6 chokidar: 3.6.0 - unplugin: 1.14.1(webpack-sources@3.2.3) + unplugin: 1.16.0 zod: 3.23.8 optionalDependencies: vite: 5.4.11(@types/node@22.9.0)(less@4.2.0)(sass-embedded@1.78.0)(sass@1.80.7)(stylus@0.62.0)(terser@5.36.0) transitivePeerDependencies: - supports-color - - webpack-sources - '@tanstack/router-zod-adapter@1.81.5(@tanstack/react-router@1.81.5(@tanstack/router-generator@1.79.0)(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113))(zod@3.23.8)': + '@tanstack/router-zod-adapter@1.81.5(@tanstack/react-router@1.81.9(@tanstack/router-generator@1.81.9)(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114))(zod@3.23.8)': dependencies: - '@tanstack/react-router': 1.81.5(@tanstack/router-generator@1.79.0)(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113) + '@tanstack/react-router': 1.81.9(@tanstack/router-generator@1.81.9)(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114) zod: 3.23.8 '@tanstack/store@0.5.5': {} @@ -10244,7 +10175,7 @@ snapshots: '@tanstack/virtual-core@3.10.6': {} - '@tanstack/virtual-file-routes@1.64.0': {} + '@tanstack/virtual-file-routes@1.81.9': {} '@taplo/core@0.1.1': {} @@ -10799,14 +10730,14 @@ snapshots: clean-stack: 5.2.0 indent-string: 5.0.0 - ahooks@3.8.1(react@19.0.0-rc-7ac8e612-20241113): + ahooks@3.8.1(react@19.0.0-rc-b01722d5-20241114): dependencies: '@babel/runtime': 7.25.6 dayjs: 1.11.13 intersection-observer: 0.12.2 js-cookie: 3.0.5 lodash: 4.17.21 - react: 19.0.0-rc-7ac8e612-20241113 + react: 19.0.0-rc-b01722d5-20241114 react-fast-compare: 3.2.2 resize-observer-polyfill: 1.5.1 screenfull: 5.2.0 @@ -10848,16 +10779,16 @@ snapshots: json-schema-traverse: 1.0.0 require-from-string: 2.0.2 - allotment@1.20.2(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113): + allotment@1.20.2(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114): dependencies: classnames: 2.5.1 eventemitter3: 5.0.1 lodash.clamp: 4.0.3 lodash.debounce: 4.0.8 lodash.isequal: 4.5.0 - react: 19.0.0-rc-7ac8e612-20241113 - react-dom: 19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113) - use-resize-observer: 9.1.0(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113) + react: 19.0.0-rc-b01722d5-20241114 + react-dom: 19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114) + use-resize-observer: 9.1.0(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114) ansi-align@2.0.0: dependencies: @@ -12010,11 +11941,11 @@ snapshots: dependencies: eslint: 8.57.1 - eslint-config-standard@17.1.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.14.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1))(eslint-plugin-n@17.13.1(eslint@8.57.1))(eslint-plugin-promise@7.1.0(eslint@8.57.1))(eslint@8.57.1): + eslint-config-standard@17.1.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.14.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1))(eslint-plugin-n@17.13.2(eslint@8.57.1))(eslint-plugin-promise@7.1.0(eslint@8.57.1))(eslint@8.57.1): dependencies: eslint: 8.57.1 eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.14.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1) - eslint-plugin-n: 17.13.1(eslint@8.57.1) + eslint-plugin-n: 17.13.2(eslint@8.57.1) eslint-plugin-promise: 7.1.0(eslint@8.57.1) eslint-import-resolver-alias@1.1.2(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.14.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)): @@ -12079,7 +12010,7 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-plugin-n@17.13.1(eslint@8.57.1): + eslint-plugin-n@17.13.2(eslint@8.57.1): dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@8.57.1) enhanced-resolve: 5.17.1 @@ -12376,13 +12307,13 @@ snapshots: fraction.js@4.3.7: {} - framer-motion@12.0.0-alpha.1(@emotion/is-prop-valid@1.3.0)(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113): + framer-motion@12.0.0-alpha.1(@emotion/is-prop-valid@1.3.0)(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114): dependencies: tslib: 2.7.0 optionalDependencies: '@emotion/is-prop-valid': 1.3.0 - react: 19.0.0-rc-7ac8e612-20241113 - react-dom: 19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113) + react: 19.0.0-rc-b01722d5-20241114 + react-dom: 19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114) fs-extra@11.2.0: dependencies: @@ -13006,10 +12937,10 @@ snapshots: jju@1.4.0: {} - jotai@2.10.2(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1): + jotai@2.10.2(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1): optionalDependencies: '@types/react': types-react@19.0.0-rc.1 - react: 19.0.0-rc-7ac8e612-20241113 + react: 19.0.0-rc-b01722d5-20241114 js-cookie@2.2.1: {} @@ -13265,19 +13196,19 @@ snapshots: escape-string-regexp: 4.0.0 optional: true - material-react-table@3.0.1(u57lr24knr5e3r4x2lcbnwq4ky): + material-react-table@3.0.1(7rlni7wlschvjzcib5ynx7xdr4): dependencies: - '@emotion/react': 11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) - '@emotion/styled': 11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) - '@mui/icons-material': 6.1.7(@mui/material@6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) - '@mui/material': 6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) - '@mui/x-date-pickers': 7.9.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(@mui/material@6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(dayjs@1.11.13)(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) + '@emotion/react': 11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) + '@emotion/styled': 11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) + '@mui/icons-material': 6.1.7(@mui/material@6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) + '@mui/material': 6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) + '@mui/x-date-pickers': 7.9.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(@mui/material@6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(dayjs@1.11.13)(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) '@tanstack/match-sorter-utils': 8.19.4 - '@tanstack/react-table': 8.20.5(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113) - '@tanstack/react-virtual': 3.10.6(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113) + '@tanstack/react-table': 8.20.5(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114) + '@tanstack/react-virtual': 3.10.6(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114) highlight-words: 1.2.2 - react: 19.0.0-rc-7ac8e612-20241113 - react-dom: 19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113) + react: 19.0.0-rc-b01722d5-20241114 + react-dom: 19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114) mathml-tag-names@2.1.3: {} @@ -13568,7 +13499,7 @@ snapshots: mlly@1.7.1: dependencies: - acorn: 8.12.1 + acorn: 8.14.0 pathe: 1.1.2 pkg-types: 1.2.0 ufo: 1.5.4 @@ -13621,14 +13552,14 @@ snapshots: muggle-string@0.4.1: {} - mui-color-input@5.0.1(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(@mui/material@6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1): + mui-color-input@5.0.1(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(@mui/material@6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1): dependencies: '@ctrl/tinycolor': 4.1.0 - '@emotion/react': 11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) - '@emotion/styled': 11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) - '@mui/material': 6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) - react: 19.0.0-rc-7ac8e612-20241113 - react-dom: 19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113) + '@emotion/react': 11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) + '@emotion/styled': 11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) + '@mui/material': 6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) + react: 19.0.0-rc-b01722d5-20241114 + react-dom: 19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114) optionalDependencies: '@types/react': types-react@19.0.0-rc.1 @@ -13638,15 +13569,15 @@ snapshots: object-assign: 4.1.1 thenify-all: 1.6.0 - nano-css@5.6.2(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113): + nano-css@5.6.2(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114): dependencies: '@jridgewell/sourcemap-codec': 1.5.0 css-tree: 1.1.3 csstype: 3.1.3 fastest-stable-stringify: 2.0.2 inline-style-prefixer: 7.0.1 - react: 19.0.0-rc-7ac8e612-20241113 - react-dom: 19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113) + react: 19.0.0-rc-b01722d5-20241114 + react-dom: 19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114) rtl-css-js: 1.16.1 stacktrace-js: 2.0.2 stylis: 4.3.2 @@ -13856,7 +13787,7 @@ snapshots: dependencies: aggregate-error: 3.1.0 - p-retry@6.2.0: + p-retry@6.2.1: dependencies: '@types/retry': 0.12.2 is-network-error: 1.1.0 @@ -14200,50 +14131,50 @@ snapshots: - supports-color - utf-8-validate - react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113): + react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114): dependencies: - react: 19.0.0-rc-7ac8e612-20241113 - scheduler: 0.25.0-rc-7ac8e612-20241113 + react: 19.0.0-rc-b01722d5-20241114 + scheduler: 0.25.0-rc-b01722d5-20241114 - react-error-boundary@4.1.2(react@19.0.0-rc-7ac8e612-20241113): + react-error-boundary@4.1.2(react@19.0.0-rc-b01722d5-20241114): dependencies: '@babel/runtime': 7.25.7 - react: 19.0.0-rc-7ac8e612-20241113 + react: 19.0.0-rc-b01722d5-20241114 react-fast-compare@3.2.2: {} - react-fast-marquee@1.6.5(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113): + react-fast-marquee@1.6.5(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114): dependencies: - react: 19.0.0-rc-7ac8e612-20241113 - react-dom: 19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113) + react: 19.0.0-rc-b01722d5-20241114 + react-dom: 19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114) - react-hook-form-mui@7.4.0(eo2cymeyrphpxbqnoughhosimq): + react-hook-form-mui@7.4.0(omrmg3wjhnirawgnnz42g5mssm): dependencies: - '@mui/material': 6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) - react: 19.0.0-rc-7ac8e612-20241113 - react-hook-form: 7.52.1(react@19.0.0-rc-7ac8e612-20241113) + '@mui/material': 6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) + react: 19.0.0-rc-b01722d5-20241114 + react-hook-form: 7.52.1(react@19.0.0-rc-b01722d5-20241114) optionalDependencies: - '@mui/icons-material': 6.1.7(@mui/material@6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) - '@mui/x-date-pickers': 7.9.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(@mui/material@6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1))(dayjs@1.11.13)(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1) + '@mui/icons-material': 6.1.7(@mui/material@6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) + '@mui/x-date-pickers': 7.9.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(@mui/material@6.1.7(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1))(dayjs@1.11.13)(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1) - react-hook-form@7.52.1(react@19.0.0-rc-7ac8e612-20241113): + react-hook-form@7.52.1(react@19.0.0-rc-b01722d5-20241114): dependencies: - react: 19.0.0-rc-7ac8e612-20241113 + react: 19.0.0-rc-b01722d5-20241114 - react-i18next@15.1.1(i18next@23.16.5)(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113): + react-i18next@15.1.1(i18next@23.16.5)(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114): dependencies: '@babel/runtime': 7.26.0 html-parse-stringify: 3.0.1 i18next: 23.16.5 - react: 19.0.0-rc-7ac8e612-20241113 + react: 19.0.0-rc-b01722d5-20241114 optionalDependencies: - react-dom: 19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113) + react-dom: 19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114) react-is@16.13.1: {} react-is@18.3.1: {} - react-markdown@9.0.1(react@19.0.0-rc-7ac8e612-20241113)(types-react@19.0.0-rc.1): + react-markdown@9.0.1(react@19.0.0-rc-b01722d5-20241114)(types-react@19.0.0-rc.1): dependencies: '@types/hast': 3.0.4 '@types/react': types-react@19.0.0-rc.1 @@ -14251,7 +14182,7 @@ snapshots: hast-util-to-jsx-runtime: 2.3.0 html-url-attributes: 3.0.0 mdast-util-to-hast: 13.1.0 - react: 19.0.0-rc-7ac8e612-20241113 + react: 19.0.0-rc-b01722d5-20241114 remark-parse: 11.0.0 remark-rehype: 11.1.0 unified: 11.0.4 @@ -14262,27 +14193,27 @@ snapshots: react-refresh@0.14.2: {} - react-split-grid@1.0.4(react@19.0.0-rc-7ac8e612-20241113): + react-split-grid@1.0.4(react@19.0.0-rc-b01722d5-20241114): dependencies: prop-types: 15.8.1 - react: 19.0.0-rc-7ac8e612-20241113 + react: 19.0.0-rc-b01722d5-20241114 split-grid: 1.0.11 - react-transition-group@4.4.5(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113): + react-transition-group@4.4.5(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114): dependencies: '@babel/runtime': 7.26.0 dom-helpers: 5.2.1 loose-envify: 1.4.0 prop-types: 15.8.1 - react: 19.0.0-rc-7ac8e612-20241113 - react-dom: 19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113) + react: 19.0.0-rc-b01722d5-20241114 + react-dom: 19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114) - react-universal-interface@0.6.2(react@19.0.0-rc-7ac8e612-20241113)(tslib@2.7.0): + react-universal-interface@0.6.2(react@19.0.0-rc-b01722d5-20241114)(tslib@2.7.0): dependencies: - react: 19.0.0-rc-7ac8e612-20241113 + react: 19.0.0-rc-b01722d5-20241114 tslib: 2.7.0 - react-use@17.5.1(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113): + react-use@17.5.1(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114): dependencies: '@types/js-cookie': 2.2.7 '@xobotyi/scrollbar-width': 1.9.5 @@ -14290,10 +14221,10 @@ snapshots: fast-deep-equal: 3.1.3 fast-shallow-equal: 1.0.0 js-cookie: 2.2.1 - nano-css: 5.6.2(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113) - react: 19.0.0-rc-7ac8e612-20241113 - react-dom: 19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113) - react-universal-interface: 0.6.2(react@19.0.0-rc-7ac8e612-20241113)(tslib@2.7.0) + nano-css: 5.6.2(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114) + react: 19.0.0-rc-b01722d5-20241114 + react-dom: 19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114) + react-universal-interface: 0.6.2(react@19.0.0-rc-b01722d5-20241114)(tslib@2.7.0) resize-observer-polyfill: 1.5.1 screenfull: 5.2.0 set-harmonic-interval: 1.0.1 @@ -14301,7 +14232,7 @@ snapshots: ts-easing: 0.2.0 tslib: 2.7.0 - react@19.0.0-rc-7ac8e612-20241113: {} + react@19.0.0-rc-b01722d5-20241114: {} read-cache@1.0.0: dependencies: @@ -14624,7 +14555,7 @@ snapshots: sax@1.3.0: {} - scheduler@0.25.0-rc-7ac8e612-20241113: {} + scheduler@0.25.0-rc-b01722d5-20241114: {} screenfull@5.2.0: {} @@ -15035,11 +14966,11 @@ snapshots: svg-tags@1.0.0: {} - swr@2.2.5(react@19.0.0-rc-7ac8e612-20241113): + swr@2.2.5(react@19.0.0-rc-b01722d5-20241114): dependencies: client-only: 0.0.1 - react: 19.0.0-rc-7ac8e612-20241113 - use-sync-external-store: 1.2.2(react@19.0.0-rc-7ac8e612-20241113) + react: 19.0.0-rc-b01722d5-20241114 + use-sync-external-store: 1.2.2(react@19.0.0-rc-b01722d5-20241114) synckit@0.9.1: dependencies: @@ -15087,7 +15018,7 @@ snapshots: reduce-css-calc: 2.1.8 resolve: 1.22.8 - tailwindcss@3.4.14: + tailwindcss@3.4.15: dependencies: '@alloc/quick-lru': 5.2.0 arg: 5.0.2 @@ -15497,15 +15428,15 @@ snapshots: dependencies: prepend-http: 1.0.4 - use-resize-observer@9.1.0(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113): + use-resize-observer@9.1.0(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114): dependencies: '@juggle/resize-observer': 3.4.0 - react: 19.0.0-rc-7ac8e612-20241113 - react-dom: 19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113) + react: 19.0.0-rc-b01722d5-20241114 + react-dom: 19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114) - use-sync-external-store@1.2.2(react@19.0.0-rc-7ac8e612-20241113): + use-sync-external-store@1.2.2(react@19.0.0-rc-b01722d5-20241114): dependencies: - react: 19.0.0-rc-7ac8e612-20241113 + react: 19.0.0-rc-b01722d5-20241114 utf-8-validate@5.0.10: dependencies: @@ -15528,10 +15459,10 @@ snapshots: unist-util-stringify-position: 4.0.0 vfile-message: 4.0.2 - virtua@0.36.3(react-dom@19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113))(react@19.0.0-rc-7ac8e612-20241113): + virtua@0.36.3(react-dom@19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114))(react@19.0.0-rc-b01722d5-20241114): optionalDependencies: - react: 19.0.0-rc-7ac8e612-20241113 - react-dom: 19.0.0-rc-7ac8e612-20241113(react@19.0.0-rc-7ac8e612-20241113) + react: 19.0.0-rc-b01722d5-20241114 + react-dom: 19.0.0-rc-b01722d5-20241114(react@19.0.0-rc-b01722d5-20241114) vite-bundle-visualizer@1.2.1(rollup@4.21.0): dependencies: diff --git a/clash-nyanpasu/scripts/package.json b/clash-nyanpasu/scripts/package.json index 8eedadae85..029a60f494 100644 --- a/clash-nyanpasu/scripts/package.json +++ b/clash-nyanpasu/scripts/package.json @@ -7,7 +7,7 @@ "@types/figlet": "1.7.0", "figlet": "1.8.0", "filesize": "10.1.6", - "p-retry": "6.2.0" + "p-retry": "6.2.1" }, "devDependencies": { "@octokit/types": "13.6.1", diff --git a/lede/include/image-commands.mk b/lede/include/image-commands.mk index 6afb76ef8a..c8247046a2 100644 --- a/lede/include/image-commands.mk +++ b/lede/include/image-commands.mk @@ -141,6 +141,20 @@ define Build/append-ubi rm $@.tmp endef +define Build/ubinize-image + sh $(TOPDIR)/scripts/ubinize-image.sh \ + $(if $(UBOOTENV_IN_UBI),--uboot-env) \ + $(foreach part,$(UBINIZE_PARTS),--part $(part)) \ + --part $(word 1,$(1))="$(BIN_DIR)/$(DEVICE_IMG_PREFIX)-$(word 2,$(1))" \ + $@.tmp \ + -p $(BLOCKSIZE:%k=%KiB) -m $(PAGESIZE) \ + $(if $(SUBPAGESIZE),-s $(SUBPAGESIZE)) \ + $(if $(VID_HDR_OFFSET),-O $(VID_HDR_OFFSET)) \ + $(UBINIZE_OPTS) + cat $@.tmp >> $@ + rm $@.tmp +endef + define Build/ubinize-kernel cp $@ $@.tmp sh $(TOPDIR)/scripts/ubinize-image.sh \ diff --git a/lede/package/boot/uboot-envtools/files/mediatek_filogic b/lede/package/boot/uboot-envtools/files/mediatek_filogic index 8a33f59672..8f04d75c4d 100644 --- a/lede/package/boot/uboot-envtools/files/mediatek_filogic +++ b/lede/package/boot/uboot-envtools/files/mediatek_filogic @@ -13,6 +13,7 @@ board=$(board_name) case "$board" in bananapi,bpi-r3|\ +bananapi,bpi-r3-mini|\ bananapi,bpi-r4|\ bananapi,bpi-r4-poe) case "$(cmdline_get_var root)" in @@ -40,6 +41,9 @@ cetron,ct3003|\ imou,lc-hx3001) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000" ;; +konka,komi-a31) + ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x20000" "0x80000" "1" + ;; glinet,gl-mt2500|\ glinet,gl-mt6000) local envdev=$(find_mmc_part "u-boot-env") diff --git a/lede/package/boot/uboot-mediatek/Makefile b/lede/package/boot/uboot-mediatek/Makefile index 4f3041c0ca..da5a1708aa 100644 --- a/lede/package/boot/uboot-mediatek/Makefile +++ b/lede/package/boot/uboot-mediatek/Makefile @@ -135,6 +135,14 @@ define U-Boot/mt7622_ubnt_unifi-6-lr FIP_COMPRESS:=1 endef +define U-Boot/mt7622_xiaomi_redmi-router-ax6s-ubi-loader + NAME:=Xiaomi Redmi Router AX6S (as UBI loader) + UBOOT_CONFIG:=mt7622_xiaomi_redmi-router-ax6s-ubi-loader + BUILD_DEVICES:=xiaomi_redmi-router-ax6s + BUILD_SUBTARGET:=mt7622 + UBOOT_IMAGE:=u-boot.bin +endef + define U-Boot/mt7623a_unielec_u7623 NAME:=UniElec U7623 (mt7623) BUILD_DEVICES:=unielec_u7623-02 @@ -296,6 +304,30 @@ define U-Boot/mt7986_bananapi_bpi-r3-nor FIP_COMPRESS:=1 endef +define U-Boot/mt7986_bananapi_bpi-r3-mini-emmc + NAME:=BananaPi BPi-R3 + BUILD_SUBTARGET:=filogic + BUILD_DEVICES:=bananapi_bpi-r3-mini + UBOOT_CONFIG:=mt7986a_bpi-r3-mini-emmc + UBOOT_IMAGE:=u-boot.fip + BL2_BOOTDEV:=emmc + BL2_SOC:=mt7986 + BL2_DDRTYPE:=ddr4 + DEPENDS:=+trusted-firmware-a-mt7986-emmc-ddr4 +endef + +define U-Boot/mt7986_bananapi_bpi-r3-mini-snand + NAME:=BananaPi BPi-R3 + BUILD_SUBTARGET:=filogic + BUILD_DEVICES:=bananapi_bpi-r3-mini + UBOOT_CONFIG:=mt7986a_bpi-r3-mini-snand + UBOOT_IMAGE:=u-boot.fip + BL2_BOOTDEV:=spim-nand-ubi + BL2_SOC:=mt7986 + BL2_DDRTYPE:=ddr4 + DEPENDS:=+trusted-firmware-a-mt7986-spim-nand-ubi-ddr4 +endef + define U-Boot/mt7988_bananapi_bpi-r4-emmc NAME:=BananaPi BPi-R4 BUILD_SUBTARGET:=filogic @@ -440,6 +472,7 @@ UBOOT_TARGETS := \ mt7622_linksys_e8450 \ mt7622_rfb1 \ mt7622_ubnt_unifi-6-lr \ + mt7622_xiaomi_redmi-router-ax6s-ubi-loader \ mt7623n_bpir2 \ mt7623a_unielec_u7623 \ mt7628_rfb \ @@ -454,6 +487,8 @@ UBOOT_TARGETS := \ mt7986_bananapi_bpi-r3-sdmmc \ mt7986_bananapi_bpi-r3-snand \ mt7986_bananapi_bpi-r3-nor \ + mt7986_bananapi_bpi-r3-mini-emmc \ + mt7986_bananapi_bpi-r3-mini-snand \ mt7986_rfb \ mt7988_bananapi_bpi-r4-emmc \ mt7988_bananapi_bpi-r4-sdmmc \ diff --git a/lede/package/boot/uboot-mediatek/patches/160-net-phy-add-support-for-Airoha-ethernet-PHY-driver.patch b/lede/package/boot/uboot-mediatek/patches/160-net-phy-add-support-for-Airoha-ethernet-PHY-driver.patch new file mode 100644 index 0000000000..f8e8659952 --- /dev/null +++ b/lede/package/boot/uboot-mediatek/patches/160-net-phy-add-support-for-Airoha-ethernet-PHY-driver.patch @@ -0,0 +1,1929 @@ +From 70157a6148ad47734f1dc646b4157ca83cc5df9f Mon Sep 17 00:00:00 2001 +From: Weijie Gao +Date: Thu, 13 Jul 2023 16:34:48 +0800 +Subject: [PATCH] net: phy: add support for Airoha ethernet PHY driver + +This patch adds support for Airoha ethernet PHY driver. + +If GMAC2 of your board connects to Airoha EN8801S, please change the eth +node as follow: + +ð { + status = "okay"; + mediatek,gmac-id = <1>; + mediatek,sgmiisys = <&sgmiisys1>; + phy-mode = "sgmii"; + phy-handle = <&phy5>; + + phy5: eth-phy@5 { + reg = <24>; + }; +}; + +If GMAC2 of your board connects to Airoha EN8811H, please change the eth +node as follow: + +ð { + status = "okay"; + mediatek,gmac-id = <1>; + mediatek,sgmiisys = <&sgmiisys1>; + phy-mode = "2500base-x"; + phy-handle = <&phy5>; + + fixed-link { + speed = <2500>; + full-duplex; + }; + + phy5: eth-phy@5 { + reg = <15>; + }; +}; + +Signed-off-by: Weijie Gao +--- + .../drivers/net/phy/Kconfig | 15 + + .../drivers/net/phy/Makefile | 2 + + .../drivers/net/phy/air_en8801s.c | 633 ++ + .../drivers/net/phy/air_en8801s.h | 267 + + .../drivers/net/phy/air_en8811h.c | 649 ++ + .../drivers/net/phy/air_en8811h.h | 160 + + .../drivers/net/phy/air_en8811h_fw.h | 9227 +++++++++++++++++ + 7 files changed, 10953 insertions(+) + create mode 100644 drivers/net/phy/air_en8801s.c + create mode 100644 drivers/net/phy/air_en8801s.h + create mode 100644 drivers/net/phy/air_en8811h.c + create mode 100644 drivers/net/phy/air_en8811h.h + create mode 100644 drivers/net/phy/air_en8811h_fw.h + +--- a/drivers/net/phy/Kconfig ++++ b/drivers/net/phy/Kconfig +@@ -77,6 +77,37 @@ config PHY_ADIN + help + Add support for configuring RGMII on Analog Devices ADIN PHYs. + ++menuconfig PHY_AIROHA ++ bool "Airoha Ethernet PHYs support" ++ ++config PHY_AIROHA_EN8801S ++ bool "Airoha Ethernet EN8801S support" ++ depends on PHY_AIROHA ++ help ++ AIROHA EN8801S supported. ++ ++config PHY_AIROHA_EN8811H ++ bool "Airoha Ethernet EN8811H support" ++ depends on PHY_AIROHA ++ help ++ AIROHA EN8811H supported. ++ ++choice ++ prompt "Location of the Airoha PHY firmware" ++ default PHY_AIROHA_FW_IN_UBI ++ depends on PHY_AIROHA_EN8811H ++ ++config PHY_AIROHA_FW_IN_MMC ++ bool "Airoha firmware in MMC boot1 partition" ++ ++config PHY_AIROHA_FW_IN_UBI ++ bool "Airoha firmware in UBI volume en8811h-fw on NAND flash" ++ ++config PHY_AIROHA_FW_IN_MTD ++ bool "Airoha firmware in MTD partition on raw flash" ++ ++endchoice ++ + menuconfig PHY_AQUANTIA + bool "Aquantia Ethernet PHYs support" + select PHY_GIGE +--- a/drivers/net/phy/Makefile ++++ b/drivers/net/phy/Makefile +@@ -11,6 +11,8 @@ obj-$(CONFIG_MV88E6352_SWITCH) += mv88e6 + obj-$(CONFIG_PHYLIB) += phy.o + obj-$(CONFIG_PHYLIB_10G) += generic_10g.o + obj-$(CONFIG_PHY_ADIN) += adin.o ++obj-$(CONFIG_PHY_AIROHA_EN8801S) += air_en8801s.o ++obj-$(CONFIG_PHY_AIROHA_EN8811H) += air_en8811h.o + obj-$(CONFIG_PHY_AQUANTIA) += aquantia.o + obj-$(CONFIG_PHY_ATHEROS) += atheros.o + obj-$(CONFIG_PHY_BROADCOM) += broadcom.o +--- /dev/null ++++ b/drivers/net/phy/air_en8801s.c +@@ -0,0 +1,633 @@ ++// SPDX-License-Identifier: GPL-2.0 ++/************************************************* ++ * FILE NAME: air_en8801s.c ++ * PURPOSE: ++ * EN8801S PHY Driver for Uboot ++ * NOTES: ++ * ++ * Copyright (C) 2023 Airoha Technology Corp. ++ *************************************************/ ++ ++/* INCLUDE FILE DECLARATIONS ++ */ ++#include ++#include ++#include ++#include ++#include "air_en8801s.h" ++ ++#if AIR_UBOOT_REVISION > 0x202004 ++#include ++#endif ++ ++static struct phy_device *s_phydev = 0; ++/****************************************************** ++ * The following led_cfg example is for reference only. ++ * LED5 1000M/LINK/ACT (GPIO5) <-> BASE_T_LED0, ++ * LED6 10/100M/LINK/ACT (GPIO9) <-> BASE_T_LED1, ++ * LED4 100M/LINK/ACT (GPIO8) <-> BASE_T_LED2, ++ ******************************************************/ ++/* User-defined.B */ ++#define AIR_LED_SUPPORT ++#ifdef AIR_LED_SUPPORT ++static const AIR_BASE_T_LED_CFG_T led_cfg[4] = ++{ ++ /* ++ * LED Enable, GPIO, LED Polarity, LED ON, LED Blink ++ */ ++ {LED_ENABLE, 5, AIR_ACTIVE_LOW, BASE_T_LED0_ON_CFG, BASE_T_LED0_BLK_CFG}, /* BASE-T LED0 */ ++ {LED_ENABLE, 9, AIR_ACTIVE_LOW, BASE_T_LED1_ON_CFG, BASE_T_LED1_BLK_CFG}, /* BASE-T LED1 */ ++ {LED_ENABLE, 8, AIR_ACTIVE_LOW, BASE_T_LED2_ON_CFG, BASE_T_LED2_BLK_CFG}, /* BASE-T LED2 */ ++ {LED_DISABLE, 1, AIR_ACTIVE_LOW, BASE_T_LED3_ON_CFG, BASE_T_LED3_BLK_CFG} /* BASE-T LED3 */ ++}; ++static const u16 led_dur = UNIT_LED_BLINK_DURATION << AIR_LED_BLK_DUR_64M; ++#endif ++/* User-defined.E */ ++/************************************************************************ ++ * F U N C T I O N S ++ ************************************************************************/ ++/* Airoha MII read function */ ++static int airoha_cl22_read(struct mii_dev *bus, int phy_addr, int phy_register) ++{ ++ int read_data = bus->read(bus, phy_addr, MDIO_DEVAD_NONE, phy_register); ++ ++ if (read_data < 0) ++ return -EIO; ++ return read_data; ++} ++ ++/* Airoha MII write function */ ++static int airoha_cl22_write(struct mii_dev *bus, int phy_addr, int phy_register, int write_data) ++{ ++ int ret = bus->write(bus, phy_addr, MDIO_DEVAD_NONE, phy_register, write_data); ++ ++ return ret; ++} ++ ++static int airoha_cl45_write(struct phy_device *phydev, int devad, int reg, int val) ++{ ++ int ret = 0; ++ ++ ret = phy_write(phydev, MDIO_DEVAD_NONE, MII_MMD_ACC_CTL_REG, devad); ++ AIR_RTN_ERR(ret); ++ ret = phy_write(phydev, MDIO_DEVAD_NONE, MII_MMD_ADDR_DATA_REG, reg); ++ AIR_RTN_ERR(ret); ++ ret = phy_write(phydev, MDIO_DEVAD_NONE, MII_MMD_ACC_CTL_REG, MMD_OP_MODE_DATA | devad); ++ AIR_RTN_ERR(ret); ++ ret = phy_write(phydev, MDIO_DEVAD_NONE, MII_MMD_ADDR_DATA_REG, val); ++ AIR_RTN_ERR(ret); ++ return ret; ++} ++ ++static int airoha_cl45_read(struct phy_device *phydev, int devad, int reg) ++{ ++ int read_data, ret; ++ ++ ret = phy_write(phydev, MDIO_DEVAD_NONE, MII_MMD_ACC_CTL_REG, devad); ++ AIR_RTN_ERR(ret); ++ ret = phy_write(phydev, MDIO_DEVAD_NONE, MII_MMD_ADDR_DATA_REG, reg); ++ AIR_RTN_ERR(ret); ++ ret = phy_write(phydev, MDIO_DEVAD_NONE, MII_MMD_ACC_CTL_REG, MMD_OP_MODE_DATA | devad); ++ AIR_RTN_ERR(ret); ++ read_data = phy_read(phydev, MDIO_DEVAD_NONE, MII_MMD_ADDR_DATA_REG); ++ if (read_data < 0) ++ return -EIO; ++ return read_data; ++} ++ ++/* EN8801 PBUS write function */ ++int airoha_pbus_write(struct mii_dev *bus, int pbus_addr, int pbus_reg, unsigned long pbus_data) ++{ ++ int ret = 0; ++ ++ ret = airoha_cl22_write(bus, pbus_addr, 0x1F, (pbus_reg >> 6)); ++ AIR_RTN_ERR(ret); ++ ret = airoha_cl22_write(bus, pbus_addr, ((pbus_reg >> 2) & 0xf), (pbus_data & 0xFFFF)); ++ AIR_RTN_ERR(ret); ++ ret = airoha_cl22_write(bus, pbus_addr, 0x10, (pbus_data >> 16)); ++ AIR_RTN_ERR(ret); ++ return ret; ++} ++ ++/* EN8801 PBUS read function */ ++unsigned long airoha_pbus_read(struct mii_dev *bus, int pbus_addr, int pbus_reg) ++{ ++ unsigned long pbus_data; ++ unsigned int pbus_data_low, pbus_data_high; ++ ++ airoha_cl22_write(bus, pbus_addr, 0x1F, (pbus_reg >> 6)); ++ pbus_data_low = airoha_cl22_read(bus, pbus_addr, ((pbus_reg >> 2) & 0xf)); ++ pbus_data_high = airoha_cl22_read(bus, pbus_addr, 0x10); ++ pbus_data = (pbus_data_high << 16) + pbus_data_low; ++ return pbus_data; ++} ++ ++/* Airoha Token Ring Write function */ ++static int airoha_tr_reg_write(struct phy_device *phydev, unsigned long tr_address, unsigned long tr_data) ++{ ++ int ret; ++ ++ ret = phy_write(phydev, MDIO_DEVAD_NONE, 0x1F, 0x52b5); /* page select */ ++ AIR_RTN_ERR(ret); ++ ret = phy_write(phydev, MDIO_DEVAD_NONE, 0x11, (int)(tr_data & 0xffff)); ++ AIR_RTN_ERR(ret); ++ ret = phy_write(phydev, MDIO_DEVAD_NONE, 0x12, (int)(tr_data >> 16)); ++ AIR_RTN_ERR(ret); ++ ret = phy_write(phydev, MDIO_DEVAD_NONE, 0x10, (int)(tr_address | TrReg_WR)); ++ AIR_RTN_ERR(ret); ++ ret = phy_write(phydev, MDIO_DEVAD_NONE, 0x1F, 0x0); /* page resetore */ ++ AIR_RTN_ERR(ret); ++ return ret; ++} ++ ++int airoha_phy_process(void) ++{ ++ int ret = 0, pbus_addr = EN8801S_PBUS_PHY_ID; ++ unsigned long pbus_data; ++ struct mii_dev *mbus; ++ ++ mbus = s_phydev->bus; ++ pbus_data = airoha_pbus_read(mbus, pbus_addr, 0x19e0); ++ pbus_data |= BIT(0); ++ ret = airoha_pbus_write(mbus, pbus_addr, 0x19e0, pbus_data); ++ if(ret) ++ printf("error: airoha_pbus_write fail ret: %d\n", ret); ++ pbus_data = airoha_pbus_read(mbus, pbus_addr, 0x19e0); ++ pbus_data &= ~BIT(0); ++ ret = airoha_pbus_write(mbus, pbus_addr, 0x19e0, pbus_data); ++ if(ret) ++ printf("error: airoha_pbus_write fail ret: %d\n", ret); ++ ++ if(ret) ++ printf("error: FCM regs reset fail, ret: %d\n", ret); ++ else ++ debug("FCM regs reset successful\n"); ++ return ret; ++} ++ ++#ifdef AIR_LED_SUPPORT ++static int airoha_led_set_usr_def(struct phy_device *phydev, u8 entity, int polar, ++ u16 on_evt, u16 blk_evt) ++{ ++ int ret = 0; ++ ++ if (AIR_ACTIVE_HIGH == polar) { ++ on_evt |= LED_ON_POL; ++ } else { ++ on_evt &= ~LED_ON_POL; ++ } ++ ret = airoha_cl45_write(phydev, 0x1f, LED_ON_CTRL(entity), on_evt | LED_ON_EN); ++ AIR_RTN_ERR(ret); ++ ret = airoha_cl45_write(phydev, 0x1f, LED_BLK_CTRL(entity), blk_evt); ++ AIR_RTN_ERR(ret); ++ return 0; ++} ++ ++static int airoha_led_set_mode(struct phy_device *phydev, u8 mode) ++{ ++ u16 cl45_data; ++ int err = 0; ++ ++ cl45_data = airoha_cl45_read(phydev, 0x1f, LED_BCR); ++ switch (mode) { ++ case AIR_LED_MODE_DISABLE: ++ cl45_data &= ~LED_BCR_EXT_CTRL; ++ cl45_data &= ~LED_BCR_MODE_MASK; ++ cl45_data |= LED_BCR_MODE_DISABLE; ++ break; ++ case AIR_LED_MODE_USER_DEFINE: ++ cl45_data |= LED_BCR_EXT_CTRL; ++ cl45_data |= LED_BCR_CLK_EN; ++ break; ++ default: ++ printf("LED mode%d is not supported!\n", mode); ++ return -EINVAL; ++ } ++ err = airoha_cl45_write(phydev, 0x1f, LED_BCR, cl45_data); ++ AIR_RTN_ERR(err); ++ return 0; ++} ++ ++static int airoha_led_set_state(struct phy_device *phydev, u8 entity, u8 state) ++{ ++ u16 cl45_data; ++ int err; ++ ++ cl45_data = airoha_cl45_read(phydev, 0x1f, LED_ON_CTRL(entity)); ++ if (LED_ENABLE == state) { ++ cl45_data |= LED_ON_EN; ++ } else { ++ cl45_data &= ~LED_ON_EN; ++ } ++ ++ err = airoha_cl45_write(phydev, 0x1f, LED_ON_CTRL(entity), cl45_data); ++ AIR_RTN_ERR(err); ++ return 0; ++} ++ ++static int en8801s_led_init(struct phy_device *phydev) ++{ ++ ++ unsigned long led_gpio = 0, reg_value = 0; ++ int ret = 0, led_id; ++ struct mii_dev *mbus = phydev->bus; ++ int gpio_led_rg[3] = {0x1870, 0x1874, 0x1878}; ++ u16 cl45_data = led_dur; ++ ++ ret = airoha_cl45_write(phydev, 0x1f, LED_BLK_DUR, cl45_data); ++ AIR_RTN_ERR(ret); ++ cl45_data >>= 1; ++ ret = airoha_cl45_write(phydev, 0x1f, LED_ON_DUR, cl45_data); ++ AIR_RTN_ERR(ret); ++ ret = airoha_led_set_mode(phydev, AIR_LED_MODE_USER_DEFINE); ++ if (ret != 0) { ++ printf("LED fail to set mode, ret %d !\n", ret); ++ return ret; ++ } ++ for(led_id = 0; led_id < EN8801S_LED_COUNT; led_id++) { ++ reg_value = 0; ++ ret = airoha_led_set_state(phydev, led_id, led_cfg[led_id].en); ++ if (ret != 0) { ++ printf("LED fail to set state, ret %d !\n", ret); ++ return ret; ++ } ++ if (LED_ENABLE == led_cfg[led_id].en) { ++ if ( (led_cfg[led_id].gpio < 0) || led_cfg[led_id].gpio > 9) { ++ printf("GPIO%d is out of range!! GPIO number is 0~9.\n", led_cfg[led_id].gpio); ++ return -EIO; ++ } ++ led_gpio |= BIT(led_cfg[led_id].gpio); ++ reg_value = airoha_pbus_read(mbus, EN8801S_PBUS_PHY_ID, gpio_led_rg[led_cfg[led_id].gpio / 4]); ++ LED_SET_GPIO_SEL(led_cfg[led_id].gpio, led_id, reg_value); ++ debug("[Airoha] gpio%d, reg_value 0x%lx\n", led_cfg[led_id].gpio, reg_value); ++ ret = airoha_pbus_write(mbus, EN8801S_PBUS_PHY_ID, gpio_led_rg[led_cfg[led_id].gpio / 4], reg_value); ++ AIR_RTN_ERR(ret); ++ ret = airoha_led_set_usr_def(phydev, led_id, led_cfg[led_id].pol, led_cfg[led_id].on_cfg, led_cfg[led_id].blk_cfg); ++ if (ret != 0) { ++ printf("LED fail to set usr def, ret %d !\n", ret); ++ return ret; ++ } ++ } ++ } ++ reg_value = (airoha_pbus_read(mbus, EN8801S_PBUS_PHY_ID, 0x1880) & ~led_gpio); ++ ret = airoha_pbus_write(mbus, EN8801S_PBUS_PHY_ID, 0x1880, reg_value); ++ AIR_RTN_ERR(ret); ++ ret = airoha_pbus_write(mbus, EN8801S_PBUS_PHY_ID, 0x186c, led_gpio); ++ AIR_RTN_ERR(ret); ++ ++ printf("LED initialize OK !\n"); ++ return 0; ++} ++#endif /* AIR_LED_SUPPORT */ ++ ++static int en8801s_config(struct phy_device *phydev) ++{ ++ int reg_value = 0, ret = 0; ++ struct mii_dev *mbus = phydev->bus; ++ int retry, pbus_addr = EN8801S_PBUS_DEFAULT_ID; ++ int phy_addr = EN8801S_MDIO_PHY_ID; ++ unsigned long pbus_data = 0; ++ gephy_all_REG_LpiReg1Ch GPHY_RG_LPI_1C; ++ gephy_all_REG_dev1Eh_reg324h GPHY_RG_1E_324; ++ gephy_all_REG_dev1Eh_reg012h GPHY_RG_1E_012; ++ gephy_all_REG_dev1Eh_reg017h GPHY_RG_1E_017; ++ ++ s_phydev = phydev; ++ retry = MAX_OUI_CHECK; ++ while (1) { ++ /* PHY OUI */ ++ pbus_data = airoha_pbus_read(mbus, pbus_addr, EN8801S_RG_ETHER_PHY_OUI); ++ if (EN8801S_PBUS_OUI == pbus_data) { ++ printf("PBUS addr 0x%x: Start initialized.\n", pbus_addr); ++ ret = airoha_pbus_write(mbus, pbus_addr, EN8801S_RG_BUCK_CTL, 0x03); ++ AIR_RTN_ERR(ret); ++ break; ++ } else ++ pbus_addr = EN8801S_PBUS_PHY_ID; ++ ++ if (0 == --retry) { ++ printf("EN8801S Probe fail !\n"); ++ return 0; ++ } ++ } ++ ++ /* SMI ADDR */ ++ pbus_data = airoha_pbus_read(mbus, pbus_addr, EN8801S_RG_SMI_ADDR); ++ pbus_data = (pbus_data & 0xffff0000) | (unsigned long)(pbus_addr << 8) | (unsigned long)(EN8801S_MDIO_DEFAULT_ID); ++ ret = airoha_pbus_write(mbus, pbus_addr, EN8801S_RG_SMI_ADDR, pbus_data); ++ AIR_RTN_ERR(ret); ++ mdelay(10); ++ ++ pbus_data = (airoha_pbus_read(mbus, pbus_addr, EN8801S_RG_LTR_CTL) & (~0x3)) | BIT(2) ; ++ ret = airoha_pbus_write(mbus, pbus_addr, EN8801S_RG_LTR_CTL, pbus_data); ++ AIR_RTN_ERR(ret); ++ mdelay(500); ++ pbus_data = (pbus_data & ~BIT(2)) | EN8801S_RX_POLARITY_NORMAL | EN8801S_TX_POLARITY_NORMAL; ++ ret = airoha_pbus_write(mbus, pbus_addr, EN8801S_RG_LTR_CTL, pbus_data); ++ AIR_RTN_ERR(ret); ++ mdelay(500); ++ /* SMI ADDR */ ++ pbus_data = airoha_pbus_read(mbus, pbus_addr, EN8801S_RG_SMI_ADDR); ++ pbus_data = (pbus_data & 0xffff0000) | (unsigned long)(EN8801S_PBUS_PHY_ID << 8) | (unsigned long)(EN8801S_MDIO_PHY_ID); ++ ret = airoha_pbus_write(mbus, pbus_addr, EN8801S_RG_SMI_ADDR, pbus_data); ++ pbus_addr = EN8801S_PBUS_PHY_ID; ++ AIR_RTN_ERR(ret); ++ mdelay(10); ++ ++ /* Optimze 10M IoT */ ++ pbus_data = airoha_pbus_read(mbus, pbus_addr, 0x1690); ++ pbus_data |= (1 << 31); ++ ret = airoha_pbus_write(mbus, pbus_addr, 0x1690, pbus_data); ++ AIR_RTN_ERR(ret); ++ /* set SGMII Base Page */ ++ ret = airoha_pbus_write(mbus, pbus_addr, 0x0600, 0x0c000c00); ++ AIR_RTN_ERR(ret); ++ ret = airoha_pbus_write(mbus, pbus_addr, 0x10, 0xD801); ++ AIR_RTN_ERR(ret); ++ ret = airoha_pbus_write(mbus, pbus_addr, 0x0, 0x9140); ++ AIR_RTN_ERR(ret); ++ ret = airoha_pbus_write(mbus, pbus_addr, 0x0A14, 0x0003); ++ AIR_RTN_ERR(ret); ++ ret = airoha_pbus_write(mbus, pbus_addr, 0x0600, 0x0c000c00); ++ AIR_RTN_ERR(ret); ++ /* Set FCM control */ ++ ret = airoha_pbus_write(mbus, pbus_addr, 0x1404, 0x004b); ++ AIR_RTN_ERR(ret); ++ ret = airoha_pbus_write(mbus, pbus_addr, 0x140c, 0x0007); ++ AIR_RTN_ERR(ret); ++ ++ ret = airoha_pbus_write(mbus, pbus_addr, 0x142c, 0x05050505); ++ AIR_RTN_ERR(ret); ++ pbus_data = airoha_pbus_read(mbus, pbus_addr, 0x1440); ++ ret = airoha_pbus_write(mbus, pbus_addr, 0x1440, pbus_data & ~BIT(11)); ++ AIR_RTN_ERR(ret); ++ ++ pbus_data = airoha_pbus_read(mbus, pbus_addr, 0x1408); ++ ret = airoha_pbus_write(mbus, pbus_addr, 0x1408, pbus_data | BIT(5)); ++ AIR_RTN_ERR(ret); ++ ++ /* Set GPHY Perfomance*/ ++ /* Token Ring */ ++ ret = airoha_tr_reg_write(phydev, RgAddr_R1000DEC_15h, 0x0055A0); ++ AIR_RTN_ERR(ret); ++ ret = airoha_tr_reg_write(phydev, RgAddr_R1000DEC_17h, 0x07FF3F); ++ AIR_RTN_ERR(ret); ++ ret = airoha_tr_reg_write(phydev, RgAddr_PMA_00h, 0x00001E); ++ AIR_RTN_ERR(ret); ++ ret = airoha_tr_reg_write(phydev, RgAddr_PMA_01h, 0x6FB90A); ++ AIR_RTN_ERR(ret); ++ ret = airoha_tr_reg_write(phydev, RgAddr_PMA_17h, 0x060671); ++ AIR_RTN_ERR(ret); ++ ret = airoha_tr_reg_write(phydev, RgAddr_PMA_18h, 0x0E2F00); ++ AIR_RTN_ERR(ret); ++ ret = airoha_tr_reg_write(phydev, RgAddr_TR_26h, 0x444444); ++ AIR_RTN_ERR(ret); ++ ret = airoha_tr_reg_write(phydev, RgAddr_DSPF_03h, 0x000000); ++ AIR_RTN_ERR(ret); ++ ret = airoha_tr_reg_write(phydev, RgAddr_DSPF_06h, 0x2EBAEF); ++ AIR_RTN_ERR(ret); ++ ret = airoha_tr_reg_write(phydev, RgAddr_DSPF_08h, 0x00000B); ++ AIR_RTN_ERR(ret); ++ ret = airoha_tr_reg_write(phydev, RgAddr_DSPF_0Ch, 0x00504D); ++ AIR_RTN_ERR(ret); ++ ret = airoha_tr_reg_write(phydev, RgAddr_DSPF_0Dh, 0x02314F); ++ AIR_RTN_ERR(ret); ++ ret = airoha_tr_reg_write(phydev, RgAddr_DSPF_0Fh, 0x003028); ++ AIR_RTN_ERR(ret); ++ ret = airoha_tr_reg_write(phydev, RgAddr_DSPF_10h, 0x005010); ++ AIR_RTN_ERR(ret); ++ ret = airoha_tr_reg_write(phydev, RgAddr_DSPF_11h, 0x040001); ++ AIR_RTN_ERR(ret); ++ ret = airoha_tr_reg_write(phydev, RgAddr_DSPF_13h, 0x018670); ++ AIR_RTN_ERR(ret); ++ ret = airoha_tr_reg_write(phydev, RgAddr_DSPF_14h, 0x00024A); ++ AIR_RTN_ERR(ret); ++ ret = airoha_tr_reg_write(phydev, RgAddr_DSPF_1Bh, 0x000072); ++ AIR_RTN_ERR(ret); ++ ret = airoha_tr_reg_write(phydev, RgAddr_DSPF_1Ch, 0x003210); ++ AIR_RTN_ERR(ret); ++ /* CL22 & CL45 */ ++ ret = airoha_cl22_write(mbus, phy_addr, 0x1f, 0x03); ++ AIR_RTN_ERR(ret); ++ GPHY_RG_LPI_1C.DATA = airoha_cl22_read(mbus, phy_addr, RgAddr_LPI_1Ch); ++ if (GPHY_RG_LPI_1C.DATA < 0) ++ return -EIO; ++ GPHY_RG_LPI_1C.DataBitField.smi_deton_th = 0x0C; ++ ret = airoha_cl22_write(mbus, phy_addr, RgAddr_LPI_1Ch, GPHY_RG_LPI_1C.DATA); ++ AIR_RTN_ERR(ret); ++ ret = airoha_cl22_write(mbus, phy_addr, RgAddr_LPI_1Ch, 0xC92); ++ AIR_RTN_ERR(ret); ++ ret = airoha_cl22_write(mbus, phy_addr, RgAddr_AUXILIARY_1Dh, 0x1); ++ AIR_RTN_ERR(ret); ++ ret = airoha_cl22_write(mbus, phy_addr, 0x1f, 0x0); ++ AIR_RTN_ERR(ret); ++ ret = airoha_cl45_write(phydev, 0x1E, 0x120, 0x8014); ++ AIR_RTN_ERR(ret); ++ ret = airoha_cl45_write(phydev, 0x1E, 0x122, 0xffff); ++ AIR_RTN_ERR(ret); ++ ret = airoha_cl45_write(phydev, 0x1E, 0x123, 0xffff); ++ AIR_RTN_ERR(ret); ++ ret = airoha_cl45_write(phydev, 0x1E, 0x144, 0x0200); ++ AIR_RTN_ERR(ret); ++ ret = airoha_cl45_write(phydev, 0x1E, 0x14A, 0xEE20); ++ AIR_RTN_ERR(ret); ++ ret = airoha_cl45_write(phydev, 0x1E, 0x189, 0x0110); ++ AIR_RTN_ERR(ret); ++ ret = airoha_cl45_write(phydev, 0x1E, 0x19B, 0x0111); ++ AIR_RTN_ERR(ret); ++ ret = airoha_cl45_write(phydev, 0x1E, 0x234, 0x0181); ++ AIR_RTN_ERR(ret); ++ ret = airoha_cl45_write(phydev, 0x1E, 0x238, 0x0120); ++ AIR_RTN_ERR(ret); ++ ret = airoha_cl45_write(phydev, 0x1E, 0x239, 0x0117); ++ AIR_RTN_ERR(ret); ++ ret = airoha_cl45_write(phydev, 0x1E, 0x268, 0x07F4); ++ AIR_RTN_ERR(ret); ++ ret = airoha_cl45_write(phydev, 0x1E, 0x2D1, 0x0733); ++ AIR_RTN_ERR(ret); ++ ret = airoha_cl45_write(phydev, 0x1E, 0x323, 0x0011); ++ AIR_RTN_ERR(ret); ++ ret = airoha_cl45_write(phydev, 0x1E, 0x324, 0x013F); ++ AIR_RTN_ERR(ret); ++ ret = airoha_cl45_write(phydev, 0x1E, 0x326, 0x0037); ++ AIR_RTN_ERR(ret); ++ ++ reg_value = airoha_cl45_read(phydev, 0x1E, 0x324); ++ if (reg_value < 0) ++ return -EIO; ++ GPHY_RG_1E_324.DATA = (int)reg_value; ++ GPHY_RG_1E_324.DataBitField.smi_det_deglitch_off = 0; ++ ret = airoha_cl45_write(phydev, 0x1E, 0x324, GPHY_RG_1E_324.DATA); ++ AIR_RTN_ERR(ret); ++ ret = airoha_cl45_write(phydev, 0x1E, 0x19E, 0xC2); ++ AIR_RTN_ERR(ret); ++ ret = airoha_cl45_write(phydev, 0x1E, 0x013, 0x0); ++ AIR_RTN_ERR(ret); ++ ++ /* EFUSE */ ++ airoha_pbus_write(mbus, pbus_addr, 0x1C08, 0x40000040); ++ retry = MAX_RETRY; ++ while (0 != retry) { ++ mdelay(1); ++ pbus_data = airoha_pbus_read(mbus, pbus_addr, 0x1C08); ++ if ((pbus_data & (1 << 30)) == 0) { ++ break; ++ } ++ retry--; ++ } ++ pbus_data = airoha_pbus_read(mbus, pbus_addr, 0x1C38); /* RAW#2 */ ++ reg_value = airoha_cl45_read(phydev, 0x1E, 0x12); ++ if (reg_value < 0) ++ return -EIO; ++ GPHY_RG_1E_012.DATA = reg_value; ++ GPHY_RG_1E_012.DataBitField.da_tx_i2mpb_a_tbt = pbus_data & 0x03f; ++ ret = airoha_cl45_write(phydev, 0x1E, 0x12, GPHY_RG_1E_012.DATA); ++ AIR_RTN_ERR(ret); ++ reg_value = airoha_cl45_read(phydev, 0x1E, 0x17); ++ if (reg_value < 0) ++ return -EIO; ++ GPHY_RG_1E_017.DataBitField.da_tx_i2mpb_b_tbt = (reg_value >> 8) & 0x03f; ++ ret = airoha_cl45_write(phydev, 0x1E, 0x17, GPHY_RG_1E_017.DATA); ++ AIR_RTN_ERR(ret); ++ ++ ret = airoha_pbus_write(mbus, pbus_addr, 0x1C08, 0x40400040); ++ AIR_RTN_ERR(ret); ++ retry = MAX_RETRY; ++ while (0 != retry) { ++ mdelay(1); ++ reg_value = airoha_pbus_read(mbus, pbus_addr, 0x1C08); ++ if ((reg_value & (1 << 30)) == 0) { ++ break; ++ } ++ retry--; ++ } ++ pbus_data = airoha_pbus_read(mbus, pbus_addr, 0x1C30); /* RAW#16 */ ++ GPHY_RG_1E_324.DataBitField.smi_det_deglitch_off = (pbus_data >> 12) & 0x01; ++ ret = airoha_cl45_write(phydev, 0x1E, 0x324, GPHY_RG_1E_324.DATA); ++ AIR_RTN_ERR(ret); ++#ifdef AIR_LED_SUPPORT ++ ret = en8801s_led_init(phydev); ++ if (ret != 0){ ++ printf("en8801s_led_init fail (ret:%d) !\n", ret); ++ } ++#endif ++ printf("EN8801S initialize OK ! (%s)\n", EN8801S_DRIVER_VERSION); ++ return 0; ++} ++ ++int en8801s_read_status(struct phy_device *phydev) ++{ ++ int ret, pbus_addr = EN8801S_PBUS_PHY_ID; ++ struct mii_dev *mbus; ++ unsigned long pbus_data; ++ ++ mbus = phydev->bus; ++ if (SPEED_10 == phydev->speed) { ++ /* set the bit for Optimze 10M IoT */ ++ debug("[Airoha] SPEED_10 0x1694\n"); ++ pbus_data = airoha_pbus_read(mbus, pbus_addr, 0x1694); ++ pbus_data |= (1 << 31); ++ ret = airoha_pbus_write(mbus, pbus_addr, 0x1694, pbus_data); ++ AIR_RTN_ERR(ret); ++ } else { ++ debug("[Airoha] SPEED_1000/100 0x1694\n"); ++ /* clear the bit for other speeds */ ++ pbus_data = airoha_pbus_read(mbus, pbus_addr, 0x1694); ++ pbus_data &= ~(1 << 31); ++ ret = airoha_pbus_write(mbus, pbus_addr, 0x1694, pbus_data); ++ AIR_RTN_ERR(ret); ++ } ++ ++ airoha_pbus_write(mbus, pbus_addr, 0x0600, 0x0c000c00); ++ if(SPEED_1000 == phydev->speed) { ++ debug("[Airoha] SPEED_1000\n"); ++ ret = airoha_pbus_write(mbus, pbus_addr, 0x10, 0xD801); ++ AIR_RTN_ERR(ret); ++ ret = airoha_pbus_write(mbus, pbus_addr, 0x0, 0x9140); ++ AIR_RTN_ERR(ret); ++ ++ ret = airoha_pbus_write(mbus, pbus_addr, 0x0A14, 0x0003); ++ AIR_RTN_ERR(ret); ++ ret = airoha_pbus_write(mbus, pbus_addr, 0x0600, 0x0c000c00); ++ AIR_RTN_ERR(ret); ++ mdelay(2); /* delay 2 ms */ ++ ret = airoha_pbus_write(mbus, pbus_addr, 0x1404, 0x004b); ++ AIR_RTN_ERR(ret); ++ ret = airoha_pbus_write(mbus, pbus_addr, 0x140c, 0x0007); ++ AIR_RTN_ERR(ret); ++ } ++ else if (SPEED_100 == phydev->speed) { ++ debug("[Airoha] SPEED_100\n"); ++ ret = airoha_pbus_write(mbus, pbus_addr, 0x10, 0xD401); ++ AIR_RTN_ERR(ret); ++ ret = airoha_pbus_write(mbus, pbus_addr, 0x0, 0x9140); ++ AIR_RTN_ERR(ret); ++ ret = airoha_pbus_write(mbus, pbus_addr, 0x0A14, 0x0007); ++ AIR_RTN_ERR(ret); ++ ret = airoha_pbus_write(mbus, pbus_addr, 0x0600, 0x0c11); ++ AIR_RTN_ERR(ret); ++ mdelay(2); /* delay 2 ms */ ++ ret = airoha_pbus_write(mbus, pbus_addr, 0x1404, 0x0027); ++ AIR_RTN_ERR(ret); ++ ret = airoha_pbus_write(mbus, pbus_addr, 0x140c, 0x0007); ++ AIR_RTN_ERR(ret); ++ } ++ else { ++ debug("[Airoha] SPEED_10\n"); ++ ret = airoha_pbus_write(mbus, pbus_addr, 0x10, 0xD001); ++ AIR_RTN_ERR(ret); ++ ret = airoha_pbus_write(mbus, pbus_addr, 0x0, 0x9140); ++ AIR_RTN_ERR(ret); ++ ++ ret = airoha_pbus_write(mbus, pbus_addr, 0x0A14, 0x000b); ++ AIR_RTN_ERR(ret); ++ ret = airoha_pbus_write(mbus, pbus_addr, 0x0600, 0x0c11); ++ AIR_RTN_ERR(ret); ++ mdelay(2); /* delay 2 ms */ ++ ret = airoha_pbus_write(mbus, pbus_addr, 0x1404, 0x0047); ++ AIR_RTN_ERR(ret); ++ ret = airoha_pbus_write(mbus, pbus_addr, 0x140c, 0x0007); ++ AIR_RTN_ERR(ret); ++ } ++ return 0; ++} ++ ++static int en8801s_startup(struct phy_device *phydev) ++{ ++ int ret; ++ ++ ret = genphy_update_link(phydev); ++ if (ret) ++ return ret; ++ ret = genphy_parse_link(phydev); ++ if (ret) ++ return ret; ++ return en8801s_read_status(phydev); ++} ++#if AIR_UBOOT_REVISION > 0x202303 ++U_BOOT_PHY_DRIVER(en8801s) = { ++ .name = "Airoha EN8801S", ++ .uid = EN8801S_PHY_ID, ++ .mask = 0x0ffffff0, ++ .features = PHY_GBIT_FEATURES, ++ .config = &en8801s_config, ++ .startup = &en8801s_startup, ++ .shutdown = &genphy_shutdown, ++}; ++#else ++static struct phy_driver AIR_EN8801S_driver = { ++ .name = "Airoha EN8801S", ++ .uid = EN8801S_PHY_ID, ++ .mask = 0x0ffffff0, ++ .features = PHY_GBIT_FEATURES, ++ .config = &en8801s_config, ++ .startup = &en8801s_startup, ++ .shutdown = &genphy_shutdown, ++}; ++ ++int phy_air_en8801s_init(void) ++{ ++ phy_register(&AIR_EN8801S_driver); ++ return 0; ++} ++#endif +--- /dev/null ++++ b/drivers/net/phy/air_en8801s.h +@@ -0,0 +1,267 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ ++/************************************************* ++ * FILE NAME: air_en8801s.h ++ * PURPOSE: ++ * EN8801S PHY Driver for Uboot ++ * NOTES: ++ * ++ * Copyright (C) 2023 Airoha Technology Corp. ++ *************************************************/ ++ ++#ifndef __EN8801S_H ++#define __EN8801S_H ++ ++/************************************************************************ ++* D E F I N E S ++************************************************************************/ ++#define AIR_UBOOT_REVISION ((((U_BOOT_VERSION_NUM / 1000) % 10) << 20) | \ ++ (((U_BOOT_VERSION_NUM / 100) % 10) << 16) | \ ++ (((U_BOOT_VERSION_NUM / 10) % 10) << 12) | \ ++ ((U_BOOT_VERSION_NUM % 10) << 8) | \ ++ (((U_BOOT_VERSION_NUM_PATCH / 10) % 10) << 4) | \ ++ ((U_BOOT_VERSION_NUM_PATCH % 10) << 0)) ++ ++#define EN8801S_MDIO_DEFAULT_ID 0x1d ++#define EN8801S_PBUS_DEFAULT_ID (EN8801S_MDIO_DEFAULT_ID + 1) ++#define EN8801S_MDIO_PHY_ID 0x18 /* Range PHY_ADDRESS_RANGE .. 0x1e */ ++#define EN8801S_PBUS_PHY_ID (EN8801S_MDIO_PHY_ID + 1) ++#define EN8801S_DRIVER_VERSION "v1.1.3" ++ ++#define EN8801S_RG_ETHER_PHY_OUI 0x19a4 ++#define EN8801S_RG_SMI_ADDR 0x19a8 ++#define EN8801S_PBUS_OUI 0x17a5 ++#define EN8801S_RG_BUCK_CTL 0x1a20 ++#define EN8801S_RG_LTR_CTL 0x0cf8 ++ ++#define EN8801S_PHY_ID1 0x03a2 ++#define EN8801S_PHY_ID2 0x9461 ++#define EN8801S_PHY_ID (unsigned long)((EN8801S_PHY_ID1 << 16) | EN8801S_PHY_ID2) ++ ++/* ++SFP Sample for verification ++Tx Reverse, Rx Reverse ++*/ ++#define EN8801S_TX_POLARITY_NORMAL 0x0 ++#define EN8801S_TX_POLARITY_REVERSE 0x1 ++ ++#define EN8801S_RX_POLARITY_NORMAL (0x1 << 1) ++#define EN8801S_RX_POLARITY_REVERSE (0x0 << 1) ++ ++#ifndef BIT ++#define BIT(nr) (1UL << (nr)) ++#endif ++ ++#define MAX_RETRY 5 ++#define MAX_OUI_CHECK 2 ++ ++/* CL45 MDIO control */ ++#define MII_MMD_ACC_CTL_REG 0x0d ++#define MII_MMD_ADDR_DATA_REG 0x0e ++#define MMD_OP_MODE_DATA BIT(14) ++ ++#define MAX_TRG_COUNTER 5 ++ ++/* TokenRing Reg Access */ ++#define TrReg_PKT_XMT_STA 0x8000 ++#define TrReg_WR 0x8000 ++#define TrReg_RD 0xA000 ++ ++#define RgAddr_LPI_1Ch 0x1c ++#define RgAddr_AUXILIARY_1Dh 0x1d ++#define RgAddr_PMA_00h 0x0f80 ++#define RgAddr_PMA_01h 0x0f82 ++#define RgAddr_PMA_17h 0x0fae ++#define RgAddr_PMA_18h 0x0fb0 ++#define RgAddr_DSPF_03h 0x1686 ++#define RgAddr_DSPF_06h 0x168c ++#define RgAddr_DSPF_08h 0x1690 ++#define RgAddr_DSPF_0Ch 0x1698 ++#define RgAddr_DSPF_0Dh 0x169a ++#define RgAddr_DSPF_0Fh 0x169e ++#define RgAddr_DSPF_10h 0x16a0 ++#define RgAddr_DSPF_11h 0x16a2 ++#define RgAddr_DSPF_13h 0x16a6 ++#define RgAddr_DSPF_14h 0x16a8 ++#define RgAddr_DSPF_1Bh 0x16b6 ++#define RgAddr_DSPF_1Ch 0x16b8 ++#define RgAddr_TR_26h 0x0ecc ++#define RgAddr_R1000DEC_15h 0x03aa ++#define RgAddr_R1000DEC_17h 0x03ae ++ ++/* ++The following led_cfg example is for reference only. ++LED5 1000M/LINK/ACT (GPIO5) <-> BASE_T_LED0, ++LED6 10/100M/LINK/ACT(GPIO9) <-> BASE_T_LED1, ++LED4 100M/LINK/ACT (GPIO8) <-> BASE_T_LED2, ++*/ ++/* User-defined.B */ ++#define BASE_T_LED0_ON_CFG (LED_ON_EVT_LINK_1000M) ++#define BASE_T_LED0_BLK_CFG (LED_BLK_EVT_1000M_TX_ACT | LED_BLK_EVT_1000M_RX_ACT) ++#define BASE_T_LED1_ON_CFG (LED_ON_EVT_LINK_100M | LED_ON_EVT_LINK_10M) ++#define BASE_T_LED1_BLK_CFG (LED_BLK_EVT_100M_TX_ACT | LED_BLK_EVT_100M_RX_ACT | \ ++ LED_BLK_EVT_10M_TX_ACT | LED_BLK_EVT_10M_RX_ACT ) ++#define BASE_T_LED2_ON_CFG (LED_ON_EVT_LINK_100M) ++#define BASE_T_LED2_BLK_CFG (LED_BLK_EVT_100M_TX_ACT | LED_BLK_EVT_100M_RX_ACT) ++#define BASE_T_LED3_ON_CFG (0x0) ++#define BASE_T_LED3_BLK_CFG (0x0) ++/* User-defined.E */ ++ ++#define EN8801S_LED_COUNT 4 ++ ++#define LED_BCR (0x021) ++#define LED_BCR_EXT_CTRL (1 << 15) ++#define LED_BCR_CLK_EN (1 << 3) ++#define LED_BCR_TIME_TEST (1 << 2) ++#define LED_BCR_MODE_MASK (3) ++#define LED_BCR_MODE_DISABLE (0) ++#define LED_ON_CTRL(i) (0x024 + ((i)*2)) ++#define LED_ON_EN (1 << 15) ++#define LED_ON_POL (1 << 14) ++#define LED_ON_EVT_MASK (0x7f) ++/* LED ON Event Option.B */ ++#define LED_ON_EVT_FORCE (1 << 6) ++#define LED_ON_EVT_LINK_DOWN (1 << 3) ++#define LED_ON_EVT_LINK_10M (1 << 2) ++#define LED_ON_EVT_LINK_100M (1 << 1) ++#define LED_ON_EVT_LINK_1000M (1 << 0) ++/* LED ON Event Option.E */ ++#define LED_BLK_CTRL(i) (0x025 + ((i)*2)) ++#define LED_BLK_EVT_MASK (0x3ff) ++/* LED Blinking Event Option.B*/ ++#define LED_BLK_EVT_FORCE (1 << 9) ++#define LED_BLK_EVT_10M_RX_ACT (1 << 5) ++#define LED_BLK_EVT_10M_TX_ACT (1 << 4) ++#define LED_BLK_EVT_100M_RX_ACT (1 << 3) ++#define LED_BLK_EVT_100M_TX_ACT (1 << 2) ++#define LED_BLK_EVT_1000M_RX_ACT (1 << 1) ++#define LED_BLK_EVT_1000M_TX_ACT (1 << 0) ++/* LED Blinking Event Option.E*/ ++#define LED_ON_DUR (0x022) ++#define LED_ON_DUR_MASK (0xffff) ++#define LED_BLK_DUR (0x023) ++#define LED_BLK_DUR_MASK (0xffff) ++ ++#define LED_ENABLE 1 ++#define LED_DISABLE 0 ++ ++#define UNIT_LED_BLINK_DURATION 1024 ++ ++#define AIR_RTN_ON_ERR(cond, err) \ ++ do { if ((cond)) return (err); } while(0) ++ ++#define AIR_RTN_ERR(err) AIR_RTN_ON_ERR(err < 0, err) ++ ++#define LED_SET_EVT(reg, cod, result, bit) do \ ++ { \ ++ if(reg & cod) { \ ++ result |= bit; \ ++ } \ ++ } while(0) ++ ++#define LED_SET_GPIO_SEL(gpio, led, val) do \ ++ { \ ++ val |= (led << (8 * (gpio % 4))); \ ++ } while(0) ++ ++/* DATA TYPE DECLARATIONS ++ */ ++typedef struct ++{ ++ int DATA_Lo; ++ int DATA_Hi; ++}TR_DATA_T; ++ ++typedef union ++{ ++ struct ++ { ++ /* b[15:00] */ ++ int smi_deton_wt : 3; ++ int smi_det_mdi_inv : 1; ++ int smi_detoff_wt : 3; ++ int smi_sigdet_debouncing_en : 1; ++ int smi_deton_th : 6; ++ int rsv_14 : 2; ++ } DataBitField; ++ int DATA; ++} gephy_all_REG_LpiReg1Ch, *Pgephy_all_REG_LpiReg1Ch; ++ ++typedef union ++{ ++ struct ++ { ++ /* b[15:00] */ ++ int rg_smi_detcnt_max : 6; ++ int rsv_6 : 2; ++ int rg_smi_det_max_en : 1; ++ int smi_det_deglitch_off : 1; ++ int rsv_10 : 6; ++ } DataBitField; ++ int DATA; ++} gephy_all_REG_dev1Eh_reg324h, *Pgephy_all_REG_dev1Eh_reg324h; ++ ++typedef union ++{ ++ struct ++ { ++ /* b[15:00] */ ++ int da_tx_i2mpb_a_tbt : 6; ++ int rsv_6 : 4; ++ int da_tx_i2mpb_a_gbe : 6; ++ } DataBitField; ++ int DATA; ++} gephy_all_REG_dev1Eh_reg012h, *Pgephy_all_REG_dev1Eh_reg012h; ++ ++typedef union ++{ ++ struct ++ { ++ /* b[15:00] */ ++ int da_tx_i2mpb_b_tbt : 6; ++ int rsv_6 : 2; ++ int da_tx_i2mpb_b_gbe : 6; ++ int rsv_14 : 2; ++ } DataBitField; ++ int DATA; ++} gephy_all_REG_dev1Eh_reg017h, *Pgephy_all_REG_dev1Eh_reg017h; ++ ++typedef struct AIR_BASE_T_LED_CFG_S ++{ ++ u16 en; ++ u16 gpio; ++ u16 pol; ++ u16 on_cfg; ++ u16 blk_cfg; ++}AIR_BASE_T_LED_CFG_T; ++ ++typedef enum ++{ ++ AIR_LED_BLK_DUR_32M, ++ AIR_LED_BLK_DUR_64M, ++ AIR_LED_BLK_DUR_128M, ++ AIR_LED_BLK_DUR_256M, ++ AIR_LED_BLK_DUR_512M, ++ AIR_LED_BLK_DUR_1024M, ++ AIR_LED_BLK_DUR_LAST ++} AIR_LED_BLK_DUT_T; ++ ++typedef enum ++{ ++ AIR_ACTIVE_LOW, ++ AIR_ACTIVE_HIGH, ++} AIR_LED_POLARITY; ++typedef enum ++{ ++ AIR_LED_MODE_DISABLE, ++ AIR_LED_MODE_USER_DEFINE, ++ AIR_LED_MODE_LAST ++} AIR_LED_MODE_T; ++ ++/************************************************************************ ++* F U N C T I O N P R O T O T Y P E S ++************************************************************************/ ++ ++unsigned long airoha_pbus_read(struct mii_dev *bus, int pbus_addr, int pbus_reg); ++int airoha_pbus_write(struct mii_dev *bus, int pbus_addr, int pbus_reg, unsigned long pbus_data); ++int airoha_phy_process(void); ++#endif /* __EN8801S_H */ +--- /dev/null ++++ b/drivers/net/phy/air_en8811h.c +@@ -0,0 +1,725 @@ ++// SPDX-License-Identifier: GPL-2.0 ++/************************************************* ++ * FILE NAME: air_en8811h.c ++ * PURPOSE: ++ * EN8811H PHY Driver for Uboot ++ * NOTES: ++ * ++ * Copyright (C) 2023 Airoha Technology Corp. ++ *************************************************/ ++ ++/* INCLUDE FILE DECLARATIONS ++*/ ++#include ++#include ++#include ++#include ++#include ++#include ++#include "air_en8811h.h" ++ ++#ifdef CONFIG_PHY_AIROHA_FW_IN_UBI ++#include ++#endif ++ ++#ifdef CONFIG_PHY_AIROHA_FW_IN_MMC ++#include ++#endif ++ ++#ifdef CONFIG_PHY_AIROHA_FW_IN_MTD ++#include ++#endif ++ ++#if AIR_UBOOT_REVISION > 0x202004 ++#include ++#endif ++ ++/************************** ++ * GPIO5 <-> BASE_T_LED0, ++ * GPIO4 <-> BASE_T_LED1, ++ * GPIO3 <-> BASE_T_LED2, ++ **************************/ ++/* User-defined.B */ ++#define AIR_LED_SUPPORT ++#ifdef AIR_LED_SUPPORT ++static const struct air_base_t_led_cfg_s led_cfg[3] = { ++/********************************************************************* ++ *Enable, GPIO, LED Polarity, LED ON, LED Blink ++**********************************************************************/ ++ {1, AIR_LED0_GPIO5, AIR_ACTIVE_HIGH, AIR_LED0_ON, AIR_LED0_BLK}, ++ {1, AIR_LED1_GPIO4, AIR_ACTIVE_HIGH, AIR_LED1_ON, AIR_LED1_BLK}, ++ {1, AIR_LED2_GPIO3, AIR_ACTIVE_HIGH, AIR_LED2_ON, AIR_LED2_BLK}, ++}; ++static const u16 led_dur = UNIT_LED_BLINK_DURATION << AIR_LED_BLK_DUR_64M; ++#endif ++/* User-defined.E */ ++/************************************************************* ++ * F U N C T I O N S ++ **************************************************************/ ++/* Airoha MII read function */ ++static int air_mii_cl22_read(struct mii_dev *bus, int phy_addr, int phy_register) ++{ ++ int read_data = bus->read(bus, phy_addr, MDIO_DEVAD_NONE, phy_register); ++ ++ if (read_data < 0) ++ return -EIO; ++ return read_data; ++} ++ ++/* Airoha MII write function */ ++static int air_mii_cl22_write(struct mii_dev *bus, int phy_addr, int phy_register, int write_data) ++{ ++ int ret = 0; ++ ++ ret = bus->write(bus, phy_addr, MDIO_DEVAD_NONE, phy_register, write_data); ++ if (ret < 0) { ++ printf("bus->write, ret: %d\n", ret); ++ return ret; ++ } ++ return ret; ++} ++ ++static int air_mii_cl45_read(struct phy_device *phydev, int devad, u16 reg) ++{ ++ int ret = 0; ++ int data; ++ ++ ret = phy_write(phydev, MDIO_DEVAD_NONE, MII_MMD_ACC_CTL_REG, devad); ++ if (ret < 0) { ++ printf("phy_write, ret: %d\n", ret); ++ return INVALID_DATA; ++ } ++ ret = phy_write(phydev, MDIO_DEVAD_NONE, MII_MMD_ADDR_DATA_REG, reg); ++ if (ret < 0) { ++ printf("phy_write, ret: %d\n", ret); ++ return INVALID_DATA; ++ } ++ ret = phy_write(phydev, MDIO_DEVAD_NONE, MII_MMD_ACC_CTL_REG, MMD_OP_MODE_DATA | devad); ++ if (ret < 0) { ++ printf("phy_write, ret: %d\n", ret); ++ return INVALID_DATA; ++ } ++ data = phy_read(phydev, MDIO_DEVAD_NONE, MII_MMD_ADDR_DATA_REG); ++ return data; ++} ++ ++static int air_mii_cl45_write(struct phy_device *phydev, int devad, u16 reg, u16 write_data) ++{ ++ int ret = 0; ++ ++ ret = phy_write(phydev, MDIO_DEVAD_NONE, MII_MMD_ACC_CTL_REG, devad); ++ if (ret < 0) { ++ printf("phy_write, ret: %d\n", ret); ++ return ret; ++ } ++ ret = phy_write(phydev, MDIO_DEVAD_NONE, MII_MMD_ADDR_DATA_REG, reg); ++ if (ret < 0) { ++ printf("phy_write, ret: %d\n", ret); ++ return ret; ++ } ++ ret = phy_write(phydev, MDIO_DEVAD_NONE, MII_MMD_ACC_CTL_REG, MMD_OP_MODE_DATA | devad); ++ if (ret < 0) { ++ printf("phy_write, ret: %d\n", ret); ++ return ret; ++ } ++ ret = phy_write(phydev, MDIO_DEVAD_NONE, MII_MMD_ADDR_DATA_REG, write_data); ++ if (ret < 0) { ++ printf("phy_write, ret: %d\n", ret); ++ return ret; ++ } ++ return 0; ++} ++/* Use default PBUS_PHY_ID */ ++/* EN8811H PBUS write function */ ++static int air_pbus_reg_write(struct phy_device *phydev, unsigned long pbus_address, unsigned long pbus_data) ++{ ++ int ret = 0; ++ struct mii_dev *mbus = phydev->bus; ++ ++ ret = air_mii_cl22_write(mbus, ((phydev->addr) + 8), 0x1F, (unsigned int)(pbus_address >> 6)); ++ if (ret < 0) ++ return ret; ++ ret = air_mii_cl22_write(mbus, ((phydev->addr) + 8), (unsigned int)((pbus_address >> 2) & 0xf), (unsigned int)(pbus_data & 0xFFFF)); ++ if (ret < 0) ++ return ret; ++ ret = air_mii_cl22_write(mbus, ((phydev->addr) + 8), 0x10, (unsigned int)(pbus_data >> 16)); ++ if (ret < 0) ++ return ret; ++ return 0; ++} ++ ++/* EN8811H BUCK write function */ ++static int air_buckpbus_reg_write(struct phy_device *phydev, unsigned long pbus_address, unsigned int pbus_data) ++{ ++ int ret = 0; ++ ++ /* page 4 */ ++ ret = phy_write(phydev, MDIO_DEVAD_NONE, 0x1F, (unsigned int)4); ++ if (ret < 0) { ++ printf("phy_write, ret: %d\n", ret); ++ return ret; ++ } ++ ret = phy_write(phydev, MDIO_DEVAD_NONE, 0x10, (unsigned int)0); ++ if (ret < 0) { ++ printf("phy_write, ret: %d\n", ret); ++ return ret; ++ } ++ ret = phy_write(phydev, MDIO_DEVAD_NONE, 0x11, (unsigned int)((pbus_address >> 16) & 0xffff)); ++ if (ret < 0) { ++ printf("phy_write, ret: %d\n", ret); ++ return ret; ++ } ++ ret = phy_write(phydev, MDIO_DEVAD_NONE, 0x12, (unsigned int)(pbus_address & 0xffff)); ++ if (ret < 0) { ++ printf("phy_write, ret: %d\n", ret); ++ return ret; ++ } ++ ret = phy_write(phydev, MDIO_DEVAD_NONE, 0x13, (unsigned int)((pbus_data >> 16) & 0xffff)); ++ if (ret < 0) { ++ printf("phy_write, ret: %d\n", ret); ++ return ret; ++ } ++ ret = phy_write(phydev, MDIO_DEVAD_NONE, 0x14, (unsigned int)(pbus_data & 0xffff)); ++ if (ret < 0) { ++ printf("phy_write, ret: %d\n", ret); ++ return ret; ++ } ++ return 0; ++} ++ ++/* EN8811H BUCK read function */ ++static unsigned int air_buckpbus_reg_read(struct phy_device *phydev, unsigned long pbus_address) ++{ ++ unsigned int pbus_data = 0, pbus_data_low, pbus_data_high; ++ int ret = 0; ++ ++ ret = phy_write(phydev, MDIO_DEVAD_NONE, 0x1F, (unsigned int)4); /* page 4 */ ++ if (ret < 0) { ++ printf("phy_write, ret: %d\n", ret); ++ return PBUS_INVALID_DATA; ++ } ++ ret = phy_write(phydev, MDIO_DEVAD_NONE, 0x10, (unsigned int)0); ++ if (ret < 0) { ++ printf("phy_write, ret: %d\n", ret); ++ return PBUS_INVALID_DATA; ++ } ++ ret = phy_write(phydev, MDIO_DEVAD_NONE, 0x15, (unsigned int)((pbus_address >> 16) & 0xffff)); ++ if (ret < 0) { ++ printf("phy_write, ret: %d\n", ret); ++ return PBUS_INVALID_DATA; ++ } ++ ret = phy_write(phydev, MDIO_DEVAD_NONE, 0x16, (unsigned int)(pbus_address & 0xffff)); ++ if (ret < 0) { ++ printf("phy_write, ret: %d\n", ret); ++ return PBUS_INVALID_DATA; ++ } ++ ++ pbus_data_high = phy_read(phydev, MDIO_DEVAD_NONE, 0x17); ++ pbus_data_low = phy_read(phydev, MDIO_DEVAD_NONE, 0x18); ++ pbus_data = (pbus_data_high << 16) + pbus_data_low; ++ ret = phy_write(phydev, MDIO_DEVAD_NONE, 0x1F, (unsigned int)0); ++ if (ret < 0) { ++ printf("phy_write, ret: %d\n", ret); ++ return ret; ++ } ++ return pbus_data; ++} ++ ++static int MDIOWriteBuf(struct phy_device *phydev, unsigned long address, unsigned long array_size, const unsigned char *buffer) ++{ ++ unsigned int write_data, offset ; ++ int ret = 0; ++ ++ /* page 4 */ ++ ret = phy_write(phydev, MDIO_DEVAD_NONE, 0x1F, (unsigned int)4); ++ if (ret < 0) { ++ printf("phy_write, ret: %d\n", ret); ++ return ret; ++ } ++ /* address increment*/ ++ ret = phy_write(phydev, MDIO_DEVAD_NONE, 0x10, (unsigned int)0x8000); ++ if (ret < 0) { ++ printf("phy_write, ret: %d\n", ret); ++ return ret; ++ } ++ ret = phy_write(phydev, MDIO_DEVAD_NONE, 0x11, (unsigned int)((address >> 16) & 0xffff)); ++ if (ret < 0) { ++ printf("phy_write, ret: %d\n", ret); ++ return ret; ++ } ++ ret = phy_write(phydev, MDIO_DEVAD_NONE, 0x12, (unsigned int)(address & 0xffff)); ++ if (ret < 0) { ++ printf("phy_write, ret: %d\n", ret); ++ return ret; ++ } ++ ++ for (offset = 0; offset < array_size; offset += 4) { ++ write_data = (buffer[offset + 3] << 8) | buffer[offset + 2]; ++ ret = phy_write(phydev, MDIO_DEVAD_NONE, 0x13, write_data); ++ if (ret < 0) { ++ printf("phy_write, ret: %d\n", ret); ++ return ret; ++ } ++ write_data = (buffer[offset + 1] << 8) | buffer[offset]; ++ ret = phy_write(phydev, MDIO_DEVAD_NONE, 0x14, write_data); ++ if (ret < 0) { ++ printf("phy_write, ret: %d\n", ret); ++ return ret; ++ } ++ } ++ ret = phy_write(phydev, MDIO_DEVAD_NONE, 0x1F, (unsigned int)0); ++ if (ret < 0) { ++ printf("phy_write, ret: %d\n", ret); ++ return ret; ++ } ++ return 0; ++} ++ ++#ifdef AIR_LED_SUPPORT ++static int airoha_led_set_usr_def(struct phy_device *phydev, u8 entity, int polar, ++ u16 on_evt, u16 blk_evt) ++{ ++ int ret = 0; ++ ++ if (AIR_ACTIVE_HIGH == polar) ++ on_evt |= LED_ON_POL; ++ else ++ on_evt &= ~LED_ON_POL; ++ ++ ret = air_mii_cl45_write(phydev, 0x1f, LED_ON_CTRL(entity), on_evt | LED_ON_EN); ++ if (ret < 0) ++ return ret; ++ ret = air_mii_cl45_write(phydev, 0x1f, LED_BLK_CTRL(entity), blk_evt); ++ if (ret < 0) ++ return ret; ++ return 0; ++} ++ ++static int airoha_led_set_mode(struct phy_device *phydev, u8 mode) ++{ ++ u16 cl45_data; ++ int err = 0; ++ ++ cl45_data = air_mii_cl45_read(phydev, 0x1f, LED_BCR); ++ switch (mode) { ++ case AIR_LED_MODE_DISABLE: ++ cl45_data &= ~LED_BCR_EXT_CTRL; ++ cl45_data &= ~LED_BCR_MODE_MASK; ++ cl45_data |= LED_BCR_MODE_DISABLE; ++ break; ++ case AIR_LED_MODE_USER_DEFINE: ++ cl45_data |= LED_BCR_EXT_CTRL; ++ cl45_data |= LED_BCR_CLK_EN; ++ break; ++ default: ++ printf("LED mode%d is not supported!\n", mode); ++ return -EINVAL; ++ } ++ err = air_mii_cl45_write(phydev, 0x1f, LED_BCR, cl45_data); ++ if (err < 0) ++ return err; ++ return 0; ++} ++ ++static int airoha_led_set_state(struct phy_device *phydev, u8 entity, u8 state) ++{ ++ u16 cl45_data; ++ int err; ++ ++ cl45_data = air_mii_cl45_read(phydev, 0x1f, LED_ON_CTRL(entity)); ++ if (LED_ENABLE == state) ++ cl45_data |= LED_ON_EN; ++ else ++ cl45_data &= ~LED_ON_EN; ++ ++ err = air_mii_cl45_write(phydev, 0x1f, LED_ON_CTRL(entity), cl45_data); ++ if (err < 0) ++ return err; ++ return 0; ++} ++ ++static int en8811h_led_init(struct phy_device *phydev) ++{ ++ unsigned int led_gpio = 0, reg_value = 0; ++ u16 cl45_data = led_dur; ++ int ret, led_id; ++ ++ cl45_data = UNIT_LED_BLINK_DURATION << AIR_LED_BLK_DUR_64M; ++ ret = air_mii_cl45_write(phydev, 0x1f, LED_BLK_DUR, cl45_data); ++ if (ret < 0) ++ return ret; ++ cl45_data >>= 1; ++ ret = air_mii_cl45_write(phydev, 0x1f, LED_ON_DUR, cl45_data); ++ if (ret < 0) ++ return ret; ++ ++ ret = airoha_led_set_mode(phydev, AIR_LED_MODE_USER_DEFINE); ++ if (ret != 0) { ++ printf("LED fail to set mode, ret %d !\n", ret); ++ return ret; ++ } ++ for(led_id = 0; led_id < EN8811H_LED_COUNT; led_id++) ++ { ++ /* LED0 <-> GPIO5, LED1 <-> GPIO4, LED0 <-> GPIO3 */ ++ if ( led_cfg[led_id].gpio != (led_id + (AIR_LED0_GPIO5 - (2 * led_id)))) { ++ printf("LED%d uses incorrect GPIO%d !\n", led_id, led_cfg[led_id].gpio); ++ return -EINVAL; ++ } ++ reg_value = 0; ++ if (led_cfg[led_id].en == LED_ENABLE) ++ { ++ led_gpio |= BIT(led_cfg[led_id].gpio); ++ ret = airoha_led_set_state(phydev, led_id, led_cfg[led_id].en); ++ if (ret != 0) { ++ printf("LED fail to set state, ret %d !\n", ret); ++ return ret; ++ } ++ ret = airoha_led_set_usr_def(phydev, led_id, led_cfg[led_id].pol, led_cfg[led_id].on_cfg, led_cfg[led_id].blk_cfg); ++ if (ret != 0) { ++ printf("LED fail to set default, ret %d !\n", ret); ++ return ret; ++ } ++ } ++ } ++ ret = air_buckpbus_reg_write(phydev, 0xcf8b8, led_gpio); ++ if (ret < 0) ++ return ret; ++ printf("LED initialize OK !\n"); ++ return 0; ++} ++#endif /* AIR_LED_SUPPORT */ ++ ++static char *firmware_buf; ++static int en8811h_load_firmware(struct phy_device *phydev) ++{ ++ u32 pbus_value; ++ int ret = 0; ++ ++ if (!firmware_buf) { ++ firmware_buf = malloc(EN8811H_MD32_DM_SIZE + EN8811H_MD32_DSP_SIZE); ++ if (!firmware_buf) { ++ printf("[Airoha] cannot allocated buffer for firmware.\n"); ++ return -ENOMEM; ++ } ++ ++#ifdef CONFIG_PHY_AIROHA_FW_IN_UBI ++ ret = ubi_volume_read("en8811h-fw", firmware_buf, EN8811H_MD32_DM_SIZE + EN8811H_MD32_DSP_SIZE); ++ if (ret) { ++ printf("[Airoha] read firmware from UBI failed.\n"); ++ free(firmware_buf); ++ firmware_buf = NULL; ++ return ret; ++ } ++#elif defined(CONFIG_PHY_AIROHA_FW_IN_MMC) ++ struct mmc *mmc = find_mmc_device(0); ++ if (!mmc) { ++ printf("[Airoha] opening MMC device failed.\n"); ++ free(firmware_buf); ++ firmware_buf = NULL; ++ return -ENODEV; ++ } ++ if (mmc_init(mmc)) { ++ printf("[Airoha] initializing MMC device failed.\n"); ++ free(firmware_buf); ++ firmware_buf = NULL; ++ return -ENODEV; ++ } ++ if (IS_SD(mmc)) { ++ printf("[Airoha] SD card is not supported.\n"); ++ free(firmware_buf); ++ firmware_buf = NULL; ++ return -EINVAL; ++ } ++ ret = mmc_set_part_conf(mmc, 1, 2, 2); ++ if (ret) { ++ printf("[Airoha] cannot access eMMC boot1 hw partition.\n"); ++ free(firmware_buf); ++ firmware_buf = NULL; ++ return ret; ++ } ++ ret = blk_dread(mmc_get_blk_desc(mmc), 0, 0x120, firmware_buf); ++ mmc_set_part_conf(mmc, 1, 1, 0); ++ if (ret != 0x120) { ++ printf("[Airoha] cannot read firmware from eMMC.\n"); ++ free(firmware_buf); ++ firmware_buf = NULL; ++ return -EIO; ++ } ++#else ++#warning EN8811H firmware loading not implemented ++ free(firmware_buf); ++ firmware_buf = NULL; ++ return -EOPNOTSUPP; ++#endif ++ } ++ ++ ret = air_buckpbus_reg_write(phydev, 0x0f0018, 0x0); ++ if (ret < 0) ++ return ret; ++ pbus_value = air_buckpbus_reg_read(phydev, 0x800000); ++ pbus_value |= BIT(11); ++ ret = air_buckpbus_reg_write(phydev, 0x800000, pbus_value); ++ if (ret < 0) ++ return ret; ++ /* Download DM */ ++ ret = MDIOWriteBuf(phydev, 0x00000000, EN8811H_MD32_DM_SIZE, firmware_buf); ++ if (ret < 0) { ++ printf("[Airoha] MDIOWriteBuf 0x00000000 fail.\n"); ++ return ret; ++ } ++ /* Download PM */ ++ ret = MDIOWriteBuf(phydev, 0x00100000, EN8811H_MD32_DSP_SIZE, firmware_buf + EN8811H_MD32_DM_SIZE); ++ if (ret < 0) { ++ printf("[Airoha] MDIOWriteBuf 0x00100000 fail.\n"); ++ return ret; ++ } ++ pbus_value = air_buckpbus_reg_read(phydev, 0x800000); ++ pbus_value &= ~BIT(11); ++ ret = air_buckpbus_reg_write(phydev, 0x800000, pbus_value); ++ if (ret < 0) ++ return ret; ++ ret = air_buckpbus_reg_write(phydev, 0x0f0018, 0x01); ++ if (ret < 0) ++ return ret; ++ return 0; ++} ++ ++static int en8811h_config(struct phy_device *phydev) ++{ ++ int ret = 0; ++ int pid1 = 0, pid2 = 0; ++ ++ ret = air_pbus_reg_write(phydev, 0xcf928 , 0x0); ++ if (ret < 0) ++ return ret; ++ ++ pid1 = phy_read(phydev, MDIO_DEVAD_NONE, MII_PHYSID1); ++ pid2 = phy_read(phydev, MDIO_DEVAD_NONE, MII_PHYSID2); ++ if ((EN8811H_PHY_ID1 != pid1) || (EN8811H_PHY_ID2 != pid2)) { ++ printf("EN8811H does not exist !\n"); ++ return -ENODEV; ++ } ++ ++ return 0; ++} ++ ++static int en8811h_get_autonego(struct phy_device *phydev, int *an) ++{ ++ int reg; ++ reg = phy_read(phydev, MDIO_DEVAD_NONE, MII_BMCR); ++ if (reg < 0) ++ return -EINVAL; ++ if (reg & BMCR_ANENABLE) ++ *an = AUTONEG_ENABLE; ++ else ++ *an = AUTONEG_DISABLE; ++ return 0; ++} ++ ++static int en8811h_startup(struct phy_device *phydev) ++{ ++ ofnode node = phy_get_ofnode(phydev); ++ int ret = 0, lpagb = 0, lpa = 0, common_adv_gb = 0, common_adv = 0, advgb = 0, adv = 0, reg = 0, an = AUTONEG_DISABLE, bmcr = 0, reg_value; ++ int old_link = phydev->link; ++ u32 pbus_value = 0, retry; ++ ++ eth_phy_reset(phydev->dev, 1); ++ mdelay(10); ++ eth_phy_reset(phydev->dev, 0); ++ mdelay(1); ++ ++ ret = en8811h_load_firmware(phydev); ++ if (ret) { ++ printf("EN8811H load firmware fail.\n"); ++ return ret; ++ } ++ retry = MAX_RETRY; ++ do { ++ mdelay(300); ++ reg_value = air_mii_cl45_read(phydev, 0x1e, 0x8009); ++ if (EN8811H_PHY_READY == reg_value) { ++ printf("EN8811H PHY ready!\n"); ++ break; ++ } ++ retry--; ++ } while (retry); ++ if (0 == retry) { ++ printf("EN8811H PHY is not ready. (MD32 FW Status reg: 0x%x)\n", reg_value); ++ pbus_value = air_buckpbus_reg_read(phydev, 0x3b3c); ++ printf("Check MD32 FW Version(0x3b3c) : %08x\n", pbus_value); ++ printf("EN8811H initialize fail!\n"); ++ return 0; ++ } ++ /* Mode selection*/ ++ printf("EN8811H Mode 1 !\n"); ++ ret = air_mii_cl45_write(phydev, 0x1e, 0x800c, 0x0); ++ if (ret < 0) ++ return ret; ++ ret = air_mii_cl45_write(phydev, 0x1e, 0x800d, 0x0); ++ if (ret < 0) ++ return ret; ++ ret = air_mii_cl45_write(phydev, 0x1e, 0x800e, 0x1101); ++ if (ret < 0) ++ return ret; ++ ret = air_mii_cl45_write(phydev, 0x1e, 0x800f, 0x0002); ++ if (ret < 0) ++ return ret; ++ ++ /* Serdes polarity */ ++ pbus_value = air_buckpbus_reg_read(phydev, 0xca0f8); ++ pbus_value &= 0xfffffffc; ++ pbus_value |= ofnode_read_bool(node, "airoha,rx-pol-reverse") ? ++ EN8811H_RX_POLARITY_REVERSE : EN8811H_RX_POLARITY_NORMAL; ++ pbus_value |= ofnode_read_bool(node, "airoha,tx-pol-reverse") ? ++ EN8811H_TX_POLARITY_REVERSE : EN8811H_TX_POLARITY_NORMAL; ++ ret = air_buckpbus_reg_write(phydev, 0xca0f8, pbus_value); ++ if (ret < 0) ++ return ret; ++ pbus_value = air_buckpbus_reg_read(phydev, 0xca0f8); ++ printf("Tx, Rx Polarity(0xca0f8): %08x\n", pbus_value); ++ pbus_value = air_buckpbus_reg_read(phydev, 0x3b3c); ++ printf("MD32 FW Version(0x3b3c) : %08x\n", pbus_value); ++#if defined(AIR_LED_SUPPORT) ++ ret = en8811h_led_init(phydev); ++ if (ret < 0) { ++ printf("en8811h_led_init fail\n"); ++ } ++#endif ++ printf("EN8811H initialize OK ! (%s)\n", EN8811H_DRIVER_VERSION); ++ ++ ret = genphy_update_link(phydev); ++ if (ret) ++ { ++ printf("ret %d!\n", ret); ++ return ret; ++ } ++ ++ ret = genphy_parse_link(phydev); ++ if (ret) ++ { ++ printf("ret %d!\n", ret); ++ return ret; ++ } ++ ++ if (old_link && phydev->link) ++ return 0; ++ ++ phydev->speed = SPEED_100; ++ phydev->duplex = DUPLEX_FULL; ++ phydev->pause = 0; ++ phydev->asym_pause = 0; ++ ++ reg = phy_read(phydev, MDIO_DEVAD_NONE, MII_BMSR); ++ if (reg < 0) ++ { ++ printf("MII_BMSR reg %d!\n", reg); ++ return reg; ++ } ++ reg = phy_read(phydev, MDIO_DEVAD_NONE, MII_BMSR); ++ if (reg < 0) ++ { ++ printf("MII_BMSR reg %d!\n", reg); ++ return reg; ++ } ++ if(reg & BMSR_LSTATUS) ++ { ++ pbus_value = air_buckpbus_reg_read(phydev, 0x109D4); ++ if (0x10 & pbus_value) { ++ phydev->speed = SPEED_2500; ++ phydev->duplex = DUPLEX_FULL; ++ } ++ else ++ { ++ ret = en8811h_get_autonego(phydev, &an); ++ if ((AUTONEG_ENABLE == an) && (0 == ret)) ++ { ++ printf("AN mode!\n"); ++ printf("SPEED 1000/100!\n"); ++ lpagb = phy_read(phydev, MDIO_DEVAD_NONE, MII_STAT1000); ++ if (lpagb < 0 ) ++ return lpagb; ++ advgb = phy_read(phydev, MDIO_DEVAD_NONE, MII_CTRL1000); ++ if (adv < 0 ) ++ return adv; ++ common_adv_gb = (lpagb & (advgb << 2)); ++ ++ lpa = phy_read(phydev, MDIO_DEVAD_NONE, MII_LPA); ++ if (lpa < 0 ) ++ return lpa; ++ adv = phy_read(phydev, MDIO_DEVAD_NONE, MII_ADVERTISE); ++ if (adv < 0 ) ++ return adv; ++ common_adv = (lpa & adv); ++ ++ phydev->speed = SPEED_10; ++ phydev->duplex = DUPLEX_HALF; ++ if (common_adv_gb & (LPA_1000FULL | LPA_1000HALF)) ++ { ++ phydev->speed = SPEED_1000; ++ if (common_adv_gb & LPA_1000FULL) ++ ++ phydev->duplex = DUPLEX_FULL; ++ } ++ else if (common_adv & (LPA_100FULL | LPA_100HALF)) ++ { ++ phydev->speed = SPEED_100; ++ if (common_adv & LPA_100FULL) ++ phydev->duplex = DUPLEX_FULL; ++ } ++ else ++ { ++ if (common_adv & LPA_10FULL) ++ phydev->duplex = DUPLEX_FULL; ++ } ++ } ++ else ++ { ++ printf("Force mode!\n"); ++ bmcr = phy_read(phydev, MDIO_DEVAD_NONE, MII_BMCR); ++ ++ if (bmcr < 0) ++ return bmcr; ++ ++ if (bmcr & BMCR_FULLDPLX) ++ phydev->duplex = DUPLEX_FULL; ++ else ++ phydev->duplex = DUPLEX_HALF; ++ ++ if (bmcr & BMCR_SPEED1000) ++ phydev->speed = SPEED_1000; ++ else if (bmcr & BMCR_SPEED100) ++ phydev->speed = SPEED_100; ++ else ++ phydev->speed = SPEED_100; ++ } ++ } ++ } ++ ++ return ret; ++} ++ ++#if AIR_UBOOT_REVISION > 0x202303 ++U_BOOT_PHY_DRIVER(en8811h) = { ++ .name = "Airoha EN8811H", ++ .uid = EN8811H_PHY_ID, ++ .mask = 0x0ffffff0, ++ .config = &en8811h_config, ++ .startup = &en8811h_startup, ++ .shutdown = &genphy_shutdown, ++}; ++#else ++static struct phy_driver AIR_EN8811H_driver = { ++ .name = "Airoha EN8811H", ++ .uid = EN8811H_PHY_ID, ++ .mask = 0x0ffffff0, ++ .config = &en8811h_config, ++ .startup = &en8811h_startup, ++ .shutdown = &genphy_shutdown, ++}; ++ ++int phy_air_en8811h_init(void) ++{ ++ phy_register(&AIR_EN8811H_driver); ++ return 0; ++} ++#endif +--- /dev/null ++++ b/drivers/net/phy/air_en8811h.h +@@ -0,0 +1,163 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ ++/************************************************* ++ * FILE NAME: air_en8811h.h ++ * PURPOSE: ++ * EN8811H PHY Driver for Uboot ++ * NOTES: ++ * ++ * Copyright (C) 2023 Airoha Technology Corp. ++ *************************************************/ ++ ++#ifndef __EN8811H_H ++#define __EN8811H_H ++ ++#define AIR_UBOOT_REVISION ((((U_BOOT_VERSION_NUM / 1000) % 10) << 20) | \ ++ (((U_BOOT_VERSION_NUM / 100) % 10) << 16) | \ ++ (((U_BOOT_VERSION_NUM / 10) % 10) << 12) | \ ++ ((U_BOOT_VERSION_NUM % 10) << 8) | \ ++ (((U_BOOT_VERSION_NUM_PATCH / 10) % 10) << 4) | \ ++ ((U_BOOT_VERSION_NUM_PATCH % 10) << 0)) ++ ++#define EN8811H_PHY_ID1 0x03a2 ++#define EN8811H_PHY_ID2 0xa411 ++#define EN8811H_PHY_ID ((EN8811H_PHY_ID1 << 16) | EN8811H_PHY_ID2) ++#define EN8811H_SPEED_2500 0x03 ++#define EN8811H_PHY_READY 0x02 ++#define MAX_RETRY 5 ++ ++#define EN8811H_MD32_DM_SIZE 0x4000 ++#define EN8811H_MD32_DSP_SIZE 0x20000 ++ ++#define EN8811H_TX_POLARITY_NORMAL 0x1 ++#define EN8811H_TX_POLARITY_REVERSE 0x0 ++ ++#define EN8811H_RX_POLARITY_NORMAL (0x0 << 1) ++#define EN8811H_RX_POLARITY_REVERSE (0x1 << 1) ++ ++#ifndef BIT ++#define BIT(nr) (1UL << (nr)) ++#endif ++ ++/* CL45 MDIO control */ ++#define MII_MMD_ACC_CTL_REG 0x0d ++#define MII_MMD_ADDR_DATA_REG 0x0e ++#define MMD_OP_MODE_DATA BIT(14) ++/* MultiGBASE-T AN register */ ++#define MULTIG_ANAR_2500M (0x0080) ++#define MULTIG_LPAR_2500M (0x0020) ++ ++#define EN8811H_DRIVER_VERSION "v1.0.4" ++ ++/************************************************************ ++ * For reference only ++ * LED0 Link 2500/Blink 2500 TxRx (GPIO5) <-> BASE_T_LED0, ++ * LED1 Link 1000/Blink 1000 TxRx (GPIO4) <-> BASE_T_LED1, ++ * LED2 Link 100/Blink 100 TxRx (GPIO3) <-> BASE_T_LED2, ++ ************************************************************/ ++/* User-defined.B */ ++#define AIR_LED0_ON (LED_ON_EVT_LINK_2500M) ++#define AIR_LED0_BLK (LED_BLK_EVT_2500M_TX_ACT | LED_BLK_EVT_2500M_RX_ACT) ++#define AIR_LED1_ON (LED_ON_EVT_LINK_1000M) ++#define AIR_LED1_BLK (LED_BLK_EVT_1000M_TX_ACT | LED_BLK_EVT_1000M_RX_ACT) ++#define AIR_LED2_ON (LED_ON_EVT_LINK_100M) ++#define AIR_LED2_BLK (LED_BLK_EVT_100M_TX_ACT | LED_BLK_EVT_100M_RX_ACT) ++/* User-defined.E */ ++ ++#define LED_ON_CTRL(i) (0x024 + ((i)*2)) ++#define LED_ON_EN (1 << 15) ++#define LED_ON_POL (1 << 14) ++#define LED_ON_EVT_MASK (0x1ff) ++/* LED ON Event Option.B */ ++#define LED_ON_EVT_LINK_2500M (1 << 8) ++#define LED_ON_EVT_FORCE (1 << 6) ++#define LED_ON_EVT_HDX (1 << 5) ++#define LED_ON_EVT_FDX (1 << 4) ++#define LED_ON_EVT_LINK_DOWN (1 << 3) ++#define LED_ON_EVT_LINK_100M (1 << 1) ++#define LED_ON_EVT_LINK_1000M (1 << 0) ++/* LED ON Event Option.E */ ++ ++#define LED_BLK_CTRL(i) (0x025 + ((i)*2)) ++#define LED_BLK_EVT_MASK (0xfff) ++/* LED Blinking Event Option.B*/ ++#define LED_BLK_EVT_2500M_RX_ACT (1 << 11) ++#define LED_BLK_EVT_2500M_TX_ACT (1 << 10) ++#define LED_BLK_EVT_FORCE (1 << 9) ++#define LED_BLK_EVT_100M_RX_ACT (1 << 3) ++#define LED_BLK_EVT_100M_TX_ACT (1 << 2) ++#define LED_BLK_EVT_1000M_RX_ACT (1 << 1) ++#define LED_BLK_EVT_1000M_TX_ACT (1 << 0) ++/* LED Blinking Event Option.E*/ ++#define LED_ENABLE 1 ++#define LED_DISABLE 0 ++ ++#define EN8811H_LED_COUNT 3 ++ ++#define LED_BCR (0x021) ++#define LED_BCR_EXT_CTRL (1 << 15) ++#define LED_BCR_CLK_EN (1 << 3) ++#define LED_BCR_TIME_TEST (1 << 2) ++#define LED_BCR_MODE_MASK (3) ++#define LED_BCR_MODE_DISABLE (0) ++#define LED_BCR_MODE_2LED (1) ++#define LED_BCR_MODE_3LED_1 (2) ++#define LED_BCR_MODE_3LED_2 (3) ++ ++#define LED_ON_DUR (0x022) ++#define LED_ON_DUR_MASK (0xffff) ++ ++#define LED_BLK_DUR (0x023) ++#define LED_BLK_DUR_MASK (0xffff) ++ ++#define LED_GPIO_SEL_MASK 0x7FFFFFF ++ ++#define UNIT_LED_BLINK_DURATION 1024 ++ ++#define INVALID_DATA 0xffff ++#define PBUS_INVALID_DATA 0xffffffff ++ ++struct air_base_t_led_cfg_s { ++ u16 en; ++ u16 gpio; ++ u16 pol; ++ u16 on_cfg; ++ u16 blk_cfg; ++}; ++ ++enum { ++ AIR_LED2_GPIO3 = 3, ++ AIR_LED1_GPIO4, ++ AIR_LED0_GPIO5, ++ AIR_LED_LAST ++}; ++ ++enum { ++ AIR_BASE_T_LED0, ++ AIR_BASE_T_LED1, ++ AIR_BASE_T_LED2, ++ AIR_BASE_T_LED3 ++}; ++ ++enum { ++ AIR_LED_BLK_DUR_32M, ++ AIR_LED_BLK_DUR_64M, ++ AIR_LED_BLK_DUR_128M, ++ AIR_LED_BLK_DUR_256M, ++ AIR_LED_BLK_DUR_512M, ++ AIR_LED_BLK_DUR_1024M, ++ AIR_LED_BLK_DUR_LAST ++}; ++ ++enum { ++ AIR_ACTIVE_LOW, ++ AIR_ACTIVE_HIGH, ++}; ++ ++enum { ++ AIR_LED_MODE_DISABLE, ++ AIR_LED_MODE_USER_DEFINE, ++ AIR_LED_MODE_LAST ++}; ++ ++#endif /* End of __EN8811H_MD32_H */ ++ +--- a/drivers/net/eth-phy-uclass.c ++++ b/drivers/net/eth-phy-uclass.c +@@ -155,7 +155,7 @@ static int eth_phy_of_to_plat(struct ude + return 0; + } + +-static void eth_phy_reset(struct udevice *dev, int value) ++void eth_phy_reset(struct udevice *dev, int value) + { + struct eth_phy_device_priv *uc_priv = dev_get_uclass_priv(dev); + u32 delay; +--- a/include/eth_phy.h ++++ b/include/eth_phy.h +@@ -14,5 +14,6 @@ int eth_phy_binds_nodes(struct udevice * + int eth_phy_set_mdio_bus(struct udevice *eth_dev, struct mii_dev *mdio_bus); + struct mii_dev *eth_phy_get_mdio_bus(struct udevice *eth_dev); + int eth_phy_get_addr(struct udevice *dev); ++void eth_phy_reset(struct udevice *dev, int value); + + #endif diff --git a/lede/package/boot/uboot-mediatek/patches/442-add-bpi-r3-mini.patch b/lede/package/boot/uboot-mediatek/patches/442-add-bpi-r3-mini.patch new file mode 100644 index 0000000000..5df81ae7a1 --- /dev/null +++ b/lede/package/boot/uboot-mediatek/patches/442-add-bpi-r3-mini.patch @@ -0,0 +1,779 @@ +--- /dev/null ++++ b/configs/mt7986a_bpi-r3-mini-emmc_defconfig +@@ -0,0 +1,203 @@ ++CONFIG_ARM=y ++CONFIG_POSITION_INDEPENDENT=y ++CONFIG_ARCH_MEDIATEK=y ++CONFIG_TARGET_MT7986=y ++CONFIG_TEXT_BASE=0x41e00000 ++CONFIG_SYS_MALLOC_F_LEN=0x4000 ++CONFIG_SYS_HAS_NONCACHED_MEMORY=y ++CONFIG_NR_DRAM_BANKS=1 ++CONFIG_DEFAULT_DEVICE_TREE="mt7986a-bpi-r3-mini" ++CONFIG_DEFAULT_ENV_FILE="bananapi_bpi-r3-mini_emmc_env" ++CONFIG_DEFAULT_FDT_FILE="mediatek/mt7986a-bpi-r3-mini.dtb" ++CONFIG_OF_LIBFDT_OVERLAY=y ++CONFIG_OF_SYSTEM_SETUP=y ++CONFIG_DEBUG_UART_BASE=0x11002000 ++CONFIG_DEBUG_UART_CLOCK=40000000 ++CONFIG_DEBUG_UART=y ++CONFIG_SYS_LOAD_ADDR=0x46000000 ++CONFIG_SMBIOS_PRODUCT_NAME="" ++CONFIG_AUTOBOOT_KEYED=y ++CONFIG_BOOTDELAY=30 ++CONFIG_AUTOBOOT_MENU_SHOW=y ++CONFIG_CFB_CONSOLE_ANSI=y ++CONFIG_BOARD_LATE_INIT=y ++CONFIG_BUTTON=y ++CONFIG_BUTTON_GPIO=y ++CONFIG_GPIO_HOG=y ++CONFIG_CMD_ENV_FLAGS=y ++CONFIG_FIT=y ++CONFIG_FIT_ENABLE_SHA256_SUPPORT=y ++CONFIG_LED=y ++CONFIG_LED_BLINK=y ++CONFIG_LED_GPIO=y ++CONFIG_LOGLEVEL=7 ++CONFIG_LOG=y ++CONFIG_SYS_PROMPT="MT7986> " ++CONFIG_CMD_BOOTMENU=y ++CONFIG_CMD_BOOTP=y ++CONFIG_CMD_BUTTON=y ++CONFIG_CMD_CACHE=y ++CONFIG_CMD_CDP=y ++CONFIG_CMD_CPU=y ++CONFIG_CMD_DHCP=y ++CONFIG_CMD_DM=y ++CONFIG_CMD_DNS=y ++CONFIG_CMD_ECHO=y ++CONFIG_CMD_ENV_READMEM=y ++CONFIG_CMD_ERASEENV=y ++CONFIG_CMD_EXT4=y ++CONFIG_CMD_FAT=y ++CONFIG_CMD_FDT=y ++CONFIG_CMD_FS_GENERIC=y ++CONFIG_CMD_FS_UUID=y ++CONFIG_CMD_GPIO=y ++CONFIG_CMD_GPT=y ++CONFIG_CMD_HASH=y ++CONFIG_CMD_ITEST=y ++CONFIG_CMD_LED=y ++CONFIG_CMD_LICENSE=y ++CONFIG_CMD_LINK_LOCAL=y ++# CONFIG_CMD_MBR is not set ++CONFIG_CMD_MDIO=y ++CONFIG_CMD_MII=y ++CONFIG_CMD_MMC=y ++CONFIG_CMD_MTD=y ++CONFIG_CMD_PCI=y ++CONFIG_CMD_PSTORE=y ++CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000 ++CONFIG_CMD_SF_TEST=y ++CONFIG_CMD_PING=y ++CONFIG_CMD_PXE=y ++CONFIG_CMD_PWM=y ++CONFIG_CMD_SMC=y ++CONFIG_CMD_TFTPBOOT=y ++CONFIG_CMD_TFTPSRV=y ++CONFIG_CMD_UBI=y ++CONFIG_CMD_UBI_RENAME=y ++CONFIG_CMD_UBIFS=y ++CONFIG_CMD_ASKENV=y ++CONFIG_CMD_PART=y ++CONFIG_CMD_RARP=y ++CONFIG_CMD_SETEXPR=y ++CONFIG_CMD_SLEEP=y ++CONFIG_CMD_SNTP=y ++CONFIG_CMD_SOURCE=y ++CONFIG_CMD_STRINGS=y ++CONFIG_CMD_USB=y ++CONFIG_CMD_UUID=y ++CONFIG_DISPLAY_CPUINFO=y ++CONFIG_DM_MDIO=y ++CONFIG_DM_MMC=y ++CONFIG_DM_MTD=y ++CONFIG_DM_REGULATOR=y ++CONFIG_DM_REGULATOR_FIXED=y ++CONFIG_DM_REGULATOR_GPIO=y ++CONFIG_DM_USB=y ++CONFIG_DM_PWM=y ++CONFIG_PWM_MTK=y ++CONFIG_HUSH_PARSER=y ++CONFIG_SYS_REDUNDAND_ENVIRONMENT=y ++CONFIG_SYS_RELOC_GD_ENV_ADDR=y ++CONFIG_VERSION_VARIABLE=y ++CONFIG_PARTITION_UUIDS=y ++CONFIG_NETCONSOLE=y ++CONFIG_REGMAP=y ++CONFIG_SYSCON=y ++CONFIG_CLK=y ++CONFIG_DM_GPIO=y ++CONFIG_DM_SCSI=y ++CONFIG_AHCI=y ++CONFIG_AHCI_PCI=y ++CONFIG_SCSI_AHCI=y ++CONFIG_SCSI=y ++CONFIG_CMD_SCSI=y ++CONFIG_PHY=y ++CONFIG_PHY_MTK_TPHY=y ++CONFIG_PHY_ETHERNET_ID=y ++CONFIG_PHY_FIXED=y ++CONFIG_MTK_AHCI=y ++CONFIG_DM_ETH=y ++CONFIG_DM_ETH_PHY=y ++CONFIG_MEDIATEK_ETH=y ++CONFIG_PHY_AIROHA=y ++CONFIG_PHY_AIROHA_EN8811H=y ++CONFIG_PHY_AIROHA_FW_IN_MMC=y ++CONFIG_PCI=y ++CONFIG_MTD=y ++CONFIG_MTD_UBI_FASTMAP=y ++CONFIG_DM_PCI=y ++CONFIG_PCIE_MEDIATEK=y ++CONFIG_PINCTRL=y ++CONFIG_PINCONF=y ++CONFIG_PINCTRL_MT7622=y ++CONFIG_POWER_DOMAIN=y ++CONFIG_PRE_CONSOLE_BUFFER=y ++CONFIG_PRE_CON_BUF_ADDR=0x4007EF00 ++CONFIG_MTK_POWER_DOMAIN=y ++CONFIG_RAM=y ++CONFIG_DM_SERIAL=y ++CONFIG_MTK_SERIAL=y ++CONFIG_MMC=y ++CONFIG_MMC_DEFAULT_DEV=1 ++CONFIG_MMC_HS200_SUPPORT=y ++CONFIG_MMC_MTK=y ++CONFIG_MMC_SUPPORTS_TUNING=y ++CONFIG_SUPPORT_EMMC_BOOT=y ++CONFIG_SPI=y ++CONFIG_DM_SPI=y ++CONFIG_MTK_SPI_NAND=y ++CONFIG_MTK_SPI_NAND_MTD=y ++CONFIG_SYSRESET_WATCHDOG=y ++CONFIG_WDT_MTK=y ++CONFIG_LZO=y ++CONFIG_ZSTD=y ++CONFIG_HEXDUMP=y ++CONFIG_RANDOM_UUID=y ++CONFIG_REGEX=y ++CONFIG_USB=y ++CONFIG_USB_HOST=y ++CONFIG_USB_XHCI_HCD=y ++CONFIG_USB_XHCI_MTK=y ++CONFIG_USB_STORAGE=y ++CONFIG_OF_EMBED=y ++CONFIG_ENV_OVERWRITE=y ++CONFIG_ENV_IS_IN_MMC=y ++CONFIG_ENV_OFFSET=0x400000 ++CONFIG_ENV_OFFSET_REDUND=0x440000 ++CONFIG_ENV_SIZE=0x40000 ++CONFIG_ENV_SIZE_REDUND=0x40000 ++CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y ++CONFIG_NET_RANDOM_ETHADDR=y ++CONFIG_REGMAP=y ++CONFIG_SYSCON=y ++CONFIG_CLK=y ++CONFIG_SUPPORT_EMMC_BOOT=y ++CONFIG_MMC_HS200_SUPPORT=y ++CONFIG_MMC_MTK=y ++CONFIG_MEDIATEK_ETH=y ++CONFIG_PINCTRL=y ++CONFIG_PINCONF=y ++CONFIG_PINCTRL_MT7986=y ++CONFIG_POWER_DOMAIN=y ++CONFIG_MTK_POWER_DOMAIN=y ++CONFIG_DM_REGULATOR=y ++CONFIG_DM_REGULATOR_FIXED=y ++CONFIG_DM_SERIAL=y ++CONFIG_MTK_SERIAL=y ++CONFIG_HEXDUMP=y ++CONFIG_USE_DEFAULT_ENV_FILE=y ++CONFIG_MTD_SPI_NAND=y ++CONFIG_MTK_SPIM=y ++#CONFIG_MTK_SNOR=y ++CONFIG_DM_SPI_FLASH=y ++CONFIG_SPI_FLASH_MTD=y ++CONFIG_SPI_FLASH_WINBOND=y ++# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set ++CONFIG_CMD_SF=y ++CONFIG_CMD_NAND=y ++CONFIG_CMD_NAND_TRIMFFS=y ++CONFIG_LMB_MAX_REGIONS=64 ++CONFIG_USE_IPADDR=y ++CONFIG_IPADDR="192.168.1.1" ++CONFIG_USE_SERVERIP=y ++CONFIG_SERVERIP="192.168.1.254" +--- /dev/null ++++ b/configs/mt7986a_bpi-r3-mini-snand_defconfig +@@ -0,0 +1,203 @@ ++CONFIG_ARM=y ++CONFIG_POSITION_INDEPENDENT=y ++CONFIG_ARCH_MEDIATEK=y ++CONFIG_TARGET_MT7986=y ++CONFIG_TEXT_BASE=0x41e00000 ++CONFIG_SYS_MALLOC_F_LEN=0x4000 ++CONFIG_SYS_HAS_NONCACHED_MEMORY=y ++CONFIG_NR_DRAM_BANKS=1 ++CONFIG_DEFAULT_DEVICE_TREE="mt7986a-bpi-r3-mini" ++CONFIG_DEFAULT_ENV_FILE="bananapi_bpi-r3-mini_snand_env" ++CONFIG_DEFAULT_FDT_FILE="mediatek/mt7986a-bpi-r3-mini.dtb" ++CONFIG_OF_LIBFDT_OVERLAY=y ++CONFIG_OF_SYSTEM_SETUP=y ++CONFIG_DEBUG_UART_BASE=0x11002000 ++CONFIG_DEBUG_UART_CLOCK=40000000 ++CONFIG_DEBUG_UART=y ++CONFIG_SYS_LOAD_ADDR=0x46000000 ++CONFIG_SMBIOS_PRODUCT_NAME="" ++CONFIG_AUTOBOOT_KEYED=y ++CONFIG_BOOTDELAY=30 ++CONFIG_AUTOBOOT_MENU_SHOW=y ++CONFIG_CFB_CONSOLE_ANSI=y ++CONFIG_BOARD_LATE_INIT=y ++CONFIG_BUTTON=y ++CONFIG_BUTTON_GPIO=y ++CONFIG_GPIO_HOG=y ++CONFIG_CMD_ENV_FLAGS=y ++CONFIG_FIT=y ++CONFIG_FIT_ENABLE_SHA256_SUPPORT=y ++CONFIG_LED=y ++CONFIG_LED_BLINK=y ++CONFIG_LED_GPIO=y ++CONFIG_LOGLEVEL=7 ++CONFIG_LOG=y ++CONFIG_SYS_PROMPT="MT7986> " ++CONFIG_CMD_BOOTMENU=y ++CONFIG_CMD_BOOTP=y ++CONFIG_CMD_BUTTON=y ++CONFIG_CMD_CACHE=y ++CONFIG_CMD_CDP=y ++CONFIG_CMD_CPU=y ++CONFIG_CMD_DHCP=y ++CONFIG_CMD_DM=y ++CONFIG_CMD_DNS=y ++CONFIG_CMD_ECHO=y ++CONFIG_CMD_ENV_READMEM=y ++CONFIG_CMD_ERASEENV=y ++CONFIG_CMD_EXT4=y ++CONFIG_CMD_FAT=y ++CONFIG_CMD_FDT=y ++CONFIG_CMD_FS_GENERIC=y ++CONFIG_CMD_FS_UUID=y ++CONFIG_CMD_GPIO=y ++CONFIG_CMD_GPT=y ++CONFIG_CMD_HASH=y ++CONFIG_CMD_ITEST=y ++CONFIG_CMD_LED=y ++CONFIG_CMD_LICENSE=y ++CONFIG_CMD_LINK_LOCAL=y ++# CONFIG_CMD_MBR is not set ++CONFIG_CMD_MDIO=y ++CONFIG_CMD_MII=y ++CONFIG_CMD_MMC=y ++CONFIG_CMD_MTD=y ++CONFIG_CMD_PCI=y ++CONFIG_CMD_PSTORE=y ++CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000 ++CONFIG_CMD_SF_TEST=y ++CONFIG_CMD_PING=y ++CONFIG_CMD_PXE=y ++CONFIG_CMD_PWM=y ++CONFIG_CMD_SMC=y ++CONFIG_CMD_TFTPBOOT=y ++CONFIG_CMD_TFTPSRV=y ++CONFIG_CMD_UBI=y ++CONFIG_CMD_UBI_RENAME=y ++CONFIG_CMD_UBIFS=y ++CONFIG_CMD_ASKENV=y ++CONFIG_CMD_PART=y ++CONFIG_CMD_RARP=y ++CONFIG_CMD_SETEXPR=y ++CONFIG_CMD_SLEEP=y ++CONFIG_CMD_SNTP=y ++CONFIG_CMD_SOURCE=y ++CONFIG_CMD_STRINGS=y ++CONFIG_CMD_USB=y ++CONFIG_CMD_UUID=y ++CONFIG_DISPLAY_CPUINFO=y ++CONFIG_DM_MMC=y ++CONFIG_DM_MTD=y ++CONFIG_DM_REGULATOR=y ++CONFIG_DM_REGULATOR_FIXED=y ++CONFIG_DM_REGULATOR_GPIO=y ++CONFIG_DM_USB=y ++CONFIG_DM_PWM=y ++CONFIG_PWM_MTK=y ++CONFIG_HUSH_PARSER=y ++CONFIG_SYS_REDUNDAND_ENVIRONMENT=y ++CONFIG_SYS_RELOC_GD_ENV_ADDR=y ++CONFIG_VERSION_VARIABLE=y ++CONFIG_PARTITION_UUIDS=y ++CONFIG_NETCONSOLE=y ++CONFIG_REGMAP=y ++CONFIG_SYSCON=y ++CONFIG_CLK=y ++CONFIG_DM_GPIO=y ++CONFIG_DM_SCSI=y ++CONFIG_AHCI=y ++CONFIG_AHCI_PCI=y ++CONFIG_SCSI_AHCI=y ++CONFIG_SCSI=y ++CONFIG_CMD_SCSI=y ++CONFIG_DM_MDIO=y ++CONFIG_PHY=y ++CONFIG_PHY_MTK_TPHY=y ++CONFIG_PHY_ETHERNET_ID=y ++CONFIG_PHY_FIXED=y ++CONFIG_MTK_AHCI=y ++CONFIG_DM_ETH=y ++CONFIG_DM_ETH_PHY=y ++CONFIG_MEDIATEK_ETH=y ++CONFIG_PCI=y ++CONFIG_MTD=y ++CONFIG_MTD_UBI_FASTMAP=y ++CONFIG_DM_PCI=y ++CONFIG_PCIE_MEDIATEK=y ++CONFIG_PINCTRL=y ++CONFIG_PINCONF=y ++CONFIG_PINCTRL_MT7622=y ++CONFIG_POWER_DOMAIN=y ++CONFIG_PRE_CONSOLE_BUFFER=y ++CONFIG_PRE_CON_BUF_ADDR=0x4007EF00 ++CONFIG_MTK_POWER_DOMAIN=y ++CONFIG_RAM=y ++CONFIG_DM_SERIAL=y ++CONFIG_MTK_SERIAL=y ++CONFIG_MMC=y ++CONFIG_MMC_DEFAULT_DEV=1 ++CONFIG_MMC_HS200_SUPPORT=y ++CONFIG_MMC_MTK=y ++CONFIG_MMC_SUPPORTS_TUNING=y ++CONFIG_SUPPORT_EMMC_BOOT=y ++CONFIG_SPI=y ++CONFIG_DM_SPI=y ++CONFIG_MTK_SPI_NAND=y ++CONFIG_MTK_SPI_NAND_MTD=y ++CONFIG_SYSRESET_WATCHDOG=y ++CONFIG_WDT_MTK=y ++CONFIG_LZO=y ++CONFIG_ZSTD=y ++CONFIG_HEXDUMP=y ++CONFIG_RANDOM_UUID=y ++CONFIG_REGEX=y ++CONFIG_USB=y ++CONFIG_USB_HOST=y ++CONFIG_USB_XHCI_HCD=y ++CONFIG_USB_XHCI_MTK=y ++CONFIG_USB_STORAGE=y ++CONFIG_OF_EMBED=y ++CONFIG_ENV_OVERWRITE=y ++CONFIG_ENV_IS_IN_UBI=y ++CONFIG_ENV_UBI_PART="ubi" ++CONFIG_ENV_SIZE=0x1f000 ++CONFIG_ENV_SIZE_REDUND=0x1f000 ++CONFIG_ENV_UBI_VOLUME="ubootenv" ++CONFIG_ENV_UBI_VOLUME_REDUND="ubootenv2" ++CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y ++CONFIG_NET_RANDOM_ETHADDR=y ++CONFIG_REGMAP=y ++CONFIG_SYSCON=y ++CONFIG_CLK=y ++CONFIG_SUPPORT_EMMC_BOOT=y ++CONFIG_MMC_HS200_SUPPORT=y ++CONFIG_MMC_MTK=y ++CONFIG_MEDIATEK_ETH=y ++CONFIG_PHY_AIROHA=y ++CONFIG_PHY_AIROHA_EN8811H=y ++CONFIG_PHY_AIROHA_FW_IN_UBI=y ++CONFIG_PINCTRL=y ++CONFIG_PINCONF=y ++CONFIG_PINCTRL_MT7986=y ++CONFIG_POWER_DOMAIN=y ++CONFIG_MTK_POWER_DOMAIN=y ++CONFIG_DM_REGULATOR=y ++CONFIG_DM_REGULATOR_FIXED=y ++CONFIG_DM_SERIAL=y ++CONFIG_MTK_SERIAL=y ++CONFIG_HEXDUMP=y ++CONFIG_USE_DEFAULT_ENV_FILE=y ++CONFIG_MTD_SPI_NAND=y ++CONFIG_MTK_SPIM=y ++#CONFIG_MTK_SNOR=y ++#CONFIG_DM_SPI_FLASH=y ++#CONFIG_SPI_FLASH_MTD=y ++#CONFIG_SPI_FLASH_WINBOND=y ++# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set ++#CONFIG_CMD_SF=y ++CONFIG_CMD_NAND=y ++CONFIG_CMD_NAND_TRIMFFS=y ++CONFIG_LMB_MAX_REGIONS=64 ++CONFIG_USE_IPADDR=y ++CONFIG_IPADDR="192.168.1.1" ++CONFIG_USE_SERVERIP=y +--- /dev/null ++++ b/bananapi_bpi-r3-mini_snand_env +@@ -0,0 +1,61 @@ ++ipaddr=192.168.1.1 ++serverip=192.168.1.254 ++loadaddr=0x46000000 ++console=earlycon=uart8250,mmio32,0x11002000 console=ttyS0 ++bootargs=root=ubi.block=0,fit root=/dev/fit0 ++bootcmd=if pstore check ; then run boot_recovery ; else run boot_ubi ; fi ++bootconf=config-mt7986a-bananapi-bpi-r3-mini ++bootdelay=0 ++bootfile=openwrt-mediatek-filogic-bananapi_bpi-r3-mini-initramfs-recovery.itb ++bootfile_bl2=openwrt-mediatek-filogic-bananapi_bpi-r3-mini-snand-preloader.bin ++bootfile_fip=openwrt-mediatek-filogic-bananapi_bpi-r3-mini-snand-bl31-uboot.fip ++bootfile_upg=openwrt-mediatek-filogic-bananapi_bpi-r3-mini-squashfs-sysupgrade.itb ++bootfile_en8811h_fw=EthMD32.bin ++bootled_pwr=green:status ++bootled_rec=blue:status ++bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60 ++bootmenu_default=0 ++bootmenu_delay=0 ++bootmenu_title= ( ( ( OpenWrt ) ) ) [SPI-NAND] ++bootmenu_0=Initialize environment.=run _firstboot ++bootmenu_0d=Run default boot command.=run boot_default ++bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return ++bootmenu_2=Boot production system from NAND.=run boot_production ; run bootmenu_confirm_return ++bootmenu_3=Boot recovery system from NAND.=run boot_recovery ; run bootmenu_confirm_return ++bootmenu_4=Load production system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return ++bootmenu_5=Load recovery system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return ++bootmenu_6=Load Airoha EN8811H firmware via TFTP then write to NAND.=run boot_tftp_write_en8811h_fw ; run bootmenu_confirm_return ++bootmenu_7=Load BL31+U-Boot FIP via TFTP then write to NAND.=run boot_tftp_write_fip ; run bootmenu_confirm_return ++bootmenu_8=Load BL2 preloader via TFTP then write to NAND.=run boot_tftp_write_bl2 ; run bootmenu_confirm_return ++bootmenu_9=Reboot.=reset ++bootmenu_10=Reset all settings to factory defaults.=run reset_factory ; reset ++boot_first=if button reset ; then led $bootled_rec on ; run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu ++boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever ++boot_production=led $bootled_pwr on ; run ubi_read_production && bootm $loadaddr#$bootconf ; led $bootled_pwr off ++boot_recovery=led $bootled_rec on ; run ubi_read_recovery && bootm $loadaddr#$bootconf ; led $bootled_rec off ++boot_ubi=run boot_production ; run boot_recovery ++boot_tftp_forever=led $bootled_rec on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done ++boot_tftp_production=tftpboot $loadaddr $bootfile_upg && env exists replacevol && iminfo $loadaddr && run ubi_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi ++boot_tftp_recovery=tftpboot $loadaddr $bootfile && env exists replacevol && iminfo $loadaddr && run ubi_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi ++boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf ++boot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip && run ubi_write_fip && run reset_factory ++boot_tftp_write_bl2=tftpboot $loadaddr $bootfile_bl2 && run snand_write_bl2 ++boot_tftp_write_en8811h_fw=tftpboot $loadaddr $bootfile_en8811h_fw && run ubi_write_en8811h_fw ++part_default=production ++part_recovery=recovery ++reset_factory=mw $loadaddr 0xff 0x1f000 ; ubi write $loadaddr ubootenv 0x1f000 ; ubi write $loadaddr ubootenv2 0x1f000 ; ubi remove rootfs_data ++snand_write_bl2=mtd erase bl2 && mtd write bl2 $loadaddr 0x0 0x40000 && mtd write bl2 $loadaddr 0x40000 0x40000 && mtd write bl2 $loadaddr 0x80000 0x40000 && mtd write bl2 $loadaddr 0xc0000 0x40000 ++ubi_create_env=ubi check ubootenv || ubi create ubootenv 0x1f000 dynamic ; ubi check ubootenv2 || ubi create ubootenv2 0x1f000 dynamic ++ubi_prepare_rootfs=if ubi check rootfs_data ; then else if env exists rootfs_data_max ; then ubi create rootfs_data $rootfs_data_max dynamic || ubi create rootfs_data - dynamic ; else ubi create rootfs_data - dynamic ; fi ; fi ++ubi_read_production=ubi read $loadaddr fit && iminfo $loadaddr && run ubi_prepare_rootfs ++ubi_read_recovery=ubi check recovery && ubi read $loadaddr recovery ++ubi_read_emmc_install=ubi check emmc_install && ubi read $loadaddr emmc_install ++ubi_remove_rootfs=ubi check rootfs_data && ubi remove rootfs_data ++ubi_write_fip=ubi check fip && ubi remove fip ; ubi create fip 0x200000 static ; ubi write $loadaddr fip 0x200000 ++ubi_write_en8811h_fw=ubi check en8811h-fw && ubi remove en8811h-fw ; ubi create en8811h-fw 0x24000 static ; ubi write $loadaddr en8811h-fw 0x24000 ++ubi_write_production=ubi check fit && ubi remove fit ; run ubi_remove_rootfs ; ubi create fit $filesize dynamic && ubi write $loadaddr fit $filesize ++ubi_write_recovery=ubi check recovery && ubi remove recovery ; run ubi_remove_rootfs ; ubi create recovery $filesize dynamic && ubi write $loadaddr recovery $filesize ++_init_env=setenv _init_env ; run ubi_create_env ; saveenv ; saveenv ++_firstboot=setenv _firstboot ; run _switch_to_menu ; run _init_env ; run boot_first ++_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title ++_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title $ver" +--- /dev/null ++++ b/bananapi_bpi-r3-mini_emmc_env +@@ -0,0 +1,59 @@ ++ipaddr=192.168.1.1 ++serverip=192.168.1.254 ++loadaddr=0x46000000 ++console=earlycon=uart8250,mmio32,0x11002000 console=ttyS0 ++bootargs=root=/dev/fit0 ++bootcmd=if pstore check ; then run boot_recovery ; else run boot_emmc ; fi ++bootconf=config-mt7986a-bananapi-bpi-r3-mini ++bootdelay=0 ++bootfile=openwrt-mediatek-filogic-bananapi_bpi-r3-mini-initramfs-recovery.itb ++bootfile_bl2=openwrt-mediatek-filogic-bananapi_bpi-r3-mini-emmc-preloader.bin ++bootfile_fip=openwrt-mediatek-filogic-bananapi_bpi-r3-mini-emmc-bl31-uboot.fip ++bootfile_upg=openwrt-mediatek-filogic-bananapi_bpi-r3-mini-squashfs-sysupgrade.itb ++bootfile_en8811h_fw=EthMD32.bin ++bootled_pwr=green:status ++bootled_rec=blue:status ++bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60 ++bootmenu_default=0 ++bootmenu_delay=0 ++bootmenu_title= ( ( ( OpenWrt ) ) ) [eMMC] ++bootmenu_0=Initialize environment.=run _firstboot ++bootmenu_0d=Run default boot command.=run boot_default ++bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return ++bootmenu_2=Boot production system from eMMC.=run boot_production ; run bootmenu_confirm_return ++bootmenu_3=Boot recovery system from eMMC.=run boot_recovery ; run bootmenu_confirm_return ++bootmenu_4=Load production system via TFTP then write to eMMC.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return ++bootmenu_5=Load recovery system via TFTP then write to eMMC.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return ++bootmenu_6=Load Airoha EN8811H firmware via TFTP then write to NAND.=run boot_tftp_write_en8811h_fw ; run bootmenu_confirm_return ++bootmenu_7=Load BL31+U-Boot FIP via TFTP then write to eMMC.=run boot_tftp_write_fip ; run bootmenu_confirm_return ++bootmenu_8=Load BL2 preloader via TFTP then write to eMMC.=run boot_tftp_write_bl2 ; run bootmenu_confirm_return ++bootmenu_9=Reboot.=reset ++bootmenu_10=Reset all settings to factory defaults.=run reset_factory ; reset ++boot_first=if button reset ; then led $bootled_rec on ; run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu ++boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever ++boot_production=led $bootled_pwr on ; run emmc_read_production && bootm $loadaddr#$bootconf ; led $bootled_pwr off ++boot_recovery=led $bootled_rec on ; run emmc_read_recovery && bootm $loadaddr#$bootconf ; led $bootled_rec off ++boot_emmc=run boot_production ; run boot_recovery ++boot_tftp_forever=led $bootled_rec on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done ++boot_tftp_production=tftpboot $loadaddr $bootfile_upg && env exists replacevol && iminfo $loadaddr && run emmc_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi ++boot_tftp_recovery=tftpboot $loadaddr $bootfile && env exists replacevol && iminfo $loadaddr && run emmc_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi ++boot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip && run emmc_write_fip ++boot_tftp_write_bl2=tftpboot $loadaddr $bootfile_bl2 && run emmc_write_bl2 ++boot_tftp_write_en8811h_fw=tftpboot $loadaddr $bootfile_en8811h_fw && run emmc_write_en8811h_fw ++boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf ++mmc_write_vol=imszb $loadaddr image_size && test 0x$image_size -le 0x$part_size && mmc erase 0x$part_addr 0x$image_size && mmc write $loadaddr 0x$part_addr 0x$image_size ++mmc_read_vol=mmc read $loadaddr $part_addr 0x100 && imszb $loadaddr image_size && test 0x$image_size -le 0x$part_size && mmc read $loadaddr 0x$part_addr 0x$image_size && setexpr filesize $image_size * 0x200 ++part_default=production ++part_recovery=recovery ++reset_factory=eraseenv && reset ++emmc_read_production=part start mmc 0 $part_default part_addr && part size mmc 0 $part_default part_size && run mmc_read_vol ++emmc_read_recovery=part start mmc 0 $part_recovery part_addr && part size mmc 0 $part_recovery part_size && run mmc_read_vol ++emmc_write_en8811h_fw=mmc partconf 0 1 2 2 && mmc erase 0x0 0x120 && mmc write $fileaddr 0x0 0x120 ; mmc partconf 0 1 1 0 ++emmc_write_bl2=mmc partconf 0 1 1 1 && mmc erase 0x0 0x400 && mmc write $fileaddr 0x0 0x400 ; mmc partconf 0 1 1 0 ++emmc_write_fip=mmc erase 0x3400 0x2000 && mmc write $fileaddr 0x3400 0x2000 && mmc erase 0x2000 0x800 ++emmc_write_production=part start mmc 0 $part_default part_addr && part size mmc 0 $part_default part_size && run mmc_write_vol ++emmc_write_recovery=part start mmc 0 $part_recovery part_addr && part size mmc 0 $part_recovery part_size && run mmc_write_vol ++_init_env=setenv _init_env ; setenv _create_env ; saveenv ; saveenv ++_firstboot=setenv _firstboot ; run _switch_to_menu ; run _init_env ; run boot_first ++_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title ++_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title $ver" +--- /dev/null ++++ b/arch/arm/dts/mt7986a-bpi-r3-mini.dts +@@ -0,0 +1,238 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later ++ ++/dts-v1/; ++#include "mt7986.dtsi" ++#include ++#include ++ ++/ { ++ #address-cells = <1>; ++ #size-cells = <1>; ++ model = "Bananapi BPi-R3 Mini"; ++ compatible = "mediatek,mt7986", "mediatek,mt7986-rfb"; ++ ++ chosen { ++ stdout-path = &uart0; ++ tick-timer = &timer0; ++ }; ++ ++ memory@40000000 { ++ device_type = "memory"; ++ reg = <0x40000000 0x80000000>; ++ }; ++ ++ gpio-keys { ++ compatible = "gpio-keys"; ++ ++ button-reset { ++ label = "reset"; ++ linux,code = ; ++ gpios = <&gpio 7 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ status_led: led-0 { ++ label = "green:status"; ++ gpios = <&gpio 19 GPIO_ACTIVE_HIGH>; ++ }; ++ ++ led-1 { ++ label = "blue:wlan2g"; ++ gpios = <&gpio 1 GPIO_ACTIVE_HIGH>; ++ }; ++ ++ led-2 { ++ label = "blue:wlan5g"; ++ gpios = <&gpio 2 GPIO_ACTIVE_HIGH>; ++ }; ++ }; ++ ++ reg_1p8v: regulator-1p8v { ++ compatible = "regulator-fixed"; ++ regulator-name = "fixed-1.8V"; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <1800000>; ++ regulator-boot-on; ++ regulator-always-on; ++ }; ++ ++ reg_3p3v: regulator-3p3v { ++ compatible = "regulator-fixed"; ++ regulator-name = "fixed-3.3V"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-boot-on; ++ regulator-always-on; ++ }; ++}; ++ ++ð { ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mdio_pins>; ++ ++ mediatek,gmac-id = <0>; ++ phy-mode = "2500base-x"; ++ phy-handle = <&phy14>; ++ ++ phy14: eth-phy@e { ++ compatible = "ethernet-phy-id03a2.a411"; ++ reg = <14>; ++ ++ airoha,rx-pol-reverse; ++ ++ reset-gpios = <&gpio 49 GPIO_ACTIVE_LOW>; ++ reset-assert-us = <10000>; ++ reset-deassert-us = <20000>; ++ }; ++}; ++ ++&mmc0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc0_pins_default>; ++ bus-width = <8>; ++ max-frequency = <200000000>; ++ cap-mmc-highspeed; ++ cap-mmc-hw-reset; ++ vmmc-supply = <®_3p3v>; ++ vqmmc-supply = <®_1p8v>; ++ non-removable; ++ status = "okay"; ++}; ++ ++&pinctrl { ++ mdio_pins: mdio-pins { ++ mux { ++ function = "eth"; ++ groups = "mdc_mdio"; ++ }; ++ ++ conf-en8811-pwr-a { ++ pins = "GPIO_11"; ++ drive-strength = ; ++ bias-pull-down = ; ++ output-low; ++ }; ++ ++ conf-en8811-pwr-b { ++ pins = "GPIO_12"; ++ drive-strength = ; ++ bias-pull-down = ; ++ output-low; ++ }; ++ }; ++ ++ mmc0_pins_default: mmc0default { ++ mux { ++ function = "flash"; ++ groups = "emmc_51"; ++ }; ++ ++ conf-cmd-dat { ++ pins = "EMMC_DATA_0", "EMMC_DATA_1", "EMMC_DATA_2", ++ "EMMC_DATA_3", "EMMC_DATA_4", "EMMC_DATA_5", ++ "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD"; ++ input-enable; ++ drive-strength = ; ++ bias-pull-up = ; ++ }; ++ ++ conf-clk { ++ pins = "EMMC_CK"; ++ drive-strength = ; ++ bias-pull-down = ; ++ }; ++ ++ conf-dsl { ++ pins = "EMMC_DSL"; ++ bias-pull-down = ; ++ }; ++ ++ conf-rst { ++ pins = "EMMC_RSTB"; ++ drive-strength = ; ++ bias-pull-up = ; ++ }; ++ }; ++ ++ spi_flash_pins: spi0-pins-func-1 { ++ mux { ++ function = "flash"; ++ groups = "spi0", "spi0_wp_hold"; ++ }; ++ ++ conf-pu { ++ pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP"; ++ drive-strength = ; ++ bias-pull-up = ; ++ }; ++ ++ conf-pd { ++ pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO"; ++ drive-strength = ; ++ bias-pull-down = ; ++ }; ++ }; ++ ++ pwm_pins: pwm0-pins-func-1 { ++ mux { ++ function = "pwm"; ++ groups = "pwm0"; ++ }; ++ }; ++}; ++ ++&pwm { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pwm_pins>; ++ status = "okay"; ++}; ++ ++&spi0 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&spi_flash_pins>; ++ status = "okay"; ++ must_tx; ++ enhance_timing; ++ dma_ext; ++ ipm_design; ++ support_quad; ++ tick_dly = <1>; ++ sample_sel = <0>; ++ ++ spi_nand@0 { ++ compatible = "spi-nand"; ++ reg = <0>; ++ spi-max-frequency = <20000000>; ++ ++ partitions { ++ compatible = "fixed-partitions"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ partition@0 { ++ label = "bl2"; ++ reg = <0x0 0x80000>; ++ }; ++ ++ partition@80000 { ++ label = "ubi"; ++ reg = <0x80000 0x7f80000>; ++ }; ++ }; ++ }; ++ ++}; ++ ++&uart0 { ++ status = "okay"; ++}; ++ ++&watchdog { ++ status = "disabled"; ++}; diff --git a/lede/package/boot/uboot-mediatek/patches/452-add-xiaomi-redmi-ax6s.patch b/lede/package/boot/uboot-mediatek/patches/452-add-xiaomi-redmi-ax6s.patch new file mode 100644 index 0000000000..256bc12361 --- /dev/null +++ b/lede/package/boot/uboot-mediatek/patches/452-add-xiaomi-redmi-ax6s.patch @@ -0,0 +1,320 @@ +From 57dc777bddf0baf3c27177576c40b5113309ce54 Mon Sep 17 00:00:00 2001 +From: Chuanhong Guo +Date: Sat, 2 Mar 2024 20:30:16 +0800 +Subject: [PATCH] add xiaomi redmi ax6s + +--- + arch/arm/dts/Makefile | 1 + + .../dts/mt7622-xiaomi-redmi-router-ax6s.dts | 166 ++++++++++++++++++ + ...omi_redmi-router-ax6s-ubi-loader_defconfig | 98 +++++++++++ + xiaomi-redmi-router-ax6s-ubi-loader_env | 22 +++ + 4 files changed, 287 insertions(+) + create mode 100644 arch/arm/dts/mt7622-xiaomi-redmi-router-ax6s.dts + create mode 100644 configs/mt7622_xiaomi_redmi-router-ax6s-ubi-loader_defconfig + create mode 100644 xiaomi-redmi-router-ax6s-ubi-loader_env + +--- a/arch/arm/dts/Makefile ++++ b/arch/arm/dts/Makefile +@@ -1425,6 +1425,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \ + mt7622-bananapi-bpi-r64.dtb \ + mt7622-linksys-e8450-ubi.dtb \ + mt7622-ubnt-unifi-6-lr.dtb \ ++ mt7622-xiaomi-redmi-router-ax6s.dtb \ + mt7623n-bananapi-bpi-r2.dtb \ + mt7629-rfb.dtb \ + mt7981-rfb.dtb \ +--- /dev/null ++++ b/arch/arm/dts/mt7622-xiaomi-redmi-router-ax6s.dts +@@ -0,0 +1,166 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT ++ ++/dts-v1/; ++#include ++#include ++#include "mt7622.dtsi" ++#include "mt7622-u-boot.dtsi" ++ ++/ { ++ #address-cells = <1>; ++ #size-cells = <1>; ++ model = "Xiaomi Redmi Router AX6S"; ++ compatible = "xiaomi,redmi-router-ax6s", "mediatek,mt7622"; ++ ++ chosen { ++ stdout-path = &uart0; ++ tick-timer = &timer0; ++ }; ++ ++ aliases { ++ spi0 = &snand; ++ ethernet0 = ð ++ }; ++ ++ memory@40000000 { ++ device_type = "memory"; ++ reg = <0x40000000 0x8000000>; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ led_power_blue: power_blue { ++ function = LED_FUNCTION_POWER; ++ color = ; ++ gpios = <&gpio 18 GPIO_ACTIVE_LOW>; ++ }; ++ ++ led_power_amber: power_amber { ++ function = LED_FUNCTION_POWER; ++ color = ; ++ gpios = <&gpio 17 GPIO_ACTIVE_LOW>; ++ }; ++ ++ led_net_blue: net_blue { ++ label = "blue:net"; ++ gpios = <&gpio 1 GPIO_ACTIVE_LOW>; ++ }; ++ ++ led_net_amber: net_amber { ++ label = "amber:net"; ++ gpios = <&gpio 16 GPIO_ACTIVE_LOW>; ++ }; ++ ++ }; ++ ++ keys { ++ compatible = "gpio-keys"; ++ ++ reset { ++ label = "reset"; ++ gpios = <&gpio 0 GPIO_ACTIVE_LOW>; ++ linux,code = ; ++ }; ++ ++ mesh { ++ label = "mesh"; ++ gpios = <&gpio 102 GPIO_ACTIVE_LOW>; ++ linux,code = ; ++ linux,input-type = ; ++ }; ++ }; ++ ++ reg_1p8v: regulator-1p8v { ++ compatible = "regulator-fixed"; ++ regulator-name = "fixed-1.8V"; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <1800000>; ++ regulator-boot-on; ++ regulator-always-on; ++ }; ++ ++ reg_3p3v: regulator-3p3v { ++ compatible = "regulator-fixed"; ++ regulator-name = "fixed-3.3V"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-boot-on; ++ regulator-always-on; ++ }; ++}; ++ ++&pcie { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pcie0_pins>; ++ status = "okay"; ++ ++ pcie@0,0 { ++ status = "okay"; ++ }; ++}; ++ ++&pinctrl { ++ pcie0_pins: pcie0-pins { ++ mux { ++ function = "pcie"; ++ groups = "pcie0_pad_perst", ++ "pcie0_1_waken", ++ "pcie0_1_clkreq"; ++ }; ++ }; ++ ++ snfi_pins: snfi-pins { ++ mux { ++ function = "flash"; ++ groups = "snfi"; ++ }; ++ }; ++ ++ uart0_pins: uart0 { ++ mux { ++ function = "uart"; ++ groups = "uart0_0_tx_rx" ; ++ }; ++ }; ++ ++ watchdog_pins: watchdog-default { ++ mux { ++ function = "watchdog"; ++ groups = "watchdog"; ++ }; ++ }; ++}; ++ ++&snand { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&snfi_pins>; ++ quad-spi; ++ status = "okay"; ++}; ++ ++&uart0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart0_pins>; ++ mediatek,force-highspeed; ++ status = "okay"; ++}; ++ ++&watchdog { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&watchdog_pins>; ++ status = "okay"; ++}; ++ ++ð { ++ status = "okay"; ++ mediatek,gmac-id = <0>; ++ phy-mode = "2500base-x"; ++ mediatek,switch = "mt7531"; ++ reset-gpios = <&gpio 54 GPIO_ACTIVE_HIGH>; ++ ++ fixed-link { ++ speed = <2500>; ++ full-duplex; ++ }; ++}; +--- /dev/null ++++ b/configs/mt7622_xiaomi_redmi-router-ax6s-ubi-loader_defconfig +@@ -0,0 +1,98 @@ ++CONFIG_ARM=y ++CONFIG_SYS_HAS_NONCACHED_MEMORY=y ++CONFIG_POSITION_INDEPENDENT=y ++CONFIG_ARCH_MEDIATEK=y ++CONFIG_TEXT_BASE=0x41e00000 ++CONFIG_SYS_MALLOC_F_LEN=0x4000 ++CONFIG_NR_DRAM_BANKS=1 ++CONFIG_DEFAULT_DEVICE_TREE="mt7622-xiaomi-redmi-router-ax6s" ++CONFIG_PRE_CON_BUF_ADDR=0x4007EF00 ++CONFIG_DEBUG_UART_BASE=0x11002000 ++CONFIG_DEBUG_UART_CLOCK=25000000 ++CONFIG_SYS_LOAD_ADDR=0x40080000 ++CONFIG_PCI=y ++CONFIG_DEBUG_UART=y ++CONFIG_FIT=y ++CONFIG_BOOTDELAY=30 ++CONFIG_AUTOBOOT_KEYED=y ++CONFIG_DEFAULT_FDT_FILE="mediatek/mt7622-xiaomi-redmi-router-ax6s" ++CONFIG_LOGLEVEL=7 ++CONFIG_PRE_CONSOLE_BUFFER=y ++CONFIG_LOG=y ++CONFIG_BOARD_LATE_INIT=y ++CONFIG_LAST_STAGE_INIT=y ++CONFIG_HUSH_PARSER=y ++# CONFIG_AUTO_COMPLETE is not set ++CONFIG_SYS_PROMPT="MT7622> " ++CONFIG_CMD_LICENSE=y ++CONFIG_CMD_ASKENV=y ++CONFIG_CMD_ERASEENV=y ++CONFIG_CMD_ENV_FLAGS=y ++# CONFIG_CMD_UNLZ4 is not set ++# CONFIG_CMD_UNZIP is not set ++CONFIG_CMD_GPIO=y ++CONFIG_CMD_MTD=y ++# CONFIG_CMD_BOOTP is not set ++CONFIG_CMD_TFTPSRV=y ++CONFIG_CMD_PING=y ++CONFIG_CMD_HASH=y ++CONFIG_CMD_SMC=y ++CONFIG_CMD_FS_GENERIC=y ++CONFIG_CMD_FS_UUID=y ++CONFIG_CMD_MTDPARTS=y ++CONFIG_MTDPARTS_DEFAULT="mtdparts=spi-nand0:512k(preloader),2816k(reserved),117248k(ubi)" ++CONFIG_CMD_UBI=y ++CONFIG_CMD_UBI_RENAME=y ++CONFIG_DOS_PARTITION=y ++CONFIG_EFI_PARTITION=y ++CONFIG_SYS_REDUNDAND_ENVIRONMENT=y ++CONFIG_SYS_RELOC_GD_ENV_ADDR=y ++CONFIG_USE_DEFAULT_ENV_FILE=y ++CONFIG_DEFAULT_ENV_FILE="xiaomi-redmi-router-ax6s-ubi-loader_env" ++CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y ++CONFIG_VERSION_VARIABLE=y ++CONFIG_PROT_UDP=y ++CONFIG_BOOTP_SEND_HOSTNAME=y ++CONFIG_NET_RANDOM_ETHADDR=y ++CONFIG_NETCONSOLE=y ++CONFIG_USE_IPADDR=y ++CONFIG_IPADDR="192.168.1.1" ++CONFIG_USE_SERVERIP=y ++CONFIG_SERVERIP="192.168.1.254" ++CONFIG_REGMAP=y ++CONFIG_SYSCON=y ++CONFIG_BUTTON=y ++CONFIG_BUTTON_GPIO=y ++CONFIG_CLK=y ++CONFIG_GPIO_HOG=y ++CONFIG_LED=y ++CONFIG_LED_BLINK=y ++CONFIG_LED_GPIO=y ++# CONFIG_MMC is not set ++CONFIG_MTD=y ++CONFIG_DM_MTD=y ++CONFIG_MTK_SPI_NAND=y ++CONFIG_MTK_SPI_NAND_MTD=y ++CONFIG_UBI_SILENCE_MSG=y ++CONFIG_MTD_UBI_FASTMAP=y ++CONFIG_PHY_FIXED=y ++CONFIG_MEDIATEK_ETH=y ++CONFIG_PCIE_MEDIATEK=y ++CONFIG_PHY=y ++CONFIG_PINCTRL=y ++CONFIG_PINCONF=y ++CONFIG_PINCTRL_MT7622=y ++CONFIG_POWER_DOMAIN=y ++CONFIG_MTK_POWER_DOMAIN=y ++CONFIG_DM_REGULATOR=y ++CONFIG_DM_REGULATOR_FIXED=y ++CONFIG_DM_REGULATOR_GPIO=y ++CONFIG_RAM=y ++CONFIG_DM_SERIAL=y ++CONFIG_MTK_SERIAL=y ++CONFIG_SPI=y ++CONFIG_DM_SPI=y ++CONFIG_UBIFS_SILENCE_MSG=y ++CONFIG_LZ4=y ++CONFIG_ZSTD=y ++CONFIG_HEXDUMP=y +--- /dev/null ++++ b/xiaomi-redmi-router-ax6s-ubi-loader_env +@@ -0,0 +1,22 @@ ++ipaddr=192.168.1.1 ++serverip=192.168.1.254 ++loadaddr=0x46000000 ++console=earlycon=uart8250,mmio32,0x11002000 console=ttyS0 ++bootled_pwr=power_blue ++bootled_rec=power_amber ++bootcmd=run boot_or_recovery ++bootconf=config-1 ++bootdelay=0 ++bootfile=openwrt-mediatek-mt7622-xiaomi_redmi-router-ax6s-initramfs-recovery.itb ++bootfile_upg=openwrt-mediatek-mt7622-xiaomi_redmi-router-ax6s-squashfs-sysupgrade.itb ++boot_or_recovery=run boot_production ; led $bootled_pwr off ; led $bootled_rec on ; if ubi check fit ; then run boot_tftp_forever ; else run tftp_production ; fi ++boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf ++boot_tftp_forever=while true ; do run boot_tftp ; sleep 1 ; done ++boot_production=run ubi_read_production && bootm $loadaddr#$bootconf ++ubi_format=ubi detach ; mtd erase ubi && ubi part ubi ++ubi_init=ubi part ubi || run ubi_format ++ubi_prepare_rootfs=if ubi check rootfs_data ; then else if env exists rootfs_data_max ; then ubi create rootfs_data $rootfs_data_max dynamic || ubi create rootfs_data - dynamic ; else ubi create rootfs_data - dynamic ; fi ; fi ++ubi_remove_rootfs=ubi check rootfs_data && ubi remove rootfs_data ++ubi_write_production=ubi check fit && ubi remove fit ; run ubi_remove_rootfs ; ubi create fit $filesize dynamic 2 && ubi write $loadaddr fit $filesize ++ubi_read_production=run ubi_init && ubi read $loadaddr fit && iminfo $loadaddr && run ubi_prepare_rootfs ++tftp_production=tftpboot $loadaddr $bootfile_upg && iminfo $loadaddr && run ubi_write_production && reset diff --git a/lede/package/kernel/ubnt-ledbar/Makefile b/lede/package/kernel/ubnt-ledbar/Makefile index 69236ffbb3..c863cbb4ad 100644 --- a/lede/package/kernel/ubnt-ledbar/Makefile +++ b/lede/package/kernel/ubnt-ledbar/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=ubnt-ledbar -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_LICENSE:=GPL-2.0 include $(INCLUDE_DIR)/package.mk diff --git a/lede/package/kernel/ubnt-ledbar/src/leds-ubnt-ledbar.c b/lede/package/kernel/ubnt-ledbar/src/leds-ubnt-ledbar.c index c36a74779c..d5c10ced69 100644 --- a/lede/package/kernel/ubnt-ledbar/src/leds-ubnt-ledbar.c +++ b/lede/package/kernel/ubnt-ledbar/src/leds-ubnt-ledbar.c @@ -9,6 +9,7 @@ #include #include #include +#include /** * Driver for the Ubiquiti RGB LED controller (LEDBAR). @@ -160,7 +161,12 @@ static int ubnt_ledbar_init_led(struct device_node *np, struct ubnt_ledbar *ledb return devm_led_classdev_register_ext(&ledbar->client->dev, led_cdev, &init_data); } +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 2, 0) +static int ubnt_ledbar_probe(struct i2c_client *client, + const struct i2c_device_id *id) +#else static int ubnt_ledbar_probe(struct i2c_client *client) +#endif { struct device_node *np = client->dev.of_node; struct ubnt_ledbar *ledbar; diff --git a/lede/scripts/ubinize-image.sh b/lede/scripts/ubinize-image.sh index 323eae547a..d8b8cd3ae2 100755 --- a/lede/scripts/ubinize-image.sh +++ b/lede/scripts/ubinize-image.sh @@ -12,15 +12,16 @@ err="" ubinize_seq="" ubivol() { - volid=$1 - name=$2 - image=$3 - autoresize=$4 - size="$5" + local volid="$1" + local name="$2" + local image="$3" + local autoresize="$4" + local size="$5" + local voltype="${6:-dynamic}" echo "[$name]" echo "mode=ubi" echo "vol_id=$volid" - echo "vol_type=dynamic" + echo "vol_type=$voltype" echo "vol_name=$name" if [ "$image" ]; then echo "image=$image" @@ -35,35 +36,47 @@ ubivol() { ubilayout() { local vol_id=0 - local rootsize= - local autoresize= - local rootfs_type="$( get_fs_type "$2" )" + local rootsize + local autoresize + local rootfs_type + local voltype + rootfs_type="$( get_fs_type "$2" )" if [ "$1" = "ubootenv" ]; then ubivol $vol_id ubootenv - vol_id=$(( $vol_id + 1 )) + vol_id=$(( vol_id + 1 )) ubivol $vol_id ubootenv2 - vol_id=$(( $vol_id + 1 )) + vol_id=$(( vol_id + 1 )) fi for part in $parts; do name="${part%%=*}" prev="$part" part="${part#*=}" + voltype=dynamic [ "$prev" = "$part" ] && part= image="${part%%=*}" + if [ "${image#:}" != "$image" ]; then + voltype=static + image="${image#:}" + fi prev="$part" part="${part#*=}" [ "$prev" = "$part" ] && part= size="$part" + if [ -z "$size" ]; then + size="$( round_up "$( stat -c%s "$image" )" 1024 )" + else + size="${size}MiB" + fi - ubivol $vol_id "$name" "$image" "" "${size}MiB" - vol_id=$(( $vol_id + 1 )) + ubivol $vol_id "$name" "$image" "" "${size}" "$voltype" + vol_id=$(( vol_id + 1 )) done if [ "$3" ]; then ubivol $vol_id kernel "$3" - vol_id=$(( $vol_id + 1 )) + vol_id=$(( vol_id + 1 )) fi if [ "$2" ]; then @@ -79,7 +92,7 @@ ubilayout() { esac ubivol $vol_id rootfs "$2" "$autoresize" "$rootsize" - vol_id=$(( $vol_id + 1 )) + vol_id=$(( vol_id + 1 )) [ "$rootfs_type" = "ubifs" ] || ubivol $vol_id rootfs_data "" 1 fi } @@ -116,7 +129,7 @@ while [ "$1" ]; do continue ;; "-"*) - ubinize_param="$@" + ubinize_param="$*" break ;; *) @@ -129,7 +142,7 @@ while [ "$1" ]; do esac done -if [ ! -r "$rootfs" -a ! -r "$kernel" -a ! "$outfile" ]; then +if [ ! -r "$rootfs" ] && [ ! -r "$kernel" ] && [ ! "$parts" ] && [ ! "$outfile" ]; then echo "syntax: $0 [--uboot-env] [--part =] [--kernel kernelimage] [--rootfs rootfsimage] out [ubinize opts]" exit 1 fi diff --git a/lede/target/linux/mediatek/base-files/etc/uci-defaults/99_fwenv-store-ethaddr.sh b/lede/target/linux/mediatek/base-files/etc/uci-defaults/99_fwenv-store-ethaddr.sh index 276ec1b19a..e9cb4f921d 100644 --- a/lede/target/linux/mediatek/base-files/etc/uci-defaults/99_fwenv-store-ethaddr.sh +++ b/lede/target/linux/mediatek/base-files/etc/uci-defaults/99_fwenv-store-ethaddr.sh @@ -10,6 +10,7 @@ unielec,u7623-02) fw_setenv ethaddr "$(cat /sys/class/net/eth0/address)" ;; bananapi,bpi-r3|\ +bananapi,bpi-r3-mini|\ bananapi,bpi-r4|\ bananapi,bpi-r4-poe) [ -z "$(fw_printenv -n ethaddr 2>/dev/null)" ] && diff --git a/lede/target/linux/mediatek/dts/mt7622-xiaomi-redmi-router-ax6s.dts b/lede/target/linux/mediatek/dts/mt7622-xiaomi-redmi-router-ax6s.dts index fccf8348c7..a1887001a8 100644 --- a/lede/target/linux/mediatek/dts/mt7622-xiaomi-redmi-router-ax6s.dts +++ b/lede/target/linux/mediatek/dts/mt7622-xiaomi-redmi-router-ax6s.dts @@ -21,7 +21,8 @@ chosen { stdout-path = "serial0:115200n8"; - bootargs = "earlycon=uart8250,mmio32,0x11002000 console=ttyS0,115200n8 swiotlb=512"; + rootdisk = <&ubi_rootfs>; + bootargs = "earlycon=uart8250,mmio32,0x11002000 swiotlb=512 ubi.block=0,fit root=/dev/fit0"; }; memory { @@ -228,7 +229,7 @@ mediatek,bmt-v2; mediatek,bmt-table-size = <0x1000>; - mediatek,bmt-remap-range = <0x0 0x6c0000>; + mediatek,bmt-remap-range = <0x0 0x340000>; partitions { compatible = "fixed-partitions"; @@ -293,12 +294,9 @@ read-only; }; - /* Shrunk and renamed from "firmware" - * as to not break luci size checks - */ partition@2c0000 { - label = "kernel"; - reg = <0x2c0000 0x400000>; + label = "ubi-loader"; + reg = <0x2c0000 0x80000>; }; /* ubi partition is the result of squashing @@ -308,9 +306,16 @@ * - overlay * - obr */ - partition@6c0000 { + partition@340000 { label = "ubi"; - reg = <0x6C0000 0x6f00000>; + reg = <0x340000 0x7280000>; + compatible = "linux,ubi"; + + volumes { + ubi_rootfs: ubi-volume-fit { + volname = "fit"; + }; + }; }; }; }; diff --git a/lede/target/linux/mediatek/dts/mt7981b-konka-komi-a31.dts b/lede/target/linux/mediatek/dts/mt7981b-konka-komi-a31.dts new file mode 100644 index 0000000000..624ef4539d --- /dev/null +++ b/lede/target/linux/mediatek/dts/mt7981b-konka-komi-a31.dts @@ -0,0 +1,246 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +/dts-v1/; +#include +#include + +#include "mt7981.dtsi" + +/ { + model = "KONKA KOMI A31 / E-Life ETR631-T / E-Life ETR635-U"; + compatible = "konka,komi-a31", "mediatek,mt7981"; + + aliases { + serial0 = &uart0; + + led-boot = &status_red_led; + led-failsafe = &status_red_led; + led-running = &status_green_led; + led-upgrade = &status_green_led; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + memory { + reg = <0 0x40000000 0 0x10000000>; + }; + + gpio-keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + linux,code = ; + gpios = <&pio 1 GPIO_ACTIVE_LOW>; + }; + + wps { + label = "wps"; + linux,code = ; + gpios = <&pio 0 GPIO_ACTIVE_LOW>; + }; + }; + + leds { + compatible = "gpio-leds"; + + status_green_led: led-0 { + label = "green:status"; + gpios = <&pio 8 GPIO_ACTIVE_LOW>; + }; + + status_blue_led: led-1 { + label = "blue:status"; + gpios = <&pio 13 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy1tpt"; + }; + + status_red_led: led-2 { + label = "red:status"; + gpios = <&pio 34 GPIO_ACTIVE_LOW>; + }; + }; +}; + +ð { + status = "okay"; + + gmac0: mac@0 { + compatible = "mediatek,eth-mac"; + reg = <0>; + phy-mode = "2500base-x"; + + nvmem-cells = <&macaddr_factory_2a>; + nvmem-cell-names = "mac-address"; + + fixed-link { + speed = <2500>; + full-duplex; + pause; + }; + }; + + gmac1: mac@1 { + compatible = "mediatek,eth-mac"; + reg = <1>; + + nvmem-cells = <&macaddr_factory_24>; + nvmem-cell-names = "mac-address"; + + phy-mode = "gmii"; + phy-handle = <&int_gbe_phy>; + }; +}; + +&mdio_bus { + switch: switch@0 { + compatible = "mediatek,mt7531"; + reg = <31>; + reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>; + interrupt-controller; + #interrupt-cells = <1>; + interrupt-parent = <&pio>; + interrupts = <38 IRQ_TYPE_LEVEL_HIGH>; + }; +}; + +&spi0 { + pinctrl-names = "default"; + pinctrl-0 = <&spi0_flash_pins>; + status = "okay"; + + spi_nand@0 { + compatible = "spi-nand"; + #address-cells = <1>; + #size-cells = <1>; + reg = <0>; + + spi-max-frequency = <52000000>; + spi-tx-bus-width = <4>; + spi-rx-bus-width = <4>; + + mediatek,nmbm; + mediatek,bmt-max-ratio = <1>; + mediatek,bmt-max-reserved-blocks = <64>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "BL2"; + reg = <0x0000000 0x0100000>; + read-only; + }; + + partition@100000 { + label = "u-boot-env"; + reg = <0x0100000 0x0080000>; + }; + + factory: partition@180000 { + label = "Factory"; + reg = <0x0180000 0x0200000>; + read-only; + }; + + partition@380000 { + label = "FIP"; + reg = <0x0380000 0x0200000>; + read-only; + }; + + partition@580000 { + label = "ubi"; + reg = <0x0580000 0x7000000>; + }; + }; + }; +}; + +&switch { + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + label = "lan1"; + }; + + port@1 { + reg = <1>; + label = "lan2"; + }; + + port@2 { + reg = <2>; + label = "lan3"; + }; + + port@6 { + reg = <6>; + label = "cpu"; + ethernet = <&gmac0>; + phy-mode = "2500base-x"; + + fixed-link { + speed = <2500>; + full-duplex; + pause; + }; + }; + }; +}; + +&pio { + spi0_flash_pins: spi0-pins { + mux { + function = "spi"; + groups = "spi0", "spi0_wp_hold"; + }; + + conf-pu { + pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP"; + drive-strength = <8>; + mediatek,pull-up-adv = <0>; /* bias-disable */ + }; + + conf-pd { + pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO"; + drive-strength = <8>; + mediatek,pull-up-adv = <0>; /* bias-disable */ + }; + }; +}; + +&uart0 { + status = "okay"; +}; + +&watchdog { + status = "okay"; +}; + +&wifi { + status = "okay"; + + mediatek,mtd-eeprom = <&factory 0x0>; +}; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_24: macaddr@24 { + reg = <0x24 0x6>; + }; + + macaddr_factory_2a: macaddr@2a { + reg = <0x2a 0x6>; + }; +}; diff --git a/lede/target/linux/mediatek/dts/mt7986a-bananapi-bpi-r3-mini.dts b/lede/target/linux/mediatek/dts/mt7986a-bananapi-bpi-r3-mini.dts new file mode 100644 index 0000000000..cbd742f7c0 --- /dev/null +++ b/lede/target/linux/mediatek/dts/mt7986a-bananapi-bpi-r3-mini.dts @@ -0,0 +1,699 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright (C) 2023 Tianling Shen + */ + +/dts-v1/; +#include +#include +#include + +#include "mt7986a.dtsi" + +/ { + model = "Bananapi BPi-R3 Mini"; + chassis-type = "embedded"; + compatible = "bananapi,bpi-r3-mini", "mediatek,mt7986a"; + + aliases { + ethernet0 = &gmac0; + ethernet1 = &gmac1; + serial0 = &uart0; + + led-boot = &status_led; + led-failsafe = &status_led; + led-running = &status_led; + led-upgrade = &status_led; + }; + + chosen { + stdout-path = "serial0:115200n8"; + rootdisk-emmc = <&emmc_rootdisk>; + rootdisk-spim-nand = <&nand_rootdisk>; + }; + + memory { + reg = <0 0x40000000 0 0x80000000>; + }; + + gpio-keys { + compatible = "gpio-keys"; + + button-reset { + label = "reset"; + linux,code = ; + gpios = <&pio 7 GPIO_ACTIVE_LOW>; + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + + status_led: led-0 { + label = "green:status"; + gpios = <&pio 19 GPIO_ACTIVE_HIGH>; + }; + + led-1 { + label = "blue:wlan2g"; + gpios = <&pio 1 GPIO_ACTIVE_HIGH>; + }; + + led-2 { + label = "blue:wlan5g"; + gpios = <&pio 2 GPIO_ACTIVE_HIGH>; + }; + }; + + fan: pwm-fan { + compatible = "pwm-fan"; + #cooling-cells = <2>; + cooling-levels = <255 128 80 0>; + pwms = <&pwm 0 10000 0>; + status = "okay"; + }; + + reg_1p8v: regulator-1p8v { + compatible = "regulator-fixed"; + regulator-name = "fixed-1.8V"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + regulator-always-on; + }; + + reg_3p3v: regulator-3p3v { + compatible = "regulator-fixed"; + regulator-name = "fixed-3.3V"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + regulator-always-on; + }; + + reg_5v: regulator-5v { + compatible = "regulator-fixed"; + regulator-name = "fixed-5V"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-boot-on; + regulator-always-on; + }; + + usb_vbus: regulator-usb-vbus { + compatible = "regulator-fixed"; + regulator-name = "usb_vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpios = <&pio 20 GPIO_ACTIVE_LOW>; + regulator-boot-on; + }; +}; + +&auxadc { + status = "okay"; +}; + +&cpu_thermal { + cooling-maps { + cpu-active-low { + cooling-device = <&fan 1 1>; + trip = <&cpu_trip_active_low>; + }; + + cpu-active-med { + cooling-device = <&fan 2 2>; + trip = <&cpu_trip_active_med>; + }; + + cpu-active-high { + cooling-device = <&fan 3 3>; + trip = <&cpu_trip_active_high>; + }; + }; +}; + +&crypto { + status = "okay"; +}; + +ð { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <ð_pins>; + + gmac0: mac@0 { + compatible = "mediatek,eth-mac"; + reg = <0>; + phy-handle = <&phy14>; + phy-mode = "2500base-x"; + }; + + gmac1: mac@1 { + compatible = "mediatek,eth-mac"; + reg = <1>; + phy-handle = <&phy15>; + phy-mode = "2500base-x"; + }; + + mdio: mdio-bus { + #address-cells = <1>; + #size-cells = <0>; + + phy14: phy@e { + compatible = "ethernet-phy-id03a2.a411"; + reg = <14>; + pinctrl-names = "default"; + pinctrl-0 = <&en8811_pwr_a>; + + airoha,pnswap-rx; + + interrupt-parent = <&pio>; + interrupts = <48 IRQ_TYPE_EDGE_FALLING>; + reset-gpios = <&pio 49 GPIO_ACTIVE_LOW>; + reset-assert-us = <10000>; + reset-deassert-us = <20000>; + + phy-mode = "2500base-x"; + full-duplex; + pause; + + leds { + #address-cells = <1>; + #size-cells = <0>; + + led@0 { + reg = <0>; + function = LED_FUNCTION_LAN; + color = ; + }; + + led@1 { + reg = <1>; + function = LED_FUNCTION_LAN; + color = ; + }; + }; + }; + + phy15: phy@f { + compatible = "ethernet-phy-id03a2.a411"; + reg = <15>; + pinctrl-names = "default"; + pinctrl-0 = <&en8811_pwr_b>; + + airoha,pnswap-rx; + + interrupt-parent = <&pio>; + interrupts = <46 IRQ_TYPE_EDGE_FALLING>; + reset-gpios = <&pio 47 GPIO_ACTIVE_LOW>; + reset-assert-us = <10000>; + reset-deassert-us = <20000>; + + phy-mode = "2500base-x"; + full-duplex; + pause; + + leds { + #address-cells = <1>; + #size-cells = <0>; + + led@0 { + reg = <0>; + function = LED_FUNCTION_WAN; + color = ; + }; + + led@1 { + reg = <1>; + function = LED_FUNCTION_WAN; + color = ; + }; + }; + }; + }; +}; + +&i2c0 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c_pins>; + status = "okay"; + + eeprom@50 { + compatible = "atmel,24c02"; + reg = <0x50>; + pagesize = <8>; + size = <256>; + }; +}; + +&mmc0 { + pinctrl-names = "default", "state_uhs"; + pinctrl-0 = <&mmc0_pins_default>; + pinctrl-1 = <&mmc0_pins_uhs>; + bus-width = <8>; + max-frequency = <200000000>; + cap-mmc-highspeed; + mmc-hs200-1_8v; + mmc-hs400-1_8v; + hs400-ds-delay = <0x14014>; + vmmc-supply = <®_3p3v>; + vqmmc-supply = <®_1p8v>; + non-removable; + no-sd; + no-sdio; + status = "okay"; + + card@0 { + compatible = "mmc-card"; + reg = <0>; + + block { + compatible = "block-device"; + partitions { + emmc_rootdisk: block-partition-production { + partname = "production"; + }; + }; + }; + }; +}; + +&pcie { + pinctrl-names = "default"; + pinctrl-0 = <&pcie_pins>; + status = "okay"; +}; + +&pcie_phy { + status = "okay"; +}; + +&pio { + en8811_pwr_a: en8811-pwr-a { + pins = "GPIO_11"; + drive-strength = <8>; + mediatek,pull-down-adv = <1>; + output-low; + }; + + en8811_pwr_b: en8811-pwr-b { + pins = "GPIO_12"; + drive-strength = <8>; + mediatek,pull-down-adv = <1>; + output-low; + }; + + eth_pins: eth-pins { + mux { + function = "eth"; + groups = "mdc_mdio"; + }; + }; + + i2c_pins: i2c-pins { + mux { + function = "i2c"; + groups = "i2c"; + }; + }; + + mmc0_pins_default: mmc0-pins-default { + mux { + function = "emmc"; + groups = "emmc_51"; + }; + conf-cmd-dat { + pins = "EMMC_DATA_0", "EMMC_DATA_1", "EMMC_DATA_2", + "EMMC_DATA_3", "EMMC_DATA_4", "EMMC_DATA_5", + "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD"; + input-enable; + drive-strength = <4>; + mediatek,pull-up-adv = <1>; + }; + conf-clk { + pins = "EMMC_CK"; + drive-strength = <6>; + mediatek,pull-down-adv = <2>; + }; + conf-ds { + pins = "EMMC_DSL"; + mediatek,pull-down-adv = <2>; + }; + conf-rst { + pins = "EMMC_RSTB"; + drive-strength = <4>; + mediatek,pull-up-adv = <1>; + }; + }; + + mmc0_pins_uhs: mmc0-uhs-pins { + mux { + function = "emmc"; + groups = "emmc_51"; + }; + conf-cmd-dat { + pins = "EMMC_DATA_0", "EMMC_DATA_1", "EMMC_DATA_2", + "EMMC_DATA_3", "EMMC_DATA_4", "EMMC_DATA_5", + "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD"; + input-enable; + drive-strength = <4>; + mediatek,pull-up-adv = <1>; + }; + conf-clk { + pins = "EMMC_CK"; + drive-strength = <6>; + mediatek,pull-down-adv = <2>; + }; + conf-ds { + pins = "EMMC_DSL"; + mediatek,pull-down-adv = <2>; + }; + conf-rst { + pins = "EMMC_RSTB"; + drive-strength = <4>; + mediatek,pull-up-adv = <1>; + }; + }; + + pcie_pins: pcie-pins { + mux { + function = "pcie"; + groups = "pcie_clk", "pcie_wake", "pcie_pereset"; + }; + }; + + pwm_pins: pwm-pins { + mux { + function = "pwm"; + groups = "pwm0", "pwm1_0"; + }; + }; + + spi_flash_pins: spi-flash-pins { + mux { + function = "spi"; + groups = "spi0", "spi0_wp_hold"; + }; + conf-pu { + pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP"; + drive-strength = <8>; + mediatek,pull-up-adv = <0>; + }; + conf-pd { + pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO"; + drive-strength = <8>; + mediatek,pull-down-adv = <0>; + }; + }; + + spic_pins: spic-pins { + mux { + function = "spi"; + groups = "spi1_2"; + }; + }; + + uart1_pins: uart1-pins { + mux { + function = "uart"; + groups = "uart1"; + }; + }; + + usb_ngff_pins: usb-ngff-pins { + ngff-pe-rst { + pins = "GPIO_7"; + drive-strength = <8>; + mediatek,pull-up-adv = <1>; + }; + ngff-wwan-off { + pins = "GPIO_8"; + drive-strength = <8>; + mediatek,pull-up-adv = <1>; + }; + ngff-pwr-off { + pins = "GPIO_9"; + drive-strength = <8>; + mediatek,pull-up-adv = <1>; + }; + ngff-rst { + pins = "GPIO_10"; + drive-strength = <8>; + mediatek,pull-up-adv = <1>; + }; + }; + + wf_2g_5g_pins: wf-2g-5g-pins { + mux { + function = "wifi"; + groups = "wf_2g", "wf_5g"; + }; + conf { + pins = "WF0_HB1", "WF0_HB2", "WF0_HB3", "WF0_HB4", + "WF0_HB0", "WF0_HB0_B", "WF0_HB5", "WF0_HB6", + "WF0_HB7", "WF0_HB8", "WF0_HB9", "WF0_HB10", + "WF0_TOP_CLK", "WF0_TOP_DATA", "WF1_HB1", + "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0", + "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8", + "WF1_TOP_CLK", "WF1_TOP_DATA"; + drive-strength = <4>; + }; + }; + + wf_dbdc_pins: wf-dbdc-pins { + mux { + function = "wifi"; + groups = "wf_dbdc"; + }; + conf { + pins = "WF0_HB1", "WF0_HB2", "WF0_HB3", "WF0_HB4", + "WF0_HB0", "WF0_HB0_B", "WF0_HB5", "WF0_HB6", + "WF0_HB7", "WF0_HB8", "WF0_HB9", "WF0_HB10", + "WF0_TOP_CLK", "WF0_TOP_DATA", "WF1_HB1", + "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0", + "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8", + "WF1_TOP_CLK", "WF1_TOP_DATA"; + drive-strength = <4>; + }; + }; +}; + +&pwm { + pinctrl-names = "default"; + pinctrl-0 = <&pwm_pins>; + status = "okay"; +}; + +&spi0 { + pinctrl-names = "default"; + pinctrl-0 = <&spi_flash_pins>; + status = "okay"; + + flash@0 { + compatible = "spi-nand"; + #address-cells = <1>; + #size-cells = <1>; + reg = <0>; + + spi-max-frequency = <20000000>; + spi-tx-bus-width = <4>; + spi-rx-bus-width = <4>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "bl2"; + reg = <0x00000 0x100000>; + read-only; + }; + + partition@100000 { + label = "ubi"; + reg = <0x100000 0x7f00000>; + compatible = "linux,ubi"; + + volumes { + nand_rootdisk: ubi-volume-fit { + volname = "fit"; + }; + }; + }; + }; + }; +}; + +&spi1 { + pinctrl-names = "default"; + pinctrl-0 = <&spic_pins>; + status = "okay"; +}; + +&ssusb { + pinctrl-names = "default"; + pinctrl-0 = <&usb_ngff_pins>; + vusb33-supply = <®_3p3v>; + vbus-supply = <&usb_vbus>; + status = "okay"; +}; + +&trng { + status = "okay"; +}; + +&uart0 { + status = "okay"; +}; + +&uart1 { + pinctrl-names = "default"; + pinctrl-0 = <&uart1_pins>; + status = "okay"; +}; + +&usb_phy { + status = "okay"; +}; + +&watchdog { + status = "okay"; +}; + +&wifi { + pinctrl-names = "default", "dbdc"; + pinctrl-0 = <&wf_2g_5g_pins>; + pinctrl-1 = <&wf_dbdc_pins>; + status = "okay"; + + mediatek,eeprom-data = <0x86790200 0x000c4326 0x60000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x125b486c 0x00280000 0x05d00000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x0c000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000012 0x12120000 0x00000000 0x00000000 0x00002222 0x22223333 0x33333333 + 0x33333333 0x33333333 0x33333333 0x33333333 0x33333333 0x33330000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00292929 0x29282828 0x28282828 0x28282828 0x28282828 0x28282828 0x28000000 0x00000000 + 0x00000000 0x00242424 0x24222222 0x22242424 0x24222222 0x22242424 0x24222222 0x22242424 + 0x24222222 0x22000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x007f7f7f 0xd1d1dddd 0xe9e9f5f5 0x01010909 0x1515d1d1 0xdddde9e9 0xf5f5fdfd + 0x09091515 0xd1d1dddd 0xe9e9f5f5 0xfdfd0909 0x1515d1d1 0xdddde9e9 0xf5f5fdfd 0x09091515 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x0efefc00 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x021e021e 0x02000200 0x02370237 0x02370237 + 0x02370237 0x02370237 0x02370237 0x02370237 0x02370237 0x02370237 0x02370237 0x02370237 + 0x02370237 0x02370237 0x02370237 0x02370237 0x002200c6 0xc6c4c4c3 0x0000c1c2 0xc1838383 + 0x838686c1 0xc1838383 0x838686c2 0xc1c18181 0x82838585 0x8686c1c1 0x81818283 0x85858686 + 0xc1c18181 0x82838585 0x8686c1c1 0x81818283 0x85858686 0xc1c18181 0x82838585 0x8686c5c5 + 0xc3c100c2 0xc3c2c200 0x81828383 0xc2c2c200 0x81828383 0xc3c1c1c1 0x81828384 0x84c2c2c2 + 0xc2008182 0x83838585 0xc2c2c200 0x81828383 0x8585c1c1 0xc1818283 0x84848686 0x82828484 + 0x85868787 0x8989c2c2 0xc2008182 0x83838585 0xc2c2c200 0x81828383 0x8585c2c2 0xc2008182 + 0x83838585 0xc4c4c2c1 0x00c3c3c3 0xc1008183 0x838686c3 0xc3c3c100 0x81838386 0x86c2c2c2 + 0x00818284 0x84868682 0x82828485 0x8688888b 0x8bc3c3c3 0xc1008183 0x838686c3 0xc3c3c100 + 0x81838386 0x86c3c3c3 0xc1008183 0x83868600 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00bd0000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00c50000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00495256 0x55555555 0x004a5251 0x51515151 0x004a5355 0x56565656 0x0049504e 0x51515151 + 0x00495150 0x54545454 0x00495051 0x51515151 0x00495251 0x50505050 0x00495251 0x51515151 + 0x00495251 0x54545454 0x00495150 0x54545454 0x00495352 0x51515151 0x00495353 0x52525252 + 0x00495150 0x50505050 0x00495152 0x54545454 0x00495251 0x53535353 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0xd1d1dddd 0xe9e9f5f5 0xfdfd1414 0x1d1d0000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x85840000 0xc3c4c382 0x828281c1 0xc4c5c400 0x0000c1c3 0xc4c4c481 0x8181c1c2 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0xc0bbc0bb 0xc0bbc0bb 0x40c5c0c4 0xc0c3c0c3 0x40c340c5 0x40c4c0c3 0x40c3c0c2 0xc0c5c0c4 + 0x40c440c4 0xc0c3c0c5 0xc0c440c4 0x40c4c0c3 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x40c640c6 0x40c640c6 0x40c640c6 0x40c640c6 0x40c640c6 0x40c640c6 + 0x40c640c6 0x40c640c6 0x40c640c6 0x40c640c6 0x40c640c6 0x40c640c6 0x40c640c6 0x40c640c6 + 0x40c640c6 0x40c640c6 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 + 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000>; +}; diff --git a/lede/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds b/lede/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds index cfbbac13ab..d461bc91ae 100644 --- a/lede/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds +++ b/lede/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds @@ -9,6 +9,12 @@ case $board in abt,asr3000) ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1" ;; +bananapi,bpi-r3-mini) + ucidef_set_led_netdev "lan1" "LAN" "mdio-bus:0e:green:lan" "eth0" "link_2500 link_1000 tx rx" + ucidef_set_led_netdev "lan2" "LAN" "mdio-bus:0e:yellow:lan" "eth0" "link_2500 link_100 tx rx" + ucidef_set_led_netdev "wan1" "WAN" "mdio-bus:0f:green:wan" "eth1" "link_2500 link_1000 tx rx" + ucidef_set_led_netdev "wan2" "WAN" "mdio-bus:0f:yellow:wan" "eth1" "link_2500 link_100 tx rx" + ;; bananapi,bpi-r4|\ bananapi,bpi-r4-poe) ucidef_set_led_netdev "wan" "wan" "mt7530-0:00:green:lan" "wan" "link tx rx" @@ -51,6 +57,9 @@ xiaomi,mi-router-wr30u) xiaomi,redmi-router-ax6000) ucidef_set_led_netdev "wan" "wan" "rgb:network" "wan" ;; +konka,komi-a31) + ucidef_set_led_netdev "blue" "BLUE" "blue:status" "eth1" "link" + ;; esac board_config_flush diff --git a/lede/target/linux/mediatek/filogic/base-files/etc/board.d/02_network b/lede/target/linux/mediatek/filogic/base-files/etc/board.d/02_network index 71324b5488..6b7a791895 100644 --- a/lede/target/linux/mediatek/filogic/base-files/etc/board.d/02_network +++ b/lede/target/linux/mediatek/filogic/base-files/etc/board.d/02_network @@ -12,6 +12,7 @@ mediatek_setup_interfaces() cmcc,rax3000m*|\ h3c,magic-nx30-pro|\ imou,lc-hx3001|\ + konka,komi-a31|\ nokia,ea0326gmp) ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" eth1 ;; @@ -24,6 +25,9 @@ mediatek_setup_interfaces() bananapi,bpi-r3) ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 sfp2" "eth1 wan" ;; + bananapi,bpi-r3-mini) + ucidef_set_interfaces_lan_wan eth0 eth1 + ;; bananapi,bpi-r4|\ bananapi,bpi-r4-poe) ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 eth1" "wan eth2" diff --git a/lede/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac b/lede/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac index 0757ec15b6..7288ed7d00 100644 --- a/lede/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac +++ b/lede/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac @@ -24,6 +24,10 @@ case "$board" in [ "$PHYNBR" = "0" ] && macaddr_setbit_la $(macaddr_add $addr 1) > /sys${DEVPATH}/macaddress [ "$PHYNBR" = "1" ] && echo "$addr" > /sys${DEVPATH}/macaddress ;; + konka,komi-a31) + addr=$(mtd_get_mac_binary factory 0x04) + [ "$PHYNBR" = "1" ] && macaddr_add $addr 2 > /sys${DEVPATH}/macaddress + ;; bananapi,bpi-r3) addr=$(cat /sys/class/net/eth0/address) [ "$PHYNBR" = "0" ] && macaddr_add $addr 2 > /sys${DEVPATH}/macaddress diff --git a/lede/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh b/lede/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh index 1af0d73eb9..73923adc21 100755 --- a/lede/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh +++ b/lede/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh @@ -22,6 +22,7 @@ platform_do_upgrade() { nand_do_upgrade "$1" ;; bananapi,bpi-r3|\ + bananapi,bpi-r3-mini|\ bananapi,bpi-r4|\ bananapi,bpi-r4-poe) [ -e /dev/fit0 ] && fitblk /dev/fit0 diff --git a/lede/target/linux/mediatek/image/filogic.mk b/lede/target/linux/mediatek/image/filogic.mk index 4abef8d046..31f381335d 100644 --- a/lede/target/linux/mediatek/image/filogic.mk +++ b/lede/target/linux/mediatek/image/filogic.mk @@ -147,6 +147,51 @@ define Device/bananapi_bpi-r3 endef TARGET_DEVICES += bananapi_bpi-r3 +define Device/bananapi_bpi-r3-mini + DEVICE_VENDOR := Bananapi + DEVICE_MODEL := BPi-R3 Mini + DEVICE_DTS := mt7986a-bananapi-bpi-r3-mini + DEVICE_DTS_CONFIG := config-mt7986a-bananapi-bpi-r3-mini + DEVICE_DTS_DIR := ../dts + DEVICE_DTS_LOADADDR := 0x43f00000 + DEVICE_PACKAGES := kmod-hwmon-pwmfan kmod-mt7915e kmod-mt7986-firmware kmod-phy-airoha-en8811h \ + kmod-usb3 e2fsprogs f2fsck mkf2fs mt7986-wo-firmware + KERNEL_LOADADDR := 0x44000000 + KERNEL := kernel-bin | gzip + KERNEL_INITRAMFS := kernel-bin | lzma | \ + fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k + KERNEL_INITRAMFS_SUFFIX := -recovery.itb + BLOCKSIZE := 128k + PAGESIZE := 2048 + KERNEL_IN_UBI := 1 + UBOOTENV_IN_UBI := 1 + IMAGES := snand-factory.bin sysupgrade.itb +ifeq ($(DUMP),) + IMAGE_SIZE := $$(shell expr 64 + $$(CONFIG_TARGET_ROOTFS_PARTSIZE))m +endif + IMAGE/sysupgrade.itb := append-kernel | \ + fit gzip $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb external-static-with-rootfs | \ + pad-rootfs | append-metadata + ARTIFACTS := \ + emmc-gpt.bin emmc-preloader.bin emmc-bl31-uboot.fip \ + snand-factory.bin snand-preloader.bin snand-bl31-uboot.fip + ARTIFACT/emmc-gpt.bin := mt798x-gpt emmc + ARTIFACT/emmc-preloader.bin := mt7986-bl2 emmc-ddr4 + ARTIFACT/emmc-bl31-uboot.fip := mt7986-bl31-uboot bananapi_bpi-r3-mini-emmc + ARTIFACT/snand-factory.bin := mt7986-bl2 spim-nand-ubi-ddr4 | pad-to 256k | \ + mt7986-bl2 spim-nand-ubi-ddr4 | pad-to 512k | \ + mt7986-bl2 spim-nand-ubi-ddr4 | pad-to 768k | \ + mt7986-bl2 spim-nand-ubi-ddr4 | pad-to 2048k | \ + ubinize-image fit squashfs-sysupgrade.itb + ARTIFACT/snand-preloader.bin := mt7986-bl2 spim-nand-ubi-ddr4 + ARTIFACT/snand-bl31-uboot.fip := mt7986-bl31-uboot bananapi_bpi-r3-mini-snand + UBINIZE_PARTS := fip=:$(STAGING_DIR_IMAGE)/mt7986_bananapi_bpi-r3-mini-snand-u-boot.fip +ifneq ($(CONFIG_PACKAGE_airoha-en8811h-firmware),) + UBINIZE_PARTS += en8811h-fw=:$(STAGING_DIR_IMAGE)/EthMD32.bin +endif +endef +TARGET_DEVICES += bananapi_bpi-r3-mini + define Device/bananapi_bpi-r4-common DEVICE_VENDOR := Bananapi DEVICE_DTS_DIR := $(DTS_DIR)/ @@ -407,6 +452,20 @@ define Device/imou_lc-hx3001 endef TARGET_DEVICES += imou_lc-hx3001 +define Device/konka_komi-a31 + DEVICE_VENDOR := KONKA + DEVICE_MODEL := KOMI A31 + DEVICE_DTS := mt7981b-konka-komi-a31 + DEVICE_DTS_DIR := ../dts + UBINIZE_OPTS := -E 5 + BLOCKSIZE := 128k + PAGESIZE := 2048 + KERNEL_IN_UBI := 1 + DEVICE_PACKAGES := kmod-mt7981-firmware mt7981-wo-firmware + IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata +endef +TARGET_DEVICES += konka_komi-a31 + define Device/jcg_q30-pro DEVICE_VENDOR := JCG DEVICE_MODEL := Q30 PRO diff --git a/lede/target/linux/mediatek/image/mt7622.mk b/lede/target/linux/mediatek/image/mt7622.mk index 3bd8bcb158..fdd5b18588 100644 --- a/lede/target/linux/mediatek/image/mt7622.mk +++ b/lede/target/linux/mediatek/image/mt7622.mk @@ -30,6 +30,21 @@ define Build/bl31-uboot cat $(STAGING_DIR_IMAGE)/mt7622_$1-u-boot.fip >> $@ endef +define Build/uboot-bin + cat $(STAGING_DIR_IMAGE)/mt7622_$1-u-boot.bin >> $@ +endef + +define Build/uboot-fit + $(TOPDIR)/scripts/mkits.sh \ + -D $(DEVICE_NAME) -o $@.its -k $@ \ + -C $(word 1,$(1)) \ + -a 0x41e00000 -e 0x41e00000 \ + -c "config-1" \ + -A $(LINUX_KARCH) -v u-boot + PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.new + @mv $@.new $@ +endef + define Build/mt7622-gpt cp $@ $@.tmp 2>/dev/null || true ptgen -g -o $@.tmp -a 1 -l 1024 \ @@ -342,12 +357,21 @@ define Device/xiaomi_redmi-router-ax6s BOARD_NAME := xiaomi,redmi-router-ax6s DEVICE_PACKAGES := kmod-mt7915-firmware UBINIZE_OPTS := -E 5 - IMAGES += factory.bin BLOCKSIZE := 128k PAGESIZE := 2048 - KERNEL_SIZE := 4096k + KERNEL := kernel-bin | gzip + KERNEL_INITRAMFS := kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k KERNEL_INITRAMFS_SUFFIX := -recovery.itb - IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi - IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata + IMAGES := sysupgrade.itb + IMAGE/sysupgrade.itb := append-kernel | fit gzip $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb external-static-with-rootfs | append-metadata + ARTIFACTS := ubi-loader.itb + ARTIFACT/ubi-loader.itb := uboot-bin xiaomi_redmi-router-ax6s-ubi-loader | lzma | uboot-fit lzma +ifneq ($(CONFIG_TARGET_ROOTFS_SQUASHFS),) + ARTIFACTS += factory.bin + ARTIFACT/factory.bin := uboot-bin xiaomi_redmi-router-ax6s-ubi-loader | lzma | uboot-fit lzma | pad-to 512k | ubinize-image fit squashfs-sysupgrade.itb +endif + DEVICE_COMPAT_VERSION := 2.0 + DEVICE_COMPAT_MESSAGE := Flash layout changes require a manual reinstall using factory.bin. endef TARGET_DEVICES += xiaomi_redmi-router-ax6s + diff --git a/lede/target/linux/mediatek/mt7622/base-files/etc/uci-defaults/05_fix-compat-version b/lede/target/linux/mediatek/mt7622/base-files/etc/uci-defaults/05_fix-compat-version index c77e1cb8bd..37775ec793 100644 --- a/lede/target/linux/mediatek/mt7622/base-files/etc/uci-defaults/05_fix-compat-version +++ b/lede/target/linux/mediatek/mt7622/base-files/etc/uci-defaults/05_fix-compat-version @@ -5,6 +5,10 @@ case "$(board_name)" in uci set system.@system[0].compat_version="1.1" uci commit system ;; + xiaomi,redmi-router-ax6s) + uci set system.@system[0].compat_version="2.0" + uci commit system + ;; esac exit 0 diff --git a/lede/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh b/lede/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh index a9899edf46..d4b31406ea 100755 --- a/lede/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh +++ b/lede/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh @@ -37,7 +37,6 @@ platform_do_upgrade() { mediatek,mt7622-rfb1-ubi|\ netgear,wax206|\ totolink,a8000ru|\ - xiaomi,redmi-router-ax6s) nand_do_upgrade "$1" ;; linksys,e8450-ubi) @@ -52,6 +51,25 @@ platform_do_upgrade() { fi default_do_upgrade "$1" ;; + xiaomi,redmi-router-ax6s) + [ -e /dev/fit0 ] && fitblk /dev/fit0 + [ -e /dev/fitrw ] && fitblk /dev/fitrw + bootdev="$(fitblk_get_bootdev)" + case "$bootdev" in + mmcblk*) + EMMC_KERN_DEV="/dev/$bootdev" + emmc_do_upgrade "$1" + ;; + mtdblock*) + PART_NAME="/dev/mtd${bootdev:8}" + default_do_upgrade "$1" + ;; + ubiblock*) + CI_KERNPART="fit" + nand_do_upgrade "$1" + ;; + esac + ;; *) default_do_upgrade "$1" ;; diff --git a/lede/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6000-re-ss-01.dts b/lede/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6000-re-ss-01.dts index 3a4ec3caa5..fdaec112b8 100644 --- a/lede/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6000-re-ss-01.dts +++ b/lede/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6000-re-ss-01.dts @@ -10,7 +10,7 @@ #include / { - model = "JDCloud RE-SS-01"; + model = "JDCloud AX1800 Pro / RE-SS-01"; compatible = "jdcloud,re-ss-01", "qcom,ipq6018"; aliases { diff --git a/lede/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6010-re-cs-02.dts b/lede/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6010-re-cs-02.dts index 5ab21f5f1b..255eab60d7 100644 --- a/lede/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6010-re-cs-02.dts +++ b/lede/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6010-re-cs-02.dts @@ -10,7 +10,7 @@ #include / { - model = "JDCloud RE-CS-02"; + model = "JDCloud AX6600 / RE-CS-02"; compatible = "jdcloud,re-cs-02", "qcom,ipq6018"; aliases { diff --git a/lede/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6010-re-cs-07.dts b/lede/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6010-re-cs-07.dts index f6ce0cefe1..a1c50332ea 100755 --- a/lede/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6010-re-cs-07.dts +++ b/lede/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6010-re-cs-07.dts @@ -10,7 +10,7 @@ #include / { - model = "JDCloud RE-CS-07"; + model = "JDCloud ER1 / RE-CS-07"; compatible = "jdcloud,re-cs-07", "qcom,ipq6018"; aliases { diff --git a/lede/target/linux/qualcommax/image/ipq60xx.mk b/lede/target/linux/qualcommax/image/ipq60xx.mk index 225de5f3de..41bf96ff28 100644 --- a/lede/target/linux/qualcommax/image/ipq60xx.mk +++ b/lede/target/linux/qualcommax/image/ipq60xx.mk @@ -62,33 +62,7 @@ define Device/glinet_gl-axt1800 endef TARGET_DEVICES += glinet_gl-axt1800 -define Device/jdcloud_re-cs-02 - $(call Device/FitImage) - $(call Device/EmmcImage) - DEVICE_VENDOR := JDCloud - DEVICE_MODEL := AX6600 - SOC := ipq6010 - BLOCKSIZE := 64k - KERNEL_SIZE := 6144k - DEVICE_DTS_CONFIG := config@cp03-c3 - DEVICE_PACKAGES := ipq-wifi-jdcloud_ax6600 kmod-ath11k-pci ath11k-firmware-qcn9074 -endef -TARGET_DEVICES += jdcloud_re-cs-02 - -define Device/jdcloud_re-cs-07 - $(call Device/FitImage) - $(call Device/EmmcImage) - DEVICE_VENDOR := JDCloud - DEVICE_MODEL := RE-CS-07 - SOC := ipq6010 - BLOCKSIZE := 64k - KERNEL_SIZE := 6144k - DEVICE_DTS_CONFIG := config@cp03-c4 - DEVICE_PACKAGES := -kmod-ath11k-ahb -ath11k-firmware-ipq6018 -endef -TARGET_DEVICES += jdcloud_re-cs-07 - -define Device/jdcloud_re-ss-01 +define Device/jdcloud_ax1800-pro $(call Device/FitImage) $(call Device/EmmcImage) DEVICE_VENDOR := JDCloud @@ -97,9 +71,41 @@ define Device/jdcloud_re-ss-01 BLOCKSIZE := 64k KERNEL_SIZE := 6144k DEVICE_DTS_CONFIG := config@cp03-c2 + DEVICE_DTS := ipq6000-re-ss-01 + SUPPORTED_DEVICES += jdcloud,re-ss-01 DEVICE_PACKAGES := ipq-wifi-jdcloud_ax1800pro endef -TARGET_DEVICES += jdcloud_re-ss-01 +TARGET_DEVICES += jdcloud_ax1800-pro + +define Device/jdcloud_ax6600 + $(call Device/FitImage) + $(call Device/EmmcImage) + DEVICE_VENDOR := JDCloud + DEVICE_MODEL := AX6600 + SOC := ipq6010 + BLOCKSIZE := 64k + KERNEL_SIZE := 6144k + DEVICE_DTS_CONFIG := config@cp03-c3 + DEVICE_DTS := ipq6010-re-cs-02 + SUPPORTED_DEVICES += jdcloud,re-cs-02 + DEVICE_PACKAGES := ipq-wifi-jdcloud_ax6600 kmod-ath11k-pci ath11k-firmware-qcn9074 +endef +TARGET_DEVICES += jdcloud_ax6600 + +define Device/jdcloud_er1 + $(call Device/FitImage) + $(call Device/EmmcImage) + DEVICE_VENDOR := JDCloud + DEVICE_MODEL := ER1 + SOC := ipq6010 + BLOCKSIZE := 64k + KERNEL_SIZE := 6144k + DEVICE_DTS_CONFIG := config@cp03-c4 + DEVICE_DTS := ipq6010-re-cs-07 + SUPPORTED_DEVICES += jdcloud,re-cs-07 + DEVICE_PACKAGES := -kmod-ath11k-ahb -ath11k-firmware-ipq6018 +endef +TARGET_DEVICES += jdcloud_er1 define Device/linksys_mr7350 $(call Device/FitImage) diff --git a/lede/toolchain/binutils/Config.in b/lede/toolchain/binutils/Config.in index 3ec4fe47a8..6b759bef11 100644 --- a/lede/toolchain/binutils/Config.in +++ b/lede/toolchain/binutils/Config.in @@ -2,7 +2,7 @@ choice prompt "Binutils Version" if TOOLCHAINOPTS - default BINUTILS_USE_VERSION_2_40 + default BINUTILS_USE_VERSION_2_42 help Select the version of binutils you wish to use. @@ -25,6 +25,10 @@ choice config BINUTILS_USE_VERSION_2_41 bool "Binutils 2.41" select BINUTILS_VERSION_2_41 + + config BINUTILS_USE_VERSION_2_42 + bool "Binutils 2.42" + select BINUTILS_VERSION_2_42 endchoice config EXTRA_BINUTILS_CONFIG_OPTIONS diff --git a/lede/toolchain/binutils/Config.version b/lede/toolchain/binutils/Config.version index acb764bb6a..0b7ffd441a 100644 --- a/lede/toolchain/binutils/Config.version +++ b/lede/toolchain/binutils/Config.version @@ -9,11 +9,14 @@ config BINUTILS_VERSION_2_39 bool config BINUTILS_VERSION_2_40 - default y if !TOOLCHAINOPTS bool config BINUTILS_VERSION_2_41 bool + +config BINUTILS_VERSION_2_42 + default y if !TOOLCHAINOPTS + bool config BINUTILS_VERSION string @@ -22,3 +25,4 @@ config BINUTILS_VERSION default "2.39" if BINUTILS_VERSION_2_39 default "2.40" if BINUTILS_VERSION_2_40 default "2.41" if BINUTILS_VERSION_2_41 + default "2.42" if BINUTILS_VERSION_2_42 diff --git a/lede/toolchain/binutils/Makefile b/lede/toolchain/binutils/Makefile index b2831f8c2b..0edb8ff533 100644 --- a/lede/toolchain/binutils/Makefile +++ b/lede/toolchain/binutils/Makefile @@ -36,6 +36,14 @@ ifeq ($(PKG_VERSION),2.41) PKG_HASH:=ae9a5789e23459e59606e6714723f2d3ffc31c03174191ef0d015bdf06007450 endif +ifeq ($(PKG_VERSION),2.42) + PKG_HASH:=f6e4d41fd5fc778b06b7891457b3620da5ecea1006c6a4a41ae998109f85a800 +endif + +ifeq ($(PKG_VERSION),2.43.1) + PKG_HASH:=13f74202a3c4c51118b797a39ea4200d3f6cfbe224da6d1d95bb938480132dfd +endif + HOST_BUILD_PARALLEL:=1 PATCH_DIR:=./patches/$(PKG_VERSION) diff --git a/lede/toolchain/binutils/patches/2.42/001-PR-30569-always-call-elf_backend_size_dynamic_sectio.patch b/lede/toolchain/binutils/patches/2.42/001-PR-30569-always-call-elf_backend_size_dynamic_sectio.patch new file mode 100644 index 0000000000..96f3971f6d --- /dev/null +++ b/lede/toolchain/binutils/patches/2.42/001-PR-30569-always-call-elf_backend_size_dynamic_sectio.patch @@ -0,0 +1,2228 @@ +From af969b14aedcc0ae27dcefab4327ff2d153dec8b Mon Sep 17 00:00:00 2001 +From: Alan Modra +Date: Thu, 28 Mar 2024 19:25:42 +1030 +Subject: [PATCH 1/2] PR 30569, always call elf_backend_size_dynamic_sections + +This largely mechanical patch is preparation for a followup patch. + +For quite some time I've thought that it would be useful to call +elf_backend_size_dynamic_sections even when no dynamic objects are +seen by the linker. That's what this patch does, with some renaming. +There are no functional changes to the linker, just a move of the +dynobj test in bfd_elf_size_dynamic_sections to target backend +functions, replacing the asserts/aborts already there. No doubt some +of the current always_size_sections functions could be moved to +size_dynamic_sections but I haven't made that change. + +Because both hooks are now always called, I have renamed +always_size_sections to early_size_sections and size_dynamic_sections +to late_size_sections. I condisdered calling late_size_sections plain +size_sections, since this is the usual target dynamic section sizing +hook, but decided that searching the sources for "size_sections" would +then hit early_size_sections and other functions. +--- + bfd/elf-bfd.h | 35 +++++++++++++++++------------------ + bfd/elf-m10300.c | 11 ++++++----- + bfd/elf32-arc.c | 9 +++++---- + bfd/elf32-arm.c | 15 ++++++++------- + bfd/elf32-bfin.c | 31 ++++++++++++++++--------------- + bfd/elf32-cr16.c | 11 ++++++----- + bfd/elf32-cris.c | 13 +++++++------ + bfd/elf32-csky.c | 8 ++++---- + bfd/elf32-frv.c | 23 ++++++++++++----------- + bfd/elf32-hppa.c | 8 ++++---- + bfd/elf32-i386.c | 7 +++---- + bfd/elf32-lm32.c | 15 ++++++++------- + bfd/elf32-m32c.c | 8 ++++---- + bfd/elf32-m32r.c | 11 ++++++----- + bfd/elf32-m68k.c | 16 ++++++++-------- + bfd/elf32-metag.c | 8 ++++---- + bfd/elf32-microblaze.c | 9 +++++---- + bfd/elf32-mips.c | 6 ++---- + bfd/elf32-nds32.c | 9 +++++---- + bfd/elf32-nios2.c | 15 ++++++++------- + bfd/elf32-or1k.c | 9 +++++---- + bfd/elf32-ppc.c | 11 ++++++----- + bfd/elf32-rl78.c | 8 ++++---- + bfd/elf32-s390.c | 10 +++++----- + bfd/elf32-score.c | 35 ++++++++++++++++++----------------- + bfd/elf32-score.h | 4 ++-- + bfd/elf32-score7.c | 13 +++++++------ + bfd/elf32-sh.c | 15 +++++++-------- + bfd/elf32-sparc.c | 3 +-- + bfd/elf32-tic6x.c | 14 +++++++------- + bfd/elf32-tilegx.c | 2 +- + bfd/elf32-tilepro.c | 11 +++++------ + bfd/elf32-vax.c | 16 +++++++--------- + bfd/elf32-xstormy16.c | 8 ++++---- + bfd/elf32-xtensa.c | 13 ++++++------- + bfd/elf64-alpha.c | 19 ++++++++++--------- + bfd/elf64-hppa.c | 11 ++++------- + bfd/elf64-ia64-vms.c | 13 +++++++------ + bfd/elf64-mips.c | 8 ++++---- + bfd/elf64-ppc.c | 12 ++++++------ + bfd/elf64-s390.c | 10 +++++----- + bfd/elf64-sparc.c | 4 ++-- + bfd/elf64-tilegx.c | 2 +- + bfd/elf64-x86-64.c | 7 +++---- + bfd/elflink.c | 9 ++++----- + bfd/elfn32-mips.c | 6 ++---- + bfd/elfnn-aarch64.c | 21 +++++++++++---------- + bfd/elfnn-ia64.c | 11 ++++++----- + bfd/elfnn-kvx.c | 19 +++++++++---------- + bfd/elfnn-loongarch.c | 9 +++++---- + bfd/elfnn-riscv.c | 7 ++++--- + bfd/elfxx-mips.c | 15 ++++++++------- + bfd/elfxx-mips.h | 4 ++-- + bfd/elfxx-sparc.c | 7 ++++--- + bfd/elfxx-sparc.h | 2 +- + bfd/elfxx-target.h | 12 ++++++------ + bfd/elfxx-tilegx.c | 7 ++++--- + bfd/elfxx-tilegx.h | 2 +- + bfd/elfxx-x86.c | 8 ++++---- + bfd/elfxx-x86.h | 8 ++++---- + ld/emultempl/vms.em | 7 +++---- + 61 files changed, 343 insertions(+), 337 deletions(-) + +--- a/bfd/elf-bfd.h ++++ b/bfd/elf-bfd.h +@@ -1187,7 +1187,7 @@ struct elf_backend_data + /* The ADJUST_DYNAMIC_SYMBOL function is called by the ELF backend + linker for every symbol which is defined by a dynamic object and + referenced by a regular object. This is called after all the +- input files have been seen, but before the SIZE_DYNAMIC_SECTIONS ++ input files have been seen, but before the LATE_SIZE_SECTIONS + function has been called. The hash table entry should be + bfd_link_hash_defined ore bfd_link_hash_defweak, and it should be + defined in a section from a dynamic object. Dynamic object +@@ -1199,24 +1199,23 @@ struct elf_backend_data + bool (*elf_backend_adjust_dynamic_symbol) + (struct bfd_link_info *info, struct elf_link_hash_entry *h); + +- /* The ALWAYS_SIZE_SECTIONS function is called by the backend linker +- after all the linker input files have been seen but before the +- section sizes have been set. This is called after +- ADJUST_DYNAMIC_SYMBOL, but before SIZE_DYNAMIC_SECTIONS. */ +- bool (*elf_backend_always_size_sections) ++ /* The EARLY_SIZE_SECTIONS and LATE_SIZE_SECTIONS functions are ++ called by the backend linker after all linker input files have ++ been seen and sections have been assigned to output sections, but ++ before the section sizes have been set. Both of these functions ++ are called even when no dynamic object is seen by the linker. ++ Between them, they must set the sizes of the dynamic sections and ++ other backend specific sections, and may fill in their contents. ++ Most backends need only use LATE_SIZE_SECTIONS. ++ EARLY_SIZE_SECTIONS is called before --export-dynamic makes some ++ symbols dynamic and before ADJUST_DYNAMIC_SYMBOL processes ++ dynamic symbols, LATE_SIZE_SECTIONS afterwards. The generic ELF ++ linker can handle the .dynsym, .dynstr and .hash sections. ++ Besides those, these functions must handle the .interp section ++ and any other sections created by CREATE_DYNAMIC_SECTIONS. */ ++ bool (*elf_backend_early_size_sections) + (bfd *output_bfd, struct bfd_link_info *info); +- +- /* The SIZE_DYNAMIC_SECTIONS function is called by the ELF backend +- linker after all the linker input files have been seen but before +- the sections sizes have been set. This is called after +- ADJUST_DYNAMIC_SYMBOL has been called on all appropriate symbols. +- It is only called when linking against a dynamic object. It must +- set the sizes of the dynamic sections, and may fill in their +- contents as well. The generic ELF linker can handle the .dynsym, +- .dynstr and .hash sections. This function must handle the +- .interp section and any sections created by the +- CREATE_DYNAMIC_SECTIONS entry point. */ +- bool (*elf_backend_size_dynamic_sections) ++ bool (*elf_backend_late_size_sections) + (bfd *output_bfd, struct bfd_link_info *info); + + /* The STRIP_ZERO_SIZED_DYNAMIC_SECTIONS function is called by the +--- a/bfd/elf-m10300.c ++++ b/bfd/elf-m10300.c +@@ -5015,8 +5015,8 @@ _bfd_mn10300_elf_adjust_dynamic_symbol ( + /* Set the sizes of the dynamic sections. */ + + static bool +-_bfd_mn10300_elf_size_dynamic_sections (bfd * output_bfd, +- struct bfd_link_info * info) ++_bfd_mn10300_elf_late_size_sections (bfd * output_bfd, ++ struct bfd_link_info * info) + { + struct elf32_mn10300_link_hash_table *htab = elf32_mn10300_hash_table (info); + bfd * dynobj; +@@ -5024,7 +5024,8 @@ _bfd_mn10300_elf_size_dynamic_sections ( + bool relocs; + + dynobj = htab->root.dynobj; +- BFD_ASSERT (dynobj != NULL); ++ if (dynobj == NULL) ++ return true; + + if (elf_hash_table (info)->dynamic_sections_created) + { +@@ -5511,8 +5512,8 @@ mn10300_elf_mkobject (bfd *abfd) + _bfd_mn10300_elf_create_dynamic_sections + #define elf_backend_adjust_dynamic_symbol \ + _bfd_mn10300_elf_adjust_dynamic_symbol +-#define elf_backend_size_dynamic_sections \ +- _bfd_mn10300_elf_size_dynamic_sections ++#define elf_backend_late_size_sections \ ++ _bfd_mn10300_elf_late_size_sections + #define elf_backend_omit_section_dynsym _bfd_elf_omit_section_dynsym_all + #define elf_backend_finish_dynamic_symbol \ + _bfd_mn10300_elf_finish_dynamic_symbol +--- a/bfd/elf32-arc.c ++++ b/bfd/elf32-arc.c +@@ -2715,8 +2715,8 @@ elf_arc_finish_dynamic_sections (bfd * o + + /* Set the sizes of the dynamic sections. */ + static bool +-elf_arc_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, +- struct bfd_link_info *info) ++elf_arc_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, ++ struct bfd_link_info *info) + { + bfd *dynobj; + asection *s; +@@ -2724,7 +2724,8 @@ elf_arc_size_dynamic_sections (bfd *outp + struct elf_link_hash_table *htab = elf_hash_table (info); + + dynobj = htab->dynobj; +- BFD_ASSERT (dynobj != NULL); ++ if (dynobj == NULL) ++ return true; + + if (htab->dynamic_sections_created) + { +@@ -3140,7 +3141,7 @@ arc_elf_relax_section (bfd *abfd, asecti + #define elf_backend_finish_dynamic_symbol elf_arc_finish_dynamic_symbol + + #define elf_backend_finish_dynamic_sections elf_arc_finish_dynamic_sections +-#define elf_backend_size_dynamic_sections elf_arc_size_dynamic_sections ++#define elf_backend_late_size_sections elf_arc_late_size_sections + + #define elf_backend_can_gc_sections 1 + #define elf_backend_want_got_plt 1 +--- a/bfd/elf32-arm.c ++++ b/bfd/elf32-arm.c +@@ -16752,8 +16752,8 @@ bfd_elf32_arm_set_byteswap_code (struct + /* Set the sizes of the dynamic sections. */ + + static bool +-elf32_arm_size_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED, +- struct bfd_link_info * info) ++elf32_arm_late_size_sections (bfd * output_bfd ATTRIBUTE_UNUSED, ++ struct bfd_link_info * info) + { + bfd * dynobj; + asection * s; +@@ -16766,7 +16766,9 @@ elf32_arm_size_dynamic_sections (bfd * o + return false; + + dynobj = elf_hash_table (info)->dynobj; +- BFD_ASSERT (dynobj != NULL); ++ if (dynobj == NULL) ++ return true; ++ + check_use_blx (htab); + + if (elf_hash_table (info)->dynamic_sections_created) +@@ -17138,8 +17140,7 @@ elf32_arm_size_dynamic_sections (bfd * o + _TLS_MODULE_BASE_, if needed. */ + + static bool +-elf32_arm_always_size_sections (bfd *output_bfd, +- struct bfd_link_info *info) ++elf32_arm_early_size_sections (bfd *output_bfd, struct bfd_link_info *info) + { + asection *tls_sec; + struct elf32_arm_link_hash_table *htab; +@@ -20341,8 +20342,8 @@ elf32_arm_backend_symbol_processing (bfd + #define elf_backend_create_dynamic_sections elf32_arm_create_dynamic_sections + #define elf_backend_finish_dynamic_symbol elf32_arm_finish_dynamic_symbol + #define elf_backend_finish_dynamic_sections elf32_arm_finish_dynamic_sections +-#define elf_backend_size_dynamic_sections elf32_arm_size_dynamic_sections +-#define elf_backend_always_size_sections elf32_arm_always_size_sections ++#define elf_backend_late_size_sections elf32_arm_late_size_sections ++#define elf_backend_early_size_sections elf32_arm_early_size_sections + #define elf_backend_init_index_section _bfd_elf_init_2_index_sections + #define elf_backend_init_file_header elf32_arm_init_file_header + #define elf_backend_reloc_type_class elf32_arm_reloc_type_class +--- a/bfd/elf32-bfin.c ++++ b/bfd/elf32-bfin.c +@@ -4027,8 +4027,8 @@ _bfinfdpic_size_got_plt (bfd *output_bfd + /* Set the sizes of the dynamic sections. */ + + static bool +-elf32_bfinfdpic_size_dynamic_sections (bfd *output_bfd, +- struct bfd_link_info *info) ++elf32_bfinfdpic_late_size_sections (bfd *output_bfd, ++ struct bfd_link_info *info) + { + struct elf_link_hash_table *htab; + bfd *dynobj; +@@ -4037,7 +4037,8 @@ elf32_bfinfdpic_size_dynamic_sections (b + + htab = elf_hash_table (info); + dynobj = htab->dynobj; +- BFD_ASSERT (dynobj != NULL); ++ if (dynobj == NULL) ++ return true; + + if (htab->dynamic_sections_created) + { +@@ -4086,7 +4087,7 @@ elf32_bfinfdpic_size_dynamic_sections (b + } + + static bool +-elf32_bfinfdpic_always_size_sections (bfd *output_bfd, ++elf32_bfinfdpic_early_size_sections (bfd *output_bfd, + struct bfd_link_info *info) + { + if (!bfd_link_relocatable (info) +@@ -5123,15 +5124,16 @@ bfin_discard_copies (struct elf_link_has + } + + static bool +-bfin_size_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED, +- struct bfd_link_info *info) ++bfin_late_size_sections (bfd * output_bfd ATTRIBUTE_UNUSED, ++ struct bfd_link_info *info) + { + bfd *dynobj; + asection *s; + bool relocs; + + dynobj = elf_hash_table (info)->dynobj; +- BFD_ASSERT (dynobj != NULL); ++ if (dynobj == NULL) ++ return true; + + if (elf_hash_table (info)->dynamic_sections_created) + { +@@ -5423,8 +5425,7 @@ struct bfd_elf_special_section const elf + #define elf_backend_check_relocs bfin_check_relocs + #define elf_backend_adjust_dynamic_symbol \ + bfin_adjust_dynamic_symbol +-#define elf_backend_size_dynamic_sections \ +- bfin_size_dynamic_sections ++#define elf_backend_late_size_sections bfin_late_size_sections + #define elf_backend_relocate_section bfin_relocate_section + #define elf_backend_finish_dynamic_symbol \ + bfin_finish_dynamic_symbol +@@ -5470,9 +5471,9 @@ struct bfd_elf_special_section const elf + #undef bfd_elf32_bfd_link_hash_table_create + #define bfd_elf32_bfd_link_hash_table_create \ + bfinfdpic_elf_link_hash_table_create +-#undef elf_backend_always_size_sections +-#define elf_backend_always_size_sections \ +- elf32_bfinfdpic_always_size_sections ++#undef elf_backend_early_size_sections ++#define elf_backend_early_size_sections \ ++ elf32_bfinfdpic_early_size_sections + + #undef elf_backend_create_dynamic_sections + #define elf_backend_create_dynamic_sections \ +@@ -5480,9 +5481,9 @@ struct bfd_elf_special_section const elf + #undef elf_backend_adjust_dynamic_symbol + #define elf_backend_adjust_dynamic_symbol \ + elf32_bfinfdpic_adjust_dynamic_symbol +-#undef elf_backend_size_dynamic_sections +-#define elf_backend_size_dynamic_sections \ +- elf32_bfinfdpic_size_dynamic_sections ++#undef elf_backend_late_size_sections ++#define elf_backend_late_size_sections \ ++ elf32_bfinfdpic_late_size_sections + #undef elf_backend_finish_dynamic_symbol + #define elf_backend_finish_dynamic_symbol \ + elf32_bfinfdpic_finish_dynamic_symbol +--- a/bfd/elf32-cr16.c ++++ b/bfd/elf32-cr16.c +@@ -2391,15 +2391,16 @@ _bfd_cr16_elf_adjust_dynamic_symbol (str + /* Set the sizes of the dynamic sections. */ + + static bool +-_bfd_cr16_elf_size_dynamic_sections (bfd * output_bfd, +- struct bfd_link_info * info) ++_bfd_cr16_elf_late_size_sections (bfd * output_bfd, ++ struct bfd_link_info * info) + { + bfd * dynobj; + asection * s; + bool relocs; + + dynobj = elf_hash_table (info)->dynobj; +- BFD_ASSERT (dynobj != NULL); ++ if (dynobj == NULL) ++ return true; + + if (elf_hash_table (info)->dynamic_sections_created) + { +@@ -2836,8 +2837,8 @@ _bfd_cr16_elf_reloc_type_class (const st + _bfd_cr16_elf_create_dynamic_sections + #define elf_backend_adjust_dynamic_symbol \ + _bfd_cr16_elf_adjust_dynamic_symbol +-#define elf_backend_size_dynamic_sections \ +- _bfd_cr16_elf_size_dynamic_sections ++#define elf_backend_late_size_sections \ ++ _bfd_cr16_elf_late_size_sections + #define elf_backend_omit_section_dynsym _bfd_elf_omit_section_dynsym_all + #define elf_backend_finish_dynamic_symbol \ + _bfd_cr16_elf_finish_dynamic_symbol +--- a/bfd/elf32-cris.c ++++ b/bfd/elf32-cris.c +@@ -2527,7 +2527,7 @@ cris_elf_plt_sym_val (bfd_vma i ATTRIBUT + entry but we found we will not create any. Called when we find we will + not have any PLT for this symbol, by for example + elf_cris_adjust_dynamic_symbol when we're doing a proper dynamic link, +- or elf_cris_size_dynamic_sections if no dynamic sections will be ++ or elf_cris_late_size_sections if no dynamic sections will be + created (we're only linking static objects). */ + + static bool +@@ -3508,8 +3508,8 @@ cris_elf_check_relocs (bfd *abfd, + /* Set the sizes of the dynamic sections. */ + + static bool +-elf_cris_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, +- struct bfd_link_info *info) ++elf_cris_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, ++ struct bfd_link_info *info) + { + struct elf_cris_link_hash_table * htab; + bfd *dynobj; +@@ -3521,7 +3521,8 @@ elf_cris_size_dynamic_sections (bfd *out + return false; + + dynobj = htab->root.dynobj; +- BFD_ASSERT (dynobj != NULL); ++ if (dynobj == NULL) ++ return true; + + if (htab->root.dynamic_sections_created) + { +@@ -4090,8 +4091,8 @@ elf_cris_got_elt_size (bfd *abfd ATTRIBU + elf_cris_adjust_dynamic_symbol + #define elf_backend_copy_indirect_symbol \ + elf_cris_copy_indirect_symbol +-#define elf_backend_size_dynamic_sections \ +- elf_cris_size_dynamic_sections ++#define elf_backend_late_size_sections \ ++ elf_cris_late_size_sections + #define elf_backend_init_index_section _bfd_elf_init_1_index_section + #define elf_backend_finish_dynamic_symbol \ + elf_cris_finish_dynamic_symbol +--- a/bfd/elf32-csky.c ++++ b/bfd/elf32-csky.c +@@ -1893,8 +1893,8 @@ csky_allocate_dynrelocs (struct elf_link + /* Set the sizes of the dynamic sections. */ + + static bool +-csky_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, +- struct bfd_link_info *info) ++csky_elf_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, ++ struct bfd_link_info *info) + { + struct csky_elf_link_hash_table *htab; + bfd *dynobj; +@@ -1907,7 +1907,7 @@ csky_elf_size_dynamic_sections (bfd *out + return false; + dynobj = htab->elf.dynobj; + if (dynobj == NULL) +- return false; ++ return true; + + if (htab->elf.dynamic_sections_created) + { +@@ -5333,7 +5333,7 @@ elf32_csky_obj_attrs_handle_unknown (bfd + /* Dynamic relocate related API. */ + #define elf_backend_create_dynamic_sections _bfd_elf_create_dynamic_sections + #define elf_backend_adjust_dynamic_symbol csky_elf_adjust_dynamic_symbol +-#define elf_backend_size_dynamic_sections csky_elf_size_dynamic_sections ++#define elf_backend_late_size_sections csky_elf_late_size_sections + #define elf_backend_finish_dynamic_symbol csky_elf_finish_dynamic_symbol + #define elf_backend_finish_dynamic_sections csky_elf_finish_dynamic_sections + #define elf_backend_rela_normal 1 +--- a/bfd/elf32-frv.c ++++ b/bfd/elf32-frv.c +@@ -5423,15 +5423,16 @@ _frvfdpic_size_got_plt (bfd *output_bfd, + /* Set the sizes of the dynamic sections. */ + + static bool +-elf32_frvfdpic_size_dynamic_sections (bfd *output_bfd, +- struct bfd_link_info *info) ++elf32_frvfdpic_late_size_sections (bfd *output_bfd, ++ struct bfd_link_info *info) + { + bfd *dynobj; + asection *s; + struct _frvfdpic_dynamic_got_plt_info gpinfo; + + dynobj = elf_hash_table (info)->dynobj; +- BFD_ASSERT (dynobj != NULL); ++ if (dynobj == NULL) ++ return true; + + if (elf_hash_table (info)->dynamic_sections_created) + { +@@ -5472,8 +5473,8 @@ elf32_frvfdpic_size_dynamic_sections (bf + } + + static bool +-elf32_frvfdpic_always_size_sections (bfd *output_bfd, +- struct bfd_link_info *info) ++elf32_frvfdpic_early_size_sections (bfd *output_bfd, ++ struct bfd_link_info *info) + { + if (!bfd_link_relocatable (info) + && !bfd_elf_stack_segment_size (output_bfd, info, +@@ -6817,9 +6818,9 @@ elf32_frv_grok_psinfo (bfd *abfd, Elf_In + #undef bfd_elf32_bfd_link_hash_table_create + #define bfd_elf32_bfd_link_hash_table_create \ + frvfdpic_elf_link_hash_table_create +-#undef elf_backend_always_size_sections +-#define elf_backend_always_size_sections \ +- elf32_frvfdpic_always_size_sections ++#undef elf_backend_early_size_sections ++#define elf_backend_early_size_sections \ ++ elf32_frvfdpic_early_size_sections + + #undef elf_backend_create_dynamic_sections + #define elf_backend_create_dynamic_sections \ +@@ -6827,9 +6828,9 @@ elf32_frv_grok_psinfo (bfd *abfd, Elf_In + #undef elf_backend_adjust_dynamic_symbol + #define elf_backend_adjust_dynamic_symbol \ + elf32_frvfdpic_adjust_dynamic_symbol +-#undef elf_backend_size_dynamic_sections +-#define elf_backend_size_dynamic_sections \ +- elf32_frvfdpic_size_dynamic_sections ++#undef elf_backend_late_size_sections ++#define elf_backend_late_size_sections \ ++ elf32_frvfdpic_late_size_sections + #undef bfd_elf32_bfd_relax_section + #define bfd_elf32_bfd_relax_section \ + elf32_frvfdpic_relax_section +--- a/bfd/elf32-hppa.c ++++ b/bfd/elf32-hppa.c +@@ -2042,8 +2042,8 @@ clobber_millicode_symbols (struct elf_li + /* Set the sizes of the dynamic sections. */ + + static bool +-elf32_hppa_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, +- struct bfd_link_info *info) ++elf32_hppa_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, ++ struct bfd_link_info *info) + { + struct elf32_hppa_link_hash_table *htab; + bfd *dynobj; +@@ -2057,7 +2057,7 @@ elf32_hppa_size_dynamic_sections (bfd *o + + dynobj = htab->etab.dynobj; + if (dynobj == NULL) +- abort (); ++ return true; + + if (htab->etab.dynamic_sections_created) + { +@@ -4452,7 +4452,7 @@ elf32_hppa_elf_get_symbol_type (Elf_Inte + #define elf_backend_hide_symbol elf32_hppa_hide_symbol + #define elf_backend_finish_dynamic_symbol elf32_hppa_finish_dynamic_symbol + #define elf_backend_finish_dynamic_sections elf32_hppa_finish_dynamic_sections +-#define elf_backend_size_dynamic_sections elf32_hppa_size_dynamic_sections ++#define elf_backend_late_size_sections elf32_hppa_late_size_sections + #define elf_backend_init_index_section _bfd_elf_init_1_index_section + #define elf_backend_gc_mark_hook elf32_hppa_gc_mark_hook + #define elf_backend_grok_prstatus elf32_hppa_grok_prstatus +--- a/bfd/elf32-i386.c ++++ b/bfd/elf32-i386.c +@@ -1957,8 +1957,7 @@ elf_i386_scan_relocs (bfd *abfd, + } + + static bool +-elf_i386_always_size_sections (bfd *output_bfd, +- struct bfd_link_info *info) ++elf_i386_early_size_sections (bfd *output_bfd, struct bfd_link_info *info) + { + bfd *abfd; + +@@ -1971,7 +1970,7 @@ elf_i386_always_size_sections (bfd *outp + elf_i386_scan_relocs)) + return false; + +- return _bfd_x86_elf_always_size_sections (output_bfd, info); ++ return _bfd_x86_elf_early_size_sections (output_bfd, info); + } + + /* Set the correct type for an x86 ELF section. We do this by the +@@ -4479,7 +4478,7 @@ elf_i386_link_setup_gnu_properties (stru + #define bfd_elf32_get_synthetic_symtab elf_i386_get_synthetic_symtab + + #define elf_backend_relocs_compatible _bfd_elf_relocs_compatible +-#define elf_backend_always_size_sections elf_i386_always_size_sections ++#define elf_backend_early_size_sections elf_i386_early_size_sections + #define elf_backend_create_dynamic_sections _bfd_elf_create_dynamic_sections + #define elf_backend_fake_sections elf_i386_fake_sections + #define elf_backend_finish_dynamic_sections elf_i386_finish_dynamic_sections +--- a/bfd/elf32-lm32.c ++++ b/bfd/elf32-lm32.c +@@ -1906,8 +1906,8 @@ allocate_dynrelocs (struct elf_link_hash + /* Set the sizes of the dynamic sections. */ + + static bool +-lm32_elf_size_dynamic_sections (bfd *output_bfd, +- struct bfd_link_info *info) ++lm32_elf_late_size_sections (bfd *output_bfd, ++ struct bfd_link_info *info) + { + struct elf_lm32_link_hash_table *htab; + bfd *dynobj; +@@ -1920,7 +1920,8 @@ lm32_elf_size_dynamic_sections (bfd *out + return false; + + dynobj = htab->root.dynobj; +- BFD_ASSERT (dynobj != NULL); ++ if (dynobj == NULL) ++ return true; + + if (htab->root.dynamic_sections_created) + { +@@ -2309,7 +2310,7 @@ lm32_elf_create_dynamic_sections (bfd *a + } + + static bool +-lm32_elf_always_size_sections (bfd *output_bfd, struct bfd_link_info *info) ++lm32_elf_early_size_sections (bfd *output_bfd, struct bfd_link_info *info) + { + if (!bfd_link_relocatable (info)) + { +@@ -2395,7 +2396,7 @@ lm32_elf_fdpic_copy_private_bfd_data (bf + #define bfd_elf32_bfd_link_hash_table_create lm32_elf_link_hash_table_create + #define elf_backend_check_relocs lm32_elf_check_relocs + #define elf_backend_reloc_type_class lm32_elf_reloc_type_class +-#define elf_backend_size_dynamic_sections lm32_elf_size_dynamic_sections ++#define elf_backend_late_size_sections lm32_elf_late_size_sections + #define elf_backend_omit_section_dynsym _bfd_elf_omit_section_dynsym_all + #define elf_backend_create_dynamic_sections lm32_elf_create_dynamic_sections + #define elf_backend_finish_dynamic_sections lm32_elf_finish_dynamic_sections +@@ -2416,8 +2417,8 @@ lm32_elf_fdpic_copy_private_bfd_data (bf + #undef elf32_bed + #define elf32_bed elf32_lm32fdpic_bed + +-#undef elf_backend_always_size_sections +-#define elf_backend_always_size_sections lm32_elf_always_size_sections ++#undef elf_backend_early_size_sections ++#define elf_backend_early_size_sections lm32_elf_early_size_sections + #undef bfd_elf32_bfd_copy_private_bfd_data + #define bfd_elf32_bfd_copy_private_bfd_data lm32_elf_fdpic_copy_private_bfd_data + +--- a/bfd/elf32-m32c.c ++++ b/bfd/elf32-m32c.c +@@ -773,8 +773,8 @@ m32c_elf_finish_dynamic_sections (bfd *a + } + + static bool +-m32c_elf_always_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, +- struct bfd_link_info *info) ++m32c_elf_early_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, ++ struct bfd_link_info *info) + { + bfd *dynobj; + asection *splt; +@@ -2132,8 +2132,8 @@ _bfd_m32c_elf_eh_frame_address_size (bfd + #define elf_backend_check_relocs m32c_elf_check_relocs + #define elf_backend_object_p m32c_elf_object_p + #define elf_symbol_leading_char ('_') +-#define elf_backend_always_size_sections \ +- m32c_elf_always_size_sections ++#define elf_backend_early_size_sections \ ++ m32c_elf_early_size_sections + #define elf_backend_finish_dynamic_sections \ + m32c_elf_finish_dynamic_sections + +--- a/bfd/elf32-m32r.c ++++ b/bfd/elf32-m32r.c +@@ -1958,8 +1958,8 @@ allocate_dynrelocs (struct elf_link_hash + /* Set the sizes of the dynamic sections. */ + + static bool +-m32r_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, +- struct bfd_link_info *info) ++m32r_elf_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, ++ struct bfd_link_info *info) + { + struct elf_link_hash_table *htab; + bfd *dynobj; +@@ -1968,7 +1968,7 @@ m32r_elf_size_dynamic_sections (bfd *out + bfd *ibfd; + + #ifdef DEBUG_PIC +- printf ("m32r_elf_size_dynamic_sections()\n"); ++ printf ("m32r_elf_late_size_sections()\n"); + #endif + + htab = m32r_elf_hash_table (info); +@@ -1976,7 +1976,8 @@ m32r_elf_size_dynamic_sections (bfd *out + return false; + + dynobj = htab->dynobj; +- BFD_ASSERT (dynobj != NULL); ++ if (dynobj == NULL) ++ return true; + + if (htab->dynamic_sections_created) + { +@@ -3658,7 +3659,7 @@ m32r_elf_reloc_type_class (const struct + + #define elf_backend_create_dynamic_sections m32r_elf_create_dynamic_sections + #define bfd_elf32_bfd_link_hash_table_create m32r_elf_link_hash_table_create +-#define elf_backend_size_dynamic_sections m32r_elf_size_dynamic_sections ++#define elf_backend_late_size_sections m32r_elf_late_size_sections + #define elf_backend_omit_section_dynsym _bfd_elf_omit_section_dynsym_all + #define elf_backend_finish_dynamic_sections m32r_elf_finish_dynamic_sections + #define elf_backend_adjust_dynamic_symbol m32r_elf_adjust_dynamic_symbol +--- a/bfd/elf32-m68k.c ++++ b/bfd/elf32-m68k.c +@@ -2934,7 +2934,7 @@ elf_m68k_get_plt_info (bfd *output_bfd) + It's a convenient place to determine the PLT style. */ + + static bool +-elf_m68k_always_size_sections (bfd *output_bfd, struct bfd_link_info *info) ++elf_m68k_early_size_sections (bfd *output_bfd, struct bfd_link_info *info) + { + /* Bind input BFDs to GOTs and calculate sizes of .got and .rela.got + sections. */ +@@ -3107,15 +3107,16 @@ elf_m68k_adjust_dynamic_symbol (struct b + /* Set the sizes of the dynamic sections. */ + + static bool +-elf_m68k_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, +- struct bfd_link_info *info) ++elf_m68k_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, ++ struct bfd_link_info *info) + { + bfd *dynobj; + asection *s; + bool relocs; + + dynobj = elf_hash_table (info)->dynobj; +- BFD_ASSERT (dynobj != NULL); ++ if (dynobj == NULL) ++ return true; + + if (elf_hash_table (info)->dynamic_sections_created) + { +@@ -4628,12 +4629,11 @@ elf_m68k_grok_psinfo (bfd *abfd, Elf_Int + #define bfd_elf32_bfd_final_link bfd_elf_final_link + + #define elf_backend_check_relocs elf_m68k_check_relocs +-#define elf_backend_always_size_sections \ +- elf_m68k_always_size_sections ++#define elf_backend_early_size_sections \ ++ elf_m68k_early_size_sections + #define elf_backend_adjust_dynamic_symbol \ + elf_m68k_adjust_dynamic_symbol +-#define elf_backend_size_dynamic_sections \ +- elf_m68k_size_dynamic_sections ++#define elf_backend_late_size_sections elf_m68k_late_size_sections + #define elf_backend_final_write_processing elf_m68k_final_write_processing + #define elf_backend_init_index_section _bfd_elf_init_1_index_section + #define elf_backend_relocate_section elf_m68k_relocate_section +--- a/bfd/elf32-metag.c ++++ b/bfd/elf32-metag.c +@@ -2717,8 +2717,8 @@ allocate_dynrelocs (struct elf_link_hash + /* Set the sizes of the dynamic sections. */ + + static bool +-elf_metag_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, +- struct bfd_link_info *info) ++elf_metag_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, ++ struct bfd_link_info *info) + { + struct elf_metag_link_hash_table *htab; + bfd *dynobj; +@@ -2729,7 +2729,7 @@ elf_metag_size_dynamic_sections (bfd *ou + htab = metag_link_hash_table (info); + dynobj = htab->etab.dynobj; + if (dynobj == NULL) +- abort (); ++ return true; + + if (htab->etab.dynamic_sections_created) + { +@@ -4019,7 +4019,7 @@ elf_metag_plt_sym_val (bfd_vma i, const + #define elf_backend_adjust_dynamic_symbol elf_metag_adjust_dynamic_symbol + #define elf_backend_finish_dynamic_symbol elf_metag_finish_dynamic_symbol + #define elf_backend_finish_dynamic_sections elf_metag_finish_dynamic_sections +-#define elf_backend_size_dynamic_sections elf_metag_size_dynamic_sections ++#define elf_backend_late_size_sections elf_metag_late_size_sections + #define elf_backend_omit_section_dynsym \ + _bfd_elf_omit_section_dynsym_all + #define elf_backend_init_file_header elf_metag_init_file_header +--- a/bfd/elf32-microblaze.c ++++ b/bfd/elf32-microblaze.c +@@ -2966,8 +2966,8 @@ allocate_dynrelocs (struct elf_link_hash + /* Set the sizes of the dynamic sections. */ + + static bool +-microblaze_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, +- struct bfd_link_info *info) ++microblaze_elf_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, ++ struct bfd_link_info *info) + { + struct elf32_mb_link_hash_table *htab; + bfd *dynobj; +@@ -2979,7 +2979,8 @@ microblaze_elf_size_dynamic_sections (bf + return false; + + dynobj = htab->elf.dynobj; +- BFD_ASSERT (dynobj != NULL); ++ if (dynobj == NULL) ++ return true; + + /* Set up .got offsets for local syms, and space for local dynamic + relocs. */ +@@ -3497,7 +3498,7 @@ microblaze_elf_add_symbol_hook (bfd *abf + #define elf_backend_create_dynamic_sections _bfd_elf_create_dynamic_sections + #define elf_backend_finish_dynamic_sections microblaze_elf_finish_dynamic_sections + #define elf_backend_finish_dynamic_symbol microblaze_elf_finish_dynamic_symbol +-#define elf_backend_size_dynamic_sections microblaze_elf_size_dynamic_sections ++#define elf_backend_late_size_sections microblaze_elf_late_size_sections + #define elf_backend_add_symbol_hook microblaze_elf_add_symbol_hook + + #include "elf32-target.h" +--- a/bfd/elf32-mips.c ++++ b/bfd/elf32-mips.c +@@ -2537,10 +2537,8 @@ static const struct ecoff_debug_swap mip + #define elf_backend_get_target_dtag _bfd_mips_elf_get_target_dtag + #define elf_backend_adjust_dynamic_symbol \ + _bfd_mips_elf_adjust_dynamic_symbol +-#define elf_backend_always_size_sections \ +- _bfd_mips_elf_always_size_sections +-#define elf_backend_size_dynamic_sections \ +- _bfd_mips_elf_size_dynamic_sections ++#define elf_backend_early_size_sections _bfd_mips_elf_early_size_sections ++#define elf_backend_late_size_sections _bfd_mips_elf_late_size_sections + #define elf_backend_init_index_section _bfd_elf_init_1_index_section + #define elf_backend_relocate_section _bfd_mips_elf_relocate_section + #define elf_backend_finish_dynamic_symbol \ +--- a/bfd/elf32-nds32.c ++++ b/bfd/elf32-nds32.c +@@ -4302,8 +4302,8 @@ elf32_nds32_add_dynreloc (bfd *output_bf + /* Set the sizes of the dynamic sections. */ + + static bool +-nds32_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, +- struct bfd_link_info *info) ++nds32_elf_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, ++ struct bfd_link_info *info) + { + struct elf_nds32_link_hash_table *htab; + bfd *dynobj; +@@ -4316,7 +4316,8 @@ nds32_elf_size_dynamic_sections (bfd *ou + return false; + + dynobj = elf_hash_table (info)->dynobj; +- BFD_ASSERT (dynobj != NULL); ++ if (dynobj == NULL) ++ return true; + + if (elf_hash_table (info)->dynamic_sections_created) + { +@@ -13984,7 +13985,7 @@ nds32_elf_unify_tls_model (bfd *inbfd, a + #define elf_backend_create_dynamic_sections nds32_elf_create_dynamic_sections + #define elf_backend_finish_dynamic_sections nds32_elf_finish_dynamic_sections + #define elf_backend_finish_dynamic_symbol nds32_elf_finish_dynamic_symbol +-#define elf_backend_size_dynamic_sections nds32_elf_size_dynamic_sections ++#define elf_backend_late_size_sections nds32_elf_late_size_sections + #define elf_backend_relocate_section nds32_elf_relocate_section + #define elf_backend_gc_mark_hook nds32_elf_gc_mark_hook + #define elf_backend_grok_prstatus nds32_elf_grok_prstatus +--- a/bfd/elf32-nios2.c ++++ b/bfd/elf32-nios2.c +@@ -5405,7 +5405,7 @@ nios2_elf32_adjust_dynamic_symbol (struc + return true; + } + +-/* Worker function for nios2_elf32_size_dynamic_sections. */ ++/* Worker function for nios2_elf32_late_size_sections. */ + static bool + adjust_dynrelocs (struct elf_link_hash_entry *h, void *inf) + { +@@ -5432,7 +5432,7 @@ adjust_dynrelocs (struct elf_link_hash_e + return true; + } + +-/* Another worker function for nios2_elf32_size_dynamic_sections. ++/* Another worker function for nios2_elf32_late_size_sections. + Allocate space in .plt, .got and associated reloc sections for + dynamic relocs. */ + static bool +@@ -5667,11 +5667,11 @@ allocate_dynrelocs (struct elf_link_hash + return true; + } + +-/* Implement elf_backend_size_dynamic_sections: ++/* Implement elf_backend_late_size_sections: + Set the sizes of the dynamic sections. */ + static bool +-nios2_elf32_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, +- struct bfd_link_info *info) ++nios2_elf32_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, ++ struct bfd_link_info *info) + { + bfd *dynobj; + asection *s; +@@ -5681,7 +5681,8 @@ nios2_elf32_size_dynamic_sections (bfd * + + htab = elf32_nios2_hash_table (info); + dynobj = htab->root.dynobj; +- BFD_ASSERT (dynobj != NULL); ++ if (dynobj == NULL) ++ return true; + + htab->res_n_size = 0; + if (htab->root.dynamic_sections_created) +@@ -6052,7 +6053,7 @@ const struct bfd_elf_special_section elf + nios2_elf32_finish_dynamic_sections + #define elf_backend_adjust_dynamic_symbol nios2_elf32_adjust_dynamic_symbol + #define elf_backend_reloc_type_class nios2_elf32_reloc_type_class +-#define elf_backend_size_dynamic_sections nios2_elf32_size_dynamic_sections ++#define elf_backend_late_size_sections nios2_elf32_late_size_sections + #define elf_backend_add_symbol_hook nios2_elf_add_symbol_hook + #define elf_backend_copy_indirect_symbol nios2_elf32_copy_indirect_symbol + #define elf_backend_object_p nios2_elf32_object_p +--- a/bfd/elf32-or1k.c ++++ b/bfd/elf32-or1k.c +@@ -3047,8 +3047,8 @@ allocate_dynrelocs (struct elf_link_hash + /* Set the sizes of the dynamic sections. */ + + static bool +-or1k_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, +- struct bfd_link_info *info) ++or1k_elf_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, ++ struct bfd_link_info *info) + { + struct elf_or1k_link_hash_table *htab; + bfd *dynobj; +@@ -3061,7 +3061,8 @@ or1k_elf_size_dynamic_sections (bfd *out + return false; + + dynobj = htab->root.dynobj; +- BFD_ASSERT (dynobj != NULL); ++ if (dynobj == NULL) ++ return true; + + if (htab->root.dynamic_sections_created) + { +@@ -3414,7 +3415,7 @@ or1k_grok_psinfo (bfd *abfd, Elf_Interna + #define elf_backend_copy_indirect_symbol or1k_elf_copy_indirect_symbol + #define elf_backend_create_dynamic_sections _bfd_elf_create_dynamic_sections + #define elf_backend_finish_dynamic_sections or1k_elf_finish_dynamic_sections +-#define elf_backend_size_dynamic_sections or1k_elf_size_dynamic_sections ++#define elf_backend_late_size_sections or1k_elf_late_size_sections + #define elf_backend_adjust_dynamic_symbol or1k_elf_adjust_dynamic_symbol + #define elf_backend_finish_dynamic_symbol or1k_elf_finish_dynamic_symbol + +--- a/bfd/elf32-ppc.c ++++ b/bfd/elf32-ppc.c +@@ -5479,8 +5479,8 @@ static const unsigned char glink_eh_fram + /* Set the sizes of the dynamic sections. */ + + static bool +-ppc_elf_size_dynamic_sections (bfd *output_bfd, +- struct bfd_link_info *info) ++ppc_elf_late_size_sections (bfd *output_bfd, ++ struct bfd_link_info *info) + { + struct ppc_elf_link_hash_table *htab; + asection *s; +@@ -5488,11 +5488,12 @@ ppc_elf_size_dynamic_sections (bfd *outp + bfd *ibfd; + + #ifdef DEBUG +- fprintf (stderr, "ppc_elf_size_dynamic_sections called\n"); ++ fprintf (stderr, "ppc_elf_late_size_sections called\n"); + #endif + + htab = ppc_elf_hash_table (info); +- BFD_ASSERT (htab->elf.dynobj != NULL); ++ if (htab->elf.dynobj == NULL) ++ return true; + + if (elf_hash_table (info)->dynamic_sections_created) + { +@@ -10433,7 +10434,7 @@ ppc_elf_finish_dynamic_sections (bfd *ou + #define elf_backend_copy_indirect_symbol ppc_elf_copy_indirect_symbol + #define elf_backend_adjust_dynamic_symbol ppc_elf_adjust_dynamic_symbol + #define elf_backend_add_symbol_hook ppc_elf_add_symbol_hook +-#define elf_backend_size_dynamic_sections ppc_elf_size_dynamic_sections ++#define elf_backend_late_size_sections ppc_elf_late_size_sections + #define elf_backend_hash_symbol ppc_elf_hash_symbol + #define elf_backend_finish_dynamic_symbol ppc_elf_finish_dynamic_symbol + #define elf_backend_finish_dynamic_sections ppc_elf_finish_dynamic_sections +--- a/bfd/elf32-rl78.c ++++ b/bfd/elf32-rl78.c +@@ -1440,8 +1440,8 @@ rl78_elf_finish_dynamic_sections (bfd *a + } + + static bool +-rl78_elf_always_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, +- struct bfd_link_info *info) ++rl78_elf_early_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, ++ struct bfd_link_info *info) + { + bfd *dynobj; + asection *splt; +@@ -2610,8 +2610,8 @@ rl78_elf_relax_section (bfd *abfd, + + #define bfd_elf32_bfd_relax_section rl78_elf_relax_section + #define elf_backend_check_relocs rl78_elf_check_relocs +-#define elf_backend_always_size_sections \ +- rl78_elf_always_size_sections ++#define elf_backend_early_size_sections \ ++ rl78_elf_early_size_sections + #define elf_backend_finish_dynamic_sections \ + rl78_elf_finish_dynamic_sections + +--- a/bfd/elf32-s390.c ++++ b/bfd/elf32-s390.c +@@ -1366,7 +1366,7 @@ elf_s390_gc_mark_hook (asection *sec, + entry but we found we will not create any. Called when we find we will + not have any PLT for this symbol, by for example + elf_s390_adjust_dynamic_symbol when we're doing a proper dynamic link, +- or elf_s390_size_dynamic_sections if no dynamic sections will be ++ or elf_s390_late_size_sections if no dynamic sections will be + created (we're only linking static objects). */ + + static void +@@ -1778,8 +1778,8 @@ allocate_dynrelocs (struct elf_link_hash + /* Set the sizes of the dynamic sections. */ + + static bool +-elf_s390_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, +- struct bfd_link_info *info) ++elf_s390_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, ++ struct bfd_link_info *info) + { + struct elf_s390_link_hash_table *htab; + bfd *dynobj; +@@ -1790,7 +1790,7 @@ elf_s390_size_dynamic_sections (bfd *out + htab = elf_s390_hash_table (info); + dynobj = htab->elf.dynobj; + if (dynobj == NULL) +- abort (); ++ return true; + + if (htab->elf.dynamic_sections_created) + { +@@ -3926,7 +3926,7 @@ elf32_s390_merge_private_bfd_data (bfd * + #define elf_backend_gc_mark_hook elf_s390_gc_mark_hook + #define elf_backend_reloc_type_class elf_s390_reloc_type_class + #define elf_backend_relocate_section elf_s390_relocate_section +-#define elf_backend_size_dynamic_sections elf_s390_size_dynamic_sections ++#define elf_backend_late_size_sections elf_s390_late_size_sections + #define elf_backend_init_index_section _bfd_elf_init_1_index_section + #define elf_backend_grok_prstatus elf_s390_grok_prstatus + #define elf_backend_grok_psinfo elf_s390_grok_psinfo +--- a/bfd/elf32-score.c ++++ b/bfd/elf32-score.c +@@ -1089,7 +1089,7 @@ score_elf_got_info (bfd *abfd, asection + appear towards the end. This reduces the amount of GOT space + required. MAX_LOCAL is used to set the number of local symbols + known to be in the dynamic symbol table. During +- s3_bfd_score_elf_size_dynamic_sections, this value is 1. Afterward, the ++ s3_bfd_score_elf_late_size_sections, this value is 1. Afterward, the + section symbols are added and the count is higher. */ + static bool + score_elf_sort_hash_table (struct bfd_link_info *info, +@@ -3160,8 +3160,8 @@ s3_bfd_score_elf_adjust_dynamic_symbol ( + /* This function is called after all the input files have been read, + and the input sections have been assigned to output sections. */ + static bool +-s3_bfd_score_elf_always_size_sections (bfd *output_bfd, +- struct bfd_link_info *info) ++s3_bfd_score_elf_early_size_sections (bfd *output_bfd, ++ struct bfd_link_info *info) + { + bfd *dynobj; + asection *s; +@@ -3237,14 +3237,15 @@ s3_bfd_score_elf_always_size_sections (b + + /* Set the sizes of the dynamic sections. */ + static bool +-s3_bfd_score_elf_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) ++s3_bfd_score_elf_late_size_sections (bfd *output_bfd, struct bfd_link_info *info) + { + bfd *dynobj; + asection *s; + bool reltext; + + dynobj = elf_hash_table (info)->dynobj; +- BFD_ASSERT (dynobj != NULL); ++ if (dynobj == NULL) ++ return true; + + if (elf_hash_table (info)->dynamic_sections_created) + { +@@ -3313,7 +3314,7 @@ s3_bfd_score_elf_size_dynamic_sections ( + } + else if (startswith (name, ".got")) + { +- /* s3_bfd_score_elf_always_size_sections() has already done ++ /* s3_bfd_score_elf_early_size_sections() has already done + most of the work, but some symbols may have been mapped + to versions that we must now resolve in the got_entries + hash tables. */ +@@ -4177,22 +4178,22 @@ _bfd_score_elf_adjust_dynamic_symbol (st + } + + static bool +-_bfd_score_elf_always_size_sections (bfd *output_bfd, +- struct bfd_link_info *info) ++_bfd_score_elf_early_size_sections (bfd *output_bfd, ++ struct bfd_link_info *info) + { + if (bfd_get_mach (output_bfd) == bfd_mach_score3) +- return s3_bfd_score_elf_always_size_sections (output_bfd, info); ++ return s3_bfd_score_elf_early_size_sections (output_bfd, info); + else +- return s7_bfd_score_elf_always_size_sections (output_bfd, info); ++ return s7_bfd_score_elf_early_size_sections (output_bfd, info); + } + + static bool +-_bfd_score_elf_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) ++_bfd_score_elf_late_size_sections (bfd *output_bfd, struct bfd_link_info *info) + { + if (bfd_get_mach (output_bfd) == bfd_mach_score3) +- return s3_bfd_score_elf_size_dynamic_sections (output_bfd, info); ++ return s3_bfd_score_elf_late_size_sections (output_bfd, info); + else +- return s7_bfd_score_elf_size_dynamic_sections (output_bfd, info); ++ return s7_bfd_score_elf_late_size_sections (output_bfd, info); + } + + static bool +@@ -4455,10 +4456,10 @@ _bfd_score_elf_common_definition (Elf_In + _bfd_score_elf_section_from_bfd_section + #define elf_backend_adjust_dynamic_symbol \ + _bfd_score_elf_adjust_dynamic_symbol +-#define elf_backend_always_size_sections \ +- _bfd_score_elf_always_size_sections +-#define elf_backend_size_dynamic_sections \ +- _bfd_score_elf_size_dynamic_sections ++#define elf_backend_early_size_sections \ ++ _bfd_score_elf_early_size_sections ++#define elf_backend_late_size_sections \ ++ _bfd_score_elf_late_size_sections + #define elf_backend_omit_section_dynsym _bfd_elf_omit_section_dynsym_all + #define elf_backend_create_dynamic_sections \ + _bfd_score_elf_create_dynamic_sections +--- a/bfd/elf32-score.h ++++ b/bfd/elf32-score.h +@@ -78,10 +78,10 @@ s7_bfd_score_elf_adjust_dynamic_symbol ( + struct elf_link_hash_entry *); + + extern bool +-s7_bfd_score_elf_always_size_sections (bfd *, struct bfd_link_info *); ++s7_bfd_score_elf_early_size_sections (bfd *, struct bfd_link_info *); + + extern bool +-s7_bfd_score_elf_size_dynamic_sections (bfd *, struct bfd_link_info *); ++s7_bfd_score_elf_late_size_sections (bfd *, struct bfd_link_info *); + + extern bool + s7_bfd_score_elf_create_dynamic_sections (bfd *, struct bfd_link_info *); +--- a/bfd/elf32-score7.c ++++ b/bfd/elf32-score7.c +@@ -975,7 +975,7 @@ score_elf_got_info (bfd *abfd, asection + appear towards the end. This reduces the amount of GOT space + required. MAX_LOCAL is used to set the number of local symbols + known to be in the dynamic symbol table. During +- s7_bfd_score_elf_size_dynamic_sections, this value is 1. Afterward, the ++ s7_bfd_score_elf_late_size_sections, this value is 1. Afterward, the + section symbols are added and the count is higher. */ + + static bool +@@ -2969,8 +2969,8 @@ s7_bfd_score_elf_adjust_dynamic_symbol ( + and the input sections have been assigned to output sections. */ + + bool +-s7_bfd_score_elf_always_size_sections (bfd *output_bfd, +- struct bfd_link_info *info) ++s7_bfd_score_elf_early_size_sections (bfd *output_bfd, ++ struct bfd_link_info *info) + { + bfd *dynobj; + asection *s; +@@ -3047,14 +3047,15 @@ s7_bfd_score_elf_always_size_sections (b + /* Set the sizes of the dynamic sections. */ + + bool +-s7_bfd_score_elf_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) ++s7_bfd_score_elf_late_size_sections (bfd *output_bfd, struct bfd_link_info *info) + { + bfd *dynobj; + asection *s; + bool reltext; + + dynobj = elf_hash_table (info)->dynobj; +- BFD_ASSERT (dynobj != NULL); ++ if (dynobj == NULL) ++ return true; + + if (elf_hash_table (info)->dynamic_sections_created) + { +@@ -3123,7 +3124,7 @@ s7_bfd_score_elf_size_dynamic_sections ( + } + else if (startswith (name, ".got")) + { +- /* s7_bfd_score_elf_always_size_sections() has already done ++ /* s7_bfd_score_elf_early_size_sections() has already done + most of the work, but some symbols may have been mapped + to versions that we must now resolve in the got_entries + hash tables. */ +--- a/bfd/elf32-sh.c ++++ b/bfd/elf32-sh.c +@@ -2927,7 +2927,7 @@ allocate_dynrelocs (struct elf_link_hash + It's a convenient place to determine the PLT style. */ + + static bool +-sh_elf_always_size_sections (bfd *output_bfd, struct bfd_link_info *info) ++sh_elf_early_size_sections (bfd *output_bfd, struct bfd_link_info *info) + { + sh_elf_hash_table (info)->plt_info = get_plt_info (output_bfd, + bfd_link_pic (info)); +@@ -2942,8 +2942,8 @@ sh_elf_always_size_sections (bfd *output + /* Set the sizes of the dynamic sections. */ + + static bool +-sh_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, +- struct bfd_link_info *info) ++sh_elf_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, ++ struct bfd_link_info *info) + { + struct elf_sh_link_hash_table *htab; + bfd *dynobj; +@@ -2956,7 +2956,8 @@ sh_elf_size_dynamic_sections (bfd *outpu + return false; + + dynobj = htab->root.dynobj; +- BFD_ASSERT (dynobj != NULL); ++ if (dynobj == NULL) ++ return true; + + if (htab->root.dynamic_sections_created) + { +@@ -6600,10 +6601,8 @@ sh_elf_encode_eh_address (bfd *abfd, + sh_elf_link_hash_table_create + #define elf_backend_adjust_dynamic_symbol \ + sh_elf_adjust_dynamic_symbol +-#define elf_backend_always_size_sections \ +- sh_elf_always_size_sections +-#define elf_backend_size_dynamic_sections \ +- sh_elf_size_dynamic_sections ++#define elf_backend_early_size_sections sh_elf_early_size_sections ++#define elf_backend_late_size_sections sh_elf_late_size_sections + #define elf_backend_omit_section_dynsym sh_elf_omit_section_dynsym + #define elf_backend_finish_dynamic_symbol \ + sh_elf_finish_dynamic_symbol +--- a/bfd/elf32-sparc.c ++++ b/bfd/elf32-sparc.c +@@ -248,8 +248,7 @@ elf32_sparc_reloc_type_class (const stru + #define elf_backend_adjust_dynamic_symbol \ + _bfd_sparc_elf_adjust_dynamic_symbol + #define elf_backend_omit_section_dynsym _bfd_sparc_elf_omit_section_dynsym +-#define elf_backend_size_dynamic_sections \ +- _bfd_sparc_elf_size_dynamic_sections ++#define elf_backend_late_size_sections _bfd_sparc_elf_late_size_sections + #define elf_backend_relocate_section _bfd_sparc_elf_relocate_section + #define elf_backend_finish_dynamic_symbol \ + _bfd_sparc_elf_finish_dynamic_symbol +--- a/bfd/elf32-tic6x.c ++++ b/bfd/elf32-tic6x.c +@@ -3160,7 +3160,7 @@ elf32_tic6x_allocate_dynrelocs (struct e + /* Set the sizes of the dynamic sections. */ + + static bool +-elf32_tic6x_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) ++elf32_tic6x_late_size_sections (bfd *output_bfd, struct bfd_link_info *info) + { + struct elf32_tic6x_link_hash_table *htab; + bfd *dynobj; +@@ -3171,7 +3171,7 @@ elf32_tic6x_size_dynamic_sections (bfd * + htab = elf32_tic6x_hash_table (info); + dynobj = htab->elf.dynobj; + if (dynobj == NULL) +- abort (); ++ return true; + + if (htab->elf.dynamic_sections_created) + { +@@ -3358,7 +3358,7 @@ elf32_tic6x_size_dynamic_sections (bfd * + and the input sections have been assigned to output sections. */ + + static bool +-elf32_tic6x_always_size_sections (bfd *output_bfd, struct bfd_link_info *info) ++elf32_tic6x_early_size_sections (bfd *output_bfd, struct bfd_link_info *info) + { + if (elf32_tic6x_using_dsbt (output_bfd) && !bfd_link_relocatable (info) + && !bfd_elf_stack_segment_size (output_bfd, info, +@@ -4261,10 +4261,10 @@ elf32_tic6x_write_section (bfd *output_b + #define elf_backend_relocs_compatible _bfd_elf_relocs_compatible + #define elf_backend_finish_dynamic_symbol \ + elf32_tic6x_finish_dynamic_symbol +-#define elf_backend_always_size_sections \ +- elf32_tic6x_always_size_sections +-#define elf_backend_size_dynamic_sections \ +- elf32_tic6x_size_dynamic_sections ++#define elf_backend_early_size_sections \ ++ elf32_tic6x_early_size_sections ++#define elf_backend_late_size_sections \ ++ elf32_tic6x_late_size_sections + #define elf_backend_finish_dynamic_sections \ + elf32_tic6x_finish_dynamic_sections + #define bfd_elf32_bfd_final_link \ +--- a/bfd/elf32-tilegx.c ++++ b/bfd/elf32-tilegx.c +@@ -105,7 +105,7 @@ tilegx_elf_grok_psinfo (bfd *abfd, Elf_I + #define elf_backend_check_relocs tilegx_elf_check_relocs + #define elf_backend_adjust_dynamic_symbol tilegx_elf_adjust_dynamic_symbol + #define elf_backend_omit_section_dynsym tilegx_elf_omit_section_dynsym +-#define elf_backend_size_dynamic_sections tilegx_elf_size_dynamic_sections ++#define elf_backend_late_size_sections tilegx_elf_late_size_sections + #define elf_backend_relocate_section tilegx_elf_relocate_section + #define elf_backend_finish_dynamic_symbol tilegx_elf_finish_dynamic_symbol + #define elf_backend_finish_dynamic_sections tilegx_elf_finish_dynamic_sections +--- a/bfd/elf32-tilepro.c ++++ b/bfd/elf32-tilepro.c +@@ -2182,11 +2182,9 @@ tilepro_elf_omit_section_dynsym (bfd *ou + #define ELF32_DYNAMIC_INTERPRETER "/lib/ld.so.1" + + static bool +-tilepro_elf_size_dynamic_sections (bfd *output_bfd, +- struct bfd_link_info *info) ++tilepro_elf_late_size_sections (bfd *output_bfd, ++ struct bfd_link_info *info) + { +- (void)output_bfd; +- + struct elf_link_hash_table *htab; + bfd *dynobj; + asection *s; +@@ -2195,7 +2193,8 @@ tilepro_elf_size_dynamic_sections (bfd * + htab = tilepro_elf_hash_table (info); + BFD_ASSERT (htab != NULL); + dynobj = htab->dynobj; +- BFD_ASSERT (dynobj != NULL); ++ if (dynobj == NULL) ++ return true; + + if (elf_hash_table (info)->dynamic_sections_created) + { +@@ -3739,7 +3738,7 @@ tilepro_additional_program_headers (bfd + #define elf_backend_check_relocs tilepro_elf_check_relocs + #define elf_backend_adjust_dynamic_symbol tilepro_elf_adjust_dynamic_symbol + #define elf_backend_omit_section_dynsym tilepro_elf_omit_section_dynsym +-#define elf_backend_size_dynamic_sections tilepro_elf_size_dynamic_sections ++#define elf_backend_late_size_sections tilepro_elf_late_size_sections + #define elf_backend_relocate_section tilepro_elf_relocate_section + #define elf_backend_finish_dynamic_symbol tilepro_elf_finish_dynamic_symbol + #define elf_backend_finish_dynamic_sections tilepro_elf_finish_dynamic_sections +--- a/bfd/elf32-vax.c ++++ b/bfd/elf32-vax.c +@@ -36,7 +36,6 @@ static bool elf_vax_check_relocs (bfd *, + asection *, const Elf_Internal_Rela *); + static bool elf_vax_adjust_dynamic_symbol (struct bfd_link_info *, + struct elf_link_hash_entry *); +-static bool elf_vax_size_dynamic_sections (bfd *, struct bfd_link_info *); + static int elf_vax_relocate_section (bfd *, struct bfd_link_info *, + bfd *, asection *, bfd_byte *, + Elf_Internal_Rela *, +@@ -985,8 +984,8 @@ elf_vax_discard_got_entries (struct elf_ + /* Discard unused dynamic data if this is a static link. */ + + static bool +-elf_vax_always_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, +- struct bfd_link_info *info) ++elf_vax_early_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, ++ struct bfd_link_info *info) + { + bfd *dynobj; + asection *s; +@@ -1024,14 +1023,15 @@ elf_vax_always_size_sections (bfd *outpu + /* Set the sizes of the dynamic sections. */ + + static bool +-elf_vax_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) ++elf_vax_late_size_sections (bfd *output_bfd, struct bfd_link_info *info) + { + bfd *dynobj; + asection *s; + bool relocs; + + dynobj = elf_hash_table (info)->dynobj; +- BFD_ASSERT (dynobj != NULL); ++ if (dynobj == NULL) ++ return true; + + if (elf_hash_table (info)->dynamic_sections_created) + { +@@ -1861,10 +1861,8 @@ elf_vax_plt_sym_val (bfd_vma i, const as + #define elf_backend_check_relocs elf_vax_check_relocs + #define elf_backend_adjust_dynamic_symbol \ + elf_vax_adjust_dynamic_symbol +-#define elf_backend_always_size_sections \ +- elf_vax_always_size_sections +-#define elf_backend_size_dynamic_sections \ +- elf_vax_size_dynamic_sections ++#define elf_backend_early_size_sections elf_vax_early_size_sections ++#define elf_backend_late_size_sections elf_vax_late_size_sections + #define elf_backend_init_index_section _bfd_elf_init_1_index_section + #define elf_backend_relocate_section elf_vax_relocate_section + #define elf_backend_finish_dynamic_symbol \ +--- a/bfd/elf32-xstormy16.c ++++ b/bfd/elf32-xstormy16.c +@@ -706,8 +706,8 @@ xstormy16_elf_relax_section (bfd *dynobj + } + + static bool +-xstormy16_elf_always_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, +- struct bfd_link_info *info) ++xstormy16_elf_early_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, ++ struct bfd_link_info *info) + { + bfd *dynobj; + asection *splt; +@@ -1013,8 +1013,8 @@ xstormy16_elf_gc_mark_hook (asection *se + #define elf_backend_relocate_section xstormy16_elf_relocate_section + #define elf_backend_gc_mark_hook xstormy16_elf_gc_mark_hook + #define elf_backend_check_relocs xstormy16_elf_check_relocs +-#define elf_backend_always_size_sections \ +- xstormy16_elf_always_size_sections ++#define elf_backend_early_size_sections \ ++ xstormy16_elf_early_size_sections + #define elf_backend_omit_section_dynsym \ + _bfd_elf_omit_section_dynsym_all + #define elf_backend_finish_dynamic_sections \ +--- a/bfd/elf32-xtensa.c ++++ b/bfd/elf32-xtensa.c +@@ -1557,8 +1557,8 @@ elf_xtensa_allocate_local_got_size (stru + /* Set the sizes of the dynamic sections. */ + + static bool +-elf_xtensa_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, +- struct bfd_link_info *info) ++elf_xtensa_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, ++ struct bfd_link_info *info) + { + struct elf_xtensa_link_hash_table *htab; + bfd *dynobj, *abfd; +@@ -1575,7 +1575,7 @@ elf_xtensa_size_dynamic_sections (bfd *o + + dynobj = elf_hash_table (info)->dynobj; + if (dynobj == NULL) +- abort (); ++ return true; + srelgot = htab->elf.srelgot; + srelplt = htab->elf.srelplt; + +@@ -1780,8 +1780,7 @@ elf_xtensa_size_dynamic_sections (bfd *o + } + + static bool +-elf_xtensa_always_size_sections (bfd *output_bfd, +- struct bfd_link_info *info) ++elf_xtensa_early_size_sections (bfd *output_bfd, struct bfd_link_info *info) + { + struct elf_xtensa_link_hash_table *htab; + asection *tls_sec; +@@ -11544,8 +11543,8 @@ static const struct bfd_elf_special_sect + #define elf_backend_object_p elf_xtensa_object_p + #define elf_backend_reloc_type_class elf_xtensa_reloc_type_class + #define elf_backend_relocate_section elf_xtensa_relocate_section +-#define elf_backend_size_dynamic_sections elf_xtensa_size_dynamic_sections +-#define elf_backend_always_size_sections elf_xtensa_always_size_sections ++#define elf_backend_late_size_sections elf_xtensa_late_size_sections ++#define elf_backend_early_size_sections elf_xtensa_early_size_sections + #define elf_backend_omit_section_dynsym _bfd_elf_omit_section_dynsym_all + #define elf_backend_special_sections elf_xtensa_special_sections + #define elf_backend_action_discarded elf_xtensa_action_discarded +--- a/bfd/elf64-alpha.c ++++ b/bfd/elf64-alpha.c +@@ -2562,8 +2562,8 @@ elf64_alpha_size_plt_section (struct bfd + } + + static bool +-elf64_alpha_always_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, +- struct bfd_link_info *info) ++elf64_alpha_early_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, ++ struct bfd_link_info *info) + { + bfd *i; + struct alpha_elf_link_hash_table * htab; +@@ -2789,8 +2789,8 @@ elf64_alpha_size_rela_got_section (struc + /* Set the sizes of the dynamic sections. */ + + static bool +-elf64_alpha_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, +- struct bfd_link_info *info) ++elf64_alpha_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, ++ struct bfd_link_info *info) + { + bfd *dynobj; + asection *s; +@@ -2802,7 +2802,8 @@ elf64_alpha_size_dynamic_sections (bfd * + return false; + + dynobj = elf_hash_table(info)->dynobj; +- BFD_ASSERT(dynobj != NULL); ++ if (dynobj == NULL) ++ return true; + + if (elf_hash_table (info)->dynamic_sections_created) + { +@@ -5448,10 +5449,10 @@ static const struct elf_size_info alpha_ + elf64_alpha_merge_symbol_attribute + #define elf_backend_copy_indirect_symbol \ + elf64_alpha_copy_indirect_symbol +-#define elf_backend_always_size_sections \ +- elf64_alpha_always_size_sections +-#define elf_backend_size_dynamic_sections \ +- elf64_alpha_size_dynamic_sections ++#define elf_backend_early_size_sections \ ++ elf64_alpha_early_size_sections ++#define elf_backend_late_size_sections \ ++ elf64_alpha_late_size_sections + #define elf_backend_omit_section_dynsym \ + _bfd_elf_omit_section_dynsym_all + #define elf_backend_relocate_section \ +--- a/bfd/elf64-hppa.c ++++ b/bfd/elf64-hppa.c +@@ -176,9 +176,6 @@ static bool elf64_hppa_adjust_dynamic_sy + static bool elf64_hppa_mark_milli_and_exported_functions + (struct elf_link_hash_entry *, void *); + +-static bool elf64_hppa_size_dynamic_sections +- (bfd *, struct bfd_link_info *); +- + static int elf64_hppa_link_output_symbol_hook + (struct bfd_link_info *, const char *, Elf_Internal_Sym *, + asection *, struct elf_link_hash_entry *); +@@ -1520,7 +1517,7 @@ elf64_hppa_mark_milli_and_exported_funct + the contents of our special sections. */ + + static bool +-elf64_hppa_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) ++elf64_hppa_late_size_sections (bfd *output_bfd, struct bfd_link_info *info) + { + struct elf64_hppa_link_hash_table *hppa_info; + struct elf64_hppa_allocate_data data; +@@ -1534,7 +1531,8 @@ elf64_hppa_size_dynamic_sections (bfd *o + return false; + + dynobj = hppa_info->root.dynobj; +- BFD_ASSERT (dynobj != NULL); ++ if (dynobj == NULL) ++ return true; + + /* Mark each function this program exports so that we will allocate + space in the .opd section for each function's FPTR. If we are +@@ -3984,8 +3982,7 @@ const struct elf_size_info hppa64_elf_si + #define elf_backend_adjust_dynamic_symbol \ + elf64_hppa_adjust_dynamic_symbol + +-#define elf_backend_size_dynamic_sections \ +- elf64_hppa_size_dynamic_sections ++#define elf_backend_late_size_sections elf64_hppa_late_size_sections + + #define elf_backend_finish_dynamic_symbol \ + elf64_hppa_finish_dynamic_symbol +--- a/bfd/elf64-ia64-vms.c ++++ b/bfd/elf64-ia64-vms.c +@@ -2591,8 +2591,8 @@ elf64_ia64_adjust_dynamic_symbol (struct + } + + static bool +-elf64_ia64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, +- struct bfd_link_info *info) ++elf64_ia64_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, ++ struct bfd_link_info *info) + { + struct elf64_ia64_allocate_data data; + struct elf64_ia64_link_hash_table *ia64_info; +@@ -2601,11 +2601,12 @@ elf64_ia64_size_dynamic_sections (bfd *o + struct elf_link_hash_table *hash_table; + + hash_table = elf_hash_table (info); +- dynobj = hash_table->dynobj; + ia64_info = elf64_ia64_hash_table (info); + if (ia64_info == NULL) + return false; +- BFD_ASSERT(dynobj != NULL); ++ dynobj = hash_table->dynobj; ++ if (dynobj == NULL) ++ return true; + data.info = info; + + /* Allocate the GOT entries. */ +@@ -5488,8 +5489,8 @@ static const struct elf_size_info elf64_ + elf64_ia64_check_relocs + #define elf_backend_adjust_dynamic_symbol \ + elf64_ia64_adjust_dynamic_symbol +-#define elf_backend_size_dynamic_sections \ +- elf64_ia64_size_dynamic_sections ++#define elf_backend_late_size_sections \ ++ elf64_ia64_late_size_sections + #define elf_backend_omit_section_dynsym \ + _bfd_elf_omit_section_dynsym_all + #define elf_backend_relocate_section \ +--- a/bfd/elf64-mips.c ++++ b/bfd/elf64-mips.c +@@ -4748,10 +4748,10 @@ const struct elf_size_info mips_elf64_si + #define elf_backend_get_target_dtag _bfd_mips_elf_get_target_dtag + #define elf_backend_adjust_dynamic_symbol \ + _bfd_mips_elf_adjust_dynamic_symbol +-#define elf_backend_always_size_sections \ +- _bfd_mips_elf_always_size_sections +-#define elf_backend_size_dynamic_sections \ +- _bfd_mips_elf_size_dynamic_sections ++#define elf_backend_early_size_sections \ ++ _bfd_mips_elf_early_size_sections ++#define elf_backend_late_size_sections \ ++ _bfd_mips_elf_late_size_sections + #define elf_backend_init_index_section _bfd_elf_init_1_index_section + #define elf_backend_relocate_section _bfd_mips_elf_relocate_section + #define elf_backend_finish_dynamic_symbol \ +--- a/bfd/elf64-ppc.c ++++ b/bfd/elf64-ppc.c +@@ -119,8 +119,8 @@ static bfd_vma opd_entry_value + #define elf_backend_adjust_dynamic_symbol ppc64_elf_adjust_dynamic_symbol + #define elf_backend_hide_symbol ppc64_elf_hide_symbol + #define elf_backend_maybe_function_sym ppc64_elf_maybe_function_sym +-#define elf_backend_always_size_sections ppc64_elf_edit +-#define elf_backend_size_dynamic_sections ppc64_elf_size_dynamic_sections ++#define elf_backend_early_size_sections ppc64_elf_edit ++#define elf_backend_late_size_sections ppc64_elf_late_size_sections + #define elf_backend_hash_symbol ppc64_elf_hash_symbol + #define elf_backend_init_index_section _bfd_elf_init_2_index_sections + #define elf_backend_action_discarded ppc64_elf_action_discarded +@@ -10148,7 +10148,7 @@ allocate_dynrelocs (struct elf_link_hash + ((((v) & 0x3ffff0000ULL) << 16) | (v & 0xffff)) + #define HA34(v) ((v + (1ULL << 33)) >> 34) + +-/* Called via elf_link_hash_traverse from ppc64_elf_size_dynamic_sections ++/* Called via elf_link_hash_traverse from ppc64_elf_late_size_sections + to set up space for global entry stubs. These are put in glink, + after the branch table. */ + +@@ -10225,8 +10225,8 @@ size_global_entry_stubs (struct elf_link + /* Set the sizes of the dynamic sections. */ + + static bool +-ppc64_elf_size_dynamic_sections (bfd *output_bfd, +- struct bfd_link_info *info) ++ppc64_elf_late_size_sections (bfd *output_bfd, ++ struct bfd_link_info *info) + { + struct ppc_link_hash_table *htab; + bfd *dynobj; +@@ -10241,7 +10241,7 @@ ppc64_elf_size_dynamic_sections (bfd *ou + + dynobj = htab->elf.dynobj; + if (dynobj == NULL) +- abort (); ++ return true; + + if (htab->elf.dynamic_sections_created) + { +--- a/bfd/elf64-s390.c ++++ b/bfd/elf64-s390.c +@@ -1301,7 +1301,7 @@ elf_s390_gc_mark_hook (asection *sec, + entry but we found we will not create any. Called when we find we will + not have any PLT for this symbol, by for example + elf_s390_adjust_dynamic_symbol when we're doing a proper dynamic link, +- or elf_s390_size_dynamic_sections if no dynamic sections will be ++ or elf_s390_late_size_sections if no dynamic sections will be + created (we're only linking static objects). */ + + static void +@@ -1714,8 +1714,8 @@ allocate_dynrelocs (struct elf_link_hash + /* Set the sizes of the dynamic sections. */ + + static bool +-elf_s390_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, +- struct bfd_link_info *info) ++elf_s390_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, ++ struct bfd_link_info *info) + { + struct elf_s390_link_hash_table *htab; + bfd *dynobj; +@@ -1729,7 +1729,7 @@ elf_s390_size_dynamic_sections (bfd *out + + dynobj = htab->elf.dynobj; + if (dynobj == NULL) +- abort (); ++ return true; + + if (htab->elf.dynamic_sections_created) + { +@@ -3912,7 +3912,7 @@ const struct elf_size_info s390_elf64_si + #define elf_backend_gc_mark_hook elf_s390_gc_mark_hook + #define elf_backend_reloc_type_class elf_s390_reloc_type_class + #define elf_backend_relocate_section elf_s390_relocate_section +-#define elf_backend_size_dynamic_sections elf_s390_size_dynamic_sections ++#define elf_backend_late_size_sections elf_s390_late_size_sections + #define elf_backend_init_index_section _bfd_elf_init_1_index_section + #define elf_backend_grok_prstatus elf_s390_grok_prstatus + #define elf_backend_grok_psinfo elf_s390_grok_psinfo +--- a/bfd/elf64-sparc.c ++++ b/bfd/elf64-sparc.c +@@ -953,8 +953,8 @@ const struct elf_size_info elf64_sparc_s + _bfd_sparc_elf_adjust_dynamic_symbol + #define elf_backend_omit_section_dynsym \ + _bfd_sparc_elf_omit_section_dynsym +-#define elf_backend_size_dynamic_sections \ +- _bfd_sparc_elf_size_dynamic_sections ++#define elf_backend_late_size_sections \ ++ _bfd_sparc_elf_late_size_sections + #define elf_backend_relocate_section \ + _bfd_sparc_elf_relocate_section + #define elf_backend_finish_dynamic_symbol \ +--- a/bfd/elf64-tilegx.c ++++ b/bfd/elf64-tilegx.c +@@ -106,7 +106,7 @@ tilegx_elf_grok_psinfo (bfd *abfd, Elf_I + #define elf_backend_check_relocs tilegx_elf_check_relocs + #define elf_backend_adjust_dynamic_symbol tilegx_elf_adjust_dynamic_symbol + #define elf_backend_omit_section_dynsym tilegx_elf_omit_section_dynsym +-#define elf_backend_size_dynamic_sections tilegx_elf_size_dynamic_sections ++#define elf_backend_late_size_sections tilegx_elf_late_size_sections + #define elf_backend_relocate_section tilegx_elf_relocate_section + #define elf_backend_finish_dynamic_symbol tilegx_elf_finish_dynamic_symbol + #define elf_backend_finish_dynamic_sections tilegx_elf_finish_dynamic_sections +--- a/bfd/elf64-x86-64.c ++++ b/bfd/elf64-x86-64.c +@@ -2549,8 +2549,7 @@ elf_x86_64_scan_relocs (bfd *abfd, struc + } + + static bool +-elf_x86_64_always_size_sections (bfd *output_bfd, +- struct bfd_link_info *info) ++elf_x86_64_early_size_sections (bfd *output_bfd, struct bfd_link_info *info) + { + bfd *abfd; + +@@ -2563,7 +2562,7 @@ elf_x86_64_always_size_sections (bfd *ou + elf_x86_64_scan_relocs)) + return false; + +- return _bfd_x86_elf_always_size_sections (output_bfd, info); ++ return _bfd_x86_elf_early_size_sections (output_bfd, info); + } + + /* Return the relocation value for @tpoff relocation +@@ -5638,7 +5637,7 @@ elf_x86_64_special_sections[]= + elf_x86_64_reloc_name_lookup + + #define elf_backend_relocs_compatible elf_x86_64_relocs_compatible +-#define elf_backend_always_size_sections elf_x86_64_always_size_sections ++#define elf_backend_early_size_sections elf_x86_64_early_size_sections + #define elf_backend_create_dynamic_sections _bfd_elf_create_dynamic_sections + #define elf_backend_finish_dynamic_sections elf_x86_64_finish_dynamic_sections + #define elf_backend_finish_dynamic_symbol elf_x86_64_finish_dynamic_symbol +--- a/bfd/elflink.c ++++ b/bfd/elflink.c +@@ -6676,8 +6676,8 @@ bfd_elf_size_dynamic_sections (bfd *outp + + /* The backend may have to create some sections regardless of whether + we're dynamic or not. */ +- if (bed->elf_backend_always_size_sections +- && ! (*bed->elf_backend_always_size_sections) (output_bfd, info)) ++ if (bed->elf_backend_early_size_sections ++ && !bed->elf_backend_early_size_sections (output_bfd, info)) + return false; + + dynobj = elf_hash_table (info)->dynobj; +@@ -7483,9 +7483,8 @@ NOTE: This behaviour is deprecated and w + + /* The backend must work out the sizes of all the other dynamic + sections. */ +- if (dynobj != NULL +- && bed->elf_backend_size_dynamic_sections != NULL +- && ! (*bed->elf_backend_size_dynamic_sections) (output_bfd, info)) ++ if (bed->elf_backend_late_size_sections != NULL ++ && !bed->elf_backend_late_size_sections (output_bfd, info)) + return false; + + if (dynobj != NULL && elf_hash_table (info)->dynamic_sections_created) +--- a/bfd/elfn32-mips.c ++++ b/bfd/elfn32-mips.c +@@ -4138,10 +4138,8 @@ static const struct ecoff_debug_swap mip + #define elf_backend_get_target_dtag _bfd_mips_elf_get_target_dtag + #define elf_backend_adjust_dynamic_symbol \ + _bfd_mips_elf_adjust_dynamic_symbol +-#define elf_backend_always_size_sections \ +- _bfd_mips_elf_always_size_sections +-#define elf_backend_size_dynamic_sections \ +- _bfd_mips_elf_size_dynamic_sections ++#define elf_backend_early_size_sections _bfd_mips_elf_early_size_sections ++#define elf_backend_late_size_sections _bfd_mips_elf_late_size_sections + #define elf_backend_init_index_section _bfd_elf_init_1_index_section + #define elf_backend_relocate_section _bfd_mips_elf_relocate_section + #define elf_backend_finish_dynamic_symbol \ +--- a/bfd/elfnn-aarch64.c ++++ b/bfd/elfnn-aarch64.c +@@ -112,7 +112,7 @@ + allocate space for one relocation on the slot. Record the GOT offset + for this symbol. + +- elfNN_aarch64_size_dynamic_sections () ++ elfNN_aarch64_late_size_sections () + + Iterate all input BFDS, look for in the local symbol data structure + constructed earlier for local TLS symbols and allocate them double +@@ -9175,8 +9175,8 @@ elfNN_aarch64_allocate_local_ifunc_dynre + though ! */ + + static bool +-elfNN_aarch64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, +- struct bfd_link_info *info) ++elfNN_aarch64_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, ++ struct bfd_link_info *info) + { + struct elf_aarch64_link_hash_table *htab; + bfd *dynobj; +@@ -9187,7 +9187,8 @@ elfNN_aarch64_size_dynamic_sections (bfd + htab = elf_aarch64_hash_table ((info)); + dynobj = htab->root.dynobj; + +- BFD_ASSERT (dynobj != NULL); ++ if (dynobj == NULL) ++ return true; + + if (htab->root.dynamic_sections_created) + { +@@ -9589,8 +9590,8 @@ elfNN_aarch64_create_small_pltn_entry (s + _TLS_MODULE_BASE_, if needed. */ + + static bool +-elfNN_aarch64_always_size_sections (bfd *output_bfd, +- struct bfd_link_info *info) ++elfNN_aarch64_early_size_sections (bfd *output_bfd, ++ struct bfd_link_info *info) + { + asection *tls_sec; + +@@ -10323,8 +10324,8 @@ const struct elf_size_info elfNN_aarch64 + #define elf_backend_adjust_dynamic_symbol \ + elfNN_aarch64_adjust_dynamic_symbol + +-#define elf_backend_always_size_sections \ +- elfNN_aarch64_always_size_sections ++#define elf_backend_early_size_sections \ ++ elfNN_aarch64_early_size_sections + + #define elf_backend_check_relocs \ + elfNN_aarch64_check_relocs +@@ -10379,8 +10380,8 @@ const struct elf_size_info elfNN_aarch64 + #define elf_backend_modify_headers \ + elfNN_aarch64_modify_headers + +-#define elf_backend_size_dynamic_sections \ +- elfNN_aarch64_size_dynamic_sections ++#define elf_backend_late_size_sections \ ++ elfNN_aarch64_late_size_sections + + #define elf_backend_size_info \ + elfNN_aarch64_size_info +--- a/bfd/elfnn-ia64.c ++++ b/bfd/elfnn-ia64.c +@@ -2987,8 +2987,8 @@ elfNN_ia64_adjust_dynamic_symbol (struct + } + + static bool +-elfNN_ia64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, +- struct bfd_link_info *info) ++elfNN_ia64_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, ++ struct bfd_link_info *info) + { + struct elfNN_ia64_allocate_data data; + struct elfNN_ia64_link_hash_table *ia64_info; +@@ -2999,8 +2999,9 @@ elfNN_ia64_size_dynamic_sections (bfd *o + if (ia64_info == NULL) + return false; + dynobj = ia64_info->root.dynobj; ++ if (dynobj == NULL) ++ return true; + ia64_info->self_dtpmod_offset = (bfd_vma) -1; +- BFD_ASSERT(dynobj != NULL); + data.info = info; + + /* Set the contents of the .interp section to the interpreter. */ +@@ -5036,8 +5037,8 @@ ignore_errors (const char *fmt ATTRIBUTE + elfNN_ia64_check_relocs + #define elf_backend_adjust_dynamic_symbol \ + elfNN_ia64_adjust_dynamic_symbol +-#define elf_backend_size_dynamic_sections \ +- elfNN_ia64_size_dynamic_sections ++#define elf_backend_late_size_sections \ ++ elfNN_ia64_late_size_sections + #define elf_backend_omit_section_dynsym \ + _bfd_elf_omit_section_dynsym_all + #define elf_backend_relocate_section \ +--- a/bfd/elfnn-kvx.c ++++ b/bfd/elfnn-kvx.c +@@ -4033,8 +4033,8 @@ kvx_readonly_dynrelocs (struct elf_link_ + /* This is the most important function of all . Innocuosly named + though ! */ + static bool +-elfNN_kvx_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, +- struct bfd_link_info *info) ++elfNN_kvx_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, ++ struct bfd_link_info *info) + { + struct elf_kvx_link_hash_table *htab; + bfd *dynobj; +@@ -4044,8 +4044,8 @@ elfNN_kvx_size_dynamic_sections (bfd *ou + + htab = elf_kvx_hash_table ((info)); + dynobj = htab->root.dynobj; +- +- BFD_ASSERT (dynobj != NULL); ++ if (dynobj == NULL) ++ return true; + + if (htab->root.dynamic_sections_created) + { +@@ -4359,8 +4359,7 @@ elfNN_kvx_create_small_pltn_entry (struc + _TLS_MODULE_BASE_, if needed. */ + + static bool +-elfNN_kvx_always_size_sections (bfd *output_bfd, +- struct bfd_link_info *info) ++elfNN_kvx_early_size_sections (bfd *output_bfd, struct bfd_link_info *info) + { + asection *tls_sec; + +@@ -4715,8 +4714,8 @@ elfNN_kvx_plt_sym_val (bfd_vma i, const + #define elf_backend_adjust_dynamic_symbol \ + elfNN_kvx_adjust_dynamic_symbol + +-#define elf_backend_always_size_sections \ +- elfNN_kvx_always_size_sections ++#define elf_backend_early_size_sections \ ++ elfNN_kvx_early_size_sections + + #define elf_backend_check_relocs \ + elfNN_kvx_check_relocs +@@ -4759,8 +4758,8 @@ elfNN_kvx_plt_sym_val (bfd_vma i, const + #define elf_backend_reloc_type_class \ + elfNN_kvx_reloc_type_class + +-#define elf_backend_size_dynamic_sections \ +- elfNN_kvx_size_dynamic_sections ++#define elf_backend_late_size_sections \ ++ elfNN_kvx_late_size_sections + + #define elf_backend_can_refcount 1 + #define elf_backend_can_gc_sections 1 +--- a/bfd/elfnn-loongarch.c ++++ b/bfd/elfnn-loongarch.c +@@ -1731,8 +1731,8 @@ maybe_set_textrel (struct elf_link_hash_ + } + + static bool +-loongarch_elf_size_dynamic_sections (bfd *output_bfd, +- struct bfd_link_info *info) ++loongarch_elf_late_size_sections (bfd *output_bfd, ++ struct bfd_link_info *info) + { + struct loongarch_elf_link_hash_table *htab; + bfd *dynobj; +@@ -1742,7 +1742,8 @@ loongarch_elf_size_dynamic_sections (bfd + htab = loongarch_elf_hash_table (info); + BFD_ASSERT (htab != NULL); + dynobj = htab->elf.dynobj; +- BFD_ASSERT (dynobj != NULL); ++ if (dynobj == NULL) ++ return true; + + if (htab->elf.dynamic_sections_created) + { +@@ -5340,7 +5341,7 @@ elf_loongarch64_hash_symbol (struct elf_ + loongarch_elf_create_dynamic_sections + #define elf_backend_check_relocs loongarch_elf_check_relocs + #define elf_backend_adjust_dynamic_symbol loongarch_elf_adjust_dynamic_symbol +-#define elf_backend_size_dynamic_sections loongarch_elf_size_dynamic_sections ++#define elf_backend_late_size_sections loongarch_elf_late_size_sections + #define elf_backend_relocate_section loongarch_elf_relocate_section + #define elf_backend_finish_dynamic_symbol loongarch_elf_finish_dynamic_symbol + #define elf_backend_output_arch_local_syms \ +--- a/bfd/elfnn-riscv.c ++++ b/bfd/elfnn-riscv.c +@@ -1482,7 +1482,7 @@ allocate_local_ifunc_dynrelocs (void **s + } + + static bool +-riscv_elf_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) ++riscv_elf_late_size_sections (bfd *output_bfd, struct bfd_link_info *info) + { + struct riscv_elf_link_hash_table *htab; + bfd *dynobj; +@@ -1492,7 +1492,8 @@ riscv_elf_size_dynamic_sections (bfd *ou + htab = riscv_elf_hash_table (info); + BFD_ASSERT (htab != NULL); + dynobj = htab->elf.dynobj; +- BFD_ASSERT (dynobj != NULL); ++ if (dynobj == NULL) ++ return true; + + if (elf_hash_table (info)->dynamic_sections_created) + { +@@ -5570,7 +5571,7 @@ riscv_elf_merge_symbol_attribute (struct + #define elf_backend_create_dynamic_sections riscv_elf_create_dynamic_sections + #define elf_backend_check_relocs riscv_elf_check_relocs + #define elf_backend_adjust_dynamic_symbol riscv_elf_adjust_dynamic_symbol +-#define elf_backend_size_dynamic_sections riscv_elf_size_dynamic_sections ++#define elf_backend_late_size_sections riscv_elf_late_size_sections + #define elf_backend_relocate_section riscv_elf_relocate_section + #define elf_backend_finish_dynamic_symbol riscv_elf_finish_dynamic_symbol + #define elf_backend_finish_dynamic_sections riscv_elf_finish_dynamic_sections +--- a/bfd/elfxx-mips.c ++++ b/bfd/elfxx-mips.c +@@ -9649,8 +9649,8 @@ _bfd_mips_elf_adjust_dynamic_symbol (str + check for any mips16 stub sections that we can discard. */ + + bool +-_bfd_mips_elf_always_size_sections (bfd *output_bfd, +- struct bfd_link_info *info) ++_bfd_mips_elf_early_size_sections (bfd *output_bfd, ++ struct bfd_link_info *info) + { + asection *sect; + struct mips_elf_link_hash_table *htab; +@@ -9993,8 +9993,8 @@ mips_elf_set_plt_sym_value (struct mips_ + /* Set the sizes of the dynamic sections. */ + + bool +-_bfd_mips_elf_size_dynamic_sections (bfd *output_bfd, +- struct bfd_link_info *info) ++_bfd_mips_elf_late_size_sections (bfd *output_bfd, ++ struct bfd_link_info *info) + { + bfd *dynobj; + asection *s, *sreldyn; +@@ -10004,7 +10004,8 @@ _bfd_mips_elf_size_dynamic_sections (bfd + htab = mips_elf_hash_table (info); + BFD_ASSERT (htab != NULL); + dynobj = elf_hash_table (info)->dynobj; +- BFD_ASSERT (dynobj != NULL); ++ if (dynobj == NULL) ++ return true; + + if (elf_hash_table (info)->dynamic_sections_created) + { +@@ -14938,7 +14939,7 @@ _bfd_mips_elf_final_link (bfd *abfd, str + input_section->flags &= ~SEC_HAS_CONTENTS; + } + +- /* Size has been set in _bfd_mips_elf_always_size_sections. */ ++ /* Size has been set in _bfd_mips_elf_early_size_sections. */ + BFD_ASSERT(o->size == sizeof (Elf_External_ABIFlags_v0)); + + /* Skip this section later on (I don't think this currently +@@ -14997,7 +14998,7 @@ _bfd_mips_elf_final_link (bfd *abfd, str + input_section->flags &= ~SEC_HAS_CONTENTS; + } + +- /* Size has been set in _bfd_mips_elf_always_size_sections. */ ++ /* Size has been set in _bfd_mips_elf_early_size_sections. */ + BFD_ASSERT(o->size == sizeof (Elf32_External_RegInfo)); + + /* Skip this section later on (I don't think this currently +--- a/bfd/elfxx-mips.h ++++ b/bfd/elfxx-mips.h +@@ -67,9 +67,9 @@ extern bool _bfd_mips_elf_check_relocs + (bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *); + extern bool _bfd_mips_elf_adjust_dynamic_symbol + (struct bfd_link_info *, struct elf_link_hash_entry *); +-extern bool _bfd_mips_elf_always_size_sections ++extern bool _bfd_mips_elf_early_size_sections + (bfd *, struct bfd_link_info *); +-extern bool _bfd_mips_elf_size_dynamic_sections ++extern bool _bfd_mips_elf_late_size_sections + (bfd *, struct bfd_link_info *); + extern int _bfd_mips_elf_relocate_section + (bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, +--- a/bfd/elfxx-sparc.c ++++ b/bfd/elfxx-sparc.c +@@ -2381,8 +2381,8 @@ _bfd_sparc_elf_omit_section_dynsym (bfd + /* Set the sizes of the dynamic sections. */ + + bool +-_bfd_sparc_elf_size_dynamic_sections (bfd *output_bfd, +- struct bfd_link_info *info) ++_bfd_sparc_elf_late_size_sections (bfd *output_bfd, ++ struct bfd_link_info *info) + { + struct _bfd_sparc_elf_link_hash_table *htab; + bfd *dynobj; +@@ -2392,7 +2392,8 @@ _bfd_sparc_elf_size_dynamic_sections (bf + htab = _bfd_sparc_elf_hash_table (info); + BFD_ASSERT (htab != NULL); + dynobj = htab->elf.dynobj; +- BFD_ASSERT (dynobj != NULL); ++ if (dynobj == NULL) ++ return true; + + if (elf_hash_table (info)->dynamic_sections_created) + { +--- a/bfd/elfxx-sparc.h ++++ b/bfd/elfxx-sparc.h +@@ -117,7 +117,7 @@ extern bool _bfd_sparc_elf_adjust_dynami + (struct bfd_link_info *, struct elf_link_hash_entry *); + extern bool _bfd_sparc_elf_omit_section_dynsym + (bfd *, struct bfd_link_info *, asection *); +-extern bool _bfd_sparc_elf_size_dynamic_sections ++extern bool _bfd_sparc_elf_late_size_sections + (bfd *, struct bfd_link_info *); + extern bool _bfd_sparc_elf_new_section_hook + (bfd *, asection *); +--- a/bfd/elfxx-target.h ++++ b/bfd/elfxx-target.h +@@ -487,11 +487,11 @@ + #ifndef elf_backend_adjust_dynamic_symbol + #define elf_backend_adjust_dynamic_symbol 0 + #endif +-#ifndef elf_backend_always_size_sections +-#define elf_backend_always_size_sections 0 ++#ifndef elf_backend_early_size_sections ++#define elf_backend_early_size_sections 0 + #endif +-#ifndef elf_backend_size_dynamic_sections +-#define elf_backend_size_dynamic_sections 0 ++#ifndef elf_backend_late_size_sections ++#define elf_backend_late_size_sections 0 + #endif + #ifndef elf_backend_strip_zero_sized_dynamic_sections + #define elf_backend_strip_zero_sized_dynamic_sections 0 +@@ -853,8 +853,8 @@ static const struct elf_backend_data elf + elf_backend_check_directives, + elf_backend_notice_as_needed, + elf_backend_adjust_dynamic_symbol, +- elf_backend_always_size_sections, +- elf_backend_size_dynamic_sections, ++ elf_backend_early_size_sections, ++ elf_backend_late_size_sections, + elf_backend_strip_zero_sized_dynamic_sections, + elf_backend_init_index_section, + elf_backend_relocate_section, +--- a/bfd/elfxx-tilegx.c ++++ b/bfd/elfxx-tilegx.c +@@ -2430,8 +2430,8 @@ tilegx_elf_omit_section_dynsym (bfd *out + } + + bool +-tilegx_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, +- struct bfd_link_info *info) ++tilegx_elf_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, ++ struct bfd_link_info *info) + { + struct tilegx_elf_link_hash_table *htab; + bfd *dynobj; +@@ -2441,7 +2441,8 @@ tilegx_elf_size_dynamic_sections (bfd *o + htab = tilegx_elf_hash_table (info); + BFD_ASSERT (htab != NULL); + dynobj = htab->elf.dynobj; +- BFD_ASSERT (dynobj != NULL); ++ if (dynobj == NULL) ++ return true; + + if (elf_hash_table (info)->dynamic_sections_created) + { +--- a/bfd/elfxx-tilegx.h ++++ b/bfd/elfxx-tilegx.h +@@ -57,7 +57,7 @@ tilegx_elf_omit_section_dynsym (bfd *, + asection *); + + extern bool +-tilegx_elf_size_dynamic_sections (bfd *, struct bfd_link_info *); ++tilegx_elf_late_size_sections (bfd *, struct bfd_link_info *); + + extern int + tilegx_elf_relocate_section (bfd *, struct bfd_link_info *, +--- a/bfd/elfxx-x86.c ++++ b/bfd/elfxx-x86.c +@@ -2241,7 +2241,7 @@ _bfd_elf_x86_valid_reloc_p (asection *in + /* Set the sizes of the dynamic sections. */ + + bool +-_bfd_x86_elf_size_dynamic_sections (bfd *output_bfd, ++_bfd_x86_elf_late_size_sections (bfd *output_bfd, + struct bfd_link_info *info) + { + struct elf_x86_link_hash_table *htab; +@@ -2257,7 +2257,7 @@ _bfd_x86_elf_size_dynamic_sections (bfd + return false; + dynobj = htab->elf.dynobj; + if (dynobj == NULL) +- abort (); ++ return true; + + /* Set up .got offsets for local syms, and space for local dynamic + relocs. */ +@@ -3003,8 +3003,8 @@ _bfd_x86_elf_finish_dynamic_sections (bf + + + bool +-_bfd_x86_elf_always_size_sections (bfd *output_bfd, +- struct bfd_link_info *info) ++_bfd_x86_elf_early_size_sections (bfd *output_bfd, ++ struct bfd_link_info *info) + { + asection *tls_sec = elf_hash_table (info)->tls_sec; + +--- a/bfd/elfxx-x86.h ++++ b/bfd/elfxx-x86.h +@@ -850,13 +850,13 @@ extern bool _bfd_elf_x86_valid_reloc_p + const Elf_Internal_Rela *, struct elf_link_hash_entry *, + Elf_Internal_Sym *, Elf_Internal_Shdr *, bool *); + +-extern bool _bfd_x86_elf_size_dynamic_sections ++extern bool _bfd_x86_elf_late_size_sections + (bfd *, struct bfd_link_info *); + + extern struct elf_x86_link_hash_table *_bfd_x86_elf_finish_dynamic_sections + (bfd *, struct bfd_link_info *); + +-extern bool _bfd_x86_elf_always_size_sections ++extern bool _bfd_x86_elf_early_size_sections + (bfd *, struct bfd_link_info *); + + extern void _bfd_x86_elf_merge_symbol_attribute +@@ -928,8 +928,8 @@ extern void _bfd_x86_elf_link_report_rel + + #define elf_backend_check_relocs \ + _bfd_x86_elf_check_relocs +-#define elf_backend_size_dynamic_sections \ +- _bfd_x86_elf_size_dynamic_sections ++#define elf_backend_late_size_sections \ ++ _bfd_x86_elf_late_size_sections + #define elf_backend_merge_symbol_attribute \ + _bfd_x86_elf_merge_symbol_attribute + #define elf_backend_copy_indirect_symbol \ +--- a/ld/emultempl/vms.em ++++ b/ld/emultempl/vms.em +@@ -197,10 +197,9 @@ gld${EMULATION_NAME}_before_allocation ( + + /* The backend must work out the sizes of all the other dynamic + sections. */ +- if (elf_hash_table (&link_info)->dynamic_sections_created +- && bed->elf_backend_size_dynamic_sections +- && ! (*bed->elf_backend_size_dynamic_sections) (link_info.output_bfd, +- &link_info)) ++ if (bed->elf_backend_late_size_sections ++ && !bed->elf_backend_late_size_sections (link_info.output_bfd, ++ &link_info)) + einfo (_("%F%P: failed to set dynamic section sizes: %E\n")); + + before_allocation_default (); diff --git a/lede/toolchain/binutils/patches/2.42/002-PR-30569-delete-_bfd_mips_elf_early_size_sections.patch b/lede/toolchain/binutils/patches/2.42/002-PR-30569-delete-_bfd_mips_elf_early_size_sections.patch new file mode 100644 index 0000000000..49381a4fa9 --- /dev/null +++ b/lede/toolchain/binutils/patches/2.42/002-PR-30569-delete-_bfd_mips_elf_early_size_sections.patch @@ -0,0 +1,218 @@ +From 3c6c32951e292a51ede70b8087bb0308d7dbc4fc Mon Sep 17 00:00:00 2001 +From: Alan Modra +Date: Thu, 28 Mar 2024 20:33:32 +1030 +Subject: [PATCH 2/2] PR 30569, delete _bfd_mips_elf_early_size_sections + +PR30569 was triggered by a patch of mine 6540edd52cc0 moving the call +to always_size_sections in bfd_elf_size_dynamic_sections earlier, made +to support the x86 DT_RELR implementation. This broke mips16 code +handling stubs when --export-dynamic is passed to the linker, because +numerous symbols then became dynamic after always_size_sections. The +mips backend fiddles with symbols in its always_size_sections. Maciej +in 902e9fc76a0e had moved the call to always_size_sections to after +the export-dynamic code. Prior to that, Nathan in 04c3a75556c0 moved +it before the exec stack code, back to the start of +bfd_elf_size_dynamic_sections which was where Ian put it originally +in ff12f303355b. So the call has moved around a little. I'm leaving +it where it is, and instead calling mips_elf_check_symbols from +late_size_sections (the old size_dynamic_sections) which is now always +called. In fact, the whole of _bfd_mips_elf_early_size_sections can +be merged into _bfd_mips_elf_late_size_sections. +--- + bfd/elf32-mips.c | 1 - + bfd/elf64-mips.c | 2 -- + bfd/elfn32-mips.c | 1 - + bfd/elfxx-mips.c | 84 +++++++++++++++++++---------------------------- + bfd/elfxx-mips.h | 2 -- + 5 files changed, 34 insertions(+), 56 deletions(-) + +--- a/bfd/elf32-mips.c ++++ b/bfd/elf32-mips.c +@@ -2537,7 +2537,6 @@ static const struct ecoff_debug_swap mip + #define elf_backend_get_target_dtag _bfd_mips_elf_get_target_dtag + #define elf_backend_adjust_dynamic_symbol \ + _bfd_mips_elf_adjust_dynamic_symbol +-#define elf_backend_early_size_sections _bfd_mips_elf_early_size_sections + #define elf_backend_late_size_sections _bfd_mips_elf_late_size_sections + #define elf_backend_init_index_section _bfd_elf_init_1_index_section + #define elf_backend_relocate_section _bfd_mips_elf_relocate_section +--- a/bfd/elf64-mips.c ++++ b/bfd/elf64-mips.c +@@ -4748,8 +4748,6 @@ const struct elf_size_info mips_elf64_si + #define elf_backend_get_target_dtag _bfd_mips_elf_get_target_dtag + #define elf_backend_adjust_dynamic_symbol \ + _bfd_mips_elf_adjust_dynamic_symbol +-#define elf_backend_early_size_sections \ +- _bfd_mips_elf_early_size_sections + #define elf_backend_late_size_sections \ + _bfd_mips_elf_late_size_sections + #define elf_backend_init_index_section _bfd_elf_init_1_index_section +--- a/bfd/elfn32-mips.c ++++ b/bfd/elfn32-mips.c +@@ -4138,7 +4138,6 @@ static const struct ecoff_debug_swap mip + #define elf_backend_get_target_dtag _bfd_mips_elf_get_target_dtag + #define elf_backend_adjust_dynamic_symbol \ + _bfd_mips_elf_adjust_dynamic_symbol +-#define elf_backend_early_size_sections _bfd_mips_elf_early_size_sections + #define elf_backend_late_size_sections _bfd_mips_elf_late_size_sections + #define elf_backend_init_index_section _bfd_elf_init_1_index_section + #define elf_backend_relocate_section _bfd_mips_elf_relocate_section +--- a/bfd/elfxx-mips.c ++++ b/bfd/elfxx-mips.c +@@ -9644,48 +9644,6 @@ _bfd_mips_elf_adjust_dynamic_symbol (str + return _bfd_elf_adjust_dynamic_copy (info, h, s); + } + +-/* This function is called after all the input files have been read, +- and the input sections have been assigned to output sections. We +- check for any mips16 stub sections that we can discard. */ +- +-bool +-_bfd_mips_elf_early_size_sections (bfd *output_bfd, +- struct bfd_link_info *info) +-{ +- asection *sect; +- struct mips_elf_link_hash_table *htab; +- struct mips_htab_traverse_info hti; +- +- htab = mips_elf_hash_table (info); +- BFD_ASSERT (htab != NULL); +- +- /* The .reginfo section has a fixed size. */ +- sect = bfd_get_section_by_name (output_bfd, ".reginfo"); +- if (sect != NULL) +- { +- bfd_set_section_size (sect, sizeof (Elf32_External_RegInfo)); +- sect->flags |= SEC_FIXED_SIZE | SEC_HAS_CONTENTS; +- } +- +- /* The .MIPS.abiflags section has a fixed size. */ +- sect = bfd_get_section_by_name (output_bfd, ".MIPS.abiflags"); +- if (sect != NULL) +- { +- bfd_set_section_size (sect, sizeof (Elf_External_ABIFlags_v0)); +- sect->flags |= SEC_FIXED_SIZE | SEC_HAS_CONTENTS; +- } +- +- hti.info = info; +- hti.output_bfd = output_bfd; +- hti.error = false; +- mips_elf_link_hash_traverse (mips_elf_hash_table (info), +- mips_elf_check_symbols, &hti); +- if (hti.error) +- return false; +- +- return true; +-} +- + /* If the link uses a GOT, lay it out and work out its size. */ + + static bool +@@ -9990,7 +9948,8 @@ mips_elf_set_plt_sym_value (struct mips_ + return true; + } + +-/* Set the sizes of the dynamic sections. */ ++/* Set the sizes of the dynamic sections, some mips non-dynamic sections, ++ and check for any mips16 stub sections that we can discard. */ + + bool + _bfd_mips_elf_late_size_sections (bfd *output_bfd, +@@ -10000,14 +9959,39 @@ _bfd_mips_elf_late_size_sections (bfd *o + asection *s, *sreldyn; + bool reltext; + struct mips_elf_link_hash_table *htab; ++ struct mips_htab_traverse_info hti; + + htab = mips_elf_hash_table (info); + BFD_ASSERT (htab != NULL); +- dynobj = elf_hash_table (info)->dynobj; ++ ++ /* The .reginfo section has a fixed size. */ ++ s = bfd_get_section_by_name (output_bfd, ".reginfo"); ++ if (s != NULL) ++ { ++ bfd_set_section_size (s, sizeof (Elf32_External_RegInfo)); ++ s->flags |= SEC_FIXED_SIZE | SEC_HAS_CONTENTS; ++ } ++ ++ /* The .MIPS.abiflags section has a fixed size. */ ++ s = bfd_get_section_by_name (output_bfd, ".MIPS.abiflags"); ++ if (s != NULL) ++ { ++ bfd_set_section_size (s, sizeof (Elf_External_ABIFlags_v0)); ++ s->flags |= SEC_FIXED_SIZE | SEC_HAS_CONTENTS; ++ } ++ ++ hti.info = info; ++ hti.output_bfd = output_bfd; ++ hti.error = false; ++ mips_elf_link_hash_traverse (htab, mips_elf_check_symbols, &hti); ++ if (hti.error) ++ return false; ++ ++ dynobj = htab->root.dynobj; + if (dynobj == NULL) + return true; + +- if (elf_hash_table (info)->dynamic_sections_created) ++ if (htab->root.dynamic_sections_created) + { + /* Set the contents of the .interp section to the interpreter. */ + if (bfd_link_executable (info) && !info->nointerp) +@@ -10147,7 +10131,7 @@ _bfd_mips_elf_late_size_sections (bfd *o + } + } + else if (bfd_link_executable (info) +- && ! mips_elf_hash_table (info)->use_rld_obj_head ++ && !htab->use_rld_obj_head + && startswith (name, ".rld_map")) + { + /* We add a room for __rld_map. It will be filled in by the +@@ -10156,7 +10140,7 @@ _bfd_mips_elf_late_size_sections (bfd *o + } + else if (SGI_COMPAT (output_bfd) + && startswith (name, ".compact_rel")) +- s->size += mips_elf_hash_table (info)->compact_rel_size; ++ s->size += htab->compact_rel_size; + else if (s == htab->root.splt) + { + /* If the last PLT entry has a branch delay slot, allocate +@@ -10196,7 +10180,7 @@ _bfd_mips_elf_late_size_sections (bfd *o + } + } + +- if (elf_hash_table (info)->dynamic_sections_created) ++ if (htab->root.dynamic_sections_created) + { + /* Add some entries to the .dynamic section. We fill in the + values later, in _bfd_mips_elf_finish_dynamic_sections, but we +@@ -14939,7 +14923,7 @@ _bfd_mips_elf_final_link (bfd *abfd, str + input_section->flags &= ~SEC_HAS_CONTENTS; + } + +- /* Size has been set in _bfd_mips_elf_early_size_sections. */ ++ /* Size has been set in _bfd_mips_elf_late_size_sections. */ + BFD_ASSERT(o->size == sizeof (Elf_External_ABIFlags_v0)); + + /* Skip this section later on (I don't think this currently +@@ -14998,7 +14982,7 @@ _bfd_mips_elf_final_link (bfd *abfd, str + input_section->flags &= ~SEC_HAS_CONTENTS; + } + +- /* Size has been set in _bfd_mips_elf_early_size_sections. */ ++ /* Size has been set in _bfd_mips_elf_late_size_sections. */ + BFD_ASSERT(o->size == sizeof (Elf32_External_RegInfo)); + + /* Skip this section later on (I don't think this currently +--- a/bfd/elfxx-mips.h ++++ b/bfd/elfxx-mips.h +@@ -67,8 +67,6 @@ extern bool _bfd_mips_elf_check_relocs + (bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *); + extern bool _bfd_mips_elf_adjust_dynamic_symbol + (struct bfd_link_info *, struct elf_link_hash_entry *); +-extern bool _bfd_mips_elf_early_size_sections +- (bfd *, struct bfd_link_info *); + extern bool _bfd_mips_elf_late_size_sections + (bfd *, struct bfd_link_info *); + extern int _bfd_mips_elf_relocate_section diff --git a/lede/toolchain/binutils/patches/2.42/300-001_ld_makefile_patch.patch b/lede/toolchain/binutils/patches/2.42/300-001_ld_makefile_patch.patch new file mode 100644 index 0000000000..64dae55dd7 --- /dev/null +++ b/lede/toolchain/binutils/patches/2.42/300-001_ld_makefile_patch.patch @@ -0,0 +1,22 @@ +--- a/ld/Makefile.am ++++ b/ld/Makefile.am +@@ -50,7 +50,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CFLAGS) + # We put the scripts in the directory $(scriptdir)/ldscripts. + # We can't put the scripts in $(datadir) because the SEARCH_DIR + # directives need to be different for native and cross linkers. +-scriptdir = $(tooldir)/lib ++scriptdir = $(libdir) + + EMUL = @EMUL@ + EMULATION_OFILES = @EMULATION_OFILES@ +--- a/ld/Makefile.in ++++ b/ld/Makefile.in +@@ -583,7 +583,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CFLAGS) + # We put the scripts in the directory $(scriptdir)/ldscripts. + # We can't put the scripts in $(datadir) because the SEARCH_DIR + # directives need to be different for native and cross linkers. +-scriptdir = $(tooldir)/lib ++scriptdir = $(libdir) + BASEDIR = $(srcdir)/.. + BFDDIR = $(BASEDIR)/bfd + INCDIR = $(BASEDIR)/include diff --git a/lede/toolchain/binutils/patches/2.42/400-mips_no_dynamic_linking_sym.patch b/lede/toolchain/binutils/patches/2.42/400-mips_no_dynamic_linking_sym.patch new file mode 100644 index 0000000000..30f70c2123 --- /dev/null +++ b/lede/toolchain/binutils/patches/2.42/400-mips_no_dynamic_linking_sym.patch @@ -0,0 +1,18 @@ +--- a/bfd/elfxx-mips.c ++++ b/bfd/elfxx-mips.c +@@ -8149,6 +8149,7 @@ _bfd_mips_elf_create_dynamic_sections (b + + name = SGI_COMPAT (abfd) ? "_DYNAMIC_LINK" : "_DYNAMIC_LINKING"; + bh = NULL; ++ if (0) { + if (!(_bfd_generic_link_add_one_symbol + (info, abfd, name, BSF_GLOBAL, bfd_abs_section_ptr, 0, + NULL, false, get_elf_backend_data (abfd)->collect, &bh))) +@@ -8161,6 +8162,7 @@ _bfd_mips_elf_create_dynamic_sections (b + + if (! bfd_elf_link_record_dynamic_symbol (info, h)) + return false; ++ } + + if (! mips_elf_hash_table (info)->use_rld_obj_head) + { diff --git a/lede/toolchain/binutils/patches/2.42/500-Change-default-emulation-for-mips64-linux.patch b/lede/toolchain/binutils/patches/2.42/500-Change-default-emulation-for-mips64-linux.patch new file mode 100644 index 0000000000..df38fcaba1 --- /dev/null +++ b/lede/toolchain/binutils/patches/2.42/500-Change-default-emulation-for-mips64-linux.patch @@ -0,0 +1,48 @@ +--- a/bfd/config.bfd ++++ b/bfd/config.bfd +@@ -962,8 +962,8 @@ case "${targ}" in + want64=true + ;; + mips64*el-*-linux*) +- targ_defvec=mips_elf32_ntrad_le_vec +- targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_le_vec mips_elf64_trad_be_vec" ++ targ_defvec=mips_elf64_trad_le_vec ++ targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_be_vec" + ;; + mips64*-*-linux*-gnuabi64) + targ_defvec=mips_elf64_trad_be_vec +@@ -971,8 +971,8 @@ case "${targ}" in + want64=true + ;; + mips64*-*-linux*) +- targ_defvec=mips_elf32_ntrad_be_vec +- targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec" ++ targ_defvec=mips_elf64_trad_be_vec ++ targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_le_vec" + ;; + mips*el-*-linux*) + targ_defvec=mips_elf32_trad_le_vec +--- a/ld/configure.tgt ++++ b/ld/configure.tgt +@@ -597,8 +597,8 @@ mips64*el-*-linux-gnuabi64) + targ_extra_emuls="elf64btsmip elf32ltsmipn32 elf32btsmipn32 elf32ltsmip elf32btsmip" + targ_extra_libpath=$targ_extra_emuls + ;; +-mips64*el-*-linux-*) targ_emul=elf32ltsmipn32 +- targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip" ++mips64*el-*-linux-*) targ_emul=elf64ltsmip ++ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32ltsmip elf32btsmip elf64btsmip" + targ_extra_libpath=$targ_extra_emuls + ;; + mips64*-*-linux-gnuabi64) +@@ -606,8 +606,8 @@ mips64*-*-linux-gnuabi64) + targ_extra_emuls="elf64ltsmip elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip" + targ_extra_libpath=$targ_extra_emuls + ;; +-mips64*-*-linux-*) targ_emul=elf32btsmipn32 +- targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip" ++mips64*-*-linux-*) targ_emul=elf64btsmip ++ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip elf64ltsmip" + targ_extra_libpath=$targ_extra_emuls + ;; + mips*el-*-linux-*) targ_emul=elf32ltsmip diff --git a/lede/toolchain/binutils/patches/2.43.1/300-001_ld_makefile_patch.patch b/lede/toolchain/binutils/patches/2.43.1/300-001_ld_makefile_patch.patch new file mode 100644 index 0000000000..64dae55dd7 --- /dev/null +++ b/lede/toolchain/binutils/patches/2.43.1/300-001_ld_makefile_patch.patch @@ -0,0 +1,22 @@ +--- a/ld/Makefile.am ++++ b/ld/Makefile.am +@@ -50,7 +50,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CFLAGS) + # We put the scripts in the directory $(scriptdir)/ldscripts. + # We can't put the scripts in $(datadir) because the SEARCH_DIR + # directives need to be different for native and cross linkers. +-scriptdir = $(tooldir)/lib ++scriptdir = $(libdir) + + EMUL = @EMUL@ + EMULATION_OFILES = @EMULATION_OFILES@ +--- a/ld/Makefile.in ++++ b/ld/Makefile.in +@@ -583,7 +583,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CFLAGS) + # We put the scripts in the directory $(scriptdir)/ldscripts. + # We can't put the scripts in $(datadir) because the SEARCH_DIR + # directives need to be different for native and cross linkers. +-scriptdir = $(tooldir)/lib ++scriptdir = $(libdir) + BASEDIR = $(srcdir)/.. + BFDDIR = $(BASEDIR)/bfd + INCDIR = $(BASEDIR)/include diff --git a/lede/toolchain/binutils/patches/2.43.1/400-mips_no_dynamic_linking_sym.patch b/lede/toolchain/binutils/patches/2.43.1/400-mips_no_dynamic_linking_sym.patch new file mode 100644 index 0000000000..d0cc7ddc69 --- /dev/null +++ b/lede/toolchain/binutils/patches/2.43.1/400-mips_no_dynamic_linking_sym.patch @@ -0,0 +1,18 @@ +--- a/bfd/elfxx-mips.c ++++ b/bfd/elfxx-mips.c +@@ -8161,6 +8161,7 @@ _bfd_mips_elf_create_dynamic_sections (b + + name = SGI_COMPAT (abfd) ? "_DYNAMIC_LINK" : "_DYNAMIC_LINKING"; + bh = NULL; ++ if (0) { + if (!(_bfd_generic_link_add_one_symbol + (info, abfd, name, BSF_GLOBAL, bfd_abs_section_ptr, 0, + NULL, false, get_elf_backend_data (abfd)->collect, &bh))) +@@ -8173,6 +8174,7 @@ _bfd_mips_elf_create_dynamic_sections (b + + if (! bfd_elf_link_record_dynamic_symbol (info, h)) + return false; ++ } + + if (! mips_elf_hash_table (info)->use_rld_obj_head) + { diff --git a/lede/toolchain/binutils/patches/2.43.1/500-Change-default-emulation-for-mips64-linux.patch b/lede/toolchain/binutils/patches/2.43.1/500-Change-default-emulation-for-mips64-linux.patch new file mode 100644 index 0000000000..df38fcaba1 --- /dev/null +++ b/lede/toolchain/binutils/patches/2.43.1/500-Change-default-emulation-for-mips64-linux.patch @@ -0,0 +1,48 @@ +--- a/bfd/config.bfd ++++ b/bfd/config.bfd +@@ -962,8 +962,8 @@ case "${targ}" in + want64=true + ;; + mips64*el-*-linux*) +- targ_defvec=mips_elf32_ntrad_le_vec +- targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_le_vec mips_elf64_trad_be_vec" ++ targ_defvec=mips_elf64_trad_le_vec ++ targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_be_vec" + ;; + mips64*-*-linux*-gnuabi64) + targ_defvec=mips_elf64_trad_be_vec +@@ -971,8 +971,8 @@ case "${targ}" in + want64=true + ;; + mips64*-*-linux*) +- targ_defvec=mips_elf32_ntrad_be_vec +- targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec" ++ targ_defvec=mips_elf64_trad_be_vec ++ targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_le_vec" + ;; + mips*el-*-linux*) + targ_defvec=mips_elf32_trad_le_vec +--- a/ld/configure.tgt ++++ b/ld/configure.tgt +@@ -597,8 +597,8 @@ mips64*el-*-linux-gnuabi64) + targ_extra_emuls="elf64btsmip elf32ltsmipn32 elf32btsmipn32 elf32ltsmip elf32btsmip" + targ_extra_libpath=$targ_extra_emuls + ;; +-mips64*el-*-linux-*) targ_emul=elf32ltsmipn32 +- targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip" ++mips64*el-*-linux-*) targ_emul=elf64ltsmip ++ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32ltsmip elf32btsmip elf64btsmip" + targ_extra_libpath=$targ_extra_emuls + ;; + mips64*-*-linux-gnuabi64) +@@ -606,8 +606,8 @@ mips64*-*-linux-gnuabi64) + targ_extra_emuls="elf64ltsmip elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip" + targ_extra_libpath=$targ_extra_emuls + ;; +-mips64*-*-linux-*) targ_emul=elf32btsmipn32 +- targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip" ++mips64*-*-linux-*) targ_emul=elf64btsmip ++ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip elf64ltsmip" + targ_extra_libpath=$targ_extra_emuls + ;; + mips*el-*-linux-*) targ_emul=elf32ltsmip diff --git a/openwrt-passwall/luci-app-passwall/luasrc/passwall/api.lua b/openwrt-passwall/luci-app-passwall/luasrc/passwall/api.lua index c27f14aad7..71c4a7d63f 100644 --- a/openwrt-passwall/luci-app-passwall/luasrc/passwall/api.lua +++ b/openwrt-passwall/luci-app-passwall/luasrc/passwall/api.lua @@ -987,7 +987,11 @@ function to_move(app_name,file) end function get_version() - return sys.exec("echo -n $(opkg list-installed luci-app-passwall |awk '{print $3}')") + local version = sys.exec("opkg list-installed luci-app-passwall 2>/dev/null | awk '{print $3}'") + if not version or #version == 0 then + version = sys.exec("apk info luci-app-passwall 2>/dev/null | awk '{print $2}'") + end + return version or "" end function to_check_self() diff --git a/openwrt-passwall/luci-app-passwall/root/usr/share/passwall/iptables.sh b/openwrt-passwall/luci-app-passwall/root/usr/share/passwall/iptables.sh index bde6f96cb1..d3a8c909c2 100755 --- a/openwrt-passwall/luci-app-passwall/root/usr/share/passwall/iptables.sh +++ b/openwrt-passwall/luci-app-passwall/root/usr/share/passwall/iptables.sh @@ -742,32 +742,30 @@ add_firewall_rule() { ipset -! create $IPSET_WHITELIST6 nethash family inet6 maxelem 1048576 timeout 172800 ipset -! create $IPSET_BLOCKLIST6 nethash family inet6 maxelem 1048576 timeout 172800 - #分流规则的IP列表 - process_shunt_rules() { - local _node=$1 - local node_protocol=$(config_n_get $_node protocol) - if [ "$node_protocol" = "_shunt" ]; then - local default_node_id=$(config_n_get $_node default_node "_direct") - local shunt_ids=$(uci show $CONFIG | grep "=shunt_rules" | awk -F '.' '{print $2}' | awk -F '=' '{print $1}') - for shunt_id in $shunt_ids; do - local _node_id=$(config_n_get $_node $shunt_id "nil") - [ "$_node_id" != "nil" ] && { - [ "$_node_id" = "_default" ] && _node_id=$default_node_id - if [ "$_node_id" = "_direct" ]; then - config_n_get $shunt_id ip_list | tr -s "\r\n" "\n" | sed -e "/^$/d" | grep -E "(\.((2(5[0-5]|[0-4][0-9]))|[0-1]?[0-9]{1,2})){3}" | sed -e "s/^/add $IPSET_WHITELIST &/g" -e "s/$/ timeout 0/g" | awk '{print $0} END{print "COMMIT"}' | ipset -! -R - config_n_get $shunt_id ip_list | tr -s "\r\n" "\n" | sed -e "/^$/d" | grep -E "([A-Fa-f0-9]{1,4}::?){1,7}[A-Fa-f0-9]{1,4}" | sed -e "s/^/add $IPSET_WHITELIST6 &/g" -e "s/$/ timeout 0/g" | awk '{print $0} END{print "COMMIT"}' | ipset -! -R - else - config_n_get $shunt_id ip_list | tr -s "\r\n" "\n" | sed -e "/^$/d" | grep -E "(\.((2(5[0-5]|[0-4][0-9]))|[0-1]?[0-9]{1,2})){3}" | sed -e "s/^/add $IPSET_SHUNTLIST &/g" -e "s/$/ timeout 0/g" | awk '{print $0} END{print "COMMIT"}' | ipset -! -R - [ "$PROXY_IPV6" = "1" ] && { - config_n_get $shunt_id ip_list | tr -s "\r\n" "\n" | sed -e "/^$/d" | grep -E "([A-Fa-f0-9]{1,4}::?){1,7}[A-Fa-f0-9]{1,4}" | sed -e "s/^/add $IPSET_SHUNTLIST6 &/g" -e "s/$/ timeout 0/g" | awk '{print $0} END{print "COMMIT"}' | ipset -! -R - } - fi - } + #分流规则的IP列表(使用分流节点时导入) + local USE_SHUNT_NODE=0 + for _node in $TCP_NODE $UDP_NODE; do + node_protocol=$(config_n_get $_node protocol) + [ "$node_protocol" = "_shunt" ] && { USE_SHUNT_NODE=1; break; } + done + [ "$USE_SHUNT_NODE" = "0" ] && { + for acl_section in $(uci show ${CONFIG} | grep "=acl_rule" | cut -d '.' -sf 2 | cut -d '=' -sf 1); do + [ "$(config_n_get $acl_section enabled)" != "1" ] && continue + for _node in $(config_n_get $acl_section tcp_node) $(config_n_get $acl_section udp_node); do + node_protocol=$(config_n_get $_node protocol) + [ "$node_protocol" = "_shunt" ] && { USE_SHUNT_NODE=1; break 2; } done - fi + done + } + [ "$USE_SHUNT_NODE" = "1" ] && { + local shunt_ids=$(uci show $CONFIG | grep "=shunt_rules" | awk -F '.' '{print $2}' | awk -F '=' '{print $1}') + for shunt_id in $shunt_ids; do + config_n_get $shunt_id ip_list | tr -s "\r\n" "\n" | sed -e "/^$/d" | grep -E "(\.((2(5[0-5]|[0-4][0-9]))|[0-1]?[0-9]{1,2})){3}" | sed -e "s/^/add $IPSET_SHUNTLIST &/g" -e "s/$/ timeout 0/g" | awk '{print $0} END{print "COMMIT"}' | ipset -! -R + [ "$PROXY_IPV6" = "1" ] && { + config_n_get $shunt_id ip_list | tr -s "\r\n" "\n" | sed -e "/^$/d" | grep -E "([A-Fa-f0-9]{1,4}::?){1,7}[A-Fa-f0-9]{1,4}" | sed -e "s/^/add $IPSET_SHUNTLIST6 &/g" -e "s/$/ timeout 0/g" | awk '{print $0} END{print "COMMIT"}' | ipset -! -R + } + done } - [ "$TCP_NODE" ] && process_shunt_rules $TCP_NODE - [ "$UDP_NODE" ] && [ "$TCP_UDP" = "0" ] && process_shunt_rules $UDP_NODE cat $RULES_PATH/chnroute | tr -s '\n' | grep -v "^#" | sed -e "/^$/d" | sed -e "s/^/add $IPSET_CHN &/g" -e "s/$/ timeout 0/g" | awk '{print $0} END{print "COMMIT"}' | ipset -! -R cat $RULES_PATH/proxy_ip | tr -s '\n' | grep -v "^#" | sed -e "/^$/d" | grep -E "(\.((2(5[0-5]|[0-4][0-9]))|[0-1]?[0-9]{1,2})){3}" | sed -e "s/^/add $IPSET_BLACKLIST &/g" -e "s/$/ timeout 0/g" | awk '{print $0} END{print "COMMIT"}' | ipset -! -R diff --git a/openwrt-passwall/luci-app-passwall/root/usr/share/passwall/nftables.sh b/openwrt-passwall/luci-app-passwall/root/usr/share/passwall/nftables.sh index dbffc089dd..60b2049dd9 100755 --- a/openwrt-passwall/luci-app-passwall/root/usr/share/passwall/nftables.sh +++ b/openwrt-passwall/luci-app-passwall/root/usr/share/passwall/nftables.sh @@ -166,9 +166,8 @@ insert_nftset() { fi mkdir -p $TMP_PATH2/nftset cat > "$TMP_PATH2/nftset/$nftset_name" <<-EOF - #define $nftset_name = {$nftset_elements} - #add element $NFTABLE_NAME $nftset_name \$$nftset_name - add element $NFTABLE_NAME $nftset_name {$nftset_elements} + define $nftset_name = {$nftset_elements} + add element $NFTABLE_NAME $nftset_name \$$nftset_name EOF nft -f "$TMP_PATH2/nftset/$nftset_name" rm -rf "$TMP_PATH2/nftset" @@ -828,32 +827,30 @@ add_firewall_rule() { gen_nftset $NFTSET_BLOCKLIST6 ipv6_addr "2d" 0 $(cat $RULES_PATH/block_ip | tr -s '\n' | grep -v "^#" | grep -E "([A-Fa-f0-9]{1,4}::?){1,7}[A-Fa-f0-9]{1,4}") gen_nftset $NFTSET_SHUNTLIST6 ipv6_addr "2d" 0 - #分流规则的IP列表 - process_shunt_rules() { - local _node=$1 - local node_protocol=$(config_n_get $_node protocol) - if [ "$node_protocol" = "_shunt" ]; then - local default_node_id=$(config_n_get $_node default_node "_direct") - local shunt_ids=$(uci show $CONFIG | grep "=shunt_rules" | awk -F '.' '{print $2}' | awk -F '=' '{print $1}') - for shunt_id in $shunt_ids; do - local _node_id=$(config_n_get $_node $shunt_id "nil") - [ "$_node_id" != "nil" ] && { - [ "$_node_id" = "_default" ] && _node_id=$default_node_id - if [ "$_node_id" = "_direct" ]; then - insert_nftset $NFTSET_WHITELIST "0" $(config_n_get $shunt_id ip_list | tr -s "\r\n" "\n" | sed -e "/^$/d" | grep -E "(\.((2(5[0-5]|[0-4][0-9]))|[0-1]?[0-9]{1,2})){3}") - insert_nftset $NFTSET_WHITELIST6 "0" $(config_n_get $shunt_id ip_list | tr -s "\r\n" "\n" | sed -e "/^$/d" | grep -E "([A-Fa-f0-9]{1,4}::?){1,7}[A-Fa-f0-9]{1,4}") - else - insert_nftset $NFTSET_SHUNTLIST "0" $(config_n_get $shunt_id ip_list | tr -s "\r\n" "\n" | sed -e "/^$/d" | grep -E "(\.((2(5[0-5]|[0-4][0-9]))|[0-1]?[0-9]{1,2})){3}") - [ "$PROXY_IPV6" = "1" ] && { - insert_nftset $NFTSET_SHUNTLIST6 "0" $(config_n_get $shunt_id ip_list | tr -s "\r\n" "\n" | sed -e "/^$/d" | grep -E "([A-Fa-f0-9]{1,4}::?){1,7}[A-Fa-f0-9]{1,4}") - } - fi - } + #分流规则的IP列表(使用分流节点时导入) + local USE_SHUNT_NODE=0 + for _node in $TCP_NODE $UDP_NODE; do + node_protocol=$(config_n_get $_node protocol) + [ "$node_protocol" = "_shunt" ] && { USE_SHUNT_NODE=1; break; } + done + [ "$USE_SHUNT_NODE" = "0" ] && { + for acl_section in $(uci show ${CONFIG} | grep "=acl_rule" | cut -d '.' -sf 2 | cut -d '=' -sf 1); do + [ "$(config_n_get $acl_section enabled)" != "1" ] && continue + for _node in $(config_n_get $acl_section tcp_node) $(config_n_get $acl_section udp_node); do + node_protocol=$(config_n_get $_node protocol) + [ "$node_protocol" = "_shunt" ] && { USE_SHUNT_NODE=1; break 2; } done - fi + done + } + [ "$USE_SHUNT_NODE" = "1" ] && { + local shunt_ids=$(uci show $CONFIG | grep "=shunt_rules" | awk -F '.' '{print $2}' | awk -F '=' '{print $1}') + for shunt_id in $shunt_ids; do + insert_nftset $NFTSET_SHUNTLIST "0" $(config_n_get $shunt_id ip_list | tr -s "\r\n" "\n" | sed -e "/^$/d" | grep -E "(\.((2(5[0-5]|[0-4][0-9]))|[0-1]?[0-9]{1,2})){3}") + [ "$PROXY_IPV6" = "1" ] && { + insert_nftset $NFTSET_SHUNTLIST6 "0" $(config_n_get $shunt_id ip_list | tr -s "\r\n" "\n" | sed -e "/^$/d" | grep -E "([A-Fa-f0-9]{1,4}::?){1,7}[A-Fa-f0-9]{1,4}") + } + done } - [ "$TCP_NODE" ] && process_shunt_rules $TCP_NODE - [ "$UDP_NODE" ] && [ "$TCP_UDP" = "0" ] && process_shunt_rules $UDP_NODE # 忽略特殊IP段 local lan_ifname lan_ip diff --git a/shadowsocks-rust/Cargo.lock b/shadowsocks-rust/Cargo.lock index 3736f3c0cb..cc167f20db 100644 --- a/shadowsocks-rust/Cargo.lock +++ b/shadowsocks-rust/Cargo.lock @@ -984,9 +984,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.34" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0" +checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" dependencies = [ "crc32fast", "miniz_oxide", diff --git a/sing-box/adapter/inbound.go b/sing-box/adapter/inbound.go index 1093bac4e6..d3cc95b7d9 100644 --- a/sing-box/adapter/inbound.go +++ b/sing-box/adapter/inbound.go @@ -61,9 +61,10 @@ type InboundContext struct { // cache // Deprecated: implement in rule action - InboundDetour string - LastInbound string - OriginDestination M.Socksaddr + InboundDetour string + LastInbound string + OriginDestination M.Socksaddr + RouteOriginalDestination M.Socksaddr // Deprecated InboundOptions option.InboundOptions UDPDisableDomainUnmapping bool diff --git a/sing-box/adapter/outbound/default.go b/sing-box/adapter/outbound/default.go index 27cafb9d2f..573673f287 100644 --- a/sing-box/adapter/outbound/default.go +++ b/sing-box/adapter/outbound/default.go @@ -25,11 +25,7 @@ func NewConnection(ctx context.Context, this N.Dialer, conn net.Conn, metadata a var outConn net.Conn var err error if len(metadata.DestinationAddresses) > 0 { - if parallelDialer, isParallelDialer := this.(dialer.ParallelInterfaceDialer); isParallelDialer { - outConn, err = dialer.DialSerialNetwork(ctx, parallelDialer, N.NetworkTCP, metadata.Destination, metadata.DestinationAddresses, metadata.NetworkStrategy, metadata.NetworkType, metadata.FallbackNetworkType, metadata.FallbackDelay) - } else { - outConn, err = N.DialSerial(ctx, this, N.NetworkTCP, metadata.Destination, metadata.DestinationAddresses) - } + outConn, err = dialer.DialSerialNetwork(ctx, this, N.NetworkTCP, metadata.Destination, metadata.DestinationAddresses, metadata.NetworkStrategy, metadata.NetworkType, metadata.FallbackNetworkType, metadata.FallbackDelay) } else { outConn, err = this.DialContext(ctx, N.NetworkTCP, metadata.Destination) } @@ -73,11 +69,7 @@ func NewPacketConnection(ctx context.Context, this N.Dialer, conn N.PacketConn, } } else { if len(metadata.DestinationAddresses) > 0 { - if parallelDialer, isParallelDialer := this.(dialer.ParallelInterfaceDialer); isParallelDialer { - outPacketConn, destinationAddress, err = dialer.ListenSerialNetworkPacket(ctx, parallelDialer, metadata.Destination, metadata.DestinationAddresses, metadata.NetworkStrategy, metadata.NetworkType, metadata.FallbackNetworkType, metadata.FallbackDelay) - } else { - outPacketConn, destinationAddress, err = N.ListenSerial(ctx, this, metadata.Destination, metadata.DestinationAddresses) - } + outPacketConn, destinationAddress, err = dialer.ListenSerialNetworkPacket(ctx, this, metadata.Destination, metadata.DestinationAddresses, metadata.NetworkStrategy, metadata.NetworkType, metadata.FallbackNetworkType, metadata.FallbackDelay) } else { outPacketConn, err = this.ListenPacket(ctx, metadata.Destination) } @@ -91,11 +83,17 @@ func NewPacketConnection(ctx context.Context, this N.Dialer, conn N.PacketConn, return err } if destinationAddress.IsValid() { - if metadata.Destination.IsFqdn() { + var originDestination M.Socksaddr + if metadata.RouteOriginalDestination.IsValid() { + originDestination = metadata.RouteOriginalDestination + } else { + originDestination = metadata.Destination + } + if metadata.Destination != M.SocksaddrFrom(destinationAddress, metadata.Destination.Port) { if metadata.UDPDisableDomainUnmapping { - outPacketConn = bufio.NewUnidirectionalNATPacketConn(bufio.NewPacketConn(outPacketConn), M.SocksaddrFrom(destinationAddress, metadata.Destination.Port), metadata.Destination) + outPacketConn = bufio.NewUnidirectionalNATPacketConn(bufio.NewPacketConn(outPacketConn), M.SocksaddrFrom(destinationAddress, metadata.Destination.Port), originDestination) } else { - outPacketConn = bufio.NewNATPacketConn(bufio.NewPacketConn(outPacketConn), M.SocksaddrFrom(destinationAddress, metadata.Destination.Port), metadata.Destination) + outPacketConn = bufio.NewNATPacketConn(bufio.NewPacketConn(outPacketConn), M.SocksaddrFrom(destinationAddress, metadata.Destination.Port), originDestination) } } if natConn, loaded := common.Cast[bufio.NATPacketConn](conn); loaded { diff --git a/sing-box/common/dialer/default_parallel_network.go b/sing-box/common/dialer/default_parallel_network.go index ea043dfdb2..5145656ba8 100644 --- a/sing-box/common/dialer/default_parallel_network.go +++ b/sing-box/common/dialer/default_parallel_network.go @@ -13,17 +13,27 @@ import ( N "github.com/sagernet/sing/common/network" ) -func DialSerialNetwork(ctx context.Context, dialer ParallelInterfaceDialer, network string, destination M.Socksaddr, destinationAddresses []netip.Addr, strategy C.NetworkStrategy, interfaceType []C.InterfaceType, fallbackInterfaceType []C.InterfaceType, fallbackDelay time.Duration) (net.Conn, error) { +func DialSerialNetwork(ctx context.Context, dialer N.Dialer, network string, destination M.Socksaddr, destinationAddresses []netip.Addr, strategy C.NetworkStrategy, interfaceType []C.InterfaceType, fallbackInterfaceType []C.InterfaceType, fallbackDelay time.Duration) (net.Conn, error) { if parallelDialer, isParallel := dialer.(ParallelNetworkDialer); isParallel { return parallelDialer.DialParallelNetwork(ctx, network, destination, destinationAddresses, strategy, interfaceType, fallbackInterfaceType, fallbackDelay) } var errors []error - for _, address := range destinationAddresses { - conn, err := dialer.DialParallelInterface(ctx, network, M.SocksaddrFrom(address, destination.Port), strategy, interfaceType, fallbackInterfaceType, fallbackDelay) - if err == nil { - return conn, nil + if parallelDialer, isParallel := dialer.(ParallelInterfaceDialer); isParallel { + for _, address := range destinationAddresses { + conn, err := parallelDialer.DialParallelInterface(ctx, network, M.SocksaddrFrom(address, destination.Port), strategy, interfaceType, fallbackInterfaceType, fallbackDelay) + if err == nil { + return conn, nil + } + errors = append(errors, err) + } + } else { + for _, address := range destinationAddresses { + conn, err := dialer.DialContext(ctx, network, M.SocksaddrFrom(address, destination.Port)) + if err == nil { + return conn, nil + } + errors = append(errors, err) } - errors = append(errors, err) } return nil, E.Errors(errors...) } @@ -106,17 +116,27 @@ func DialParallelNetwork(ctx context.Context, dialer ParallelInterfaceDialer, ne } } -func ListenSerialNetworkPacket(ctx context.Context, dialer ParallelInterfaceDialer, destination M.Socksaddr, destinationAddresses []netip.Addr, strategy C.NetworkStrategy, interfaceType []C.InterfaceType, fallbackInterfaceType []C.InterfaceType, fallbackDelay time.Duration) (net.PacketConn, netip.Addr, error) { +func ListenSerialNetworkPacket(ctx context.Context, dialer N.Dialer, destination M.Socksaddr, destinationAddresses []netip.Addr, strategy C.NetworkStrategy, interfaceType []C.InterfaceType, fallbackInterfaceType []C.InterfaceType, fallbackDelay time.Duration) (net.PacketConn, netip.Addr, error) { if parallelDialer, isParallel := dialer.(ParallelNetworkDialer); isParallel { return parallelDialer.ListenSerialNetworkPacket(ctx, destination, destinationAddresses, strategy, interfaceType, fallbackInterfaceType, fallbackDelay) } var errors []error - for _, address := range destinationAddresses { - conn, err := dialer.ListenSerialInterfacePacket(ctx, M.SocksaddrFrom(address, destination.Port), strategy, interfaceType, fallbackInterfaceType, fallbackDelay) - if err == nil { - return conn, address, nil + if parallelDialer, isParallel := dialer.(ParallelInterfaceDialer); isParallel { + for _, address := range destinationAddresses { + conn, err := parallelDialer.ListenSerialInterfacePacket(ctx, M.SocksaddrFrom(address, destination.Port), strategy, interfaceType, fallbackInterfaceType, fallbackDelay) + if err == nil { + return conn, address, nil + } + errors = append(errors, err) + } + } else { + for _, address := range destinationAddresses { + conn, err := dialer.ListenPacket(ctx, M.SocksaddrFrom(address, destination.Port)) + if err == nil { + return conn, address, nil + } + errors = append(errors, err) } - errors = append(errors, err) } return nil, netip.Addr{}, E.Errors(errors...) } diff --git a/sing-box/docs/changelog.md b/sing-box/docs/changelog.md index 1ba478be2c..c01024abe8 100644 --- a/sing-box/docs/changelog.md +++ b/sing-box/docs/changelog.md @@ -5,12 +5,18 @@ icon: material/alert-decagram #### 1.11.0-alpha.16 * Add `cache_capacity` DNS option **1** +* Add `override_address` and `override_port` route options **2** * Fixes and improvements **1**: See [DNS](/configuration/dns/#cache_capacity). +**2**: + +See [Rule Action](/configuration/route/#override_address) and +[Migrate destination override fields to route options](/migration/#migrate-destination-override-fields-to-route-options). + #### 1.11.0-alpha.15 * Improve multi network dialing **1** diff --git a/sing-box/docs/configuration/dns/index.md b/sing-box/docs/configuration/dns/index.md index fc81333443..0756281dbf 100644 --- a/sing-box/docs/configuration/dns/index.md +++ b/sing-box/docs/configuration/dns/index.md @@ -1,16 +1,11 @@ --- -icon: material/new +icon: material/new-box --- - !!! quote "Changes in sing-box 1.11.0" :material-plus: [cache_capacity](#cache_capacity) -!!! quote "Changes in sing-box 1.9.0" - - :material-plus: [client_subnet](#client_subnet) - # DNS ### Structure @@ -70,7 +65,7 @@ Make each DNS server's cache independent for special purposes. If enabled, will #### cache_capacity -!!! quote "Since sing-box 1.11.0" +!!! question "Since sing-box 1.11.0" LRU cache capacity. diff --git a/sing-box/docs/configuration/dns/index.zh.md b/sing-box/docs/configuration/dns/index.zh.md index 20fbc00db5..76c07b6a2c 100644 --- a/sing-box/docs/configuration/dns/index.zh.md +++ b/sing-box/docs/configuration/dns/index.zh.md @@ -1,15 +1,11 @@ --- -icon: material/new +icon: material/new-box --- -!!! quote "自 sing-box 1.11.0 起" +!!! quote "sing-box 1.11.0 中的更改" :material-plus: [cache_capacity](#cache_capacity) -!!! quote "自 sing-box 1.9.0 起" - - :material-plus: [client_subnet](#client_subnet) - # DNS ### 结构 @@ -68,7 +64,7 @@ icon: material/new #### cache_capacity -!!! quote "自 sing-box 1.11.0 起" +!!! question "自 sing-box 1.11.0 起" LRU 缓存容量。 diff --git a/sing-box/docs/configuration/outbound/direct.md b/sing-box/docs/configuration/outbound/direct.md index c2f5671a6b..71649243a5 100644 --- a/sing-box/docs/configuration/outbound/direct.md +++ b/sing-box/docs/configuration/outbound/direct.md @@ -1,3 +1,12 @@ +--- +icon: material/alert-decagram +--- + +!!! quote "Changes in sing-box 1.11.0" + + :material-alert-decagram: [override_address](#override_address) + :material-alert-decagram: [override_port](#override_port) + `direct` outbound send requests directly. ### Structure @@ -9,7 +18,6 @@ "override_address": "1.0.0.1", "override_port": 53, - "proxy_protocol": 0, ... // Dial Fields } @@ -19,16 +27,20 @@ #### override_address +!!! failure "Deprecated in sing-box 1.11.0" + + Destination override fields are deprecated in sing-box 1.11.0 and will be removed in sing-box 1.13.0, see [Migration](/migration/#migrate-destination-override-fields-to-route-options). + Override the connection destination address. #### override_port +!!! failure "Deprecated in sing-box 1.11.0" + + Destination override fields are deprecated in sing-box 1.11.0 and will be removed in sing-box 1.13.0, see [Migration](/migration/#migrate-destination-override-fields-to-route-options). + Override the connection destination port. -#### proxy_protocol - -Write [Proxy Protocol](https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt) in the connection header. - Protocol value can be `1` or `2`. ### Dial Fields diff --git a/sing-box/docs/configuration/outbound/direct.zh.md b/sing-box/docs/configuration/outbound/direct.zh.md index aee131758a..55d3bf8c2d 100644 --- a/sing-box/docs/configuration/outbound/direct.zh.md +++ b/sing-box/docs/configuration/outbound/direct.zh.md @@ -1,3 +1,12 @@ +--- +icon: material/alert-decagram +--- + +!!! quote "sing-box 1.11.0 中的更改" + + :material-alert-decagram: [override_address](#override_address) + :material-alert-decagram: [override_port](#override_port) + `direct` 出站直接发送请求。 ### 结构 @@ -9,7 +18,6 @@ "override_address": "1.0.0.1", "override_port": 53, - "proxy_protocol": 0, ... // 拨号字段 } @@ -19,18 +27,20 @@ #### override_address +!!! failure "已在 sing-box 1.11.0 废弃" + + 目标覆盖字段在 sing-box 1.11.0 中已废弃,并将在 sing-box 1.13.0 中被移除,参阅 [迁移指南](/migration/#migrate-destination-override-fields-to-route-options)。 + 覆盖连接目标地址。 #### override_port +!!! failure "已在 sing-box 1.11.0 废弃" + + 目标覆盖字段在 sing-box 1.11.0 中已废弃,并将在 sing-box 1.13.0 中被移除,参阅 [迁移指南](/migration/#migrate-destination-override-fields-to-route-options)。 + 覆盖连接目标端口。 -#### proxy_protocol - -写出 [代理协议](https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt) 到连接头。 - -可用协议版本值:`1` 或 `2`。 - ### 拨号字段 参阅 [拨号字段](/zh/configuration/shared/dial/)。 diff --git a/sing-box/docs/configuration/route/rule_action.md b/sing-box/docs/configuration/route/rule_action.md index 6462c84836..63e2b00b75 100644 --- a/sing-box/docs/configuration/route/rule_action.md +++ b/sing-box/docs/configuration/route/rule_action.md @@ -10,12 +10,8 @@ icon: material/new-box { "action": "route", // default "outbound": "", - "network_strategy": "", - "network_type": [], - "fallback_network_type": [], - "fallback_delay": "", - "udp_disable_domain_unmapping": false, - "udp_connect": false + + ... // route-options Fields } ``` @@ -31,6 +27,34 @@ icon: material/new-box Tag of target outbound. +#### route-options Fields + +See `route-options` fields below. + +### route-options + +```json +{ + "action": "route-options", + "override_address": "", + "override_port": 0, + "network_strategy": "", + "fallback_delay": "", + "udp_disable_domain_unmapping": false, + "udp_connect": false +} +``` + +`route-options` set options for routing. + +#### override_address + +Override the connection destination address. + +#### override_port + +Override the connection destination port. + #### network_strategy See [Dial Fields](/configuration/shared/dial/#network_strategy) for details. @@ -62,20 +86,6 @@ do not support receiving UDP packets with domain addresses, such as Surge. If enabled, attempts to connect UDP connection to the destination instead of listen. -### route-options - -```json -{ - "action": "route-options", - "network_strategy": "", - "fallback_delay": "", - "udp_disable_domain_unmapping": false, - "udp_connect": false -} -``` - -`route-options` set options for routing. - ### reject ```json diff --git a/sing-box/docs/configuration/route/rule_action.zh.md b/sing-box/docs/configuration/route/rule_action.zh.md index acadb66d3c..7959fced45 100644 --- a/sing-box/docs/configuration/route/rule_action.zh.md +++ b/sing-box/docs/configuration/route/rule_action.zh.md @@ -10,12 +10,8 @@ icon: material/new-box { "action": "route", // 默认 "outbound": "", - "network_strategy": "", - "fallback_delay": "", - "network_type": [], - "fallback_network_type": [], - "udp_disable_domain_unmapping": false, - "udp_connect": false + + ... // route-options 字段 } ``` @@ -27,6 +23,38 @@ icon: material/new-box 目标出站的标签。 +#### route-options 字段 + +参阅下方的 `route-options` 字段。 + +### route-options + +```json +{ + "action": "route-options", + "override_address": "", + "override_port": 0, + "network_strategy": "", + "fallback_delay": "", + "udp_disable_domain_unmapping": false, + "udp_connect": false +} +``` + +!!! note "" + + 当内容只有一项时,可以忽略 JSON 数组 [] 标签 + +`route-options` 为路由设置选项。 + +#### override_address + +覆盖目标地址。 + +#### override_port + +覆盖目标端口。 + #### network_strategy 详情参阅 [拨号字段](/configuration/shared/dial/#network_strategy)。 @@ -56,24 +84,6 @@ icon: material/new-box 如果启用,将尝试将 UDP 连接 connect 到目标而不是 listen。 -### route-options - -```json -{ - "action": "route-options", - "network_strategy": "", - "fallback_delay": "", - "udp_disable_domain_unmapping": false, - "udp_connect": false -} -``` - -!!! note "" - - 当内容只有一项时,可以忽略 JSON 数组 [] 标签 - -`route-options` 为路由设置选项。 - ### reject ```json diff --git a/sing-box/docs/deprecated.md b/sing-box/docs/deprecated.md index d57c93ade4..5dcec56241 100644 --- a/sing-box/docs/deprecated.md +++ b/sing-box/docs/deprecated.md @@ -22,6 +22,12 @@ check [Migration](../migration/#migrate-legacy-inbound-fields-to-rule-actions). Old fields will be removed in sing-box 1.13.0. +#### Destination override fields in direct outbound + +Destination override fields (`override_address` / `override_port`) in direct outbound are deprecated +and can be replaced by rule actions, +check [Migration](../migration/#migrate-destination-override-fields-to-route-options). + ## 1.10.0 #### TUN address fields are merged diff --git a/sing-box/docs/deprecated.zh.md b/sing-box/docs/deprecated.zh.md index 76a426d279..6f6c839fce 100644 --- a/sing-box/docs/deprecated.zh.md +++ b/sing-box/docs/deprecated.zh.md @@ -20,6 +20,13 @@ icon: material/delete-alert 旧字段将在 sing-box 1.13.0 中被移除。 +#### direct 出站中的目标地址覆盖字段 + +direct 出站中的目标地址覆盖字段(`override_address` / `override_port`)已废弃且可以通过规则动作替代, +参阅 [迁移指南](/migration/#migrate-destination-override-fields-to-route-options)。 + +旧字段将在 sing-box 1.13.0 中被移除。 + ## 1.10.0 #### Match source 规则项已重命名 diff --git a/sing-box/docs/migration.md b/sing-box/docs/migration.md index 8f01c4f031..ea1afa2dd2 100644 --- a/sing-box/docs/migration.md +++ b/sing-box/docs/migration.md @@ -156,6 +156,44 @@ Inbound fields are deprecated and can be replaced by rule actions. } ``` +### Migrate destination override fields to route options + +Destination override fields in direct outbound are deprecated and can be replaced by route options. + +!!! info "References" + + [Rule Action](/configuration/route/rule_action/) / + [Direct](/configuration/outbound/direct/) + +=== ":material-card-remove: Deprecated" + + ```json + { + "outbounds": [ + { + "type": "direct", + "override_address": "1.1.1.1", + "override_port": 443 + } + ] + } + ``` + +=== ":material-card-multiple: New" + + ```json + { + "route": { + "rules": [ + { + "action": "route-options", // or route + "override_address": "1.1.1.1", + "override_port": 443 + } + ] + } + ``` + ## 1.10.0 ### TUN address fields are merged diff --git a/sing-box/docs/migration.zh.md b/sing-box/docs/migration.zh.md index dc62f37003..73afbb0519 100644 --- a/sing-box/docs/migration.zh.md +++ b/sing-box/docs/migration.zh.md @@ -104,6 +104,7 @@ icon: material/arrange-bring-forward ### 迁移旧的入站字段到规则动作 + 入站选项已被弃用,且可以被规则动作替代。 !!! info "参考" @@ -156,6 +157,45 @@ icon: material/arrange-bring-forward } ``` +### 迁移 direct 出站中的目标地址覆盖字段到路由字段 + +direct 出站中的目标地址覆盖字段已废弃,且可以被路由字段替代。 + +!!! info "参考" + + [Rule Action](/zh/configuration/route/rule_action/) / + [Direct](/zh/configuration/outbound/direct/) + +=== ":material-card-remove: 弃用的" + + ```json + { + "outbounds": [ + { + "type": "direct", + "override_address": "1.1.1.1", + "override_port": 443 + } + ] + } + ``` + +=== ":material-card-multiple: 新的" + + ```json + { + "route": { + "rules": [ + { + "action": "route-options", // 或 route + "override_address": "1.1.1.1", + "override_port": 443 + } + ] + } + } + ``` + ## 1.10.0 ### TUN 地址字段已合并 @@ -164,8 +204,6 @@ icon: material/arrange-bring-forward `inet4_route_address` 和 `inet6_route_address` 已合并为 `route_address`, `inet4_route_exclude_address` 和 `inet6_route_exclude_address` 已合并为 `route_exclude_address`。 -旧字段已废弃,且将在 sing-box 1.11.0 中移除。 - !!! info "参考" [TUN](/zh/configuration/inbound/tun/) diff --git a/sing-box/experimental/deprecated/constants.go b/sing-box/experimental/deprecated/constants.go index bf848ffea0..a62b89f84b 100644 --- a/sing-box/experimental/deprecated/constants.go +++ b/sing-box/experimental/deprecated/constants.go @@ -100,6 +100,15 @@ var OptionInboundOptions = Note{ MigrationLink: "https://sing-box.sagernet.org/migration/#migrate-legacy-special-outbounds-to-rule-actions", } +var OptionDestinationOverrideFields = Note{ + Name: "destination-override-fields", + Description: "destination override fields in direct outbound", + DeprecatedVersion: "1.11.0", + ScheduledVersion: "1.13.0", + EnvName: "DESTINATION_OVERRIDE_FIELDS", + MigrationLink: "https://sing-box.sagernet.org/migration/#migrate-destination-override-fields-to-route-options", +} + var Options = []Note{ OptionBadMatchSource, OptionGEOIP, @@ -107,4 +116,5 @@ var Options = []Note{ OptionTUNAddressX, OptionSpecialOutbounds, OptionInboundOptions, + OptionDestinationOverrideFields, } diff --git a/sing-box/go.mod b/sing-box/go.mod index f055676f13..cd19bc91b8 100644 --- a/sing-box/go.mod +++ b/sing-box/go.mod @@ -25,10 +25,10 @@ require ( github.com/sagernet/gvisor v0.0.0-20241021032506-a4324256e4a3 github.com/sagernet/quic-go v0.48.1-beta.1 github.com/sagernet/reality v0.0.0-20230406110435-ee17307e7691 - github.com/sagernet/sing v0.6.0-alpha.9.0.20241114050315-4d3f04d2ed9b - github.com/sagernet/sing-dns v0.4.0-alpha.1.0.20241114050436-c6f02f9bdd5c + github.com/sagernet/sing v0.6.0-alpha.14 + github.com/sagernet/sing-dns v0.4.0-alpha.2 github.com/sagernet/sing-mux v0.3.0-alpha.1 - github.com/sagernet/sing-quic v0.3.0-rc.2 + github.com/sagernet/sing-quic v0.4.0-alpha.3 github.com/sagernet/sing-shadowsocks v0.2.7 github.com/sagernet/sing-shadowsocks2 v0.2.0 github.com/sagernet/sing-shadowtls v0.1.4 diff --git a/sing-box/go.sum b/sing-box/go.sum index 4cd6b07917..2c695fb92a 100644 --- a/sing-box/go.sum +++ b/sing-box/go.sum @@ -110,14 +110,14 @@ github.com/sagernet/quic-go v0.48.1-beta.1/go.mod h1:1WgdDIVD1Gybp40JTWketeSfKA/ github.com/sagernet/reality v0.0.0-20230406110435-ee17307e7691 h1:5Th31OC6yj8byLGkEnIYp6grlXfo1QYUfiYFGjewIdc= github.com/sagernet/reality v0.0.0-20230406110435-ee17307e7691/go.mod h1:B8lp4WkQ1PwNnrVMM6KyuFR20pU8jYBD+A4EhJovEXU= github.com/sagernet/sing v0.2.18/go.mod h1:OL6k2F0vHmEzXz2KW19qQzu172FDgSbUSODylighuVo= -github.com/sagernet/sing v0.6.0-alpha.9.0.20241114050315-4d3f04d2ed9b h1:9uCKmb7UsGQpVM0qAOTQXk4dQBhmJc6PC5pyxT2hxWU= -github.com/sagernet/sing v0.6.0-alpha.9.0.20241114050315-4d3f04d2ed9b/go.mod h1:ARkL0gM13/Iv5VCZmci/NuoOlePoIsW0m7BWfln/Hak= -github.com/sagernet/sing-dns v0.4.0-alpha.1.0.20241114050436-c6f02f9bdd5c h1:2gDzgQ6PBEfj/Cr9itS7XE/w9ya6l/EzJXIzBXb0vXU= -github.com/sagernet/sing-dns v0.4.0-alpha.1.0.20241114050436-c6f02f9bdd5c/go.mod h1:MSv9hJRUrIi35pvlSTgrwWFl/owYyUhpV+m4d9YkteI= +github.com/sagernet/sing v0.6.0-alpha.14 h1:ORh6yQwLL+/nv+rklrO2W4k+zgf3ZzaOl/83vQbJUl4= +github.com/sagernet/sing v0.6.0-alpha.14/go.mod h1:ARkL0gM13/Iv5VCZmci/NuoOlePoIsW0m7BWfln/Hak= +github.com/sagernet/sing-dns v0.4.0-alpha.2 h1:0x5WjrO+Ifk9sqJlHRz/tKENHwoEinQ8HQCHAhpJHAQ= +github.com/sagernet/sing-dns v0.4.0-alpha.2/go.mod h1:ZiXcacKL54jSSYZMbYF3qKNFkkW674Jt+85YCmK64K8= github.com/sagernet/sing-mux v0.3.0-alpha.1 h1:IgNX5bJBpL41gGbp05pdDOvh/b5eUQ6cv9240+Ngipg= github.com/sagernet/sing-mux v0.3.0-alpha.1/go.mod h1:FTcImmdfW38Lz7b+HQ+mxxOth1lz4ao8uEnz+MwIJQE= -github.com/sagernet/sing-quic v0.3.0-rc.2 h1:7vcC4bdS1GBJzHZhfmJiH0CfzQ4mYLUW51Z2RNHcGwc= -github.com/sagernet/sing-quic v0.3.0-rc.2/go.mod h1:3UOq51WVqzra7eCgod7t4hqnTaOiZzFUci9avMrtOqs= +github.com/sagernet/sing-quic v0.4.0-alpha.3 h1:2svvOqgQCJg7FNrIrLTaRB6oDzXPiIyWIt9csjZxD6Q= +github.com/sagernet/sing-quic v0.4.0-alpha.3/go.mod h1:Fmnpy0XoyYdjJrxNqEyl3LC9uLibMNNbxG7dt6HATY4= github.com/sagernet/sing-shadowsocks v0.2.7 h1:zaopR1tbHEw5Nk6FAkM05wCslV6ahVegEZaKMv9ipx8= github.com/sagernet/sing-shadowsocks v0.2.7/go.mod h1:0rIKJZBR65Qi0zwdKezt4s57y/Tl1ofkaq6NlkzVuyE= github.com/sagernet/sing-shadowsocks2 v0.2.0 h1:wpZNs6wKnR7mh1wV9OHwOyUr21VkS3wKFHi+8XwgADg= diff --git a/sing-box/option/direct.go b/sing-box/option/direct.go index 8624846dbc..180ff0aa23 100644 --- a/sing-box/option/direct.go +++ b/sing-box/option/direct.go @@ -1,5 +1,12 @@ package option +import ( + "context" + + "github.com/sagernet/sing-box/experimental/deprecated" + "github.com/sagernet/sing/common/json" +) + type DirectInboundOptions struct { ListenOptions Network NetworkList `json:"network,omitempty"` @@ -7,9 +14,25 @@ type DirectInboundOptions struct { OverridePort uint16 `json:"override_port,omitempty"` } -type DirectOutboundOptions struct { +type _DirectOutboundOptions struct { DialerOptions + // Deprecated: Use Route Action instead OverrideAddress string `json:"override_address,omitempty"` - OverridePort uint16 `json:"override_port,omitempty"` - ProxyProtocol uint8 `json:"proxy_protocol,omitempty"` + // Deprecated: Use Route Action instead + OverridePort uint16 `json:"override_port,omitempty"` + // Deprecated: removed + ProxyProtocol uint8 `json:"proxy_protocol,omitempty"` +} + +type DirectOutboundOptions _DirectOutboundOptions + +func (d *DirectOutboundOptions) UnmarshalJSONContext(ctx context.Context, content []byte) error { + err := json.UnmarshalDisallowUnknownFields(content, (*_DirectOutboundOptions)(d)) + if err != nil { + return err + } + if d.OverrideAddress != "" || d.OverridePort != 0 { + deprecated.Report(ctx, deprecated.OptionDestinationOverrideFields) + } + return nil } diff --git a/sing-box/option/rule_action.go b/sing-box/option/rule_action.go index 7c31ea7a42..ce3b92d9e9 100644 --- a/sing-box/option/rule_action.go +++ b/sing-box/option/rule_action.go @@ -137,24 +137,25 @@ func (r *DNSRuleAction) UnmarshalJSONContext(ctx context.Context, data []byte) e } type RouteActionOptions struct { - Outbound string `json:"outbound,omitempty"` - NetworkStrategy NetworkStrategy `json:"network_strategy,omitempty"` - FallbackDelay uint32 `json:"fallback_delay,omitempty"` - UDPDisableDomainUnmapping bool `json:"udp_disable_domain_unmapping,omitempty"` - UDPConnect bool `json:"udp_connect,omitempty"` + Outbound string `json:"outbound,omitempty"` + RawRouteOptionsActionOptions } -type _RouteOptionsActionOptions struct { - NetworkStrategy NetworkStrategy `json:"network_strategy,omitempty"` - FallbackDelay uint32 `json:"fallback_delay,omitempty"` - UDPDisableDomainUnmapping bool `json:"udp_disable_domain_unmapping,omitempty"` - UDPConnect bool `json:"udp_connect,omitempty"` +type RawRouteOptionsActionOptions struct { + OverrideAddress string `json:"override_address,omitempty"` + OverridePort uint16 `json:"override_port,omitempty"` + + NetworkStrategy NetworkStrategy `json:"network_strategy,omitempty"` + FallbackDelay uint32 `json:"fallback_delay,omitempty"` + + UDPDisableDomainUnmapping bool `json:"udp_disable_domain_unmapping,omitempty"` + UDPConnect bool `json:"udp_connect,omitempty"` } -type RouteOptionsActionOptions _RouteOptionsActionOptions +type RouteOptionsActionOptions RawRouteOptionsActionOptions func (r *RouteOptionsActionOptions) UnmarshalJSON(data []byte) error { - err := json.Unmarshal(data, (*_RouteOptionsActionOptions)(r)) + err := json.Unmarshal(data, (*RawRouteOptionsActionOptions)(r)) if err != nil { return err } diff --git a/sing-box/protocol/direct/inbound.go b/sing-box/protocol/direct/inbound.go index 568a72cbd0..177d334247 100644 --- a/sing-box/protocol/direct/inbound.go +++ b/sing-box/protocol/direct/inbound.go @@ -110,6 +110,8 @@ func (i *Inbound) NewConnectionEx(ctx context.Context, conn net.Conn, metadata a i.logger.InfoContext(ctx, "inbound connection to ", metadata.Destination) metadata.Inbound = i.Tag() metadata.InboundType = i.Type() + metadata.InboundDetour = i.listener.ListenOptions().Detour + metadata.InboundOptions = i.listener.ListenOptions().InboundOptions i.router.RouteConnectionEx(ctx, conn, metadata, onClose) } @@ -119,6 +121,8 @@ func (i *Inbound) NewPacketConnectionEx(ctx context.Context, conn N.PacketConn, var metadata adapter.InboundContext metadata.Inbound = i.Tag() metadata.InboundType = i.Type() + metadata.InboundDetour = i.listener.ListenOptions().Detour + metadata.InboundOptions = i.listener.ListenOptions().InboundOptions metadata.Source = source metadata.Destination = destination metadata.OriginDestination = i.listener.UDPAddr() diff --git a/sing-box/protocol/http/inbound.go b/sing-box/protocol/http/inbound.go index 87ed9a1089..5560ee40b7 100644 --- a/sing-box/protocol/http/inbound.go +++ b/sing-box/protocol/http/inbound.go @@ -73,7 +73,7 @@ func (h *Inbound) Start() error { func (h *Inbound) Close() error { return common.Close( - &h.listener, + h.listener, h.tlsConfig, ) } diff --git a/sing-box/protocol/hysteria/inbound.go b/sing-box/protocol/hysteria/inbound.go index 8127106b89..2b6d8a4d78 100644 --- a/sing-box/protocol/hysteria/inbound.go +++ b/sing-box/protocol/hysteria/inbound.go @@ -17,6 +17,7 @@ import ( "github.com/sagernet/sing/common" "github.com/sagernet/sing/common/auth" E "github.com/sagernet/sing/common/exceptions" + M "github.com/sagernet/sing/common/metadata" N "github.com/sagernet/sing/common/network" ) @@ -85,7 +86,7 @@ func NewInbound(ctx context.Context, router adapter.Router, logger log.ContextLo XPlusPassword: options.Obfs, TLSConfig: tlsConfig, UDPTimeout: udpTimeout, - Handler: adapter.NewUpstreamHandler(adapter.InboundContext{}, inbound.newConnection, inbound.newPacketConnection, nil), + Handler: inbound, // Legacy options @@ -117,12 +118,16 @@ func NewInbound(ctx context.Context, router adapter.Router, logger log.ContextLo return inbound, nil } -func (h *Inbound) newConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error { +func (h *Inbound) NewConnectionEx(ctx context.Context, conn net.Conn, source M.Socksaddr, destination M.Socksaddr, onClose N.CloseHandlerFunc) { ctx = log.ContextWithNewID(ctx) + var metadata adapter.InboundContext metadata.Inbound = h.Tag() metadata.InboundType = h.Type() metadata.InboundDetour = h.listener.ListenOptions().Detour metadata.InboundOptions = h.listener.ListenOptions().InboundOptions + metadata.OriginDestination = h.listener.UDPAddr() + metadata.Source = source + metadata.Destination = destination h.logger.InfoContext(ctx, "inbound connection from ", metadata.Source) userID, _ := auth.UserFromContext[int](ctx) if userName := h.userNameList[userID]; userName != "" { @@ -131,16 +136,19 @@ func (h *Inbound) newConnection(ctx context.Context, conn net.Conn, metadata ada } else { h.logger.InfoContext(ctx, "inbound connection to ", metadata.Destination) } - return h.router.RouteConnection(ctx, conn, metadata) + h.router.RouteConnectionEx(ctx, conn, metadata, onClose) } -func (h *Inbound) newPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error { +func (h *Inbound) NewPacketConnectionEx(ctx context.Context, conn N.PacketConn, source M.Socksaddr, destination M.Socksaddr, onClose N.CloseHandlerFunc) { ctx = log.ContextWithNewID(ctx) + var metadata adapter.InboundContext metadata.Inbound = h.Tag() metadata.InboundType = h.Type() metadata.InboundDetour = h.listener.ListenOptions().Detour metadata.InboundOptions = h.listener.ListenOptions().InboundOptions metadata.OriginDestination = h.listener.UDPAddr() + metadata.Source = source + metadata.Destination = destination h.logger.InfoContext(ctx, "inbound packet connection from ", metadata.Source) userID, _ := auth.UserFromContext[int](ctx) if userName := h.userNameList[userID]; userName != "" { @@ -149,7 +157,7 @@ func (h *Inbound) newPacketConnection(ctx context.Context, conn N.PacketConn, me } else { h.logger.InfoContext(ctx, "inbound packet connection to ", metadata.Destination) } - return h.router.RoutePacketConnection(ctx, conn, metadata) + h.router.RoutePacketConnectionEx(ctx, conn, metadata, onClose) } func (h *Inbound) Start() error { @@ -168,7 +176,7 @@ func (h *Inbound) Start() error { func (h *Inbound) Close() error { return common.Close( - &h.listener, + h.listener, h.tlsConfig, common.PtrOrNil(h.service), ) diff --git a/sing-box/protocol/hysteria2/inbound.go b/sing-box/protocol/hysteria2/inbound.go index cbf811097f..03cd8d2d52 100644 --- a/sing-box/protocol/hysteria2/inbound.go +++ b/sing-box/protocol/hysteria2/inbound.go @@ -20,6 +20,7 @@ import ( "github.com/sagernet/sing/common" "github.com/sagernet/sing/common/auth" E "github.com/sagernet/sing/common/exceptions" + M "github.com/sagernet/sing/common/metadata" N "github.com/sagernet/sing/common/network" ) @@ -108,7 +109,7 @@ func NewInbound(ctx context.Context, router adapter.Router, logger log.ContextLo TLSConfig: tlsConfig, IgnoreClientBandwidth: options.IgnoreClientBandwidth, UDPTimeout: udpTimeout, - Handler: adapter.NewUpstreamHandler(adapter.InboundContext{}, inbound.newConnection, inbound.newPacketConnection, nil), + Handler: inbound, MasqueradeHandler: masqueradeHandler, }) if err != nil { @@ -128,12 +129,16 @@ func NewInbound(ctx context.Context, router adapter.Router, logger log.ContextLo return inbound, nil } -func (h *Inbound) newConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error { +func (h *Inbound) NewConnectionEx(ctx context.Context, conn net.Conn, source M.Socksaddr, destination M.Socksaddr, onClose N.CloseHandlerFunc) { ctx = log.ContextWithNewID(ctx) + var metadata adapter.InboundContext metadata.Inbound = h.Tag() metadata.InboundType = h.Type() metadata.InboundDetour = h.listener.ListenOptions().Detour metadata.InboundOptions = h.listener.ListenOptions().InboundOptions + metadata.OriginDestination = h.listener.UDPAddr() + metadata.Source = source + metadata.Destination = destination h.logger.InfoContext(ctx, "inbound connection from ", metadata.Source) userID, _ := auth.UserFromContext[int](ctx) if userName := h.userNameList[userID]; userName != "" { @@ -142,16 +147,19 @@ func (h *Inbound) newConnection(ctx context.Context, conn net.Conn, metadata ada } else { h.logger.InfoContext(ctx, "inbound connection to ", metadata.Destination) } - return h.router.RouteConnection(ctx, conn, metadata) + h.router.RouteConnectionEx(ctx, conn, metadata, onClose) } -func (h *Inbound) newPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error { +func (h *Inbound) NewPacketConnectionEx(ctx context.Context, conn N.PacketConn, source M.Socksaddr, destination M.Socksaddr, onClose N.CloseHandlerFunc) { ctx = log.ContextWithNewID(ctx) + var metadata adapter.InboundContext metadata.Inbound = h.Tag() metadata.InboundType = h.Type() metadata.InboundDetour = h.listener.ListenOptions().Detour metadata.InboundOptions = h.listener.ListenOptions().InboundOptions metadata.OriginDestination = h.listener.UDPAddr() + metadata.Source = source + metadata.Destination = destination h.logger.InfoContext(ctx, "inbound packet connection from ", metadata.Source) userID, _ := auth.UserFromContext[int](ctx) if userName := h.userNameList[userID]; userName != "" { @@ -160,7 +168,7 @@ func (h *Inbound) newPacketConnection(ctx context.Context, conn N.PacketConn, me } else { h.logger.InfoContext(ctx, "inbound packet connection to ", metadata.Destination) } - return h.router.RoutePacketConnection(ctx, conn, metadata) + h.router.RoutePacketConnectionEx(ctx, conn, metadata, onClose) } func (h *Inbound) Start() error { @@ -179,7 +187,7 @@ func (h *Inbound) Start() error { func (h *Inbound) Close() error { return common.Close( - &h.listener, + h.listener, h.tlsConfig, common.PtrOrNil(h.service), ) diff --git a/sing-box/protocol/redirect/redirect.go b/sing-box/protocol/redirect/redirect.go index 71e1fced1a..23bfad3eb4 100644 --- a/sing-box/protocol/redirect/redirect.go +++ b/sing-box/protocol/redirect/redirect.go @@ -59,6 +59,8 @@ func (h *Redirect) NewConnectionEx(ctx context.Context, conn net.Conn, metadata } metadata.Inbound = h.Tag() metadata.InboundType = h.Type() + metadata.InboundDetour = h.listener.ListenOptions().Detour + metadata.InboundOptions = h.listener.ListenOptions().InboundOptions metadata.Destination = M.SocksaddrFromNetIP(destination) h.logger.InfoContext(ctx, "inbound connection to ", metadata.Destination) h.router.RouteConnectionEx(ctx, conn, metadata, onClose) diff --git a/sing-box/protocol/redirect/tproxy.go b/sing-box/protocol/redirect/tproxy.go index dee40ec5a8..bdff4dff6a 100644 --- a/sing-box/protocol/redirect/tproxy.go +++ b/sing-box/protocol/redirect/tproxy.go @@ -101,6 +101,8 @@ func (t *TProxy) NewPacketConnectionEx(ctx context.Context, conn N.PacketConn, s var metadata adapter.InboundContext metadata.Inbound = t.Tag() metadata.InboundType = t.Type() + metadata.InboundDetour = t.listener.ListenOptions().Detour + metadata.InboundOptions = t.listener.ListenOptions().InboundOptions metadata.Source = source metadata.Destination = destination metadata.OriginDestination = t.listener.UDPAddr() diff --git a/sing-box/protocol/shadowsocks/inbound.go b/sing-box/protocol/shadowsocks/inbound.go index b23516d995..78cfc4a27d 100644 --- a/sing-box/protocol/shadowsocks/inbound.go +++ b/sing-box/protocol/shadowsocks/inbound.go @@ -120,6 +120,8 @@ func (h *Inbound) newConnection(ctx context.Context, conn net.Conn, metadata ada h.logger.InfoContext(ctx, "inbound connection to ", metadata.Destination) metadata.Inbound = h.Tag() metadata.InboundType = h.Type() + metadata.InboundDetour = h.listener.ListenOptions().Detour + metadata.InboundOptions = h.listener.ListenOptions().InboundOptions return h.router.RouteConnection(ctx, conn, metadata) } diff --git a/sing-box/protocol/shadowsocks/inbound_multi.go b/sing-box/protocol/shadowsocks/inbound_multi.go index 0e1efedfc2..45c91cdf80 100644 --- a/sing-box/protocol/shadowsocks/inbound_multi.go +++ b/sing-box/protocol/shadowsocks/inbound_multi.go @@ -138,6 +138,8 @@ func (h *MultiInbound) newConnection(ctx context.Context, conn net.Conn, metadat h.logger.InfoContext(ctx, "[", user, "] inbound connection to ", metadata.Destination) metadata.Inbound = h.Tag() metadata.InboundType = h.Type() + metadata.InboundDetour = h.listener.ListenOptions().Detour + metadata.InboundOptions = h.listener.ListenOptions().InboundOptions return h.router.RouteConnection(ctx, conn, metadata) } diff --git a/sing-box/protocol/shadowsocks/inbound_relay.go b/sing-box/protocol/shadowsocks/inbound_relay.go index 5818ca29f1..7768e94a5e 100644 --- a/sing-box/protocol/shadowsocks/inbound_relay.go +++ b/sing-box/protocol/shadowsocks/inbound_relay.go @@ -123,6 +123,8 @@ func (h *RelayInbound) newConnection(ctx context.Context, conn net.Conn, metadat h.logger.InfoContext(ctx, "[", destination, "] inbound connection to ", metadata.Destination) metadata.Inbound = h.Tag() metadata.InboundType = h.Type() + metadata.InboundDetour = h.listener.ListenOptions().Detour + metadata.InboundOptions = h.listener.ListenOptions().InboundOptions return h.router.RouteConnection(ctx, conn, metadata) } diff --git a/sing-box/protocol/trojan/inbound.go b/sing-box/protocol/trojan/inbound.go index 010ae8baf2..bb1706940c 100644 --- a/sing-box/protocol/trojan/inbound.go +++ b/sing-box/protocol/trojan/inbound.go @@ -149,7 +149,7 @@ func (h *Inbound) Start() error { func (h *Inbound) Close() error { return common.Close( - &h.listener, + h.listener, h.tlsConfig, h.transport, ) diff --git a/sing-box/protocol/tuic/inbound.go b/sing-box/protocol/tuic/inbound.go index 33de10d5cb..496079c194 100644 --- a/sing-box/protocol/tuic/inbound.go +++ b/sing-box/protocol/tuic/inbound.go @@ -17,6 +17,7 @@ import ( "github.com/sagernet/sing/common" "github.com/sagernet/sing/common/auth" E "github.com/sagernet/sing/common/exceptions" + M "github.com/sagernet/sing/common/metadata" N "github.com/sagernet/sing/common/network" "github.com/gofrs/uuid/v5" @@ -71,7 +72,7 @@ func NewInbound(ctx context.Context, router adapter.Router, logger log.ContextLo ZeroRTTHandshake: options.ZeroRTTHandshake, Heartbeat: time.Duration(options.Heartbeat), UDPTimeout: udpTimeout, - Handler: adapter.NewUpstreamHandler(adapter.InboundContext{}, inbound.newConnection, inbound.newPacketConnection, nil), + Handler: inbound, }) if err != nil { return nil, err @@ -99,12 +100,16 @@ func NewInbound(ctx context.Context, router adapter.Router, logger log.ContextLo return inbound, nil } -func (h *Inbound) newConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error { +func (h *Inbound) NewConnectionEx(ctx context.Context, conn net.Conn, source M.Socksaddr, destination M.Socksaddr, onClose N.CloseHandlerFunc) { ctx = log.ContextWithNewID(ctx) + var metadata adapter.InboundContext metadata.Inbound = h.Tag() metadata.InboundType = h.Type() metadata.InboundDetour = h.listener.ListenOptions().Detour metadata.InboundOptions = h.listener.ListenOptions().InboundOptions + metadata.OriginDestination = h.listener.UDPAddr() + metadata.Source = source + metadata.Destination = destination h.logger.InfoContext(ctx, "inbound connection from ", metadata.Source) userID, _ := auth.UserFromContext[int](ctx) if userName := h.userNameList[userID]; userName != "" { @@ -113,16 +118,19 @@ func (h *Inbound) newConnection(ctx context.Context, conn net.Conn, metadata ada } else { h.logger.InfoContext(ctx, "inbound connection to ", metadata.Destination) } - return h.router.RouteConnection(ctx, conn, metadata) + h.router.RouteConnectionEx(ctx, conn, metadata, onClose) } -func (h *Inbound) newPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error { +func (h *Inbound) NewPacketConnectionEx(ctx context.Context, conn N.PacketConn, source M.Socksaddr, destination M.Socksaddr, onClose N.CloseHandlerFunc) { ctx = log.ContextWithNewID(ctx) + var metadata adapter.InboundContext metadata.Inbound = h.Tag() metadata.InboundType = h.Type() metadata.InboundDetour = h.listener.ListenOptions().Detour metadata.InboundOptions = h.listener.ListenOptions().InboundOptions metadata.OriginDestination = h.listener.UDPAddr() + metadata.Source = source + metadata.Destination = destination h.logger.InfoContext(ctx, "inbound packet connection from ", metadata.Source) userID, _ := auth.UserFromContext[int](ctx) if userName := h.userNameList[userID]; userName != "" { @@ -131,7 +139,7 @@ func (h *Inbound) newPacketConnection(ctx context.Context, conn N.PacketConn, me } else { h.logger.InfoContext(ctx, "inbound packet connection to ", metadata.Destination) } - return h.router.RoutePacketConnection(ctx, conn, metadata) + h.router.RoutePacketConnectionEx(ctx, conn, metadata, onClose) } func (h *Inbound) Start() error { @@ -150,7 +158,7 @@ func (h *Inbound) Start() error { func (h *Inbound) Close() error { return common.Close( - &h.listener, + h.listener, h.tlsConfig, common.PtrOrNil(h.server), ) diff --git a/sing-box/protocol/vless/inbound.go b/sing-box/protocol/vless/inbound.go index 0641549b0a..05a99fd103 100644 --- a/sing-box/protocol/vless/inbound.go +++ b/sing-box/protocol/vless/inbound.go @@ -129,7 +129,7 @@ func (h *Inbound) Start() error { func (h *Inbound) Close() error { return common.Close( h.service, - &h.listener, + h.listener, h.tlsConfig, h.transport, ) diff --git a/sing-box/protocol/vmess/inbound.go b/sing-box/protocol/vmess/inbound.go index 1c80f376e1..07451007dd 100644 --- a/sing-box/protocol/vmess/inbound.go +++ b/sing-box/protocol/vmess/inbound.go @@ -143,7 +143,7 @@ func (h *Inbound) Start() error { func (h *Inbound) Close() error { return common.Close( h.service, - &h.listener, + h.listener, h.tlsConfig, h.transport, ) diff --git a/sing-box/route/route.go b/sing-box/route/route.go index 051ee403ba..3dc7a0224e 100644 --- a/sing-box/route/route.go +++ b/sing-box/route/route.go @@ -422,17 +422,38 @@ match: } } } + var routeOptions *rule.RuleActionRouteOptions switch action := currentRule.Action().(type) { case *rule.RuleActionRoute: - metadata.NetworkStrategy = action.NetworkStrategy - metadata.FallbackDelay = action.FallbackDelay - metadata.UDPDisableDomainUnmapping = action.UDPDisableDomainUnmapping - metadata.UDPConnect = action.UDPConnect + routeOptions = &action.RuleActionRouteOptions case *rule.RuleActionRouteOptions: - metadata.NetworkStrategy = action.NetworkStrategy - metadata.FallbackDelay = action.FallbackDelay - metadata.UDPDisableDomainUnmapping = action.UDPDisableDomainUnmapping - metadata.UDPConnect = action.UDPConnect + routeOptions = action + } + if routeOptions != nil { + // TODO: add nat + if (routeOptions.OverrideAddress.IsValid() || routeOptions.OverridePort > 0) && !metadata.RouteOriginalDestination.IsValid() { + metadata.RouteOriginalDestination = metadata.Destination + } + if routeOptions.OverrideAddress.IsValid() { + metadata.Destination = M.Socksaddr{ + Addr: routeOptions.OverrideAddress.Addr, + Port: metadata.Destination.Port, + Fqdn: metadata.Destination.Fqdn, + } + } + if routeOptions.OverridePort > 0 { + metadata.Destination = M.Socksaddr{ + Addr: metadata.Destination.Addr, + Port: routeOptions.OverridePort, + Fqdn: metadata.Destination.Fqdn, + } + } + metadata.NetworkStrategy = routeOptions.NetworkStrategy + metadata.FallbackDelay = routeOptions.FallbackDelay + metadata.UDPDisableDomainUnmapping = routeOptions.UDPDisableDomainUnmapping + metadata.UDPConnect = routeOptions.UDPConnect + } + switch action := currentRule.Action().(type) { case *rule.RuleActionSniff: if !preMatch { newBuffer, newPacketBuffers, newErr := r.actionSniff(ctx, metadata, action, inputConn, inputPacketConn) diff --git a/sing-box/route/rule/rule_action.go b/sing-box/route/rule/rule_action.go index 52e9520726..1b4099c903 100644 --- a/sing-box/route/rule/rule_action.go +++ b/sing-box/route/rule/rule_action.go @@ -19,6 +19,7 @@ import ( E "github.com/sagernet/sing/common/exceptions" F "github.com/sagernet/sing/common/format" "github.com/sagernet/sing/common/logger" + M "github.com/sagernet/sing/common/metadata" N "github.com/sagernet/sing/common/network" ) @@ -30,6 +31,8 @@ func NewRuleAction(ctx context.Context, logger logger.ContextLogger, action opti return &RuleActionRoute{ Outbound: action.RouteOptions.Outbound, RuleActionRouteOptions: RuleActionRouteOptions{ + OverrideAddress: M.ParseSocksaddrHostPort(action.RouteOptions.OverrideAddress, 0), + OverridePort: action.RouteOptions.OverridePort, NetworkStrategy: C.NetworkStrategy(action.RouteOptions.NetworkStrategy), FallbackDelay: time.Duration(action.RouteOptions.FallbackDelay), UDPDisableDomainUnmapping: action.RouteOptions.UDPDisableDomainUnmapping, @@ -38,6 +41,8 @@ func NewRuleAction(ctx context.Context, logger logger.ContextLogger, action opti }, nil case C.RuleActionTypeRouteOptions: return &RuleActionRouteOptions{ + OverrideAddress: M.ParseSocksaddrHostPort(action.RouteOptionsOptions.OverrideAddress, 0), + OverridePort: action.RouteOptionsOptions.OverridePort, NetworkStrategy: C.NetworkStrategy(action.RouteOptionsOptions.NetworkStrategy), FallbackDelay: time.Duration(action.RouteOptionsOptions.FallbackDelay), UDPDisableDomainUnmapping: action.RouteOptionsOptions.UDPDisableDomainUnmapping, @@ -139,6 +144,8 @@ func (r *RuleActionRoute) String() string { } type RuleActionRouteOptions struct { + OverrideAddress M.Socksaddr + OverridePort uint16 NetworkStrategy C.NetworkStrategy NetworkType []C.InterfaceType FallbackNetworkType []C.InterfaceType diff --git a/small/luci-app-passwall/luasrc/passwall/api.lua b/small/luci-app-passwall/luasrc/passwall/api.lua index c27f14aad7..71c4a7d63f 100644 --- a/small/luci-app-passwall/luasrc/passwall/api.lua +++ b/small/luci-app-passwall/luasrc/passwall/api.lua @@ -987,7 +987,11 @@ function to_move(app_name,file) end function get_version() - return sys.exec("echo -n $(opkg list-installed luci-app-passwall |awk '{print $3}')") + local version = sys.exec("opkg list-installed luci-app-passwall 2>/dev/null | awk '{print $3}'") + if not version or #version == 0 then + version = sys.exec("apk info luci-app-passwall 2>/dev/null | awk '{print $2}'") + end + return version or "" end function to_check_self() diff --git a/small/luci-app-passwall/root/usr/share/passwall/iptables.sh b/small/luci-app-passwall/root/usr/share/passwall/iptables.sh index bde6f96cb1..d3a8c909c2 100755 --- a/small/luci-app-passwall/root/usr/share/passwall/iptables.sh +++ b/small/luci-app-passwall/root/usr/share/passwall/iptables.sh @@ -742,32 +742,30 @@ add_firewall_rule() { ipset -! create $IPSET_WHITELIST6 nethash family inet6 maxelem 1048576 timeout 172800 ipset -! create $IPSET_BLOCKLIST6 nethash family inet6 maxelem 1048576 timeout 172800 - #分流规则的IP列表 - process_shunt_rules() { - local _node=$1 - local node_protocol=$(config_n_get $_node protocol) - if [ "$node_protocol" = "_shunt" ]; then - local default_node_id=$(config_n_get $_node default_node "_direct") - local shunt_ids=$(uci show $CONFIG | grep "=shunt_rules" | awk -F '.' '{print $2}' | awk -F '=' '{print $1}') - for shunt_id in $shunt_ids; do - local _node_id=$(config_n_get $_node $shunt_id "nil") - [ "$_node_id" != "nil" ] && { - [ "$_node_id" = "_default" ] && _node_id=$default_node_id - if [ "$_node_id" = "_direct" ]; then - config_n_get $shunt_id ip_list | tr -s "\r\n" "\n" | sed -e "/^$/d" | grep -E "(\.((2(5[0-5]|[0-4][0-9]))|[0-1]?[0-9]{1,2})){3}" | sed -e "s/^/add $IPSET_WHITELIST &/g" -e "s/$/ timeout 0/g" | awk '{print $0} END{print "COMMIT"}' | ipset -! -R - config_n_get $shunt_id ip_list | tr -s "\r\n" "\n" | sed -e "/^$/d" | grep -E "([A-Fa-f0-9]{1,4}::?){1,7}[A-Fa-f0-9]{1,4}" | sed -e "s/^/add $IPSET_WHITELIST6 &/g" -e "s/$/ timeout 0/g" | awk '{print $0} END{print "COMMIT"}' | ipset -! -R - else - config_n_get $shunt_id ip_list | tr -s "\r\n" "\n" | sed -e "/^$/d" | grep -E "(\.((2(5[0-5]|[0-4][0-9]))|[0-1]?[0-9]{1,2})){3}" | sed -e "s/^/add $IPSET_SHUNTLIST &/g" -e "s/$/ timeout 0/g" | awk '{print $0} END{print "COMMIT"}' | ipset -! -R - [ "$PROXY_IPV6" = "1" ] && { - config_n_get $shunt_id ip_list | tr -s "\r\n" "\n" | sed -e "/^$/d" | grep -E "([A-Fa-f0-9]{1,4}::?){1,7}[A-Fa-f0-9]{1,4}" | sed -e "s/^/add $IPSET_SHUNTLIST6 &/g" -e "s/$/ timeout 0/g" | awk '{print $0} END{print "COMMIT"}' | ipset -! -R - } - fi - } + #分流规则的IP列表(使用分流节点时导入) + local USE_SHUNT_NODE=0 + for _node in $TCP_NODE $UDP_NODE; do + node_protocol=$(config_n_get $_node protocol) + [ "$node_protocol" = "_shunt" ] && { USE_SHUNT_NODE=1; break; } + done + [ "$USE_SHUNT_NODE" = "0" ] && { + for acl_section in $(uci show ${CONFIG} | grep "=acl_rule" | cut -d '.' -sf 2 | cut -d '=' -sf 1); do + [ "$(config_n_get $acl_section enabled)" != "1" ] && continue + for _node in $(config_n_get $acl_section tcp_node) $(config_n_get $acl_section udp_node); do + node_protocol=$(config_n_get $_node protocol) + [ "$node_protocol" = "_shunt" ] && { USE_SHUNT_NODE=1; break 2; } done - fi + done + } + [ "$USE_SHUNT_NODE" = "1" ] && { + local shunt_ids=$(uci show $CONFIG | grep "=shunt_rules" | awk -F '.' '{print $2}' | awk -F '=' '{print $1}') + for shunt_id in $shunt_ids; do + config_n_get $shunt_id ip_list | tr -s "\r\n" "\n" | sed -e "/^$/d" | grep -E "(\.((2(5[0-5]|[0-4][0-9]))|[0-1]?[0-9]{1,2})){3}" | sed -e "s/^/add $IPSET_SHUNTLIST &/g" -e "s/$/ timeout 0/g" | awk '{print $0} END{print "COMMIT"}' | ipset -! -R + [ "$PROXY_IPV6" = "1" ] && { + config_n_get $shunt_id ip_list | tr -s "\r\n" "\n" | sed -e "/^$/d" | grep -E "([A-Fa-f0-9]{1,4}::?){1,7}[A-Fa-f0-9]{1,4}" | sed -e "s/^/add $IPSET_SHUNTLIST6 &/g" -e "s/$/ timeout 0/g" | awk '{print $0} END{print "COMMIT"}' | ipset -! -R + } + done } - [ "$TCP_NODE" ] && process_shunt_rules $TCP_NODE - [ "$UDP_NODE" ] && [ "$TCP_UDP" = "0" ] && process_shunt_rules $UDP_NODE cat $RULES_PATH/chnroute | tr -s '\n' | grep -v "^#" | sed -e "/^$/d" | sed -e "s/^/add $IPSET_CHN &/g" -e "s/$/ timeout 0/g" | awk '{print $0} END{print "COMMIT"}' | ipset -! -R cat $RULES_PATH/proxy_ip | tr -s '\n' | grep -v "^#" | sed -e "/^$/d" | grep -E "(\.((2(5[0-5]|[0-4][0-9]))|[0-1]?[0-9]{1,2})){3}" | sed -e "s/^/add $IPSET_BLACKLIST &/g" -e "s/$/ timeout 0/g" | awk '{print $0} END{print "COMMIT"}' | ipset -! -R diff --git a/small/luci-app-passwall/root/usr/share/passwall/nftables.sh b/small/luci-app-passwall/root/usr/share/passwall/nftables.sh index dbffc089dd..60b2049dd9 100755 --- a/small/luci-app-passwall/root/usr/share/passwall/nftables.sh +++ b/small/luci-app-passwall/root/usr/share/passwall/nftables.sh @@ -166,9 +166,8 @@ insert_nftset() { fi mkdir -p $TMP_PATH2/nftset cat > "$TMP_PATH2/nftset/$nftset_name" <<-EOF - #define $nftset_name = {$nftset_elements} - #add element $NFTABLE_NAME $nftset_name \$$nftset_name - add element $NFTABLE_NAME $nftset_name {$nftset_elements} + define $nftset_name = {$nftset_elements} + add element $NFTABLE_NAME $nftset_name \$$nftset_name EOF nft -f "$TMP_PATH2/nftset/$nftset_name" rm -rf "$TMP_PATH2/nftset" @@ -828,32 +827,30 @@ add_firewall_rule() { gen_nftset $NFTSET_BLOCKLIST6 ipv6_addr "2d" 0 $(cat $RULES_PATH/block_ip | tr -s '\n' | grep -v "^#" | grep -E "([A-Fa-f0-9]{1,4}::?){1,7}[A-Fa-f0-9]{1,4}") gen_nftset $NFTSET_SHUNTLIST6 ipv6_addr "2d" 0 - #分流规则的IP列表 - process_shunt_rules() { - local _node=$1 - local node_protocol=$(config_n_get $_node protocol) - if [ "$node_protocol" = "_shunt" ]; then - local default_node_id=$(config_n_get $_node default_node "_direct") - local shunt_ids=$(uci show $CONFIG | grep "=shunt_rules" | awk -F '.' '{print $2}' | awk -F '=' '{print $1}') - for shunt_id in $shunt_ids; do - local _node_id=$(config_n_get $_node $shunt_id "nil") - [ "$_node_id" != "nil" ] && { - [ "$_node_id" = "_default" ] && _node_id=$default_node_id - if [ "$_node_id" = "_direct" ]; then - insert_nftset $NFTSET_WHITELIST "0" $(config_n_get $shunt_id ip_list | tr -s "\r\n" "\n" | sed -e "/^$/d" | grep -E "(\.((2(5[0-5]|[0-4][0-9]))|[0-1]?[0-9]{1,2})){3}") - insert_nftset $NFTSET_WHITELIST6 "0" $(config_n_get $shunt_id ip_list | tr -s "\r\n" "\n" | sed -e "/^$/d" | grep -E "([A-Fa-f0-9]{1,4}::?){1,7}[A-Fa-f0-9]{1,4}") - else - insert_nftset $NFTSET_SHUNTLIST "0" $(config_n_get $shunt_id ip_list | tr -s "\r\n" "\n" | sed -e "/^$/d" | grep -E "(\.((2(5[0-5]|[0-4][0-9]))|[0-1]?[0-9]{1,2})){3}") - [ "$PROXY_IPV6" = "1" ] && { - insert_nftset $NFTSET_SHUNTLIST6 "0" $(config_n_get $shunt_id ip_list | tr -s "\r\n" "\n" | sed -e "/^$/d" | grep -E "([A-Fa-f0-9]{1,4}::?){1,7}[A-Fa-f0-9]{1,4}") - } - fi - } + #分流规则的IP列表(使用分流节点时导入) + local USE_SHUNT_NODE=0 + for _node in $TCP_NODE $UDP_NODE; do + node_protocol=$(config_n_get $_node protocol) + [ "$node_protocol" = "_shunt" ] && { USE_SHUNT_NODE=1; break; } + done + [ "$USE_SHUNT_NODE" = "0" ] && { + for acl_section in $(uci show ${CONFIG} | grep "=acl_rule" | cut -d '.' -sf 2 | cut -d '=' -sf 1); do + [ "$(config_n_get $acl_section enabled)" != "1" ] && continue + for _node in $(config_n_get $acl_section tcp_node) $(config_n_get $acl_section udp_node); do + node_protocol=$(config_n_get $_node protocol) + [ "$node_protocol" = "_shunt" ] && { USE_SHUNT_NODE=1; break 2; } done - fi + done + } + [ "$USE_SHUNT_NODE" = "1" ] && { + local shunt_ids=$(uci show $CONFIG | grep "=shunt_rules" | awk -F '.' '{print $2}' | awk -F '=' '{print $1}') + for shunt_id in $shunt_ids; do + insert_nftset $NFTSET_SHUNTLIST "0" $(config_n_get $shunt_id ip_list | tr -s "\r\n" "\n" | sed -e "/^$/d" | grep -E "(\.((2(5[0-5]|[0-4][0-9]))|[0-1]?[0-9]{1,2})){3}") + [ "$PROXY_IPV6" = "1" ] && { + insert_nftset $NFTSET_SHUNTLIST6 "0" $(config_n_get $shunt_id ip_list | tr -s "\r\n" "\n" | sed -e "/^$/d" | grep -E "([A-Fa-f0-9]{1,4}::?){1,7}[A-Fa-f0-9]{1,4}") + } + done } - [ "$TCP_NODE" ] && process_shunt_rules $TCP_NODE - [ "$UDP_NODE" ] && [ "$TCP_UDP" = "0" ] && process_shunt_rules $UDP_NODE # 忽略特殊IP段 local lan_ifname lan_ip diff --git a/small/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua b/small/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua index 300923ac48..b2cb81bdde 100644 --- a/small/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua +++ b/small/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua @@ -16,36 +16,15 @@ s = m:section(TypedSection, "server_subscribe") s.anonymous = true o = s:option(Flag, "auto_update", translate("Auto Update")) +o.rmempty = false o.description = translate("Auto Update Server subscription, GFW list and CHN route") -o = s:option(ListValue, "auto_update_week_time", translate("Update Time (Every Week)")) -o:value('*', translate("Every Day")) -o:value("1", translate("Every Monday")) -o:value("2", translate("Every Tuesday")) -o:value("3", translate("Every Wednesday")) -o:value("4", translate("Every Thursday")) -o:value("5", translate("Every Friday")) -o:value("6", translate("Every Saturday")) -o:value("0", translate("Every Sunday")) -o.default = "*" -o.rmempty = false -o:depends("auto_update", "1") - -o = s:option(ListValue, "auto_update_day_time", translate("Update time (every day)")) +o = s:option(ListValue, "auto_update_time", translate("Update time (every day)")) for t = 0, 23 do o:value(t, t .. ":00") end o.default = 2 o.rmempty = false -o:depends("auto_update", "1") - -o = s:option(ListValue, "auto_update_min_time", translate("Update Interval (min)")) -for i = 0, 59 do - o:value(i, i .. ":00") -end -o.default = 30 -o.rmempty = false -o:depends("auto_update", "1") o = s:option(DynamicList, "subscribe_url", translate("Subscribe URL")) o.rmempty = true diff --git a/small/luci-app-ssr-plus/po/zh_Hans/ssr-plus.po b/small/luci-app-ssr-plus/po/zh_Hans/ssr-plus.po index db336897d0..18f19a7ebc 100644 --- a/small/luci-app-ssr-plus/po/zh_Hans/ssr-plus.po +++ b/small/luci-app-ssr-plus/po/zh_Hans/ssr-plus.po @@ -596,36 +596,6 @@ msgstr "格式为 IP:PORT(默认:禁用)" msgid "Update time (every day)" msgstr "更新时间(每天)" -msgid "Update Time (Every Week)" -msgstr "更新时间(每周)" - -msgid "Update Interval (min)" -msgstr "更新间隔 (分钟)" - -msgid "Every Day" -msgstr "每天" - -msgid "Every Monday" -msgstr "每周一" - -msgid "Every Tuesday" -msgstr "每周二" - -msgid "Every Wednesday" -msgstr "每周三" - -msgid "Every Thursday" -msgstr "每周四" - -msgid "Every Friday" -msgstr "每周五" - -msgid "Every Saturday" -msgstr "每周六" - -msgid "Every Sunday" -msgstr "每周日" - msgid "Auto Update Server subscription, GFW list and CHN route" msgstr "自动更新服务器订阅、GFW 列表和中国大陆 IP 段" diff --git a/small/luci-app-ssr-plus/root/etc/init.d/shadowsocksr b/small/luci-app-ssr-plus/root/etc/init.d/shadowsocksr index b212b902ef..4029a07438 100755 --- a/small/luci-app-ssr-plus/root/etc/init.d/shadowsocksr +++ b/small/luci-app-ssr-plus/root/etc/init.d/shadowsocksr @@ -61,12 +61,12 @@ PS="/bin/busybox ps" uci_get_by_name() { local ret=$(uci get $NAME.$1.$2 2>/dev/null) - echo "${ret:=$3}" + echo ${ret:=$3} } uci_get_by_type() { local ret=$(uci get $NAME.@$1[0].$2 2>/dev/null) - echo "${ret:=$3}" + echo ${ret:=$3} } uci_set_by_name() { @@ -81,7 +81,7 @@ uci_set_by_type() { uci_get_by_cfgid() { local ret=$(uci show $NAME.@$1[0].$2 | awk -F '.' '{print $2}' 2>/dev/null) - echo "${ret:=$3}" + echo ${ret:=$3} } get_host_ip() { @@ -120,7 +120,7 @@ echolog() { add_cron() { touch $CRON_FILE sed -i '/ssrplus.log/d' $CRON_FILE - [ $(uci_get_by_type server_subscribe auto_update 0) -eq 1 ] && echo "$(uci_get_by_type server_subscribe auto_update_min_time) $(uci_get_by_type server_subscribe auto_update_day_time) * * $(uci_get_by_type server_subscribe auto_update_week_time) /usr/share/shadowsocksr/ssrplusupdate.sh >$LOG_FILE" >>$CRON_FILE + [ $(uci_get_by_type server_subscribe auto_update 0) -eq 1 ] && echo "0 $(uci_get_by_type server_subscribe auto_update_time) * * * /usr/share/shadowsocksr/ssrplusupdate.sh >$LOG_FILE" >>$CRON_FILE crontab $CRON_FILE } diff --git a/small/luci-app-ssr-plus/root/usr/share/shadowsocksr/shadowsocksr.config b/small/luci-app-ssr-plus/root/usr/share/shadowsocksr/shadowsocksr.config index 9a9276098d..6d9f287498 100644 --- a/small/luci-app-ssr-plus/root/usr/share/shadowsocksr/shadowsocksr.config +++ b/small/luci-app-ssr-plus/root/usr/share/shadowsocksr/shadowsocksr.config @@ -22,10 +22,8 @@ config global config server_subscribe option proxy '0' + option auto_update_time '2' option auto_update '1' - option auto_update_week_time '*' - option auto_update_day_time '2' - option auto_update_min_time '0' option filter_words '过期时间/剩余流量/QQ群/官网/防失联地址/回国' config access_control diff --git a/small/mihomo/Makefile b/small/mihomo/Makefile index 79f513fe77..fb69e37940 100644 --- a/small/mihomo/Makefile +++ b/small/mihomo/Makefile @@ -1,13 +1,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mihomo -PKG_RELEASE:=3 +PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/MetaCubeX/mihomo.git -PKG_SOURCE_DATE:=2024-11-05 -PKG_SOURCE_VERSION:=ce52c3438bf5c09f1fe58f6034a9ff7ee4ac3c25 -PKG_MIRROR_HASH:=5df3e7e3e9aceb0ec1facde407d973cb5395a1b1a595aa587d59f138ebb8ba29 +PKG_SOURCE_DATE:=2024-11-14 +PKG_SOURCE_VERSION:=de19f927e86573a7a97159e3b9925049f06d4563 +PKG_MIRROR_HASH:=931d397995b2da9e97f3f050d4650fa9013980d6c523df40bca3b58822a42409 PKG_LICENSE:=MIT PKG_MAINTAINER:=Joseph Mory @@ -16,7 +16,7 @@ PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 PKG_BUILD_FLAGS:=no-mips16 -PKG_BUILD_VERSION:=alpha-ce52c34 +PKG_BUILD_VERSION:=alpha-de19f92 PKG_BUILD_TIME:=$(shell date -u -Iseconds) GO_PKG:=github.com/metacubex/mihomo diff --git a/v2rayn/v2rayN/PacLib/PacHandler.cs b/v2rayn/v2rayN/PacLib/PacHandler.cs index 1481b94d39..6801c69b78 100644 --- a/v2rayn/v2rayN/PacLib/PacHandler.cs +++ b/v2rayn/v2rayN/PacLib/PacHandler.cs @@ -11,11 +11,11 @@ public class PacHandler private static int _httpPort; private static int _pacPort; private static TcpListener? _tcpListener; - private static string _pacText; + private static byte[] _writeContent; private static bool _isRunning; private static bool _needRestart = true; - public static void Start(string configPath, int httpPort, int pacPort) + public static async Task Start(string configPath, int httpPort, int pacPort) { _needRestart = (configPath != _configPath || httpPort != _httpPort || pacPort != _pacPort || !_isRunning); @@ -23,7 +23,7 @@ public class PacHandler _httpPort = httpPort; _pacPort = pacPort; - InitText(); + await InitText(); if (_needRestart) { @@ -32,15 +32,24 @@ public class PacHandler } } - private static void InitText() + private static async Task InitText() { var path = Path.Combine(_configPath, "pac.txt"); if (!File.Exists(path)) { - File.AppendAllText(path, Resources.ResourceManager.GetString("pac")); + await File.AppendAllTextAsync(path, Resources.ResourceManager.GetString("pac")); } - _pacText = File.ReadAllText(path).Replace("__PROXY__", $"PROXY 127.0.0.1:{_httpPort};DIRECT;"); + var pacText = (await File.ReadAllTextAsync(path)).Replace("__PROXY__", $"PROXY 127.0.0.1:{_httpPort};DIRECT;"); + + var sb = new StringBuilder(); + sb.AppendLine("HTTP/1.0 200 OK"); + sb.AppendLine("Content-type:application/x-ns-proxy-autoconfig"); + sb.AppendLine("Connection:close"); + sb.AppendLine("Content-Length:" + Encoding.UTF8.GetByteCount(pacText)); + sb.AppendLine(); + sb.Append(pacText); + _writeContent = Encoding.UTF8.GetBytes(sb.ToString()); } private static void RunListener() @@ -60,21 +69,8 @@ public class PacHandler continue; } - var client = _tcpListener.AcceptTcpClient(); - await Task.Run(() => - { - var stream = client.GetStream(); - var sb = new StringBuilder(); - sb.AppendLine("HTTP/1.0 200 OK"); - sb.AppendLine("Content-type:application/x-ns-proxy-autoconfig"); - sb.AppendLine("Connection:close"); - sb.AppendLine("Content-Length:" + Encoding.UTF8.GetByteCount(_pacText)); - sb.AppendLine(); - sb.Append(_pacText); - var content = Encoding.UTF8.GetBytes(sb.ToString()); - stream.Write(content, 0, content.Length); - stream.Flush(); - }); + var client = await _tcpListener.AcceptTcpClientAsync(); + await Task.Run(() => { WriteContent(client); }); } catch { @@ -84,6 +80,13 @@ public class PacHandler }, TaskCreationOptions.LongRunning); } + private static void WriteContent(TcpClient client) + { + var stream = client.GetStream(); + stream.Write(_writeContent, 0, _writeContent.Length); + stream.Flush(); + } + public static void Stop() { if (_tcpListener == null) return; diff --git a/v2rayn/v2rayN/ServiceLib/Common/DesUtils.cs b/v2rayn/v2rayN/ServiceLib/Common/DesUtils.cs new file mode 100644 index 0000000000..132fff65e6 --- /dev/null +++ b/v2rayn/v2rayN/ServiceLib/Common/DesUtils.cs @@ -0,0 +1,75 @@ +using System.Security.Cryptography; +using System.Text; + +namespace ServiceLib.Common +{ + public class DesUtils + { + /// + /// Encrypt + /// + /// + /// /// + /// + public static string Encrypt(string? text, string? key = null) + { + if (text.IsNullOrEmpty()) + { + return string.Empty; + } + GetKeyIv(key ?? GetDefaultKey(), out var rgbKey, out var rgbIv); + var dsp = DES.Create(); + using var memStream = new MemoryStream(); + using var cryStream = new CryptoStream(memStream, dsp.CreateEncryptor(rgbKey, rgbIv), CryptoStreamMode.Write); + using var sWriter = new StreamWriter(cryStream); + sWriter.Write(text); + sWriter.Flush(); + cryStream.FlushFinalBlock(); + memStream.Flush(); + return Convert.ToBase64String(memStream.GetBuffer(), 0, (int)memStream.Length); + } + + /// + /// Decrypt + /// + /// + /// + /// + public static string Decrypt(string? encryptText, string? key = null) + { + if (encryptText.IsNullOrEmpty()) + { + return string.Empty; + } + GetKeyIv(key ?? GetDefaultKey(), out var rgbKey, out var rgbIv); + var dsp = DES.Create(); + var buffer = Convert.FromBase64String(encryptText); + + using var memStream = new MemoryStream(); + using var cryStream = new CryptoStream(memStream, dsp.CreateDecryptor(rgbKey, rgbIv), CryptoStreamMode.Write); + cryStream.Write(buffer, 0, buffer.Length); + cryStream.FlushFinalBlock(); + return Encoding.UTF8.GetString(memStream.ToArray()); + } + + private static void GetKeyIv(string key, out byte[] rgbKey, out byte[] rgbIv) + { + if (key.IsNullOrEmpty()) + { + throw new ArgumentNullException("The key cannot be null"); + } + if (key.Length <= 8) + { + throw new ArgumentNullException("The key length cannot be less than 8 characters."); + } + + rgbKey = Encoding.ASCII.GetBytes(key.Substring(0, 8)); + rgbIv = Encoding.ASCII.GetBytes(key.Insert(0, "w").Substring(0, 8)); + } + + private static string GetDefaultKey() + { + return Utils.GetMd5(Utils.GetHomePath() + "DesUtils"); + } + } +} \ No newline at end of file diff --git a/v2rayn/v2rayN/ServiceLib/Handler/CoreHandler.cs b/v2rayn/v2rayN/ServiceLib/Handler/CoreHandler.cs index cd8cdf51cb..6ebb80e8f9 100644 --- a/v2rayn/v2rayN/ServiceLib/Handler/CoreHandler.cs +++ b/v2rayn/v2rayN/ServiceLib/Handler/CoreHandler.cs @@ -261,7 +261,7 @@ namespace ServiceLib.Handler return _config.TunModeItem.EnableTun && eCoreType == ECoreType.sing_box && Utils.IsLinux() - && _config.TunModeItem.LinuxSudoPassword.IsNotEmpty() + && _config.TunModeItem.LinuxSudoPwd.IsNotEmpty() ; } @@ -299,7 +299,8 @@ namespace ServiceLib.Handler if (isNeedSudo) { proc.StartInfo.FileName = $"/bin/sudo"; - proc.StartInfo.Arguments = $"-S {fileName} {string.Format(coreInfo.Arguments, configPath)}"; + proc.StartInfo.Arguments = $"-S {fileName} {string.Format(coreInfo.Arguments, Utils.GetConfigPath(configPath))}"; + proc.StartInfo.WorkingDirectory = null; proc.StartInfo.StandardInputEncoding = Encoding.UTF8; proc.StartInfo.RedirectStandardInput = true; } @@ -328,10 +329,11 @@ namespace ServiceLib.Handler if (isNeedSudo) { + var pwd = DesUtils.Decrypt(_config.TunModeItem.LinuxSudoPwd); await Task.Delay(10); - await proc.StandardInput.WriteLineAsync(_config.TunModeItem.LinuxSudoPassword); + await proc.StandardInput.WriteLineAsync(pwd); await Task.Delay(10); - await proc.StandardInput.WriteLineAsync(_config.TunModeItem.LinuxSudoPassword); + await proc.StandardInput.WriteLineAsync(pwd); } if (displayLog) diff --git a/v2rayn/v2rayN/ServiceLib/Handler/SysProxy/SysProxyHandler.cs b/v2rayn/v2rayN/ServiceLib/Handler/SysProxy/SysProxyHandler.cs index d6735e4b46..de2ac9db64 100644 --- a/v2rayn/v2rayN/ServiceLib/Handler/SysProxy/SysProxyHandler.cs +++ b/v2rayn/v2rayN/ServiceLib/Handler/SysProxy/SysProxyHandler.cs @@ -33,15 +33,10 @@ namespace ServiceLib.Handler.SysProxy await ProxySettingLinux.SetProxy(Global.Loopback, port); break; - case ESysProxyType.ForcedChange: - { - if (Utils.IsOSX()) - { - await ProxySettingOSX.SetProxy(Global.Loopback, port); - } + case ESysProxyType.ForcedChange when Utils.IsOSX(): + await ProxySettingOSX.SetProxy(Global.Loopback, port); + break; - break; - } case ESysProxyType.ForcedClear when Utils.IsWindows(): ProxySettingWindows.UnsetProxy(); break; @@ -50,23 +45,13 @@ namespace ServiceLib.Handler.SysProxy await ProxySettingLinux.UnsetProxy(); break; - case ESysProxyType.ForcedClear: - { - if (Utils.IsOSX()) - { - await ProxySettingOSX.UnsetProxy(); - } + case ESysProxyType.ForcedClear when Utils.IsOSX(): + await ProxySettingOSX.UnsetProxy(); + break; - break; - } case ESysProxyType.Pac when Utils.IsWindows(): - { - var portPac = AppHandler.Instance.GetLocalPort(EInboundProtocol.pac); - PacHandler.Start(Utils.GetConfigPath(), port, portPac); - var strProxy = $"{Global.HttpProtocol}{Global.Loopback}:{portPac}/pac?t={DateTime.Now.Ticks}"; - ProxySettingWindows.SetProxy(strProxy, "", 4); - break; - } + await SetWindowsProxyPac(port); + break; } if (type != ESysProxyType.Pac && Utils.IsWindows()) @@ -102,5 +87,13 @@ namespace ServiceLib.Handler.SysProxy .Replace("{socks_port}", portSocks.ToString()); } } + + private static async Task SetWindowsProxyPac(int port) + { + var portPac = AppHandler.Instance.GetLocalPort(EInboundProtocol.pac); + await PacHandler.Start(Utils.GetConfigPath(), port, portPac); + var strProxy = $"{Global.HttpProtocol}{Global.Loopback}:{portPac}/pac?t={DateTime.Now.Ticks}"; + ProxySettingWindows.SetProxy(strProxy, "", 4); + } } } \ No newline at end of file diff --git a/v2rayn/v2rayN/ServiceLib/Models/ConfigItems.cs b/v2rayn/v2rayN/ServiceLib/Models/ConfigItems.cs index 8ec47b8880..7de1794cd8 100644 --- a/v2rayn/v2rayN/ServiceLib/Models/ConfigItems.cs +++ b/v2rayn/v2rayN/ServiceLib/Models/ConfigItems.cs @@ -80,7 +80,7 @@ public bool IgnoreGeoUpdateCore { get; set; } = true; public int AutoUpdateInterval { get; set; } - + public bool EnableSecurityProtocolTls13 { get; set; } public int TrayMenuServersLimit { get; set; } = 20; @@ -116,6 +116,7 @@ public bool EnableDragDropSort { get; set; } public bool DoubleClick2Activate { get; set; } public bool AutoHideStartup { get; set; } + public bool Hide2TrayWhenClose { get; set; } public List MainColumnItem { get; set; } public bool ShowInTaskbar { get; set; } } @@ -161,7 +162,7 @@ public int Mtu { get; set; } public bool EnableExInbound { get; set; } public bool EnableIPv6Address { get; set; } - public string? LinuxSudoPassword { get; set; } + public string? LinuxSudoPwd { get; set; } } [Serializable] diff --git a/v2rayn/v2rayN/ServiceLib/Resx/ResUI.Designer.cs b/v2rayn/v2rayN/ServiceLib/Resx/ResUI.Designer.cs index 3056864126..a439d7c0f2 100644 --- a/v2rayn/v2rayN/ServiceLib/Resx/ResUI.Designer.cs +++ b/v2rayn/v2rayN/ServiceLib/Resx/ResUI.Designer.cs @@ -3103,6 +3103,15 @@ namespace ServiceLib.Resx { } } + /// + /// 查找类似 Hide to tray when closing the window 的本地化字符串。 + /// + public static string TbSettingsHide2TrayWhenClose { + get { + return ResourceManager.GetString("TbSettingsHide2TrayWhenClose", resourceCulture); + } + } + /// /// 查找类似 HTTP Port 的本地化字符串。 /// @@ -3176,7 +3185,7 @@ namespace ServiceLib.Resx { } /// - /// 查找类似 The password will only be stored in the local file. 的本地化字符串。 + /// 查找类似 The password is encrypted and stored only in local files. 的本地化字符串。 /// public static string TbSettingsLinuxSudoPasswordTip { get { diff --git a/v2rayn/v2rayN/ServiceLib/Resx/ResUI.fa-Ir.resx b/v2rayn/v2rayN/ServiceLib/Resx/ResUI.fa-Ir.resx index 991c9fe2f5..937d107fe9 100644 --- a/v2rayn/v2rayN/ServiceLib/Resx/ResUI.fa-Ir.resx +++ b/v2rayn/v2rayN/ServiceLib/Resx/ResUI.fa-Ir.resx @@ -1373,7 +1373,7 @@ Linux system sudo password - The password will only be stored in the local file. + The password is encrypted and stored only in local files. Please set the sudo password in Tun mode settings first @@ -1387,4 +1387,7 @@ XHTTP Extra raw JSON, format: { XHTTPObject } + + Hide to tray when closing the window + \ No newline at end of file diff --git a/v2rayn/v2rayN/ServiceLib/Resx/ResUI.resx b/v2rayn/v2rayN/ServiceLib/Resx/ResUI.resx index 9c69dc9584..af6a2c9ee6 100644 --- a/v2rayn/v2rayN/ServiceLib/Resx/ResUI.resx +++ b/v2rayn/v2rayN/ServiceLib/Resx/ResUI.resx @@ -1373,7 +1373,7 @@ Linux system sudo password - The password will only be stored in the local file. + The password is encrypted and stored only in local files. Please set the sudo password in Tun mode settings first @@ -1387,4 +1387,7 @@ XHTTP Extra raw JSON, format: { XHTTPObject } + + Hide to tray when closing the window + \ No newline at end of file diff --git a/v2rayn/v2rayN/ServiceLib/Resx/ResUI.ru.resx b/v2rayn/v2rayN/ServiceLib/Resx/ResUI.ru.resx index 2039501378..8758825cd1 100644 --- a/v2rayn/v2rayN/ServiceLib/Resx/ResUI.ru.resx +++ b/v2rayn/v2rayN/ServiceLib/Resx/ResUI.ru.resx @@ -1373,7 +1373,7 @@ Linux system sudo password - The password will only be stored in the local file. + The password is encrypted and stored only in local files. Please set the sudo password in Tun mode settings first @@ -1387,4 +1387,7 @@ XHTTP Extra raw JSON, format: { XHTTPObject } + + Hide to tray when closing the window + \ No newline at end of file diff --git a/v2rayn/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx b/v2rayn/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx index 1863182505..9fd66a6e4f 100644 --- a/v2rayn/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx +++ b/v2rayn/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx @@ -1370,7 +1370,7 @@ Linux系统的sudo密码 - 密码只会存储在本地文件中,没有密码无法开启Tun + 密码已加密且只存储在本地文件中,无密码无法开启Tun 请先在Tun模式设置中设置sudo密码 @@ -1384,4 +1384,7 @@ XHTTP Extra 原始 JSON,格式: { XHTTPObject } + + 关闭窗口时隐藏至托盘 + \ No newline at end of file diff --git a/v2rayn/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx b/v2rayn/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx index c68e0da65f..c452a2ff61 100644 --- a/v2rayn/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx +++ b/v2rayn/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx @@ -1370,7 +1370,7 @@ Linux系統的sudo密碼 - 密碼只會儲存在本機檔案中,沒有密碼無法開啟Tun + 密碼已加密且只儲存在本機檔案中,無密碼無法開啟Tun 請先在Tun模式設定中設定sudo密碼 @@ -1384,4 +1384,7 @@ XHTTP Extra 原始 JSON,格式: { XHTTPObject } + + 關閉視窗時隱藏至托盤 + \ No newline at end of file diff --git a/v2rayn/v2rayN/ServiceLib/ServiceLib.csproj b/v2rayn/v2rayN/ServiceLib/ServiceLib.csproj index 83d73e70b2..ecd130e615 100644 --- a/v2rayn/v2rayN/ServiceLib/ServiceLib.csproj +++ b/v2rayn/v2rayN/ServiceLib/ServiceLib.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 7.1.0 + 7.1.1 diff --git a/v2rayn/v2rayN/ServiceLib/ViewModels/CheckUpdateViewModel.cs b/v2rayn/v2rayN/ServiceLib/ViewModels/CheckUpdateViewModel.cs index a62c3f2a02..5890d614bd 100644 --- a/v2rayn/v2rayN/ServiceLib/ViewModels/CheckUpdateViewModel.cs +++ b/v2rayn/v2rayN/ServiceLib/ViewModels/CheckUpdateViewModel.cs @@ -267,7 +267,7 @@ namespace ServiceLib.ViewModels var filesList = (new DirectoryInfo(toPath)).GetFiles().Select(u => u.FullName).ToList(); foreach (var file in filesList) { - await Utils.SetLinuxChmod(Path.Combine(toPath, item.CoreType)); + await Utils.SetLinuxChmod(Path.Combine(toPath, item.CoreType.ToLower())); } } diff --git a/v2rayn/v2rayN/ServiceLib/ViewModels/OptionSettingViewModel.cs b/v2rayn/v2rayN/ServiceLib/ViewModels/OptionSettingViewModel.cs index 40aadacad0..53fe1df6a1 100644 --- a/v2rayn/v2rayN/ServiceLib/ViewModels/OptionSettingViewModel.cs +++ b/v2rayn/v2rayN/ServiceLib/ViewModels/OptionSettingViewModel.cs @@ -53,6 +53,7 @@ namespace ServiceLib.ViewModels [Reactive] public bool EnableUpdateSubOnlyRemarksExist { get; set; } [Reactive] public bool EnableSecurityProtocolTls13 { get; set; } [Reactive] public bool AutoHideStartup { get; set; } + [Reactive] public bool Hide2TrayWhenClose { get; set; } [Reactive] public bool EnableDragDropSort { get; set; } [Reactive] public bool DoubleClick2Activate { get; set; } [Reactive] public int AutoUpdateInterval { get; set; } @@ -166,6 +167,7 @@ namespace ServiceLib.ViewModels EnableUpdateSubOnlyRemarksExist = _config.UiItem.EnableUpdateSubOnlyRemarksExist; EnableSecurityProtocolTls13 = _config.GuiItem.EnableSecurityProtocolTls13; AutoHideStartup = _config.UiItem.AutoHideStartup; + Hide2TrayWhenClose = _config.UiItem.Hide2TrayWhenClose; EnableDragDropSort = _config.UiItem.EnableDragDropSort; DoubleClick2Activate = _config.UiItem.DoubleClick2Activate; AutoUpdateInterval = _config.GuiItem.AutoUpdateInterval; @@ -198,7 +200,7 @@ namespace ServiceLib.ViewModels TunMtu = _config.TunModeItem.Mtu; TunEnableExInbound = _config.TunModeItem.EnableExInbound; TunEnableIPv6Address = _config.TunModeItem.EnableIPv6Address; - TunLinuxSudoPassword = _config.TunModeItem.LinuxSudoPassword; + TunLinuxSudoPassword = _config.TunModeItem.LinuxSudoPwd; #endregion Tun mode @@ -316,6 +318,7 @@ namespace ServiceLib.ViewModels _config.UiItem.EnableUpdateSubOnlyRemarksExist = EnableUpdateSubOnlyRemarksExist; _config.GuiItem.EnableSecurityProtocolTls13 = EnableSecurityProtocolTls13; _config.UiItem.AutoHideStartup = AutoHideStartup; + _config.UiItem.Hide2TrayWhenClose = Hide2TrayWhenClose; _config.GuiItem.AutoUpdateInterval = AutoUpdateInterval; _config.UiItem.EnableDragDropSort = EnableDragDropSort; _config.UiItem.DoubleClick2Activate = DoubleClick2Activate; @@ -342,7 +345,10 @@ namespace ServiceLib.ViewModels _config.TunModeItem.Mtu = TunMtu; _config.TunModeItem.EnableExInbound = TunEnableExInbound; _config.TunModeItem.EnableIPv6Address = TunEnableIPv6Address; - _config.TunModeItem.LinuxSudoPassword = TunLinuxSudoPassword; + if (TunLinuxSudoPassword != _config.TunModeItem.LinuxSudoPwd) + { + _config.TunModeItem.LinuxSudoPwd = DesUtils.Encrypt(TunLinuxSudoPassword); + } //coreType await SaveCoreType(); diff --git a/v2rayn/v2rayN/ServiceLib/ViewModels/StatusBarViewModel.cs b/v2rayn/v2rayN/ServiceLib/ViewModels/StatusBarViewModel.cs index 47c7312a24..3298f63639 100644 --- a/v2rayn/v2rayN/ServiceLib/ViewModels/StatusBarViewModel.cs +++ b/v2rayn/v2rayN/ServiceLib/ViewModels/StatusBarViewModel.cs @@ -440,7 +440,7 @@ namespace ServiceLib.ViewModels } else if (Utils.IsLinux()) { - return _config.TunModeItem.LinuxSudoPassword.IsNotEmpty(); + return _config.TunModeItem.LinuxSudoPwd.IsNotEmpty(); } return false; } diff --git a/v2rayn/v2rayN/v2rayN.Desktop/Views/MainWindow.axaml.cs b/v2rayn/v2rayN/v2rayN.Desktop/Views/MainWindow.axaml.cs index 377e4689e0..a0ac88f89b 100644 --- a/v2rayn/v2rayN/v2rayN.Desktop/Views/MainWindow.axaml.cs +++ b/v2rayn/v2rayN/v2rayN.Desktop/Views/MainWindow.axaml.cs @@ -382,7 +382,7 @@ namespace v2rayN.Desktop.Views #endregion Event #region UI - + public void ShowHideWindow(bool? blShow) { var bl = blShow ?? !_config.UiItem.ShowInTaskbar; @@ -398,7 +398,7 @@ namespace v2rayN.Desktop.Views } else { - if (Utils.IsWindows()) + if (_config.UiItem.Hide2TrayWhenClose) { this.Hide(); } diff --git a/v2rayn/v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml b/v2rayn/v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml index 6176dfe360..7f3408670e 100644 --- a/v2rayn/v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml +++ b/v2rayn/v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml @@ -489,6 +489,18 @@ HorizontalAlignment="Left" Classes="Margin8" /> + + + Classes="Margin8" /> vm.EnableUpdateSubOnlyRemarksExist, v => v.togEnableUpdateSubOnlyRemarksExist.IsChecked).DisposeWith(disposables); this.Bind(ViewModel, vm => vm.EnableSecurityProtocolTls13, v => v.togEnableSecurityProtocolTls13.IsChecked).DisposeWith(disposables); this.Bind(ViewModel, vm => vm.AutoHideStartup, v => v.togAutoHideStartup.IsChecked).DisposeWith(disposables); + this.Bind(ViewModel, vm => vm.Hide2TrayWhenClose, v => v.togHide2TrayWhenClose.IsChecked).DisposeWith(disposables); this.Bind(ViewModel, vm => vm.DoubleClick2Activate, v => v.togDoubleClick2Activate.IsChecked).DisposeWith(disposables); this.Bind(ViewModel, vm => vm.AutoUpdateInterval, v => v.txtautoUpdateInterval.Text).DisposeWith(disposables); this.Bind(ViewModel, vm => vm.CurrentFontFamily, v => v.cmbcurrentFontFamily.SelectedValue).DisposeWith(disposables); diff --git a/v2rayng/V2rayNG/app/build.gradle.kts b/v2rayng/V2rayNG/app/build.gradle.kts index 244165858e..e90855be45 100644 --- a/v2rayng/V2rayNG/app/build.gradle.kts +++ b/v2rayng/V2rayNG/app/build.gradle.kts @@ -1,11 +1,11 @@ plugins { - id("com.android.application") - id("org.jetbrains.kotlin.android") + alias(libs.plugins.android.application) + alias(libs.plugins.kotlin.android) } android { namespace = "com.v2ray.ang" - compileSdk = 34 + compileSdk = 35 defaultConfig { applicationId = "com.v2ray.ang" @@ -14,6 +14,7 @@ android { versionCode = 612 versionName = "1.9.16" multiDexEnabled = true + splits { abi { isEnable = true @@ -27,20 +28,16 @@ android { } } + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" } - compileOptions { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 - } buildTypes { release { isMinifyEnabled = false - - } - debug { - isMinifyEnabled = false - + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro" + ) } } @@ -50,8 +47,13 @@ android { } } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } kotlinOptions { - jvmTarget = JavaVersion.VERSION_1_8.toString() + jvmTarget = JavaVersion.VERSION_11.toString() } applicationVariants.all { @@ -69,7 +71,8 @@ android { output.outputFileName = "v2rayNG_${variant.versionName}_${abi}.apk" if (versionCodes.containsKey(abi)) { - output.versionCodeOverride = (1000000 * versionCodes[abi]!!).plus(variant.versionCode) + output.versionCodeOverride = + (1000000 * versionCodes[abi]!!).plus(variant.versionCode) } else { return@forEach } @@ -86,49 +89,60 @@ android { useLegacyPackaging = true } } + } dependencies { + // Core Libraries implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.aar", "*.jar")))) - testImplementation(libs.junit) - testImplementation(libs.org.mockito.mockito.inline) - testImplementation(libs.mockito.kotlin) - implementation(libs.flexbox) - // Androidx - implementation(libs.constraintlayout) - implementation(libs.legacy.support.v4) - implementation(libs.appcompat) - implementation(libs.material) - implementation(libs.cardview) + // AndroidX Core Libraries + implementation(libs.androidx.core.ktx) + implementation(libs.androidx.appcompat) + implementation(libs.androidx.activity) + implementation(libs.androidx.constraintlayout) implementation(libs.preference.ktx) implementation(libs.recyclerview) - implementation(libs.fragment.ktx) - implementation(libs.multidex) - implementation(libs.viewpager2) - // Androidx ktx - implementation(libs.activity.ktx) + // UI Libraries + implementation(libs.material) + implementation(libs.toastcompat) + implementation(libs.editorkit) + implementation(libs.flexbox) + + // Data and Storage Libraries + implementation(libs.mmkv.static) + implementation(libs.gson) + + // Reactive and Utility Libraries + implementation(libs.rxjava) + implementation(libs.rxandroid) + implementation(libs.rxpermissions) + + // Language and Processing Libraries + implementation(libs.language.base) + implementation(libs.language.json) + + // Intent and Utility Libraries + implementation(libs.quickie.bundled) + implementation(libs.core) + + // AndroidX Lifecycle and Architecture Components implementation(libs.lifecycle.viewmodel.ktx) implementation(libs.lifecycle.livedata.ktx) implementation(libs.lifecycle.runtime.ktx) - //kotlin - implementation(libs.kotlin.reflect) - implementation(libs.kotlinx.coroutines.core) - implementation(libs.kotlinx.coroutines.android) - - implementation(libs.mmkv.static) - implementation(libs.gson) - implementation(libs.rxjava) - implementation(libs.rxandroid) - implementation(libs.rxpermissions) - implementation(libs.toastcompat) - implementation(libs.editorkit) - implementation(libs.language.base) - implementation(libs.language.json) - implementation(libs.quickie.bundled) - implementation(libs.core) + // Background Task Libraries implementation(libs.work.runtime.ktx) implementation(libs.work.multiprocess) -} \ No newline at end of file + + // Multidex Support + implementation(libs.multidex) + + // Testing Libraries + testImplementation(libs.junit) + androidTestImplementation(libs.androidx.junit) + androidTestImplementation(libs.androidx.espresso.core) + testImplementation(libs.org.mockito.mockito.inline) + testImplementation(libs.mockito.kotlin) +} diff --git a/v2rayng/V2rayNG/app/proguard-rules.pro b/v2rayng/V2rayNG/app/proguard-rules.pro index e69de29bb2..481bb43481 100644 --- a/v2rayng/V2rayNG/app/proguard-rules.pro +++ b/v2rayng/V2rayNG/app/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/AngApplication.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/AngApplication.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/AngApplication.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/AngApplication.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/AppConfig.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/AppConfig.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/AppConfig.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/AppConfig.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/AppInfo.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/dto/AppInfo.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/AppInfo.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/dto/AppInfo.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/AssetUrlItem.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/dto/AssetUrlItem.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/AssetUrlItem.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/dto/AssetUrlItem.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/ConfigResult.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/dto/ConfigResult.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/ConfigResult.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/dto/ConfigResult.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/EConfigType.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/dto/EConfigType.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/EConfigType.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/dto/EConfigType.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/Hysteria2Bean.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/dto/Hysteria2Bean.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/Hysteria2Bean.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/dto/Hysteria2Bean.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/Language.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/dto/Language.kt similarity index 89% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/Language.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/dto/Language.kt index c517bc75c0..c3a8d9ba4e 100644 --- a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/Language.kt +++ b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/dto/Language.kt @@ -8,7 +8,8 @@ enum class Language(val code: String) { VIETNAMESE("vi"), RUSSIAN("ru"), PERSIAN("fa"), - BANGLA("bn"); + BANGLA("bn"), + BAKHTIARI("bqi-rIR"); companion object { fun fromCode(code: String): Language { diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/NetworkType.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/dto/NetworkType.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/NetworkType.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/dto/NetworkType.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/ProfileItem.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/dto/ProfileItem.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/ProfileItem.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/dto/ProfileItem.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/ProfileLiteItem.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/dto/ProfileLiteItem.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/ProfileLiteItem.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/dto/ProfileLiteItem.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/RoutingType.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/dto/RoutingType.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/RoutingType.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/dto/RoutingType.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/RulesetItem.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/dto/RulesetItem.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/RulesetItem.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/dto/RulesetItem.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/ServerAffiliationInfo.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/dto/ServerAffiliationInfo.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/ServerAffiliationInfo.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/dto/ServerAffiliationInfo.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/ServerConfig.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/dto/ServerConfig.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/ServerConfig.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/dto/ServerConfig.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/ServersCache.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/dto/ServersCache.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/ServersCache.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/dto/ServersCache.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/SubscriptionItem.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/dto/SubscriptionItem.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/SubscriptionItem.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/dto/SubscriptionItem.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/V2rayConfig.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/dto/V2rayConfig.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/V2rayConfig.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/dto/V2rayConfig.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/VmessQRCode.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/dto/VmessQRCode.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/VmessQRCode.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/dto/VmessQRCode.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/extension/_Ext.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/extension/_Ext.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/extension/_Ext.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/extension/_Ext.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/fmt/CustomFmt.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/fmt/CustomFmt.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/fmt/CustomFmt.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/fmt/CustomFmt.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/fmt/FmtBase.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/fmt/FmtBase.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/fmt/FmtBase.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/fmt/FmtBase.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/fmt/HttpFmt.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/fmt/HttpFmt.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/fmt/HttpFmt.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/fmt/HttpFmt.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/fmt/Hysteria2Fmt.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/fmt/Hysteria2Fmt.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/fmt/Hysteria2Fmt.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/fmt/Hysteria2Fmt.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/fmt/ShadowsocksFmt.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/fmt/ShadowsocksFmt.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/fmt/ShadowsocksFmt.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/fmt/ShadowsocksFmt.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/fmt/SocksFmt.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/fmt/SocksFmt.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/fmt/SocksFmt.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/fmt/SocksFmt.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/fmt/TrojanFmt.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/fmt/TrojanFmt.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/fmt/TrojanFmt.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/fmt/TrojanFmt.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/fmt/VlessFmt.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/fmt/VlessFmt.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/fmt/VlessFmt.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/fmt/VlessFmt.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/fmt/VmessFmt.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/fmt/VmessFmt.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/fmt/VmessFmt.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/fmt/VmessFmt.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/fmt/WireguardFmt.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/fmt/WireguardFmt.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/fmt/WireguardFmt.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/fmt/WireguardFmt.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/handler/AngConfigManager.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/handler/AngConfigManager.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/handler/AngConfigManager.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/handler/AngConfigManager.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/handler/MigrateManager.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/handler/MigrateManager.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/handler/MigrateManager.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/handler/MigrateManager.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/handler/MmkvManager.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/handler/MmkvManager.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/handler/MmkvManager.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/handler/MmkvManager.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/handler/SettingsManager.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/handler/SettingsManager.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/handler/SettingsManager.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/handler/SettingsManager.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/handler/V2rayConfigManager.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/handler/V2rayConfigManager.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/handler/V2rayConfigManager.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/handler/V2rayConfigManager.kt diff --git a/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/helper/ItemTouchHelperAdapter.java b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/helper/ItemTouchHelperAdapter.kt similarity index 53% rename from v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/helper/ItemTouchHelperAdapter.java rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/helper/ItemTouchHelperAdapter.kt index 566feffcce..8707d16fa3 100644 --- a/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/helper/ItemTouchHelperAdapter.java +++ b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/helper/ItemTouchHelperAdapter.kt @@ -13,46 +13,41 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - -package com.v2ray.ang.helper; - -import androidx.recyclerview.widget.ItemTouchHelper; -import androidx.recyclerview.widget.RecyclerView; +package com.v2ray.ang.helper /** - * Interface to listen for a move or dismissal event from a {@link ItemTouchHelper.Callback}. + * Interface to listen for a move or dismissal event from a [ItemTouchHelper.Callback]. * * @author Paul Burke (ipaulpro) */ -public interface ItemTouchHelperAdapter { - +interface ItemTouchHelperAdapter { /** * Called when an item has been dragged far enough to trigger a move. This is called every time - * an item is shifted, and not at the end of a "drop" event.
- *
- * Implementations should call {@link RecyclerView.Adapter#notifyItemMoved(int, int)} after + * an item is shifted, and **not** at the end of a "drop" event.

+ *

+ * Implementations should call [RecyclerView.Adapter.notifyItemMoved] after * adjusting the underlying data to reflect this move. * * @param fromPosition The start position of the moved item. * @param toPosition Then resolved position of the moved item. * @return True if the item was moved to the new adapter position. - * @see RecyclerView#getAdapterPositionFor(RecyclerView.ViewHolder) - * @see RecyclerView.ViewHolder#getAdapterPosition() + * @see RecyclerView.getAdapterPositionFor + * @see RecyclerView.ViewHolder.getAdapterPosition */ - boolean onItemMove(int fromPosition, int toPosition); + fun onItemMove(fromPosition: Int, toPosition: Int): Boolean - void onItemMoveCompleted(); + fun onItemMoveCompleted() /** - * Called when an item has been dismissed by a swipe.
- *
- * Implementations should call {@link RecyclerView.Adapter#notifyItemRemoved(int)} after + * Called when an item has been dismissed by a swipe.

+ *

+ * Implementations should call [RecyclerView.Adapter.notifyItemRemoved] after * adjusting the underlying data to reflect this removal. * * @param position The position of the item dismissed. - * @see RecyclerView#getAdapterPositionFor(RecyclerView.ViewHolder) - * @see RecyclerView.ViewHolder#getAdapterPosition() + * @see RecyclerView.getAdapterPositionFor + * @see RecyclerView.ViewHolder.getAdapterPosition */ - void onItemDismiss(int position); + fun onItemDismiss(position: Int) } diff --git a/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/helper/ItemTouchHelperViewHolder.java b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/helper/ItemTouchHelperViewHolder.kt similarity index 67% rename from v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/helper/ItemTouchHelperViewHolder.java rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/helper/ItemTouchHelperViewHolder.kt index 149768fc1e..75655b0c85 100644 --- a/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/helper/ItemTouchHelperViewHolder.java +++ b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/helper/ItemTouchHelperViewHolder.kt @@ -13,29 +13,26 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +package com.v2ray.ang.helper -package com.v2ray.ang.helper; - -import androidx.recyclerview.widget.ItemTouchHelper; +import androidx.recyclerview.widget.ItemTouchHelper /** - * Interface to notify an item ViewHolder of relevant callbacks from {@link - * ItemTouchHelper.Callback}. + * Interface to notify an item ViewHolder of relevant callbacks from [ ]. * * @author Paul Burke (ipaulpro) */ -public interface ItemTouchHelperViewHolder { - +interface ItemTouchHelperViewHolder { /** - * Called when the {@link ItemTouchHelper} first registers an item as being moved or swiped. + * Called when the [ItemTouchHelper] first registers an item as being moved or swiped. * Implementations should update the item view to indicate it's active state. */ - void onItemSelected(); + fun onItemSelected() /** - * Called when the {@link ItemTouchHelper} has completed the move or swipe, and the active item + * Called when the [ItemTouchHelper] has completed the move or swipe, and the active item * state should be cleared. */ - void onItemClear(); + fun onItemClear() } diff --git a/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/helper/SimpleItemTouchHelperCallback.java b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/helper/SimpleItemTouchHelperCallback.java deleted file mode 100644 index e4e5845d45..0000000000 --- a/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/helper/SimpleItemTouchHelperCallback.java +++ /dev/null @@ -1,160 +0,0 @@ -/* - * Copyright (C) 2015 Paul Burke - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.v2ray.ang.helper; - -import android.animation.ValueAnimator; -import android.graphics.Canvas; -import android.view.animation.DecelerateInterpolator; - -import androidx.annotation.NonNull; -import androidx.recyclerview.widget.GridLayoutManager; -import androidx.recyclerview.widget.ItemTouchHelper; -import androidx.recyclerview.widget.RecyclerView; - -/** - * An implementation of {@link ItemTouchHelper.Callback} that enables basic drag & drop and - * swipe-to-dismiss. Drag events are automatically started by an item long-press.
- *
- * Expects the RecyclerView.Adapter to listen for {@link - * ItemTouchHelperAdapter} callbacks and the RecyclerView.ViewHolder to implement - * {@link ItemTouchHelperViewHolder}. - * - * @author Paul Burke (ipaulpro) - */ -public class SimpleItemTouchHelperCallback extends ItemTouchHelper.Callback { - - private static final float ALPHA_FULL = 1.0f; - private static final float SWIPE_THRESHOLD = 0.25f; - private static final long ANIMATION_DURATION = 200; - - private final ItemTouchHelperAdapter mAdapter; - private ValueAnimator mReturnAnimator; - - public SimpleItemTouchHelperCallback(ItemTouchHelperAdapter adapter) { - mAdapter = adapter; - } - - @Override - public boolean isLongPressDragEnabled() { - return true; - } - - @Override - public boolean isItemViewSwipeEnabled() { - return true; - } - - @Override - public int getMovementFlags(@NonNull RecyclerView recyclerView, @NonNull RecyclerView.ViewHolder viewHolder) { - if (recyclerView.getLayoutManager() instanceof GridLayoutManager) { - final int dragFlags = ItemTouchHelper.UP | ItemTouchHelper.DOWN | ItemTouchHelper.LEFT | ItemTouchHelper.RIGHT; - final int swipeFlags = ItemTouchHelper.START | ItemTouchHelper.END; - return makeMovementFlags(dragFlags, swipeFlags); - } else { - final int dragFlags = ItemTouchHelper.UP | ItemTouchHelper.DOWN; - final int swipeFlags = ItemTouchHelper.START | ItemTouchHelper.END; - return makeMovementFlags(dragFlags, swipeFlags); - } - } - - @Override - public boolean onMove(@NonNull RecyclerView recyclerView, @NonNull RecyclerView.ViewHolder source, @NonNull RecyclerView.ViewHolder target) { - if (source.getItemViewType() != target.getItemViewType()) { - return false; - } - mAdapter.onItemMove(source.getBindingAdapterPosition(), target.getBindingAdapterPosition()); - return true; - } - - @Override - public void onSwiped(@NonNull RecyclerView.ViewHolder viewHolder, int direction) { - // 不执行删除操作,仅返回项目到原位 - returnViewToOriginalPosition(viewHolder); - } - - @Override - public void onChildDraw(@NonNull Canvas c, @NonNull RecyclerView recyclerView, - @NonNull RecyclerView.ViewHolder viewHolder, - float dX, float dY, int actionState, boolean isCurrentlyActive) { - if (actionState == ItemTouchHelper.ACTION_STATE_SWIPE) { - float maxSwipeDistance = viewHolder.itemView.getWidth() * SWIPE_THRESHOLD; - float swipeAmount = Math.abs(dX); - float direction = Math.signum(dX); - - // 限制最大滑动距离 - float translationX = Math.min(swipeAmount, maxSwipeDistance) * direction; - float alpha = ALPHA_FULL - Math.min(swipeAmount, maxSwipeDistance) / maxSwipeDistance; - - viewHolder.itemView.setTranslationX(translationX); - viewHolder.itemView.setAlpha(alpha); - - if (swipeAmount >= maxSwipeDistance && isCurrentlyActive) { - returnViewToOriginalPosition(viewHolder); - } - } else { - super.onChildDraw(c, recyclerView, viewHolder, dX, dY, actionState, isCurrentlyActive); - } - } - - private void returnViewToOriginalPosition(RecyclerView.ViewHolder viewHolder) { - if (mReturnAnimator != null && mReturnAnimator.isRunning()) { - mReturnAnimator.cancel(); - } - - mReturnAnimator = ValueAnimator.ofFloat(viewHolder.itemView.getTranslationX(), 0f); - mReturnAnimator.addUpdateListener(animation -> { - float value = (float) animation.getAnimatedValue(); - viewHolder.itemView.setTranslationX(value); - viewHolder.itemView.setAlpha(1f - Math.abs(value) / (viewHolder.itemView.getWidth() * SWIPE_THRESHOLD)); - }); - mReturnAnimator.setInterpolator(new DecelerateInterpolator()); - mReturnAnimator.setDuration(ANIMATION_DURATION); - mReturnAnimator.start(); - } - - @Override - public void onSelectedChanged(RecyclerView.ViewHolder viewHolder, int actionState) { - if (actionState != ItemTouchHelper.ACTION_STATE_IDLE) { - if (viewHolder instanceof ItemTouchHelperViewHolder) { - ItemTouchHelperViewHolder itemViewHolder = (ItemTouchHelperViewHolder) viewHolder; - itemViewHolder.onItemSelected(); - } - } - super.onSelectedChanged(viewHolder, actionState); - } - - @Override - public void clearView(@NonNull RecyclerView recyclerView, @NonNull RecyclerView.ViewHolder viewHolder) { - super.clearView(recyclerView, viewHolder); - viewHolder.itemView.setAlpha(ALPHA_FULL); - if (viewHolder instanceof ItemTouchHelperViewHolder) { - ItemTouchHelperViewHolder itemViewHolder = (ItemTouchHelperViewHolder) viewHolder; - itemViewHolder.onItemClear(); - } - mAdapter.onItemMoveCompleted(); - } - - @Override - public float getSwipeThreshold(@NonNull RecyclerView.ViewHolder viewHolder) { - return 1.1f; // 设置一个大于1的值,确保不会触发默认的滑动删除操作 - } - - @Override - public float getSwipeEscapeVelocity(float defaultValue) { - return defaultValue * 10; // 增加滑动逃逸速度,使得更难触发滑动 - } -} diff --git a/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/helper/SimpleItemTouchHelperCallback.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/helper/SimpleItemTouchHelperCallback.kt new file mode 100644 index 0000000000..ff61aadc38 --- /dev/null +++ b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/helper/SimpleItemTouchHelperCallback.kt @@ -0,0 +1,148 @@ +/* + * Copyright (C) 2015 Paul Burke + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.v2ray.ang.helper + +import android.animation.ValueAnimator +import android.animation.ValueAnimator.AnimatorUpdateListener +import android.graphics.Canvas +import android.view.animation.DecelerateInterpolator +import androidx.recyclerview.widget.GridLayoutManager +import androidx.recyclerview.widget.ItemTouchHelper +import androidx.recyclerview.widget.RecyclerView +import kotlin.math.abs +import kotlin.math.min +import kotlin.math.sign + +/** + * An implementation of [ItemTouchHelper.Callback] that enables basic drag & drop and + * swipe-to-dismiss. Drag events are automatically started by an item long-press.

+ * + * Expects the `RecyclerView.Adapter` to listen for [ ] callbacks and the `RecyclerView.ViewHolder` to implement + * [ItemTouchHelperViewHolder]. + * + * @author Paul Burke (ipaulpro) + */ +class SimpleItemTouchHelperCallback(private val mAdapter: ItemTouchHelperAdapter) : ItemTouchHelper.Callback() { + private var mReturnAnimator: ValueAnimator? = null + + override fun isLongPressDragEnabled(): Boolean = true + + override fun isItemViewSwipeEnabled(): Boolean = true + + override fun getMovementFlags( + recyclerView: RecyclerView, + viewHolder: RecyclerView.ViewHolder + ): Int { + val dragFlags: Int + val swipeFlags: Int + if (recyclerView.layoutManager is GridLayoutManager) { + dragFlags = ItemTouchHelper.UP or ItemTouchHelper.DOWN or ItemTouchHelper.LEFT or ItemTouchHelper.RIGHT + swipeFlags = ItemTouchHelper.START or ItemTouchHelper.END + } else { + dragFlags = ItemTouchHelper.UP or ItemTouchHelper.DOWN + swipeFlags = ItemTouchHelper.START or ItemTouchHelper.END + } + return makeMovementFlags(dragFlags, swipeFlags) + } + + override fun onMove( + recyclerView: RecyclerView, + source: RecyclerView.ViewHolder, + target: RecyclerView.ViewHolder + ): Boolean { + return if (source.itemViewType != target.itemViewType) { + false + } else { + mAdapter.onItemMove(source.bindingAdapterPosition, target.bindingAdapterPosition) + true + } + } + + override fun onSwiped(viewHolder: RecyclerView.ViewHolder, direction: Int) { + // Do not delete; simply return item to original position + returnViewToOriginalPosition(viewHolder) + } + + override fun onChildDraw( + c: Canvas, recyclerView: RecyclerView, + viewHolder: RecyclerView.ViewHolder, + dX: Float, dY: Float, actionState: Int, isCurrentlyActive: Boolean + ) { + if (actionState == ItemTouchHelper.ACTION_STATE_SWIPE) { + val maxSwipeDistance = viewHolder.itemView.width * SWIPE_THRESHOLD + val swipeAmount = abs(dX) + val direction = sign(dX) + + // Limit maximum swipe distance + val translationX = min(swipeAmount, maxSwipeDistance) * direction + val alpha = ALPHA_FULL - min(swipeAmount, maxSwipeDistance) / maxSwipeDistance + + viewHolder.itemView.translationX = translationX + viewHolder.itemView.alpha = alpha + + if (swipeAmount >= maxSwipeDistance && isCurrentlyActive) { + returnViewToOriginalPosition(viewHolder) + } + } else { + super.onChildDraw(c, recyclerView, viewHolder, dX, dY, actionState, isCurrentlyActive) + } + } + + private fun returnViewToOriginalPosition(viewHolder: RecyclerView.ViewHolder) { + mReturnAnimator?.takeIf { it.isRunning }?.cancel() + + mReturnAnimator = ValueAnimator.ofFloat(viewHolder.itemView.translationX, 0f).apply { + addUpdateListener { animation -> + val value = animation.animatedValue as Float + viewHolder.itemView.translationX = value + viewHolder.itemView.alpha = (1f - abs(value) / (viewHolder.itemView.width * SWIPE_THRESHOLD)) + } + interpolator = DecelerateInterpolator() + duration = ANIMATION_DURATION + start() + } + } + + override fun onSelectedChanged(viewHolder: RecyclerView.ViewHolder?, actionState: Int) { + if (actionState != ItemTouchHelper.ACTION_STATE_IDLE && viewHolder is ItemTouchHelperViewHolder) { + viewHolder.onItemSelected() + } + super.onSelectedChanged(viewHolder, actionState) + } + + override fun clearView(recyclerView: RecyclerView, viewHolder: RecyclerView.ViewHolder) { + super.clearView(recyclerView, viewHolder) + viewHolder.itemView.alpha = ALPHA_FULL + if (viewHolder is ItemTouchHelperViewHolder) { + viewHolder.onItemClear() + } + mAdapter.onItemMoveCompleted() + } + + override fun getSwipeThreshold(viewHolder: RecyclerView.ViewHolder): Float { + return 1.1f // Set a value greater than 1 to prevent default swipe delete + } + + override fun getSwipeEscapeVelocity(defaultValue: Float): Float { + return defaultValue * 10 // Increase swipe escape velocity to make swipe harder to trigger + } + + companion object { + private const val ALPHA_FULL = 1.0f + private const val SWIPE_THRESHOLD = 0.25f + private const val ANIMATION_DURATION: Long = 200 + } +} \ No newline at end of file diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/plugin/NativePlugin.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/plugin/NativePlugin.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/plugin/NativePlugin.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/plugin/NativePlugin.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/plugin/Plugin.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/plugin/Plugin.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/plugin/Plugin.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/plugin/Plugin.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/plugin/PluginContract.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/plugin/PluginContract.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/plugin/PluginContract.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/plugin/PluginContract.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/plugin/PluginList.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/plugin/PluginList.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/plugin/PluginList.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/plugin/PluginList.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/plugin/PluginManager.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/plugin/PluginManager.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/plugin/PluginManager.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/plugin/PluginManager.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/plugin/ResolvedPlugin.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/plugin/ResolvedPlugin.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/plugin/ResolvedPlugin.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/plugin/ResolvedPlugin.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/receiver/BootReceiver.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/receiver/BootReceiver.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/receiver/BootReceiver.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/receiver/BootReceiver.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/receiver/TaskerReceiver.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/receiver/TaskerReceiver.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/receiver/TaskerReceiver.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/receiver/TaskerReceiver.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/receiver/WidgetProvider.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/receiver/WidgetProvider.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/receiver/WidgetProvider.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/receiver/WidgetProvider.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/service/ProcessService.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/service/ProcessService.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/service/ProcessService.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/service/ProcessService.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/service/QSTileService.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/service/QSTileService.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/service/QSTileService.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/service/QSTileService.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/service/ServiceControl.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/service/ServiceControl.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/service/ServiceControl.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/service/ServiceControl.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/service/SubscriptionUpdater.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/service/SubscriptionUpdater.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/service/SubscriptionUpdater.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/service/SubscriptionUpdater.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/service/V2RayProxyOnlyService.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/service/V2RayProxyOnlyService.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/service/V2RayProxyOnlyService.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/service/V2RayProxyOnlyService.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/service/V2RayServiceManager.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/service/V2RayServiceManager.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/service/V2RayServiceManager.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/service/V2RayServiceManager.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/service/V2RayTestService.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/service/V2RayTestService.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/service/V2RayTestService.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/service/V2RayTestService.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/service/V2RayVpnService.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/service/V2RayVpnService.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/service/V2RayVpnService.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/service/V2RayVpnService.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/AboutActivity.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/ui/AboutActivity.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/AboutActivity.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/ui/AboutActivity.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/BaseActivity.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/ui/BaseActivity.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/BaseActivity.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/ui/BaseActivity.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/FragmentAdapter.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/ui/FragmentAdapter.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/FragmentAdapter.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/ui/FragmentAdapter.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/LogcatActivity.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/ui/LogcatActivity.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/LogcatActivity.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/ui/LogcatActivity.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/MainActivity.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/ui/MainActivity.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/MainActivity.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/ui/MainActivity.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/MainRecyclerAdapter.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/ui/MainRecyclerAdapter.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/MainRecyclerAdapter.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/ui/MainRecyclerAdapter.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/PerAppProxyActivity.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/ui/PerAppProxyActivity.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/PerAppProxyActivity.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/ui/PerAppProxyActivity.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/PerAppProxyAdapter.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/ui/PerAppProxyAdapter.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/PerAppProxyAdapter.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/ui/PerAppProxyAdapter.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/RoutingEditActivity.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/ui/RoutingEditActivity.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/RoutingEditActivity.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/ui/RoutingEditActivity.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/RoutingSettingActivity.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/ui/RoutingSettingActivity.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/RoutingSettingActivity.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/ui/RoutingSettingActivity.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/RoutingSettingRecyclerAdapter.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/ui/RoutingSettingRecyclerAdapter.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/RoutingSettingRecyclerAdapter.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/ui/RoutingSettingRecyclerAdapter.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/ScScannerActivity.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/ui/ScScannerActivity.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/ScScannerActivity.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/ui/ScScannerActivity.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/ScSwitchActivity.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/ui/ScSwitchActivity.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/ScSwitchActivity.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/ui/ScSwitchActivity.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/ScannerActivity.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/ui/ScannerActivity.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/ScannerActivity.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/ui/ScannerActivity.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/ServerActivity.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/ui/ServerActivity.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/ServerActivity.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/ui/ServerActivity.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/ServerCustomConfigActivity.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/ui/ServerCustomConfigActivity.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/ServerCustomConfigActivity.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/ui/ServerCustomConfigActivity.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/SettingsActivity.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/ui/SettingsActivity.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/SettingsActivity.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/ui/SettingsActivity.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/SubEditActivity.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/ui/SubEditActivity.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/SubEditActivity.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/ui/SubEditActivity.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/SubSettingActivity.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/ui/SubSettingActivity.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/SubSettingActivity.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/ui/SubSettingActivity.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/SubSettingRecyclerAdapter.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/ui/SubSettingRecyclerAdapter.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/SubSettingRecyclerAdapter.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/ui/SubSettingRecyclerAdapter.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/TaskerActivity.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/ui/TaskerActivity.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/TaskerActivity.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/ui/TaskerActivity.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/UrlSchemeActivity.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/ui/UrlSchemeActivity.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/UrlSchemeActivity.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/ui/UrlSchemeActivity.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/UserAssetActivity.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/ui/UserAssetActivity.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/UserAssetActivity.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/ui/UserAssetActivity.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/UserAssetUrlActivity.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/ui/UserAssetUrlActivity.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/UserAssetUrlActivity.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/ui/UserAssetUrlActivity.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/util/AppManagerUtil.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/util/AppManagerUtil.kt similarity index 83% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/util/AppManagerUtil.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/util/AppManagerUtil.kt index 28107108ce..8ce94751ab 100644 --- a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/util/AppManagerUtil.kt +++ b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/util/AppManagerUtil.kt @@ -13,13 +13,11 @@ object AppManagerUtil { val apps = ArrayList() for (pkg in packages) { - //if (!pkg.hasInternetPermission && pkg.packageName != "android") continue - - val applicationInfo = pkg.applicationInfo + val applicationInfo = pkg.applicationInfo ?: continue val appName = applicationInfo.loadLabel(packageManager).toString() - val appIcon = applicationInfo.loadIcon(packageManager) - val isSystemApp = applicationInfo.flags and ApplicationInfo.FLAG_SYSTEM > 0 + val appIcon = applicationInfo.loadIcon(packageManager) ?: continue + val isSystemApp = (applicationInfo.flags and ApplicationInfo.FLAG_SYSTEM) > 0 val appInfo = AppInfo(appName, pkg.packageName, appIcon, isSystemApp, 0) apps.add(appInfo) diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/util/JsonUtil.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/util/JsonUtil.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/util/JsonUtil.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/util/JsonUtil.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/util/MessageUtil.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/util/MessageUtil.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/util/MessageUtil.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/util/MessageUtil.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/util/MyContextWrapper.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/util/MyContextWrapper.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/util/MyContextWrapper.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/util/MyContextWrapper.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/util/PluginUtil.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/util/PluginUtil.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/util/PluginUtil.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/util/PluginUtil.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/util/QRCodeDecoder.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/util/QRCodeDecoder.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/util/QRCodeDecoder.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/util/QRCodeDecoder.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/util/SpeedtestUtil.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/util/SpeedtestUtil.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/util/SpeedtestUtil.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/util/SpeedtestUtil.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/util/Utils.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/util/Utils.kt similarity index 96% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/util/Utils.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/util/Utils.kt index 6a278b8929..a919512166 100644 --- a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/util/Utils.kt +++ b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/util/Utils.kt @@ -131,7 +131,8 @@ object Utils { * get remote dns servers from preference */ fun getRemoteDnsServers(): List { - val remoteDns = MmkvManager.decodeSettingsString(AppConfig.PREF_REMOTE_DNS) ?: AppConfig.DNS_PROXY + val remoteDns = + MmkvManager.decodeSettingsString(AppConfig.PREF_REMOTE_DNS) ?: AppConfig.DNS_PROXY val ret = remoteDns.split(",").filter { isPureIpAddress(it) || isCoreDNSAddress(it) } if (ret.isEmpty()) { return listOf(AppConfig.DNS_PROXY) @@ -149,7 +150,8 @@ object Utils { * get remote dns servers from preference */ fun getDomesticDnsServers(): List { - val domesticDns = MmkvManager.decodeSettingsString(AppConfig.PREF_DOMESTIC_DNS) ?: AppConfig.DNS_DIRECT + val domesticDns = + MmkvManager.decodeSettingsString(AppConfig.PREF_DOMESTIC_DNS) ?: AppConfig.DNS_DIRECT val ret = domesticDns.split(",").filter { isPureIpAddress(it) || isCoreDNSAddress(it) } if (ret.isEmpty()) { return listOf(AppConfig.DNS_DIRECT) @@ -357,7 +359,11 @@ object Utils { } @Throws(IOException::class) - fun getUrlContentWithCustomUserAgent(urlStr: String?, timeout: Int = 30000, httpPort: Int = 0): String { + fun getUrlContentWithCustomUserAgent( + urlStr: String?, + timeout: Int = 30000, + httpPort: Int = 0 + ): String { val url = URL(urlStr) val conn = if (httpPort == 0) { url.openConnection() @@ -410,7 +416,8 @@ object Utils { } fun getLocale(): Locale { - val langCode = MmkvManager.decodeSettingsString(AppConfig.PREF_LANGUAGE) ?: Language.AUTO.code + val langCode = + MmkvManager.decodeSettingsString(AppConfig.PREF_LANGUAGE) ?: Language.AUTO.code val language = Language.fromCode(langCode) return when (language) { @@ -422,6 +429,7 @@ object Utils { Language.RUSSIAN -> Locale("ru") Language.PERSIAN -> Locale("fa") Language.BANGLA -> Locale("bn") + Language.BAKHTIARI -> Locale("bqi", "IR") } } @@ -455,7 +463,8 @@ object Utils { return if (second) { AppConfig.DelayTestUrl2 } else { - MmkvManager.decodeSettingsString(AppConfig.PREF_DELAY_TEST_URL) ?: AppConfig.DelayTestUrl + MmkvManager.decodeSettingsString(AppConfig.PREF_DELAY_TEST_URL) + ?: AppConfig.DelayTestUrl } } diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/util/ZipUtil.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/util/ZipUtil.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/util/ZipUtil.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/util/ZipUtil.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/viewmodel/MainViewModel.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/viewmodel/MainViewModel.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/viewmodel/MainViewModel.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/viewmodel/MainViewModel.kt diff --git a/v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/viewmodel/SettingsViewModel.kt b/v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/viewmodel/SettingsViewModel.kt similarity index 100% rename from v2rayng/V2rayNG/app/src/main/kotlin/com/v2ray/ang/viewmodel/SettingsViewModel.kt rename to v2rayng/V2rayNG/app/src/main/java/com/v2ray/ang/viewmodel/SettingsViewModel.kt diff --git a/v2rayng/V2rayNG/app/src/main/res/values-bqi-rIR/strings.xml b/v2rayng/V2rayNG/app/src/main/res/values-bqi-rIR/strings.xml new file mode 100644 index 0000000000..a741e2eb94 --- /dev/null +++ b/v2rayng/V2rayNG/app/src/main/res/values-bqi-rIR/strings.xml @@ -0,0 +1,327 @@ + + + v2rayNG + آلشت + آلشت + سی کرت ٱولی و کار بوردن ای ویژیی, ز برنومه سی ازاف کردن سرور استفاڌه کۊنین + گۊشیڌن نومگه کشاری + بستن نومگه کشاری + مووفقیت من جاگورویی داده + جاگورویی داده ٱنجوم نگرؽڌ + + + واڌاشتن + گرؽڌن موجوز مومکن نؽڌ + گرؽڌن موجوز وارسۊوی مومکن نؽڌ + سی گرؽڌن دۉسمندیا بیشتر کیلیک کوݩ + ره وستن خدمات + واڌاشتن خدمات + ره وستن خدمات وا مووفقیت ٱنجوم وابی + ره وستن خدمات وا مووفقیت ٱنجوم نوابی + + + فایل کانفیگ + ٱووردن کانفیگ + زفت کردن کانفیگ + پاک کردن کانفیگ + و من ٱووردن کانفیگ ز QRcode + و من ٱووردن کانفیگ ز کلیپ بورد + هؽل دستی[VMess] + هؽل دستی[VLESS] + هؽل دستی[Shadowsocks] + هؽل دستی[SOCKS] + هؽل دستی[HTTP] + هؽل دستی[Trojan] + هؽل دستی[Wireguard] + هؽل دستی[Hysteria2] + کانفیگ سفارشی + کانفیگ سفارشین ز کلیپ بورد و من بیار + کانفیگ سفارشین ز مهلی و من بیار + کانفیگ سفارشین ز آدرس اینترنتی و من بیار + نشۊوی اینترنتی اسکن کانفیگ سفارشین بزݩ + پاک بۊ؟ + پؽش ز پاک کردن کانفیگ نا موئتبر قوۊل کوݩ! پاک کردن کانفیگن قوۊل اکۊنی؟ + نیشتنا + آدرس + پورت + نوم من توری + alterId + ٱمنیت + شبکه + جاگورو + نوء head + هالت gRPC + هاست + هاست http + هاست ws + هاست httpupgrade + هاست splithttp + هاست h2 + ٱمنیت QUIC + اختیار gRPC + تور + تور ws + تور httpupgrade + تور splithttp + تور h2 + کیلیت QUIC + سید kcp + نوم خدمات gRPC + TLS + Fingerprint + Alpn + اجازه نا ٱمن + SNI + آدرس + پورت + رزم + ٱمنیت + رزم (اختیاری) + نوم من توری (اختیاری) + رزم نگاری + جریان + PublicKey + ShortId + SpiderX + SecretKey + Reserved(اختیاری, وا کاما ز یک جوڌا ابۊن) + آدرس مهلی (اختیاری IPv4/IPv6, وا کاما ز یک جوڌا ابۊن) + Mtu(اختیاری, خوتکار 1420) + وا مووفقیت ٱنجوم وابی + شکست خرد + هیچ داده ای وۊجۊڌ نڌاره + پوروتوکول نادوروست + رزم گوشایی ٱنجوم نوابی + پسند فایل کانفیگ + ی برنومه دؽوۉداری فایل بپۊرنین. + کانفیگ سفارشی + کانفیگ نا موئتبر هڌ + موئتوا + هیچ داده ای من کلیپ بورد وۊجۊڌ نڌاره + نشۊوی اینترنتی نا موئتبر هڌ + آدرس اشتراک پوروتوکول نا ٱمن HTTP ن و کار مبرین + موتمعن بۊین ک پورت وۊرۊڌی وا سامووا ی جۊر هڌ + کانفیگ زبال نؽڌ + هاست(SNI)(اختیاری) + لف گیری فایل ٱنجوم نوابی، ز ی برنومه دؽوۉداری فایل هیاری بگرین + ازاف کردن دارایی + ازاف کردن فایل + ازاف کردن آدرس اینترنتی + آدرس اینترنتی + دانلود فایلا + آدرس اینترنتی دارایین ازاف کۊنین + فایلن نجوست + ائزارات ز زیتر بیڌسۉݩ + ای کار ممنۊ هڌ + رزم Obfs + پورت گوم (درگا سرورن ز نۊ هؽل اکونه) + فاسله پورت گوم (سانیه) + pinSHA256 + + + هون بارونی بۊ + پیتینیڌن + پسند پوی + رزمان بزنین + هالت Bypass + پسند خوتکار پروکسی برنومه + موئتوا هونی دانلود ابۊن + و در کشیڌن من کلیپ بورد + و من ٱووردن ز کلیپ بورد + + + + سامووا + سامووا پؽش رئڌه + سامووا VPN + پروکسی و ری برنومه + پوی وولاتی: برنومه واجۊری بیڌه پروکسی هڌ، منپیز موستقیم بؽ نشووه هڌ. /n هالت دور زیڌن: برنومه نشووک ناڌه موستقیمن منپیز هڌ، پروکسی نشووک زیڌه نؽڌ. /n گۊزینه پسند خوتکار برنومه پروکسی من نومگه + منپیز خوتکار مجال ره ونی + مجال ره وندن خوساخوس و سرور پسند بیڌه منپیز ابۊ که گاشڌ نا مووفق بۊ. + + سامووا Mux + ره وندن Mux + زل تر، ٱما گاشڌ منپیز زی قت بۊ /n بارت دؽوۉداری، TCP، UDP و QUIC ن ای لم سفارشی کۊنین. + منپیزا TCP (تلایه منجا 1-1024) + منپیزا XUDP (تلایه منجا 1-1024) + دؽوۉداری QUIC من تونل mux + + رڌ کردن + موجاز + گوم زیڌن + + + ره وندن نشۉݩ داڌن سورعت + نشۉݩ داڌن سورعت هیم سکویی من وارسۊویا./nنماڌ وارسۊوی و ری و کار گرؽڌن آلشت ابۊ. + + ره وندن Sniffing + دامنه sniff ن ز کتن امتهۉݩ کۊنین (پؽش فرز رۊشن) + ره وندن routeOnly + ز نوم دامنه sniffed تینا سی تور جوستن استفاڌه کۊنین وو آدرس مورد نزرن و عونوان آدرس IP ووردارین. + + ره وندن DNS مهلی + DNS پردازشت وابیڌه و دس هسته ماژول DNS (پؽشنهاڌ ابۊ، ٱر نیاز هڌ ک جوستن تور وو ولات ٱسلین دور زنی) + + ره وندن DNS جئلی + DNS مهلی آدرسا IP جئلی ن وورگنه (زل تر، ٱما گاشڌ من یقرد ز برنومیل کار نکونه) + + ترجی IPv6 + ترجی داڌن نشۊوی وو تورا IPv6 + + DNS ز ره دیر (اختیاری) (udp/tcp/https/quic)(اختیاری) + DNS + + VPN DNS (تینا IPv4/v6) + + DNS منی (اختیاری) + DNS + + آدرس اینترنتی آزمایش تئخیر واقعی (http/https) + Url + + هشتن منپیزا ز LAN + پوی دسگایل ترن وا آدرس IP ایسا، ز ره socks/http و پروکسی منپیز بۊن، تینا من شبکه قابل اعتماد فعال بۊ تا ز منپیز ؛یر موجاز جلو گری بۊ. + منپیزا ز LAN ن موجار کۊنین، موتمعن بۊین ک من ی شبکه قابل ائتماڌ هڌین. + + اجازه نا ٱمن + مجال و کار بردن TLS ب تۉر پؽش فرز، موجوز نا ٱمن فعال هڌ. + + پورت پروکسی SOCKS5 + پورت پروکسی SOCKS5 + + پورت پروکسی HTTP + پورت پروکسی HTTP + + پورت DNS مهلی + پورت DNS مهلی + + قوۊل کردن پاک کردن کانفیگ + سی پاک وابیڌن فایل کانفیگ نیاز به قوۊل کردن دووارته ز سمت منتور هڌ + + زی اسکنن ره ون + شؽواتگرن سی اسکن، زی مجال ره وندن بۊگۊشین، اندی ترین کودن اسکن کۊنین یا شؽواتی ن منه نوار ٱوزار پسند کۊنین. + + فشناڌن منشڌ + فشناڌن منشڌ یا داسوو موشکلا من Github + ٱووڌن من جرگه تلگرام + برنومه تلگرامن نجوست + هریم سیخومی + زبار + کود بونچک + تورگه تلگرام + لادراری گرؽڌن ز کانفیگ + جاگه زفت کردن: [%s]، بعڌ پاک کردن برنومه یا پاک کردن جاگه زفت کردن، نوسخه لادرار هم پاک ابۊ. + وورگندن کانفیگ + یک رسۊوی کانفیگ + + تبلیغات + تبلیغات، سی نیشتن جوزیات بیشتر کیلیک کۊنین. (هیاری مالی کۊنین تا پاک بۊ) + + ورۊ کردن خوتکار اشتراکا + اشتراکا خوتۉ ن و تۉر خوتکار وا فاسله زمۊوی من پس زمینه ورۊ کۊنین. ای ویژیی من پوی دسگایل گاشڌ همیشه کار نکونه + فاسله ورۊ کردن خوتکار (اقلن وا 15 دؽقه بۊ) + + سئت داسووا + هالت + سی هیاری بیشتر ری ای هؽل بزݩ + زۉݩ + سامووا رابت منتوری + سامووا هالت رابت منتوری + + داسووا + لف گیری + روفتن + ره وندن دووارته خدمات + پاک کردن پوی کانفیگا جرگه سکویی + پاک کردن کانفیگا تکراری جرگه سکویی + پاک کردن کانفیگا نا موئتبر جرگه سکویی + و در کشیڌن کانفیگا غیر سفارشی جرگه سکویی من کلیپ بورد + سامووا جرگه اشتراک + نیشتنا + نشۊوی اینترنتی اختیاری + نیشتنا فیلتر مئمۊلی + فعال بیڌن ورۊ کردن + فعال بیڌن ورۊ کردن خوتکار + نیشتنا پروکسی پؽشی + نیشتنا پروکسی نیایی + نیشتنا هڌسۉݩ وو هرف نارن + به‌روزرسانی اشتراک گروه فعلی + Tcping کانفیگا جرگه سکویی + تئخیر واقعی کانفیگا جرگه سکویی + فایلا دارایی جوقرافیایی + ترتیب و ری نتیجیل آزمایش + فیلتر کردن کانفیگا + پوی جرگیل + پاک کردن %d کانفیگ تکراری + + ره وندن خدمات + قوۊل + + نشقه دامنه + سامووا تور جوستن + وا کاما ز یک جوڌا ابۊن (,) پسند دامنه یا آی پی + زفت کردن + روفتن + سامووا قانۉݩ تور جوستن + ازاف کردن قانۉݩ + و من ٱووردن قانووا + قانووایی ک هیم سکو هڌسۉݩ پاک ابۊن، هنی هم اخۊی پاکسۉݩ کۊنی؟ + و من ٱووردن قانووا ز کلیپ بورد + و در کشیڌن قانووا وو زفت من کلیپ بورد + چفت هڌ، ای قانؤنن مجال و من ٱووردن ز پؽش سامووا زفت کۊنین + domain + ip + port + protocol + [http,tls,bittorrent] + network"[udp|tcp]" + [udp|tcp] + outboundTag + + منپیزن واجۊری کوݩ + هونی آزمایش ابۊ… + مووفق بی: منپیز HTTP %dms تۊل کشی + منپیز و اینترنتن نجوست: %s + اینترنت من دسرس نؽ + کود ختا: #%d + منپیز هڌ، سی واجۊری کیلیک کوݩ + منپیز نؽڌ + + اشتراک وا مووفقیت زفت زابی + اشتراک زفت نوابی + سامووا Fragment + Fragment Packets + Fragment Length (min-max) + Fragment Interval (min-max) + فعال کردن Fragment + + + QRcode + و در کشیڌن من کلیپ بورد + و در کشیڌن پوی کانفیگ من کلیپ بورد + + + + QRcode + و در کشیڌن من کلیپ بورد + + + + VPN + تینا پروکسی + + + + و دین کردن سیستم + رۊشنا + تاریک + + + + نومگه اسبؽڌ چین + نومگه شه چین + جهۊوی (Global) + نومگه اسبؽڌ ایران + + + \ No newline at end of file diff --git a/v2rayng/V2rayNG/app/src/main/res/values-night/styles.xml b/v2rayng/V2rayNG/app/src/main/res/values-night/themes.xml similarity index 100% rename from v2rayng/V2rayNG/app/src/main/res/values-night/styles.xml rename to v2rayng/V2rayNG/app/src/main/res/values-night/themes.xml diff --git a/v2rayng/V2rayNG/app/src/main/res/values/arrays.xml b/v2rayng/V2rayNG/app/src/main/res/values/arrays.xml index 535e6bd73c..76c8965826 100644 --- a/v2rayng/V2rayNG/app/src/main/res/values/arrays.xml +++ b/v2rayng/V2rayNG/app/src/main/res/values/arrays.xml @@ -171,6 +171,7 @@ فارسی عربي বাংলা + لۊری بختیاری @@ -184,6 +185,7 @@ fa ar bn + bqi-rIR @@ -203,4 +205,4 @@ direct block - \ No newline at end of file + diff --git a/v2rayng/V2rayNG/app/src/main/res/values/styles.xml b/v2rayng/V2rayNG/app/src/main/res/values/themes.xml similarity index 100% rename from v2rayng/V2rayNG/app/src/main/res/values/styles.xml rename to v2rayng/V2rayNG/app/src/main/res/values/themes.xml diff --git a/v2rayng/V2rayNG/app/src/test/java/com/v2ray/ang/AngUnitTest.kt b/v2rayng/V2rayNG/app/src/test/java/com/v2ray/ang/AngUnitTest.kt new file mode 100644 index 0000000000..61de199eb3 --- /dev/null +++ b/v2rayng/V2rayNG/app/src/test/java/com/v2ray/ang/AngUnitTest.kt @@ -0,0 +1,47 @@ +package com.v2ray.ang + +import com.v2ray.ang.util.Utils +import org.junit.Test + +import org.junit.Assert.* + +/** + * Example local unit test, which will execute on the development machine (host). + * + * See [testing documentation](http://d.android.com/tools/testing). + */ +class AngUnitTest { + + @Test + fun test_parseInt() { + assertEquals(Utils.parseInt("1234"), 1234) + } + + @Test + fun test_isIpAddress() { + assertFalse(Utils.isIpAddress("114.113.112.266")) + assertFalse(Utils.isIpAddress("666.666.666.666")) + assertFalse(Utils.isIpAddress("256.0.0.0")) + assertFalse(Utils.isIpAddress("::ffff:127.0.0.0.1")) + assertFalse(Utils.isIpAddress("baidu.com")) + assertFalse(Utils.isIpAddress("")) + + assertTrue(Utils.isIpAddress("127.0.0.1")) + assertTrue(Utils.isIpAddress("127.0.0.1:80")) + assertTrue(Utils.isIpAddress("0.0.0.0/0")) + assertTrue(Utils.isIpAddress("::1")) + assertTrue(Utils.isIpAddress("[::1]:80")) + assertTrue(Utils.isIpAddress("2605:2700:0:3::4713:93e3")) + assertTrue(Utils.isIpAddress("[2605:2700:0:3::4713:93e3]:80")) + assertTrue(Utils.isIpAddress("::ffff:192.168.173.22")) + assertTrue(Utils.isIpAddress("[::ffff:192.168.173.22]:80")) + assertTrue(Utils.isIpAddress("1::")) + assertTrue(Utils.isIpAddress("::")) + assertTrue(Utils.isIpAddress("::/0")) + assertTrue(Utils.isIpAddress("10.24.56.0/24")) + assertTrue(Utils.isIpAddress("2001:4321::1")) + assertTrue(Utils.isIpAddress("240e:1234:abcd:12::6666")) + assertTrue(Utils.isIpAddress("240e:1234:abcd:12::/64")) + } + +} \ No newline at end of file diff --git a/v2rayng/V2rayNG/app/src/test/java/com/v2ray/ang/ExampleUnitTest.java b/v2rayng/V2rayNG/app/src/test/java/com/v2ray/ang/ExampleUnitTest.java deleted file mode 100644 index 3e28d6402e..0000000000 --- a/v2rayng/V2rayNG/app/src/test/java/com/v2ray/ang/ExampleUnitTest.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.v2ray.ang; - -import static org.junit.Assert.assertEquals; - -import org.junit.Test; - -/** - * To work on unit tests, switch the Test Artifact in the Build Variants view. - */ -public class ExampleUnitTest { - @Test - public void addition_isCorrect() throws Exception { - assertEquals(4, 2 + 2); - } -} \ No newline at end of file diff --git a/v2rayng/V2rayNG/app/src/test/kotlin/com/v2ray/ang/ExampleUnitTest.kt b/v2rayng/V2rayNG/app/src/test/kotlin/com/v2ray/ang/ExampleUnitTest.kt deleted file mode 100644 index 08872d0c84..0000000000 --- a/v2rayng/V2rayNG/app/src/test/kotlin/com/v2ray/ang/ExampleUnitTest.kt +++ /dev/null @@ -1,138 +0,0 @@ -import com.v2ray.ang.util.Utils -import org.junit.Assert.assertEquals -import org.junit.Assert.assertFalse -import org.junit.Assert.assertTrue -import org.junit.Test - -class UtilTest { - - @Test - fun test_parseInt() { - assertEquals(Utils.parseInt("1234"), 1234) - } - - @Test - fun test_isIpAddress() { - assertFalse(Utils.isIpAddress("114.113.112.266")) - assertFalse(Utils.isIpAddress("666.666.666.666")) - assertFalse(Utils.isIpAddress("256.0.0.0")) - assertFalse(Utils.isIpAddress("::ffff:127.0.0.0.1")) - assertFalse(Utils.isIpAddress("baidu.com")) - assertFalse(Utils.isIpAddress("")) - - assertTrue(Utils.isIpAddress("127.0.0.1")) - assertTrue(Utils.isIpAddress("127.0.0.1:80")) - assertTrue(Utils.isIpAddress("0.0.0.0/0")) - assertTrue(Utils.isIpAddress("::1")) - assertTrue(Utils.isIpAddress("[::1]:80")) - assertTrue(Utils.isIpAddress("2605:2700:0:3::4713:93e3")) - assertTrue(Utils.isIpAddress("[2605:2700:0:3::4713:93e3]:80")) - assertTrue(Utils.isIpAddress("::ffff:192.168.173.22")) - assertTrue(Utils.isIpAddress("[::ffff:192.168.173.22]:80")) - assertTrue(Utils.isIpAddress("1::")) - assertTrue(Utils.isIpAddress("::")) - assertTrue(Utils.isIpAddress("::/0")) - assertTrue(Utils.isIpAddress("10.24.56.0/24")) - assertTrue(Utils.isIpAddress("2001:4321::1")) - assertTrue(Utils.isIpAddress("240e:1234:abcd:12::6666")) - assertTrue(Utils.isIpAddress("240e:1234:abcd:12::/64")) - } - -// @Test -// fun test_fmtHysteria2Parse() { -// val url2 = "hysteria2://password2@127.0.0.1:443?obfs=salamander&obfs-password=obfs2&insecure=0#Hy22" -// var result2 = Hysteria2Fmt.parse(url2) -// assertTrue(result2 != null) -// assertTrue(result2?.server == "127.0.0.1") -// assertTrue(result2?.obfsPassword == "obfs2") -// assertTrue(result2?.security == "tls") -// -// var url22 = Hysteria2Fmt.toUri(result2!!) -// assertTrue(url22.contains("obfs2")) -// } -// -// @Test -// fun test_fmtSsParse() { -// val url2 = "ss://aa:bb@127.0.0.1:10000#sss" -// var result2 = ShadowsocksFmt.parse(url2) -// assertTrue(result2 != null) -// assertTrue(result2?.server == "127.0.0.1") -// -// var result = ShadowsocksFmt.parse("ss://YWVzLTI1Ni1nY206cGFzc3dvcmQy@127.0.0.1:10000#sss") -// assertTrue(result != null) -// assertTrue(result?.server == "127.0.0.1") -// } -// -// @Test -// fun test_fmtSocksParse() { -// val url2 = "socks://Og%3D%3D@127.0.0.1:1000#socks2" -// var result2 = SocksFmt.parse(url2) -// assertTrue(result2 != null) -// assertTrue(result2?.server == "127.0.0.1") -// var url22 = SocksFmt.toUri(result2!!) -// assertTrue(url2.contains(url22)) -// -// var result = SocksFmt.parse("socks://dXNlcjpwYXNz@127.0.0.1:1000#socks2") -// assertTrue(result != null) -// assertTrue(result?.server == "127.0.0.1") -// } -// -// @Test -// fun test_fmtTrojanParse() { -// val url2 = "trojan://password2@127.0.0.1:443?flow=xtls-rprx-vision&security=tls&type=tcp&headerType=none#Trojan" -// var result2 = TrojanFmt.parse(url2) -// assertTrue(result2 != null) -// assertTrue(result2?.server == "127.0.0.1") -// assertTrue(result2?.flow == "xtls-rprx-vision") -// -// val url = "trojan://password2@127.0.0.1:443#Trojan" -// var result = TrojanFmt.parse(url) -// assertTrue(result != null) -// assertTrue(result?.server == "127.0.0.1") -// assertTrue(result?.security == "tls") -// -// -// } -// -// @Test -// fun test_fmtVlessParse() { -// val url2 = -// "vless://cae1dc39-0547-4b1d-9e7a-01132c7ae3a7@127.0.0.1:443?encryption=none&flow=xtls-rprx-vision&security=reality&sni=sni2&fp=chrome&pbk=publickkey&sid=123456&spx=%2F&type=ws&host=host2&path=path2#VLESS" -// var result2 = VlessFmt.parse(url2) -// assertTrue(result2 != null) -// assertTrue(result2?.server == "127.0.0.1") -// assertTrue(result2?.flow == "xtls-rprx-vision") -// -// -// var url22 = VlessFmt.toUri(result2!!) -// assertTrue(url22.contains("xtls-rprx-vision")) -// -// } -// -// @Test -// fun test_fmtVmessParse() { -// val url2 = -// "vmess://ew0KICAidiI6ICIyIiwNCiAgInBzIjogIlZtZXNzIiwNCiAgImFkZCI6ICIxMjcuMC4wLjEiLA0KICAicG9ydCI6ICIxMDAwMCIsDQogICJpZCI6ICJlYmI5MWM5OS1lZjA3LTRmZjUtOThhYS01OTAyYWI0ZDAyODYiLA0KICAiYWlkIjogIjEyMyIsDQogICJzY3kiOiAiYWVzLTEyOC1nY20iLA0KICAibmV0IjogInRjcCIsDQogICJ0eXBlIjogIm5vbmUiLA0KICAiaG9zdCI6ICJob3N0MiIsDQogICJwYXRoIjogInBhdGgyIiwNCiAgInRscyI6ICIiLA0KICAic25pIjogIiIsDQogICJhbHBuIjogIiINCn0=" -// var result2 = VmessFmt.parse(url2) -// assertTrue(result2 != null) -// assertTrue(result2?.server == "127.0.0.1") -// assertTrue(result2?.method == "aes-128-gcm") -// -// } -// -// -// @Test -// fun test_fmtWireguardParse() { -// val url2 = "wireguard://privatekey2@127.0.0.1:2000?publickey=publickey2&reserved=2%2C2%2C3&address=127.0.0.127&mtu=1250#WGG" -// var result2 = WireguardFmt.parse(url2) -// assertTrue(result2 != null) -// assertTrue(result2?.server == "127.0.0.1") -// assertTrue(result2?.publicKey == "publickey2") -// assertTrue(result2?.localAddress == "127.0.0.127") -// -// -// var url22 = WireguardFmt.toUri(result2!!) -// assertTrue(url22.contains("publickey2")) -// } -} - diff --git a/v2rayng/V2rayNG/build.gradle.kts b/v2rayng/V2rayNG/build.gradle.kts index acb2cb0e9f..f55768e8e6 100644 --- a/v2rayng/V2rayNG/build.gradle.kts +++ b/v2rayng/V2rayNG/build.gradle.kts @@ -2,5 +2,5 @@ plugins { alias(libs.plugins.android.application) apply false alias(libs.plugins.android.library) apply false - alias(libs.plugins.android.kotlin) apply false -} + alias(libs.plugins.kotlin.android) apply false +} \ No newline at end of file diff --git a/v2rayng/V2rayNG/gradle.properties b/v2rayng/V2rayNG/gradle.properties index 9e2f93c29d..8126f5d5b0 100644 --- a/v2rayng/V2rayNG/gradle.properties +++ b/v2rayng/V2rayNG/gradle.properties @@ -1,6 +1,24 @@ -kotlin.incremental=true +# Project-wide Gradle settings. +# IDE (e.g. Android Studio) users: +# Gradle settings configured through the IDE *will override* +# any settings specified in this file. +# For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. For more details, visit +# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects +# org.gradle.parallel=true +# AndroidX package structure to make it clearer which packages are bundled with the +# Android operating system, and which are packaged with your app's APK +# https://developer.android.com/topic/libraries/support-library/androidx-rn android.useAndroidX=true -android.enableJetifier=true +# Kotlin code style for this project: "official" or "obsolete": kotlin.code.style=official +# Enables namespacing of each library's R class so that its R class includes only the +# resources declared in the library itself and none from the library's dependencies, +# thereby reducing the size of the R class for that library android.nonTransitiveRClass=true -org.gradle.jvmargs=-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 +kotlin.incremental=true \ No newline at end of file diff --git a/v2rayng/V2rayNG/gradle/libs.versions.toml b/v2rayng/V2rayNG/gradle/libs.versions.toml index a1d57aeb49..6cf7ef5a26 100644 --- a/v2rayng/V2rayNG/gradle/libs.versions.toml +++ b/v2rayng/V2rayNG/gradle/libs.versions.toml @@ -1,71 +1,63 @@ [versions] -activityKtx = "1.9.3" -appcompat = "1.7.0" -cardview = "1.0.0" -constraintlayout = "2.2.0" -core = "3.5.3" -editorkit = "2.9.0" -flexbox = "3.0.0" -fragmentKtx = "1.8.5" -gson = "2.11.0" +agp = "8.7.2" +kotlin = "2.0.21" +coreKtx = "1.15.0" junit = "4.13.2" -kotlinReflect = "2.0.21" -kotlinxCoroutinesCore = "1.9.0" -legacySupportV4 = "1.0.0" -lifecycleViewmodelKtx = "2.8.7" +junitVersion = "1.2.1" +espressoCore = "3.6.1" +appcompat = "1.7.0" material = "1.12.0" +activity = "1.9.3" +constraintlayout = "2.2.0" mmkvStatic = "1.3.9" -multidex = "2.0.1" -preferenceKtx = "1.2.1" -quickieBundled = "1.10.0" -recyclerview = "1.3.2" -rxandroid = "3.0.2" +gson = "2.11.0" rxjava = "3.1.9" +rxandroid = "3.0.2" rxpermissions = "0.12" toastcompat = "1.1.0" -viewpager2 = "1.1.0" -workRuntimeKtx = "2.9.1" -androidGradlePlugin = "8.7.2" -androidKotlinPlugin = "2.0.21" +editorkit = "2.9.0" +quickieBundled = "1.10.0" +core = "3.5.3" +workRuntimeKtx = "2.10.0" +lifecycleViewmodelKtx = "2.8.7" +multidex = "2.0.1" mockitoMockitoInline = "4.0.0" - +flexbox = "3.0.0" +preferenceKtx = "1.2.1" +recyclerview = "1.3.2" [libraries] -activity-ktx = { module = "androidx.activity:activity-ktx", version.ref = "activityKtx" } -appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" } -cardview = { module = "androidx.cardview:cardview", version.ref = "cardview" } -constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "constraintlayout" } -core = { module = "com.google.zxing:core", version.ref = "core" } -editorkit = { module = "com.blacksquircle.ui:editorkit", version.ref = "editorkit" } -flexbox = { module = "com.google.android.flexbox:flexbox", version.ref = "flexbox" } -fragment-ktx = { module = "androidx.fragment:fragment-ktx", version.ref = "fragmentKtx" } -gson = { module = "com.google.code.gson:gson", version.ref = "gson" } -junit = { module = "junit:junit", version.ref = "junit" } -kotlin-reflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref = "kotlinReflect" } -kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "kotlinxCoroutinesCore" } -kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinxCoroutinesCore" } -language-base = { module = "com.blacksquircle.ui:language-base", version.ref = "editorkit" } -language-json = { module = "com.blacksquircle.ui:language-json", version.ref = "editorkit" } -legacy-support-v4 = { module = "androidx.legacy:legacy-support-v4", version.ref = "legacySupportV4" } -lifecycle-livedata-ktx = { module = "androidx.lifecycle:lifecycle-livedata-ktx", version.ref = "lifecycleViewmodelKtx" } -lifecycle-runtime-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "lifecycleViewmodelKtx" } -lifecycle-viewmodel-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "lifecycleViewmodelKtx" } -material = { module = "com.google.android.material:material", version.ref = "material" } +androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" } +junit = { group = "junit", name = "junit", version.ref = "junit" } +androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" } +androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" } +androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" } +material = { group = "com.google.android.material", name = "material", version.ref = "material" } +androidx-activity = { group = "androidx.activity", name = "activity", version.ref = "activity" } +androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" } mmkv-static = { module = "com.tencent:mmkv-static", version.ref = "mmkvStatic" } -multidex = { module = "androidx.multidex:multidex", version.ref = "multidex" } -quickie-bundled = { module = "io.github.g00fy2.quickie:quickie-bundled", version.ref = "quickieBundled" } -recyclerview = { module = "androidx.recyclerview:recyclerview", version.ref = "recyclerview" } -preference-ktx = { module = "androidx.preference:preference-ktx", version.ref = "preferenceKtx" } -rxandroid = { module = "io.reactivex.rxjava3:rxandroid", version.ref = "rxandroid" } +gson = { module = "com.google.code.gson:gson", version.ref = "gson" } rxjava = { module = "io.reactivex.rxjava3:rxjava", version.ref = "rxjava" } +rxandroid = { module = "io.reactivex.rxjava3:rxandroid", version.ref = "rxandroid" } rxpermissions = { module = "com.github.tbruyelle:rxpermissions", version.ref = "rxpermissions" } toastcompat = { module = "me.drakeet.support:toastcompat", version.ref = "toastcompat" } -viewpager2 = { module = "androidx.viewpager2:viewpager2", version.ref = "viewpager2" } -work-multiprocess = { module = "androidx.work:work-multiprocess", version.ref = "workRuntimeKtx" } +editorkit = { module = "com.blacksquircle.ui:editorkit", version.ref = "editorkit" } +language-base = { module = "com.blacksquircle.ui:language-base", version.ref = "editorkit" } +language-json = { module = "com.blacksquircle.ui:language-json", version.ref = "editorkit" } +quickie-bundled = { module = "io.github.g00fy2.quickie:quickie-bundled", version.ref = "quickieBundled" } +core = { module = "com.google.zxing:core", version.ref = "core" } work-runtime-ktx = { module = "androidx.work:work-runtime-ktx", version.ref = "workRuntimeKtx" } -mockito-kotlin = { module = "org.mockito.kotlin:mockito-kotlin", version.ref = "mockitoMockitoInline" } +work-multiprocess = { module = "androidx.work:work-multiprocess", version.ref = "workRuntimeKtx" } +lifecycle-viewmodel-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "lifecycleViewmodelKtx" } +lifecycle-livedata-ktx = { module = "androidx.lifecycle:lifecycle-livedata-ktx", version.ref = "lifecycleViewmodelKtx" } +lifecycle-runtime-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "lifecycleViewmodelKtx" } +multidex = { module = "androidx.multidex:multidex", version.ref = "multidex" } org-mockito-mockito-inline = { module = "org.mockito:mockito-inline", version.ref = "mockitoMockitoInline" } - +mockito-kotlin = { module = "org.mockito.kotlin:mockito-kotlin", version.ref = "mockitoMockitoInline" } +flexbox = { module = "com.google.android.flexbox:flexbox", version.ref = "flexbox" } +recyclerview = { module = "androidx.recyclerview:recyclerview", version.ref = "recyclerview" } +preference-ktx = { module = "androidx.preference:preference-ktx", version.ref = "preferenceKtx" } [plugins] -android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" } -android-library = { id = "com.android.library", version.ref = "androidGradlePlugin" } -android-kotlin = { id = "org.jetbrains.kotlin.android", version.ref = "androidKotlinPlugin" } +android-application = { id = "com.android.application", version.ref = "agp" } +kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } +android-library = { id = "com.android.library", version.ref = "agp" } + diff --git a/v2rayng/V2rayNG/gradle/wrapper/gradle-wrapper.jar b/v2rayng/V2rayNG/gradle/wrapper/gradle-wrapper.jar index 13372aef5e..e708b1c023 100644 Binary files a/v2rayng/V2rayNG/gradle/wrapper/gradle-wrapper.jar and b/v2rayng/V2rayNG/gradle/wrapper/gradle-wrapper.jar differ diff --git a/v2rayng/V2rayNG/gradle/wrapper/gradle-wrapper.properties b/v2rayng/V2rayNG/gradle/wrapper/gradle-wrapper.properties index 87d9b395f5..20a15d0263 100644 --- a/v2rayng/V2rayNG/gradle/wrapper/gradle-wrapper.properties +++ b/v2rayng/V2rayNG/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Sun Jul 28 13:40:50 CST 2024 +#Thu Nov 14 12:42:51 BDT 2024 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https://services.gradle.org/distributions/gradle-8.10.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/v2rayng/V2rayNG/gradlew b/v2rayng/V2rayNG/gradlew index 9d82f78915..4f906e0c81 100755 --- a/v2rayng/V2rayNG/gradlew +++ b/v2rayng/V2rayNG/gradlew @@ -1,4 +1,20 @@ -#!/usr/bin/env bash +#!/usr/bin/env sh + +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ############################################################################## ## @@ -6,42 +22,6 @@ ## ############################################################################## -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn ( ) { - echo "$*" -} - -die ( ) { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; -esac - # Attempt to set APP_HOME # Resolve links: $0 may be a link PRG="$0" @@ -60,8 +40,49 @@ cd "`dirname \"$PRG\"`/" >/dev/null APP_HOME="`pwd -P`" cd "$SAVED" >/dev/null +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + # Determine the Java command to use to start the JVM. if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then @@ -85,7 +106,7 @@ location of your Java installation." fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then MAX_FD_LIMIT=`ulimit -H -n` if [ $? -eq 0 ] ; then if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then @@ -105,10 +126,11 @@ if $darwin; then GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" fi -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` # We build the pattern for arguments to be converted via cygpath @@ -134,27 +156,30 @@ if $cygwin ; then else eval `echo args$i`="\"$arg\"" fi - i=$((i+1)) + i=`expr $i + 1` done case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + 0) set -- ;; + 1) set -- "$args0" ;; + 2) set -- "$args0" "$args1" ;; + 3) set -- "$args0" "$args1" "$args2" ;; + 4) set -- "$args0" "$args1" "$args2" "$args3" ;; + 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; esac fi -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " } -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" +APP_ARGS=`save "$@"` -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +exec "$JAVACMD" "$@" diff --git a/v2rayng/V2rayNG/gradlew.bat b/v2rayng/V2rayNG/gradlew.bat index 8a0b282aa6..107acd32c4 100644 --- a/v2rayng/V2rayNG/gradlew.bat +++ b/v2rayng/V2rayNG/gradlew.bat @@ -1,3 +1,19 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + @if "%DEBUG%" == "" @echo off @rem ########################################################################## @rem @@ -8,20 +24,23 @@ @rem Set local scope for the variables with windows NT shell if "%OS%"=="Windows_NT" setlocal -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - set DIRNAME=%~dp0 if "%DIRNAME%" == "" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init +if "%ERRORLEVEL%" == "0" goto execute echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. @@ -35,7 +54,7 @@ goto fail set JAVA_HOME=%JAVA_HOME:"=% set JAVA_EXE=%JAVA_HOME%/bin/java.exe -if exist "%JAVA_EXE%" goto init +if exist "%JAVA_EXE%" goto execute echo. echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% @@ -45,34 +64,14 @@ echo location of your Java installation. goto fail -:init -@rem Get command-line arguments, handling Windowz variants - -if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ - :execute @rem Setup the command line set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* :end @rem End local scope for the variables with windows NT shell diff --git a/v2rayng/V2rayNG/settings.gradle.kts b/v2rayng/V2rayNG/settings.gradle.kts index 60ba4300d0..3f61841e6a 100644 --- a/v2rayng/V2rayNG/settings.gradle.kts +++ b/v2rayng/V2rayNG/settings.gradle.kts @@ -1,8 +1,14 @@ pluginManagement { repositories { - gradlePluginPortal() - google() + google { + content { + includeGroupByRegex("com\\.android.*") + includeGroupByRegex("com\\.google.*") + includeGroupByRegex("androidx.*") + } + } mavenCentral() + gradlePluginPortal() } } dependencyResolutionManagement { @@ -14,5 +20,6 @@ dependencyResolutionManagement { maven { url = uri("https://jitpack.io") } } } + rootProject.name = "v2rayNG" include(":app") diff --git a/yass/CMakeLists.txt b/yass/CMakeLists.txt index 906c4535a4..1e4045c241 100644 --- a/yass/CMakeLists.txt +++ b/yass/CMakeLists.txt @@ -479,8 +479,6 @@ cmake_dependent_option( USE_SYSTEM_CARES "Build with system or vendored c-ares" OFF USE_CARES OFF) -option(USE_BUILTIN_CA_BUNDLE_CRT "Build with embedded ca-bundle.crt support" ON) - option(USE_MBEDTLS "Build with mbedtls support" ON) cmake_dependent_option( USE_SYSTEM_MBEDTLS "Build with system or vendored mbedtls" OFF @@ -3162,56 +3160,52 @@ if (APPLE) endif() # -# optional builtin ca-bundle crt support +# required builtin ca-bundle crt support # -if (USE_BUILTIN_CA_BUNDLE_CRT) - set(ASIO_CA_BUNDLE_CRT_SRC) +set(ASIO_CA_BUNDLE_CRT_SRC) - if (WIN32 AND NOT OS_AARCH64) - enable_language(ASM_NASM) - set(ASIO_CA_BUNDLE_CRT_SRC "third_party/ca-certificates/ca-bundle.crt.asm") - endif() - - if (WIN32 AND OS_AARCH64) - enable_language(ASM) - # silence some unsed definitions' warnings - if (COMPILER_CLANG) - set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -Wno-unused-command-line-argument") - endif() - set(ASIO_CA_BUNDLE_CRT_SRC "third_party/ca-certificates/ca-bundle.crt.win.s") - endif() - - if (OHOS OR ANDROID OR CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") - enable_language(ASM) - # silence some unsed definitions' warnings - if (COMPILER_CLANG) - set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -Wno-unused-command-line-argument") - endif() - if(CMAKE_SIZEOF_VOID_P EQUAL 4) - set(ASIO_CA_BUNDLE_CRT_SRC "third_party/ca-certificates/ca-bundle.crt.m32.s") - else() - set(ASIO_CA_BUNDLE_CRT_SRC "third_party/ca-certificates/ca-bundle.crt.s") - endif() - endif() - - if (APPLE) - enable_language(ASM) - set(ASIO_CA_BUNDLE_CRT_SRC "third_party/ca-certificates/ca-bundle.crt.apple.s") - endif() - - if (NOT ASIO_CA_BUNDLE_CRT_SRC) - message(FATAL_ERROR "builtin ca bundle crt missing implementation") - endif() - - add_library(asio_ca_bundle_crt OBJECT ${ASIO_CA_BUNDLE_CRT_SRC}) - target_include_directories(asio_ca_bundle_crt PRIVATE third_party/ca-certificates) - - list(APPEND YASS_APP_FEATURES "ca-certificates 20240203.3.98") - # macro used in yass_test - target_compile_definitions(asio PUBLIC HAVE_BUILTIN_CA_BUNDLE_CRT=1) - target_sources(asio PRIVATE $) +if (WIN32 AND NOT OS_AARCH64) + enable_language(ASM_NASM) + set(ASIO_CA_BUNDLE_CRT_SRC "third_party/ca-certificates/ca-bundle.crt.asm") endif() +if (WIN32 AND OS_AARCH64) + enable_language(ASM) + # silence some unsed definitions' warnings + if (COMPILER_CLANG) + set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -Wno-unused-command-line-argument") + endif() + set(ASIO_CA_BUNDLE_CRT_SRC "third_party/ca-certificates/ca-bundle.crt.win.s") +endif() + +if (OHOS OR ANDROID OR CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") + enable_language(ASM) + # silence some unsed definitions' warnings + if (COMPILER_CLANG) + set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -Wno-unused-command-line-argument") + endif() + if(CMAKE_SIZEOF_VOID_P EQUAL 4) + set(ASIO_CA_BUNDLE_CRT_SRC "third_party/ca-certificates/ca-bundle.crt.m32.s") + else() + set(ASIO_CA_BUNDLE_CRT_SRC "third_party/ca-certificates/ca-bundle.crt.s") + endif() +endif() + +if (APPLE) + enable_language(ASM) + set(ASIO_CA_BUNDLE_CRT_SRC "third_party/ca-certificates/ca-bundle.crt.apple.s") +endif() + +if (NOT ASIO_CA_BUNDLE_CRT_SRC) + message(FATAL_ERROR "builtin ca bundle crt missing implementation") +endif() + +add_library(asio_ca_bundle_crt OBJECT ${ASIO_CA_BUNDLE_CRT_SRC}) +target_include_directories(asio_ca_bundle_crt PRIVATE third_party/ca-certificates) + +list(APPEND YASS_APP_FEATURES "ca-certificates 20240203.3.98") +target_sources(asio PRIVATE $) + # # required supplementary ca-bundle crt support # diff --git a/yass/debian/rules b/yass/debian/rules index f78972e4fc..d4df805d7d 100755 --- a/yass/debian/rules +++ b/yass/debian/rules @@ -75,7 +75,7 @@ override_dh_auto_configure: CMAKE_OPTIONS += -DUSE_CET=on endif override_dh_auto_configure: - dh_auto_configure ${DEB_BUILD_SYSTEM_OPTIONS} -- -DCMAKE_BUILD_TYPE=Release -DBUILD_BENCHMARKS=on -DBUILD_TESTS=on $(CMAKE_OPTIONS) -DCLI=on -DSERVER=on -DUSE_BUILTIN_CA_BUNDLE_CRT=off -DUSE_TCMALLOC=on + dh_auto_configure ${DEB_BUILD_SYSTEM_OPTIONS} -- -DCMAKE_BUILD_TYPE=Release -DBUILD_BENCHMARKS=on -DBUILD_TESTS=on $(CMAKE_OPTIONS) -DCLI=on -DSERVER=on -DUSE_TCMALLOC=on override_dh_auto_build: dh_auto_build ${DEB_BUILD_SYSTEM_OPTIONS} -- -j $(NCPUS) diff --git a/yass/doc/yass_cli.1 b/yass/doc/yass_cli.1 index 091cbe1b8b..e512fa1668 100644 --- a/yass/doc/yass_cli.1 +++ b/yass/doc/yass_cli.1 @@ -1,6 +1,6 @@ .\" generated with Ronn-NG/v0.9.1 .\" http://github.com/apjanke/ronn-ng/tree/0.9.1 -.TH "YASS_CLI" "1" "October 2024" "" +.TH "YASS_CLI" "1" "November 2024" "" .SH "NAME" \fByass_cli\fR \- a lightweight and efficient, socks5/http forward proxy .SH "SYNOPSIS" @@ -68,8 +68,8 @@ Maximum number of accepted connection is \fInumber\fR\. \fB\-\-padding_support\fR Enable padding support\. .TP -\fB\-\-use_ca_bundle_crt\fR -Use builtin ca\-bundle\.crt instead of system CA store\. +\fB\-\-ca_native\fR +Load CA certs from the OS\. .TP \fB\-\-cacert\fR \fIfile\fR Tells where to use the specified certificate \fIfile\fR to verify the peer\. diff --git a/yass/doc/yass_cli.md b/yass/doc/yass_cli.md index 3b4fd0974b..c2b54977b3 100644 --- a/yass/doc/yass_cli.md +++ b/yass/doc/yass_cli.md @@ -82,8 +82,8 @@ See . * `--padding_support`: Enable padding support. -* `--use_ca_bundle_crt`: - Use builtin ca-bundle.crt instead of system CA store. +* `--ca_native`: + Load CA certs from the OS. * `--cacert` _file_: Tells where to use the specified certificate _file_ to verify the peer. diff --git a/yass/doc/yass_server.1 b/yass/doc/yass_server.1 index 8d59f53e33..0cc0b17c71 100644 --- a/yass/doc/yass_server.1 +++ b/yass/doc/yass_server.1 @@ -1,6 +1,6 @@ .\" generated with Ronn-NG/v0.9.1 .\" http://github.com/apjanke/ronn-ng/tree/0.9.1 -.TH "YASS_SEREVR" "1" "October 2024" "" +.TH "YASS_SEREVR" "1" "November 2024" "" .SH "NAME" \fByass_serevr\fR \- a lightweight and efficient, socks5/http forward proxy .SH "SYNOPSIS" @@ -68,8 +68,8 @@ Maximum number of accepted connection is \fInumber\fR\. \fB\-\-padding_support\fR Enable padding support\. .TP -\fB\-\-use_ca_bundle_crt\fR -Use builtin ca\-bundle\.crt instead of system CA store\. +\fB\-\-ca_native\fR +Load CA certs from the OS\. .TP \fB\-\-cacert\fR \fIfile\fR Tells where to use the specified certificate \fIfile\fR to verify the peer\. diff --git a/yass/doc/yass_server.md b/yass/doc/yass_server.md index 0c2c723c97..57b898d37b 100644 --- a/yass/doc/yass_server.md +++ b/yass/doc/yass_server.md @@ -81,8 +81,8 @@ See . * `--padding_support`: Enable padding support. -* `--use_ca_bundle_crt`: - Use builtin ca-bundle.crt instead of system CA store. +* `--ca_native`: + Load CA certs from the OS. * `--cacert` _file_: Tells where to use the specified certificate _file_ to verify the peer. diff --git a/yass/src/config/config.cpp b/yass/src/config/config.cpp index a1131fdfce..a0851e0aee 100644 --- a/yass/src/config/config.cpp +++ b/yass/src/config/config.cpp @@ -464,7 +464,7 @@ void SetClientUsageMessage(std::string_view exec_path) { --method Specify encrypt of method to use --limit_rate Limits the rate of response transmission to a client. Uint can be (none), k, m. --padding_support Enable padding support - --use_ca_bundle_crt Use builtin ca-bundle.crt instead of system CA store + --ca_native Load CA certs from the OS --cacert Tells where to use the specified certificate file to verify the peer --capath Tells where to use the specified certificate dir to verify the peer --certificate_chain_file Use custom certificate chain file to verify server's certificate @@ -487,7 +487,7 @@ void SetServerUsageMessage(std::string_view exec_path) { --method Specify encrypt of method to use --limit_rate Limits the rate of response transmission to a client. Uint can be (none), k, m. --padding_support Enable padding support - --use_ca_bundle_crt Use builtin ca-bundle.crt instead of system CA store + --ca_native Load CA certs from the OS --cacert Tells where to use the specified certificate file to verify the peer --capath Tells where to use the specified certificate dir to verify the peer --certificate_chain_file Use custom certificate chain file to verify server's certificate diff --git a/yass/src/config/config_core.cpp b/yass/src/config/config_core.cpp index 7a4dbb80d1..39f3048708 100644 --- a/yass/src/config/config_core.cpp +++ b/yass/src/config/config_core.cpp @@ -146,7 +146,7 @@ static const std::string kCipherMethodHelpMessage = absl::StrCat("Specify encrypt of method to use, one of ", kCipherMethodsStr); ABSL_FLAG(CipherMethodFlag, method, CipherMethodFlag(CRYPTO_DEFAULT), kCipherMethodHelpMessage); -ABSL_FLAG(uint32_t, parallel_max, 512, "Maximum concurrency for parallel connections"); +ABSL_FLAG(uint32_t, parallel_max, 65535, "Maximum concurrency for parallel connections"); ABSL_FLAG(RateFlag, limit_rate, RateFlag(0), "Limit transfer speed to RATE"); #if BUILDFLAG(IS_MAC) diff --git a/yass/src/net/asio_ssl.cpp b/yass/src/net/asio_ssl.cpp index 0804ab93e0..135bcecfc5 100644 --- a/yass/src/net/asio_ssl.cpp +++ b/yass/src/net/asio_ssl.cpp @@ -34,20 +34,7 @@ #include "third_party/boringssl/src/pki/trust_store.h" #endif -#ifdef HAVE_BUILTIN_CA_BUNDLE_CRT - -// Use internal ca-bundle.crt if necessary -// we take care of the ca-bundle if windows version is below windows 8.1 -ABSL_FLAG(bool, - use_ca_bundle_crt, -#if defined(_WIN32) && _WIN32_WINNT < 0x0603 - !IsWindowsVersionBNOrGreater(6, 3, 0), -#else - false, -#endif - "Use internal ca-bundle.crt instead of system CA store."); - -#endif // HAVE_BUILTIN_CA_BUNDLE_CRT +ABSL_FLAG(bool, ca_native, false, "Load CA certs from the OS."); std::ostream& operator<<(std::ostream& o, asio::error_code ec) { #ifdef _WIN32 @@ -419,32 +406,7 @@ static int load_ca_to_ssl_ctx_path(SSL_CTX* ssl_ctx, const std::string& dir_path return count; } -static int load_ca_to_ssl_ctx_cacert(SSL_CTX* ssl_ctx) { - int count = 0; - std::string ca_bundle = absl::GetFlag(FLAGS_cacert); - if (!ca_bundle.empty()) { - int result = load_ca_to_ssl_ctx_bundle(ssl_ctx, ca_bundle); - if (result > 0) { - LOG(INFO) << "Loaded ca bundle from: " << ca_bundle << " with " << result << " certificates"; - count += result; - } else { - print_openssl_error(); - LOG(WARNING) << "Loading ca bundle failure from: " << ca_bundle; - } - return result; - } - std::string ca_path = absl::GetFlag(FLAGS_capath); - if (!ca_path.empty()) { - int result = load_ca_to_ssl_ctx_path(ssl_ctx, ca_path); - if (result > 0) { - LOG(INFO) << "Loaded ca from directory: " << ca_path << " with " << result << " certificates"; - count += result; - } - } - return count; -} - -static int load_ca_to_ssl_ctx_yass_ca_bundle(SSL_CTX* ssl_ctx) { +static std::optional load_ca_to_ssl_ctx_yass_ca_bundle(SSL_CTX* ssl_ctx) { #ifdef _WIN32 #define CA_BUNDLE L"yass-ca-bundle.crt" // The windows version will automatically look for a CA certs file named 'ca-bundle.crt', @@ -496,7 +458,7 @@ static int load_ca_to_ssl_ctx_yass_ca_bundle(SSL_CTX* ssl_ctx) { for (const auto& wca_bundle : ca_bundles) { auto ca_bundle = SysWideToUTF8(wca_bundle); - VLOG(1) << "Trying to load ca bundle from: " << ca_bundle; + VLOG(1) << "Attempt to load ca bundle from: " << ca_bundle; int result = load_ca_to_ssl_ctx_bundle(ssl_ctx, ca_bundle); if (result > 0) { LOG(INFO) << "Loaded ca bundle from: " << ca_bundle << " with " << result << " certificates"; @@ -506,7 +468,39 @@ static int load_ca_to_ssl_ctx_yass_ca_bundle(SSL_CTX* ssl_ctx) { #undef CA_BUNDLE #endif - return 0; + return std::nullopt; +} + +static std::optional load_ca_to_ssl_ctx_cacert(SSL_CTX* ssl_ctx) { + if (absl::GetFlag(FLAGS_ca_native)) { + int result = load_ca_to_ssl_ctx_system(ssl_ctx); + if (!result) { + LOG(WARNING) << "Loading ca bundle failure from system"; + } + return result; + } + std::string ca_bundle = absl::GetFlag(FLAGS_cacert); + if (!ca_bundle.empty()) { + int result = load_ca_to_ssl_ctx_bundle(ssl_ctx, ca_bundle); + if (result) { + LOG(INFO) << "Loaded ca bundle from: " << ca_bundle << " with " << result << " certificates"; + } else { + print_openssl_error(); + LOG(WARNING) << "Loading ca bundle failure from: " << ca_bundle; + } + return result; + } + std::string ca_path = absl::GetFlag(FLAGS_capath); + if (!ca_path.empty()) { + int result = load_ca_to_ssl_ctx_path(ssl_ctx, ca_path); + if (result) { + LOG(INFO) << "Loaded ca from directory: " << ca_path << " with " << result << " certificates"; + } else { + LOG(WARNING) << "Loading ca directory failure from: " << ca_path; + } + return result; + } + return load_ca_to_ssl_ctx_yass_ca_bundle(ssl_ctx); } #ifdef _WIN32 @@ -595,7 +589,7 @@ int load_ca_to_ssl_store_from_schannel_store(X509_STORE* store, HCERTSTORE cert_ return count; } -void GatherEnterpriseCertsForLocation(HCERTSTORE cert_store, DWORD location, LPCWSTR store_name) { +void GatherEnterpriseCertsForLocation(LPCSTR provider, HCERTSTORE cert_store, DWORD location, LPCWSTR store_name) { if (!(location == CERT_SYSTEM_STORE_LOCAL_MACHINE || location == CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY || location == CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE || location == CERT_SYSTEM_STORE_CURRENT_USER || location == CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY)) { @@ -606,7 +600,7 @@ void GatherEnterpriseCertsForLocation(HCERTSTORE cert_store, DWORD location, LPC HCERTSTORE enterprise_root_store = NULL; - enterprise_root_store = CertOpenStore(CERT_STORE_PROV_SYSTEM_W, 0, NULL, flags, store_name); + enterprise_root_store = CertOpenStore(provider, 0, NULL, flags, store_name); if (!enterprise_root_store) { return; } @@ -618,67 +612,24 @@ void GatherEnterpriseCertsForLocation(HCERTSTORE cert_store, DWORD location, LPC PLOG(WARNING) << "CertCloseStore() call failed"; } } -#endif - -int load_ca_to_ssl_ctx_system(SSL_CTX* ssl_ctx) { -#ifdef _WIN32 - HCERTSTORE root_store = NULL; - int count = 0; - - X509_STORE* store = SSL_CTX_get_cert_store(ssl_ctx); - if (!store) { - LOG(WARNING) << "Can't get SSL CTX cert store"; - goto out; - } - root_store = CertOpenStore(CERT_STORE_PROV_COLLECTION, 0, NULL, 0, nullptr); - if (!root_store) { - LOG(WARNING) << "Can't get cert store"; - goto out; - } - // Grab the user-added roots. - GatherEnterpriseCertsForLocation(root_store, CERT_SYSTEM_STORE_LOCAL_MACHINE, L"ROOT"); - GatherEnterpriseCertsForLocation(root_store, CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY, L"ROOT"); - GatherEnterpriseCertsForLocation(root_store, CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE, L"ROOT"); - GatherEnterpriseCertsForLocation(root_store, CERT_SYSTEM_STORE_CURRENT_USER, L"ROOT"); - GatherEnterpriseCertsForLocation(root_store, CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY, L"ROOT"); - - // Grab the user-added intermediates (optional). - GatherEnterpriseCertsForLocation(root_store, CERT_SYSTEM_STORE_LOCAL_MACHINE, L"CA"); - GatherEnterpriseCertsForLocation(root_store, CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY, L"CA"); - GatherEnterpriseCertsForLocation(root_store, CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE, L"CA"); - GatherEnterpriseCertsForLocation(root_store, CERT_SYSTEM_STORE_CURRENT_USER, L"CA"); - GatherEnterpriseCertsForLocation(root_store, CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY, L"CA"); - - count = load_ca_to_ssl_store_from_schannel_store(store, root_store); - - if (!CertCloseStore(root_store, 0)) { - PLOG(WARNING) << "CertCloseStore() call failed"; - } - -out: - LOG(INFO) << "Loaded ca from SChannel: " << count << " certificates"; - return count; -#elif BUILDFLAG(IS_IOS) - return 0; -#elif BUILDFLAG(IS_MAC) - const SecTrustSettingsDomain domain = kSecTrustSettingsDomainSystem; +#endif // _WIN32 +#if BUILDFLAG(IS_MAC) +int load_ca_to_ssl_store_from_sec_trust_domain(X509_STORE* store, SecTrustSettingsDomain domain) { const CFStringRef policy_oid = kSecPolicyAppleSSL; CFArrayRef certs; OSStatus err; - asio::error_code ec; CFIndex size; - X509_STORE* store = nullptr; int count = 0; err = SecTrustSettingsCopyCertificates(domain, &certs); - if (err != errSecSuccess) { - LOG(ERROR) << "SecTrustSettingsCopyCertificates error: " << DescriptionFromOSStatus(err); + // Note: SecTrustSettingsCopyCertificates can legitimately return + // errSecNoTrustSettings if there are no trust settings in |domain|. + if (err == errSecNoTrustSettings) { goto out; } - - store = SSL_CTX_get_cert_store(ssl_ctx); - if (!store) { - LOG(WARNING) << "Can't get SSL CTX cert store"; + if (err != errSecSuccess) { + LOG(ERROR) << "SecTrustSettingsCopyCertificates error: " << DescriptionFromOSStatus(err) << " at domain 0x" + << std::hex << domain; goto out; } @@ -733,10 +684,175 @@ out: ++count; } } -out: + CFRelease(certs); - LOG(INFO) << "Loaded ca from Sec: " << count << " certificates"; + +out: + VLOG(1) << "Loaded ca from SecTrust: " << count << " certificates at domain 0x" << std::hex << domain; return count; +} +#endif // BUILDFLAG(IS_MAC) + +int load_ca_to_ssl_ctx_system(SSL_CTX* ssl_ctx) { +#ifdef _WIN32 + HCERTSTORE root_store = NULL; + int count = 0; + + X509_STORE* store = SSL_CTX_get_cert_store(ssl_ctx); + if (!store) { + LOG(WARNING) << "Can't get SSL CTX cert store"; + goto out; + } + root_store = CertOpenStore(CERT_STORE_PROV_COLLECTION, 0, NULL, 0, nullptr); + if (!root_store) { + LOG(WARNING) << "Can't get cert store"; + goto out; + } + // Grab the user-added roots. + GatherEnterpriseCertsForLocation(CERT_STORE_PROV_SYSTEM_W, root_store, CERT_SYSTEM_STORE_LOCAL_MACHINE, L"ROOT"); + GatherEnterpriseCertsForLocation(CERT_STORE_PROV_SYSTEM_W, root_store, CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY, + L"ROOT"); + GatherEnterpriseCertsForLocation(CERT_STORE_PROV_SYSTEM_W, root_store, CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE, + L"ROOT"); + GatherEnterpriseCertsForLocation(CERT_STORE_PROV_SYSTEM_W, root_store, CERT_SYSTEM_STORE_CURRENT_USER, L"ROOT"); + GatherEnterpriseCertsForLocation(CERT_STORE_PROV_SYSTEM_W, root_store, CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY, + L"ROOT"); + + // Grab the user-added intermediates (optional). + GatherEnterpriseCertsForLocation(CERT_STORE_PROV_SYSTEM_W, root_store, CERT_SYSTEM_STORE_LOCAL_MACHINE, L"CA"); + GatherEnterpriseCertsForLocation(CERT_STORE_PROV_SYSTEM_W, root_store, CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY, + L"CA"); + GatherEnterpriseCertsForLocation(CERT_STORE_PROV_SYSTEM_W, root_store, CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE, + L"CA"); + GatherEnterpriseCertsForLocation(CERT_STORE_PROV_SYSTEM_W, root_store, CERT_SYSTEM_STORE_CURRENT_USER, L"CA"); + GatherEnterpriseCertsForLocation(CERT_STORE_PROV_SYSTEM_W, root_store, CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY, + L"CA"); + + count = load_ca_to_ssl_store_from_schannel_store(store, root_store); + + if (!CertCloseStore(root_store, 0)) { + PLOG(WARNING) << "CertCloseStore() call failed"; + } + +out: + LOG(INFO) << "Loaded ca from SChannel: " << count << " certificates"; + return count; +#elif BUILDFLAG(IS_MAC) + X509_STORE* store = SSL_CTX_get_cert_store(ssl_ctx); + int count = 0; + if (!store) { + LOG(WARNING) << "Can't get SSL CTX cert store"; + goto out; + } + count += load_ca_to_ssl_store_from_sec_trust_domain(store, kSecTrustSettingsDomainSystem); + count += load_ca_to_ssl_store_from_sec_trust_domain(store, kSecTrustSettingsDomainAdmin); + count += load_ca_to_ssl_store_from_sec_trust_domain(store, kSecTrustSettingsDomainUser); + +out: + LOG(INFO) << "Loaded ca from SecTrust: " << count << " certificates"; + return count; +#elif BUILDFLAG(IS_IOS) + return 0; +#else + int count = 0; + // cert list copied from golang src/crypto/x509/root_unix.go + static const char* ca_bundle_paths[] = { + "/etc/ssl/certs/ca-certificates.crt", // Debian/Ubuntu/Gentoo etc. + "/etc/pki/tls/certs/ca-bundle.crt", // Fedora/RHEL + "/etc/ssl/ca-bundle.pem", // OpenSUSE + "/etc/openssl/certs/ca-certificates.crt", // NetBSD + "/etc/ssl/cert.pem", // OpenBSD + "/usr/local/share/certs/ca-root-nss.crt", // FreeBSD/DragonFly + "/etc/pki/tls/cacert.pem", // OpenELEC + "/etc/certs/ca-certificates.crt", // Solaris 11.2+ + }; + for (auto ca_bundle : ca_bundle_paths) { + int result = load_ca_to_ssl_ctx_bundle(ssl_ctx, ca_bundle); + if (result > 0) { + LOG(INFO) << "Loaded ca bundle from: " << ca_bundle << " with " << result << " certificates"; + count += result; + } + } + static const char* ca_paths[] = { + "/etc/ssl/certs", // SLES10/SLES11, https://golang.org/issue/12139 + "/etc/pki/tls/certs", // Fedora/RHEL + "/system/etc/security/cacerts", // Android + }; + + for (auto ca_path : ca_paths) { + int result = load_ca_to_ssl_ctx_path(ssl_ctx, ca_path); + if (result > 0) { + LOG(INFO) << "Loaded ca from directory: " << ca_path << " with " << result << " certificates"; + count += result; + } + } + return count; +#endif +} + +int load_ca_to_ssl_ctx_system_extra(SSL_CTX* ssl_ctx) { +#ifdef _WIN32 + HCERTSTORE root_store = NULL; + int count = 0; + + X509_STORE* store = SSL_CTX_get_cert_store(ssl_ctx); + if (!store) { + LOG(WARNING) << "Can't get SSL CTX cert store"; + goto out; + } + root_store = CertOpenStore(CERT_STORE_PROV_COLLECTION, 0, NULL, 0, nullptr); + if (!root_store) { + LOG(WARNING) << "Can't get cert store"; + goto out; + } + // Grab the user-added roots. + GatherEnterpriseCertsForLocation(CERT_STORE_PROV_SYSTEM_REGISTRY_W, root_store, CERT_SYSTEM_STORE_LOCAL_MACHINE, + L"ROOT"); + GatherEnterpriseCertsForLocation(CERT_STORE_PROV_SYSTEM_REGISTRY_W, root_store, + CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY, L"ROOT"); + GatherEnterpriseCertsForLocation(CERT_STORE_PROV_SYSTEM_REGISTRY_W, root_store, + CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE, L"ROOT"); + GatherEnterpriseCertsForLocation(CERT_STORE_PROV_SYSTEM_REGISTRY_W, root_store, CERT_SYSTEM_STORE_CURRENT_USER, + L"ROOT"); + GatherEnterpriseCertsForLocation(CERT_STORE_PROV_SYSTEM_REGISTRY_W, root_store, + CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY, L"ROOT"); + + // Grab the user-added intermediates (optional). + GatherEnterpriseCertsForLocation(CERT_STORE_PROV_SYSTEM_REGISTRY_W, root_store, CERT_SYSTEM_STORE_LOCAL_MACHINE, + L"CA"); + GatherEnterpriseCertsForLocation(CERT_STORE_PROV_SYSTEM_REGISTRY_W, root_store, + CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY, L"CA"); + GatherEnterpriseCertsForLocation(CERT_STORE_PROV_SYSTEM_REGISTRY_W, root_store, + CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE, L"CA"); + GatherEnterpriseCertsForLocation(CERT_STORE_PROV_SYSTEM_REGISTRY_W, root_store, CERT_SYSTEM_STORE_CURRENT_USER, + L"CA"); + GatherEnterpriseCertsForLocation(CERT_STORE_PROV_SYSTEM_REGISTRY_W, root_store, + CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY, L"CA"); + + count = load_ca_to_ssl_store_from_schannel_store(store, root_store); + + if (!CertCloseStore(root_store, 0)) { + PLOG(WARNING) << "CertCloseStore() call failed"; + } + +out: + LOG(INFO) << "Loaded user-added ca from SChannel: " << count << " certificates"; + return count; +#elif BUILDFLAG(IS_MAC) + X509_STORE* store = SSL_CTX_get_cert_store(ssl_ctx); + int count = 0; + if (!store) { + LOG(WARNING) << "Can't get SSL CTX cert store"; + goto out; + } + count += load_ca_to_ssl_store_from_sec_trust_domain(store, kSecTrustSettingsDomainAdmin); + count += load_ca_to_ssl_store_from_sec_trust_domain(store, kSecTrustSettingsDomainUser); + +out: + LOG(INFO) << "Loaded user-added ca from SecTrust: " << count << " certificates"; + return count; +#elif BUILDFLAG(IS_IOS) + return 0; #else int count = 0; // cert list copied from golang src/crypto/x509/root_unix.go @@ -786,41 +902,19 @@ void load_ca_to_ssl_ctx(SSL_CTX* ssl_ctx) { found_isrg_root_x2 = false; found_digicert_root_g2 = false; found_gts_root_r4 = false; - load_ca_to_ssl_ctx_cacert(ssl_ctx); + if (load_ca_to_ssl_ctx_cacert(ssl_ctx).has_value()) { + goto done; + } -#ifdef HAVE_BUILTIN_CA_BUNDLE_CRT - if (absl::GetFlag(FLAGS_use_ca_bundle_crt)) { + load_ca_to_ssl_ctx_system_extra(ssl_ctx); + { std::string_view ca_bundle_content(_binary_ca_bundle_crt_start, _binary_ca_bundle_crt_end - _binary_ca_bundle_crt_start); int result = load_ca_to_ssl_ctx_from_mem(ssl_ctx, ca_bundle_content); - LOG(WARNING) << "Builtin ca bundle loaded: " << result << " ceritificates"; - return; - } -#endif // HAVE_BUILTIN_CA_BUNDLE_CRT - - if (load_ca_to_ssl_ctx_yass_ca_bundle(ssl_ctx) == 0 && load_ca_to_ssl_ctx_system(ssl_ctx) == 0) { -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_OHOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) - LOG(WARNING) << "No ceritifcates from system loaded, probably due to outdated system image"; -#elif BUILDFLAG(IS_LINUX) - LOG(WARNING) << "No ceritifcates from system loaded, probably due to missing ca-certficates package"; -#elif BUILDFLAG(IS_FREEBSD) - LOG(WARNING) << "No ceritifcates from system loaded, probably due to missing ca_root_nss package"; -#elif BUILDFLAG(IS_IOS) - // nop -#else - LOG(WARNING) << "No ceritifcates from system keychain loaded, trying builtin ca bundle"; -#endif - -#ifdef HAVE_BUILTIN_CA_BUNDLE_CRT - std::string_view ca_bundle_content(_binary_ca_bundle_crt_start, - _binary_ca_bundle_crt_end - _binary_ca_bundle_crt_start); - int result = load_ca_to_ssl_ctx_from_mem(ssl_ctx, ca_bundle_content); - LOG(WARNING) << "Loaded builtin ca bundle with " << result << " ceritificates"; -#else - LOG(WARNING) << "Attempted to load builtin ca bundle not available"; -#endif + LOG(INFO) << "Loaded builtin ca bundle with: " << result << " ceritificates"; } +done: // TODO we can add the missing CA if required if (!found_isrg_root_x1 || !found_isrg_root_x2 || !found_digicert_root_g2 || !found_gts_root_r4) { if (!found_isrg_root_x1) { diff --git a/yass/src/net/asio_ssl_internal.hpp b/yass/src/net/asio_ssl_internal.hpp index 69935fdac2..632f488a7f 100644 --- a/yass/src/net/asio_ssl_internal.hpp +++ b/yass/src/net/asio_ssl_internal.hpp @@ -8,17 +8,14 @@ #include -#ifdef HAVE_BUILTIN_CA_BUNDLE_CRT - extern "C" const char _binary_ca_bundle_crt_start[]; extern "C" const char _binary_ca_bundle_crt_end[]; -#endif - extern "C" const char _binary_supplementary_ca_bundle_crt_start[]; extern "C" const char _binary_supplementary_ca_bundle_crt_end[]; int load_ca_to_ssl_ctx_from_mem(SSL_CTX* ssl_ctx, std::string_view cadata); int load_ca_to_ssl_ctx_system(SSL_CTX* ssl_ctx); +int load_ca_to_ssl_ctx_system_extra(SSL_CTX* ssl_ctx); #endif // H_NET_ASIO_SSL_INTERNAL diff --git a/yass/src/net/asio_ssl_test.cpp b/yass/src/net/asio_ssl_test.cpp index 6eed9e26a3..5e2e1ca091 100644 --- a/yass/src/net/asio_ssl_test.cpp +++ b/yass/src/net/asio_ssl_test.cpp @@ -7,7 +7,6 @@ #include "core/utils.hpp" #include "net/asio_ssl_internal.hpp" -#ifdef HAVE_BUILTIN_CA_BUNDLE_CRT TEST(SSL_TEST, LoadBuiltinCaBundle) { bssl::UniquePtr ssl_ctx; ssl_ctx.reset(::SSL_CTX_new(::TLS_client_method())); @@ -17,7 +16,6 @@ TEST(SSL_TEST, LoadBuiltinCaBundle) { int result = load_ca_to_ssl_ctx_from_mem(ssl_ctx.get(), ca_bundle_content); ASSERT_NE(result, 0); } -#endif TEST(SSL_TEST, LoadSupplementaryCaBundle) { bssl::UniquePtr ssl_ctx; @@ -33,17 +31,10 @@ TEST(SSL_TEST, LoadSystemCa) { bssl::UniquePtr ssl_ctx; ssl_ctx.reset(::SSL_CTX_new(::TLS_client_method())); int result = load_ca_to_ssl_ctx_system(ssl_ctx.get()); -#ifdef _WIN32 - if (IsWindowsVersionBNOrGreater(6, 3, 0)) { - ASSERT_NE(result, 0); - } else { - GTEST_SKIP() << "skipped as system version is too low"; - } -#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_OHOS) || BUILDFLAG(IS_FREEBSD) || \ - BUILDFLAG(IS_LINUX) || !defined(HAVE_BUILTIN_CA_BUNDLE_CRT) - ASSERT_NE(result, 0); -#else +#if BUILDFLAG(IS_IOS) // we don't test on iOS GTEST_SKIP() << "skipped as system is not supported"; +#else + ASSERT_NE(result, 0); #endif } diff --git a/yass/src/net/content_server.hpp b/yass/src/net/content_server.hpp index 5f3e1c3552..655ea78b47 100644 --- a/yass/src/net/content_server.hpp +++ b/yass/src/net/content_server.hpp @@ -275,8 +275,8 @@ class ContentServer { socket.non_blocking(true, ec); if constexpr (T::Type == CONNECTION_FACTORY_SERVER) { SetTCPCongestion(socket.native_handle(), ec); - SetTCPKeepAlive(socket.native_handle(), ec); } + SetTCPKeepAlive(socket.native_handle(), ec); SetSocketTcpNoDelay(&socket, ec); conn->on_accept(std::move(socket), ctx.endpoint, ctx.peer_endpoint, connection_id, tlsext_ctx, ssl_socket_data_index_, ssl_client_session_cache_.get()); diff --git a/yass/src/net/stream.hpp b/yass/src/net/stream.hpp index f52d9de546..9a01f26685 100644 --- a/yass/src/net/stream.hpp +++ b/yass/src/net/stream.hpp @@ -472,8 +472,8 @@ class stream : public gurl_base::RefCountedThreadSafe { connected_ = true; if (config::pType_IsClient()) { SetTCPCongestion(socket_.native_handle(), ec); - SetTCPKeepAlive(socket_.native_handle(), ec); } + SetTCPKeepAlive(socket_.native_handle(), ec); SetSocketTcpNoDelay(&socket_, ec); auto start = absl::Now(); diff --git a/yass/tools/build.go b/yass/tools/build.go index 94180e829f..210d39b8f5 100644 --- a/yass/tools/build.go +++ b/yass/tools/build.go @@ -1008,8 +1008,6 @@ func buildStageGenerateBuildScript() { if systemNameFlag == "android" { cmakeArgs = append(cmakeArgs, fmt.Sprintf("-DUSE_CARES=%s", "ON")) - // see #751 - cmakeArgs = append(cmakeArgs, "-DUSE_BUILTIN_CA_BUNDLE_CRT=off") glog.Infof("Using android ndk version %s", androidNdkVer) NdkDir := filepath.Join(androidSdkDir, "ndk", androidNdkVer) if _, err := os.Stat(NdkDir); errors.Is(err, os.ErrNotExist) { @@ -1033,7 +1031,6 @@ func buildStageGenerateBuildScript() { } if systemNameFlag == "harmony" { - cmakeArgs = append(cmakeArgs, "-DUSE_BUILTIN_CA_BUNDLE_CRT=off") if _, err := os.Stat(harmonyNdkDir); errors.Is(err, os.ErrNotExist) { glog.Fatalf("Harmony Ndk Directory at %s demanded", harmonyNdkDir) } @@ -1053,9 +1050,6 @@ func buildStageGenerateBuildScript() { if subSystemNameFlag == "openwrt" { subsystem = "musl" } - if subsystem == "musl" { - cmakeArgs = append(cmakeArgs, "-DUSE_BUILTIN_CA_BUNDLE_CRT=off") - } cmakeArgs = append(cmakeArgs, fmt.Sprintf("-DUSE_CARES=%s", "ON")) gnuType, gnuArch := getGNUTargetTypeAndArch(archFlag, subsystem) cmakeArgs = append(cmakeArgs, fmt.Sprintf("-DCMAKE_TOOLCHAIN_FILE=%s/../cmake/platforms/Linux.cmake", buildDir)) @@ -1086,8 +1080,6 @@ func buildStageGenerateBuildScript() { } if systemNameFlag == "freebsd" && sysrootFlag != "" { - // depends on ca_root_nss package - cmakeArgs = append(cmakeArgs, "-DUSE_BUILTIN_CA_BUNDLE_CRT=off") cmakeArgs = append(cmakeArgs, fmt.Sprintf("-DUSE_CARES=%s", "ON")) var llvmTarget string diff --git a/yass/yass-redir.old.service b/yass/yass-redir.old.service index 406be6b626..3193dbf87e 100644 --- a/yass/yass-redir.old.service +++ b/yass/yass-redir.old.service @@ -10,6 +10,7 @@ ExecStart=/usr/bin/yass_cli -c /etc/yass/redir.json -logtostderr --redir_mode Restart=on-failure RestartSec=5s RestartPreventExitStatus=23 +LimitNOFILE=65536 [Install] WantedBy=multi-user.target diff --git a/yass/yass-redir.service b/yass/yass-redir.service index 406bd3a1e8..7879d43b07 100644 --- a/yass/yass-redir.service +++ b/yass/yass-redir.service @@ -11,6 +11,7 @@ ExecStart=/usr/bin/yass_cli -c /etc/yass/redir.json -log_dir=/var/log/yass-redir Restart=on-failure RestartSec=5s RestartPreventExitStatus=23 +LimitNOFILE=65536 [Install] WantedBy=multi-user.target diff --git a/yass/yass.old.service b/yass/yass.old.service index 9fdd994bae..126349246e 100644 --- a/yass/yass.old.service +++ b/yass/yass.old.service @@ -10,6 +10,7 @@ ExecStart=/usr/bin/yass_cli -c /etc/yass/config.json -logtostderr Restart=on-failure RestartSec=5s RestartPreventExitStatus=23 +LimitNOFILE=65536 [Install] WantedBy=multi-user.target diff --git a/yass/yass.service b/yass/yass.service index 9c15c59a67..c20aefc72f 100644 --- a/yass/yass.service +++ b/yass/yass.service @@ -11,6 +11,7 @@ ExecStart=/usr/bin/yass_cli -c /etc/yass/config.json -log_dir=/var/log/yass Restart=on-failure RestartSec=5s RestartPreventExitStatus=23 +LimitNOFILE=65536 [Install] WantedBy=multi-user.target diff --git a/yass/yass.spec.in b/yass/yass.spec.in index 94835820d7..0cc7f8fa72 100644 --- a/yass/yass.spec.in +++ b/yass/yass.spec.in @@ -222,7 +222,7 @@ cd build -DUSE_CARES=on -DUSE_SYSTEM_CARES="%enable_system_cares_opt" \ -DUSE_LIBCXX="%enable_libcxx_opt" \ -DUSE_CET="%enable_cet_opt" \ - -DENABLE_LTO=on -DENABLE_LLD="%enable_lld_opt" -DUSE_BUILTIN_CA_BUNDLE_CRT=off .. + -DENABLE_LTO=on -DENABLE_LLD="%enable_lld_opt" .. ninja cd ..