Skip to content

Commit e6afe2a

Browse files
committed
typo fix. add typo check workflow and config file.
Assisted-by: Deepseek-V4-Flash:0731 vscode copilot Assisted-by: GLM:5.2 vscode copilot Assisted-by: Longcat:2.0 vscode copilot
1 parent 94420fb commit e6afe2a

52 files changed

Lines changed: 1498 additions & 299 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.codespellrc

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# codespell configuration
2+
# Docs: https://github.com/codespell-project/codespell
3+
4+
[codespell]
5+
# Files / paths to skip entirely
6+
skip = .git,node_modules,.vitepress,.github,package-lock.json,*.svg,*.png,*.jpg,*.jpeg,*.gif,*.webp,*.ico,*.woff,*.woff2,*.ttf,*.eot
7+
8+
# Built-in dictionaries to check
9+
builtin = clear,rare,informal,usage
10+
11+
# Words to ignore (technical terms, codenames, commands, etc.)
12+
# Entries are comma-separated, case-insensitive.
13+
# NOTE: keep on a single line - configparser treats "\" as an escape char,
14+
# so backslash line-continuation would corrupt the word list.
15+
ignore-words-list = abl,reserv,slave,te
16+
17+
# Extra words that are always considered correct
18+
# (one word per line, lowercase)
19+
# ignore-words.txt is maintained next to this file

.github/workflows/lint-docs.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Lint Docs
2+
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
lint:
13+
name: Markdown & spelling
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v6
18+
19+
- name: Set up Node.js
20+
uses: actions/setup-node@v6
21+
with:
22+
node-version: 22
23+
cache: 'npm'
24+
cache-dependency-path: 'package-lock.json'
25+
26+
- name: Install dependencies
27+
run: npm ci --legacy-peer-deps
28+
29+
- name: Markdown lint (markdownlint-cli2)
30+
run: npm run lint:md
31+
32+
- name: Spell check (codespell)
33+
run: |
34+
python3 -m venv .venv-spell
35+
.venv-spell/bin/pip install --quiet codespell
36+
.venv-spell/bin/codespell --config .codespellrc

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ node_modules
33
dist
44
.npmrc
55
.idea
6-
.vitepress/cache
6+
.vitepress/cache
7+
.venv-spell

.markdownlint-cli2.yaml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# Markdownlint configuration.
2+
# Docs: https://github.com/DavidAnson/markdownlint/blob/main/doc/README.md
3+
# CLI: https://github.com/DavidAnson/markdownlint-cli2
4+
5+
config:
6+
default: true
7+
8+
# ---- Rules relaxed to match the existing doc style ----
9+
10+
# MD001 - heading-increment
11+
# Guides use headings inside blockquotes (e.g. "> ### Part 1").
12+
MD001: false
13+
14+
# MD004 - ul-style
15+
# Lists mix "-" and "+" markers.
16+
MD004: false
17+
18+
# MD007 - ul-indent
19+
# Top-level list items are sometimes indented for readability.
20+
MD007: false
21+
22+
# MD013 - line-length
23+
# The docs intentionally use long lines (e.g. tables, links, CJK text).
24+
MD013: false
25+
26+
# MD022 - blanks-around-headings
27+
# Headings are often immediately followed by content.
28+
MD022: false
29+
30+
# MD024 - no-duplicate-heading
31+
# Duplicate headings are common in guides (e.g. "Part 1", "Part 2" sections).
32+
MD024:
33+
siblings_only: true
34+
35+
# MD025 - single-title
36+
# Some pages use multiple top-level headings (e.g. section dividers).
37+
MD025: false
38+
39+
# MD026 - no-trailing-punctuation
40+
# Headings may end with a period in some existing docs.
41+
MD026: false
42+
43+
# MD028 - no-blanks-blockquote
44+
# Blank lines inside/around blockquotes are used for readability.
45+
MD028: false
46+
47+
# MD029 - ol-prefix
48+
# Step headings use numbers like "3.", "4.", "5." directly.
49+
MD029: false
50+
51+
# MD031 - blanks-around-fences
52+
# Fenced code blocks are often glued to the surrounding text.
53+
MD031: false
54+
55+
# MD032 - blanks-around-lists
56+
# Lists are often glued to the surrounding text.
57+
MD032: false
58+
59+
# MD033 - no-inline-html
60+
# VitePress supports HTML components inside Markdown (e.g. <Badge />, <div>).
61+
MD033: false
62+
63+
# MD035 - hr-style
64+
# Horizontal rules mix "---", "___" and "__".
65+
MD035: false
66+
67+
# MD036 - no-emphasis-as-heading
68+
# Existing docs use bold text (**Device/**) as de-facto headings.
69+
MD036: false
70+
71+
# MD041 - first-line-heading
72+
# VitePress pages may start with YAML frontmatter and have no top-level H1.
73+
MD041: false
74+
75+
# MD058 - blanks-around-tables
76+
# Tables are often glued to the surrounding text.
77+
MD058: false
78+
79+
globs:
80+
- "**/*.md"
81+
82+
ignores:
83+
- "node_modules/**"
84+
- ".vitepress/**"
85+
- "package-lock.json"

.vitepress/en.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ export const en = defineConfig({
1414
'/': { base: '', items: sidebarDocs() },
1515
},
1616
editLink: {
17-
text: 'Edit this page on Github',
17+
text: 'Edit this page on GitHub',
1818
pattern: 'https://github.com/Project-Aloha/DocumentWebsite/edit/main/:path'
1919
},
2020
footer: {
21-
copyright: `Site CC BY-NC-SA 4.0 | CopyRight © 2022-${new Date().getFullYear()} Project-Aloha`
21+
copyright: `Site CC BY-NC-SA 4.0 | Copyright © 2022-${new Date().getFullYear()} Project-Aloha`
2222
},
2323
}
2424
})

.vitepress/zh.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export const zh = defineConfig({
3030
next: '下一页'
3131
},
3232
editLink: {
33-
text: '在 Github 上编辑此页',
33+
text: '在 GitHub 上编辑此页',
3434
pattern: 'https://github.com/Project-Aloha/DocumentWebsite/edit/main/:path'
3535
},
3636
footer: {

DualBoot/Config.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ If you do not need it, set the two values to 0.
55

66
## Format
77
- A config file should only contain the following contents.
8-
```
8+
```text
99
StackBase=0x00000000
1010
StackSize=0x00000000
1111
RestartReasonAddress=0x00000000
1212
```
1313
- The value after `=` must be hex number.
14-
- Config file not in this format will cause unexceptional behavior.
14+
- Config file not in this format will cause unexpected behavior.
1515

1616
## How to get these values
1717
- `StackBase`
@@ -29,5 +29,4 @@ If you do not need it, set the two values to 0.
2929
android:/# printf "RestartReasonAddress=0x%x\n" $((0x$(realpath /sys/firmware/devicetree/base/soc/qcom\,msm-imem@*/restart_reason@* | awk -F'[@/]' '{print $(NF-2)"+0x"$(NF)}')))
3030
RestartReasonAddress=0x146bf65c
3131
```
32-
33-
32+

DualBoot/Introduction.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## DualBoot Kernel Patcher
22
> Based on [SurfaceDuoDualBootKernelImagePatcher](https://github.com/WOA-Project/SurfaceDuoDualBootKernelImagePatcher).
33
4-
Kernel Patcher is a tool can inject shell codes into Linux kernel header, which can help use archive dual boot.
4+
Kernel Patcher is a tool can inject shell codes into Linux kernel header, which can help achieve dual boot.
55
Can also do some more interesting things like replace dtb provided by abl with ours, select different linux kernel etc.
66

77
## DualBoot Boot Order
@@ -10,7 +10,7 @@ flowchart TD
1010
bl[Bootloader]
1111
subgraph patched_kernel[Patched Kernel]
1212
subgraph ori_kernel[Origin Linux Kernel]
13-
subgraph shellcode[ShellCodeᅟᅠ]
13+
subgraph shellcode[ShellCode]
1414
start_shellcode(Entry of Shell Code)
1515
check_memory{Check flags in memory}
1616
copy_fd[Copy UEFI FD to UEFI stack region]
@@ -54,4 +54,4 @@ block-beta
5454
shell_code["Shell Code"]
5555
rest_kernel["Rest of Kernel"]
5656
fd["UEFI FD"]
57-
```
57+
```

DualBoot/PatchKernel.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
44
## Prepare
55
- An android device.
6-
- Download `UEFI FD` file from [Github Action](https://github.com/Project-Aloha/mu_aloha_platforms/actions)(You may need to login to download artifacts) or [Release Page](https://github.com/Project-Aloha/mu_aloha_platforms/releases) of uefi repository.
6+
- Download `UEFI FD` file from [GitHub Action](https://github.com/Project-Aloha/mu_aloha_platforms/actions)(You may need to login to download artifacts) or [Release Page](https://github.com/Project-Aloha/mu_aloha_platforms/releases) of uefi repository.
77
- `Magiskboot` for your environment, there are prebuilt binaries on github.
88
- DualBoot kernel patcher binary and shellcode binaries for your devices from [release page](https://github.com/Project-Aloha/DualBootKernelPatcher/releases) or [action page](https://github.com/Project-Aloha/DualBootKernelPatcher/actions).
99

@@ -13,9 +13,9 @@
1313

1414
## Steps
1515
> Assume you have done the following steps on your android device.
16-
> 1. Root your device with magisk.
17-
> 2. Downloaded and installed termux.
18-
> 3. Installed root-repo and tsu in termux with apt.
16+
> 1. Root your device with magisk.
17+
> 2. Downloaded and installed termux.
18+
> 3. Installed root-repo and tsu in termux with apt.
1919
2020
- Get Android Boot Image.
2121
+ The boot image usually can be found at `/dev/block/by-name/boot` or `/dev/block/by-name/boot_a` (or _b).
@@ -27,7 +27,7 @@
2727
```
2828

2929
- Unpack it with magiskboot.
30-
+ If your device was rooted by magisk, there should be an magiskboot binary at `/data/adb/magisk/magiskboot`
30+
+ If your device was rooted by magisk, there should be a magiskboot binary at `/data/adb/magisk/magiskboot`
3131
+ By the way you can press the `tab` button in termux to automatically fill path, instead of typing the characters one by one.
3232
+ Do Unpack
3333
```bash
@@ -61,7 +61,7 @@ Please do not patch a patched kernel.
6161
- Apply patch with dualboot kernel patcher.
6262
+ Assume the patcher and shellcodes and config you downloaded above was saved at `/sdcard/Download/`
6363
+ Unpack these zips with these cmds, or extract in file manager.
64-
```
64+
```bash
6565
unzip /sdcard/Download/Shellcodes.zip
6666
unzip /sdcard/Download/DualBootKernelPatcher-Linux-arm64.zip
6767
unzip /sdcard/Download/Config.zip
@@ -81,7 +81,7 @@ Please do not patch a patched kernel.
8181
mv patched_kernel kernel
8282
/data/adb/magisk/magiskboot repack boot.img
8383
```
84-
+ You will get a file named `new-boot.img` if magiskboot success.
84+
+ You will get a file named `new-boot.img` if magiskboot succeeds.
8585

8686
- Test with fastboot.
8787
+ Send `new-boot.img` to your computer:
@@ -100,13 +100,13 @@ Please do not patch a patched kernel.
100100
+ See if the device is entering a correct os.
101101

102102
- Flash boot image into disk
103-
+ If everything goes well and boot image was backuped. You can flash boot image into disk now. Then no fastboot command is required when using dualboot.
103+
+ If everything goes well and boot image was backed up. You can flash boot image into disk now. Then no fastboot command is required when using dualboot.
104104
+ Flash boot:
105105
```powershell
106106
fastboot flash boot new-boot.img
107107
```
108108
- Recover original boot image:
109-
+ If you want to remove dualboot, flash your backuped boot image.
109+
- If you want to remove dualboot, flash your backed up boot image.
110110
```powershell
111111
fastboot flash boot.img
112112
```

DualBoot/ShellCode.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ Shell Code is the key place why we patch kernel or what do we patch kernel for.
77
## DualBoot ShellCodes
88
- For DualBoot feature, here provided several sources:
99
+ [DummyHead.S](https://github.com/Project-Aloha/DualBootKernelPatcher/blob/main/ShellCode/DummyHead.S)
10-
- PlaceHolders of Linux Kernel hdr.(refer `kernel64_hdr` struct in [Qualcomm ABL](https://git.codelinaro.org/clo/la/abl/tianocore/edk2/-/blob/KERNEL.PLATFORM.2.1.r1-04700-kernel.0/QcomModulePkg/Include/Library/BootImage.h?ref_type=tags#L477-489))
10+
- Placeholders of Linux Kernel hdr.(refer `kernel64_hdr` struct in [Qualcomm ABL](https://git.codelinaro.org/clo/la/abl/tianocore/edk2/-/blob/KERNEL.PLATFORM.2.1.r1-04700-kernel.0/QcomModulePkg/Include/Library/BootImage.h?ref_type=tags#L477-489))
1111
- This part will not be injected into Linux kernel.
1212

1313
+ `ShellCode.xxx.S`
1414
- Read flags in memory or do other check.
1515
- Once the conditions are met, will jump to `_UEFI`, otherwise continue next instruction.
1616

1717
+ [CommonTail.S](https://github.com/Project-Aloha/DualBootKernelPatcher/blob/main/ShellCode/CommonTail.S)
18-
- First instruction is jumping to linux, that happen when condition in `ShellCode.xxx.S` not meet.
19-
- Provide `_UEFI`label, `ShellCode.xxx.S` will jump here after conditions.
20-
- Handles unexceptional behavior in the end.
18+
- First instruction is jumping to linux, that happens when the condition in `ShellCode.xxx.S` is not met.
19+
- Provide `_UEFI` label, `ShellCode.xxx.S` will jump here after conditions.
20+
- Handles unexpected behavior in the end.
2121

2222
## DTB Wrapper
2323
- Coming soon.

0 commit comments

Comments
 (0)