Skip to content

Commit 2a1d57c

Browse files
committed
added some notes
1 parent 7176cb4 commit 2a1d57c

File tree

6 files changed

+89
-9
lines changed

6 files changed

+89
-9
lines changed

src/views/develop/guides/_sidebar.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,5 @@
1919
* Wayland
2020
* Media Format
2121
* Library Version
22-
* :bi-cpu:Reverse Engineering
23-
* Web App
24-
* Native App
25-
* Firmware
26-
* System
2722
* :bi-lightbulb:Contribute to Guides
2823
* [Document Syntax](/develop/guides/docs-syntax)

src/views/hacking/_sidebar.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# All Guides
2+
3+
* Introduction
4+
* :bi-braces:Reverse Engineering
5+
* Web App
6+
* Native App
7+
* Firmware
8+
* System
9+
* :bi-motherboard:Using Main Boards
10+
* [Power Supply](/hacking/main-board/power-supply)
11+
* [Video Output](/hacking/main-board/video-output)

src/views/hacking/index.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Hacking
2+
3+
---
4+
5+
Okay, we're now getting serious. This section mainly focuses on reverse engineering, and some hardware related
6+
techniques.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Power Supply
2+
3+
---
4+
5+
Most TV models use 13.2V DC to power up the main board. Having a 12V DC power supply with at least 1.5A current rating
6+
as the board draws around 1.2A current when powered up.
7+
8+
## LCD Models (12-pin Connector)
9+
10+
For many boards, a 12-pin connector is used to power up the board.
11+
12+
On some older boards:
13+
14+
| Left | | | | | Right |
15+
|--------|------|------|------|-----|-------|
16+
| 1 | 3 | 5 | 7 | 9 | 11 |
17+
| PWR ON | GND | D13V | A13V | GND | - |
18+
| - | D13V | D13V | A13V | GND | - |
19+
| 2 | 4 | 6 | 8 | 10 | 12 |
20+
21+
On some newer boards:
22+
23+
| Left | | | | | Right |
24+
|------|-----|------|------|------|--------|
25+
| 1 | 3 | 5 | 7 | 9 | 11 |
26+
| - | GND | A13V | D13V | GND | PWR ON |
27+
| - | GND | A13V | D13V | D13V | - |
28+
| 2 | 4 | 6 | 8 | 10 | 12 |
29+
30+
## OLED Models (24-pin Connector)
31+
32+
| Left | | | | | | | | | | | Right |
33+
|------|---|---|---|----|----|----|----|----|----|----|-------|
34+
| 1 | 3 | 5 | 7 | 9 | 11 | 13 | 15 | 17 | 19 | 21 | 23 |
35+
| - | - | - | - | - | - | - | - | - | - | - | - |
36+
| - | - | - | - | - | - | - | - | - | - | - | - |
37+
| 2 | 4 | 6 | 8 | 10 | 12 | 14 | 16 | 18 | 20 | 22 | 24 |
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
LG uses different panel interfaces for different models:
2+
3+
1. LVDS for older 1080p models
4+
2. Vx1 for some UHD models
5+
3. EPI (propertiery p2p interface by LG), very common
6+
7+
We can easily get video output from 1 & 2. However, without expensive tool, it's very hard to get video output.
8+
9+
### Boards to Buy
10+
11+
| Series | webOS | Panel Interface | Resolution | Part No. (ATSC) | Part No. (DVB) | Notes |
12+
|--------|-------|-----------------|------------|-----------------|----------------|--------------------------------------------|
13+
| EC93 | 1.x | LVDS | 1920x1080 | EAX66612205 | EAX65612205 | |
14+
| LF63 | 2.x | LVDS | 1920x1080 | EAX66202604 | EAX66202603 | |
15+
| UM76 | 4.x | Vx1 | 3840x2160 | EAX68253604 | EAX68253604 | Vx1 interface only available for 75" model |

webpack/markdown-to-page.js

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,32 @@ function getPagePath(relative) {
2727
return `/${path.posix.format(parsed.name === 'index' ? {root: parsed.dir} : {dir: parsed.dir, name: parsed.name})}`;
2828
}
2929

30+
/**
31+
* @param fs {import('webpack').LoaderContext<Object>['fs']}
32+
* @param dir {string}
33+
* @param root {string}
34+
* @return {string|null}
35+
*/
36+
function findSidebar(fs, dir, root) {
37+
while (dir !== root) {
38+
const sidebar = fs.readdirSync(dir).find(ent => ent.startsWith('_sidebar.'));
39+
if (sidebar) {
40+
return path.join(dir, sidebar);
41+
}
42+
dir = path.dirname(dir);
43+
}
44+
return null;
45+
}
46+
3047
/**
3148
* @param content {string}
3249
* @param meta {Object}
3350
* @param loaderContext {import('webpack').LoaderContext<Object> & { data: { [key: string]: any } | string }}
3451
*/
3552
export default function (content, meta, loaderContext) {
3653
const {resourcePath, data, context, rootContext, fs} = loaderContext;
37-
const sidebarEnt = fs.readdirSync(path.dirname(resourcePath))
38-
.find(ent => ent.startsWith('_sidebar.'));
54+
const sidebarPath = findSidebar(fs, path.dirname(resourcePath), rootContext);
55+
const sidebarContent = sidebarPath && fs.readFileSync(sidebarPath, 'utf-8').trim();
3956
const processor = remark()
4057
.use(remarkBootstrapIcon)
4158
.use(remarkRehype, {allowDangerousHtml: true})
@@ -48,8 +65,7 @@ export default function (content, meta, loaderContext) {
4865
})
4966
.use(rehypeStringify, {allowDangerousCharacters: true, allowDangerousHtml: true});
5067
/** @type {VFile|undefined} */
51-
const sidebar = sidebarEnt ? processor
52-
.processSync(fs.readFileSync(path.join(context, sidebarEnt))) : undefined;
68+
const sidebar = sidebarContent && processor.processSync(sidebarContent);
5369
Object.assign(data, meta, sidebar && {sidebar: sidebar.data.title || 'Pages'});
5470
return `{{#partial 'sidebar'}}${sidebar}{{/partial}}{{#> page }}${content}{{/page}}`;
5571
}

0 commit comments

Comments
 (0)