Skip to content

Commit

Permalink
update linux doc
Browse files Browse the repository at this point in the history
Signed-off-by: iotah <[email protected]>
  • Loading branch information
IotaHydrae committed Apr 8, 2024
1 parent 5654933 commit 53f4974
Show file tree
Hide file tree
Showing 9 changed files with 173 additions and 4 deletions.
Binary file added assets/images/backlight-wiring.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/fb-test.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/luckfox-pico-buildroot-fb.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/pico-on-jig.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/reset-wiring.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 11 additions & 1 deletion content/docs/get-started/core-board.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ seo:

如果您自行准备核心板,那么在焊接排针的时候,应该以排针向下的方式焊接。

在焊接核心板排针的时候,可以使用如下3D打印模型辅助[pico-soldering-jig.stl](http://embeddedboys.com/uploads/pico-soldering-jig.stl)
在焊接核心板排针的时候,可能会因对齐问题导致排针焊歪,此时可以使用如下3D打印模型辅助[pico-soldering-jig.stl](http://embeddedboys.com/uploads/pico-soldering-jig.stl)
{{< figure
src="images/pico-soldering-jig.webp"
process="fill 480x270"
Expand All @@ -54,6 +54,16 @@ seo:
caption=""
>}}
将排针放至孔中,再放上Pico,就像这样:
{{< figure
src="images/pico-on-jig.jpg"
process="fill 480x270"
width="160"
sizes="75vw"
alt=""
caption=""
>}}
然后就可以开始焊接啦

{{< callout context="danger" title="危险" icon="alert-octagon" >}}
不要将排针向上焊接的核心板安装到显示屏模组中!
Expand Down
143 changes: 143 additions & 0 deletions content/docs/other-platform/linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,146 @@ seo:
canonical: "" # custom canonical URL (optional)
noindex: false # false (default) or true
---

本文用于介绍如何将此拓展板部署到Linux平台,因为此拓展板基于GPIO设计,在Linux中只目前只能使用gpiolib接口驱动,因为各平台实现方式不同,所以速度会有较大差异,效率普遍低下,但是能用😊。

相关资料仓库:[https://github.com/embeddedboys/pico_dm_qd3503728_linux](https://github.com/embeddedboys/pico_dm_qd3503728_linux)

## Luckfox Pico{#luckfox_pico}

luckfox pico有两个版本的SDK,分别是Buildroot和Ubuntu,我们针对这两个版本都做了适配。

### 硬件改动 飞线

在使用Luckfox Pico的时候,需要先飞两根线

1. 短接`GP21``GP22`,因为luckfox pico的GP22是NC(无连接)的
{{<figure
src="images/reset-wiring.png"
process="fill 480x270"
width="160"
sizes="75vw"
>}}
2. 短接电阻`R3``R4`的左侧,使背光常开,因为luckfox pico的GP28是NC
{{<figure
src="images/backlight-wiring.png"
process="fill 480x270"
width="160"
sizes="75vw"
>}}

### Buildroot

1. 修改设备树

在根节点中添加如下节点
```shell
ili9488 {
status = "okay";
compatible = "ultrachip,uc8253";
pinctrl-names = "default";
pinctrl-0 = <&i80_pins>;
fps = <30>;
buswidth = <8>;
debug = <0x7>;
db = <&gpio1 RK_PB2 GPIO_ACTIVE_HIGH>,
<&gpio1 RK_PB3 GPIO_ACTIVE_HIGH>,
<&gpio1 RK_PC7 GPIO_ACTIVE_HIGH>,
<&gpio1 RK_PC6 GPIO_ACTIVE_HIGH>,
<&gpio1 RK_PC5 GPIO_ACTIVE_HIGH>,
<&gpio1 RK_PC4 GPIO_ACTIVE_HIGH>,
<&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>,
<&gpio1 RK_PD3 GPIO_ACTIVE_HIGH>,
<&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>,
<&gpio1 RK_PC0 GPIO_ACTIVE_HIGH>,
<&gpio1 RK_PC1 GPIO_ACTIVE_HIGH>,
<&gpio1 RK_PC2 GPIO_ACTIVE_HIGH>,
<&gpio1 RK_PC3 GPIO_ACTIVE_HIGH>,
<&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>,
<&gpio1 RK_PD0 GPIO_ACTIVE_HIGH>,
<&gpio1 RK_PD1 GPIO_ACTIVE_HIGH>;

dc = <&gpio4 RK_PA3 GPIO_ACTIVE_HIGH>; //RS
wr = <&gpio4 RK_PA2 GPIO_ACTIVE_HIGH>;
reset = <&gpio4 RK_PA4 GPIO_ACTIVE_HIGH>; //RES
};
```

修改pinctrl,设定gpio方向、驱动强度等
```shell
&pinctrl {
i80 {
i80_pins: i80-pins {
rockchip,pins =
<1 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none_drv_level_0>,
<1 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none_drv_level_0>,
<1 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none_drv_level_0>,
<1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none_drv_level_0>,
<1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none_drv_level_0>,
<1 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none_drv_level_0>,
<1 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none_drv_level_0>,
<1 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none_drv_level_0>,
<1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none_drv_level_0>,
<1 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none_drv_level_0>,
<1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none_drv_level_0>,
<1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none_drv_level_0>,
<1 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none_drv_level_0>,
<0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none_drv_level_0>,
<1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none_drv_level_0>,
<1 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none_drv_level_0>,
<4 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none_drv_level_0>,
<4 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none_drv_level_0>,
<4 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none_drv_level_0>;
};
};
};

```

2. 修改内核配置,开启fb console支持
3. 重新编译,烧录boot.img,重启
```shell
./build.sh kernel
```
4. 编译,加载fb驱动

#### 如果您觉得太麻烦了,可以使用我们编译好的文件,但这会覆盖您设备当前的内核及设备树,操作步骤如下

1. 下载固件

[boot.img](http://embeddedboys.com/uploads/luckfox-pico/boot.img)

[ili9488_fb.ko](http://embeddedboys.com/uploads/luckfox-pico/ili9488_fb.ko)

2. 将固件推送至设备中
```shell
adb push boot.img /root/
adb push ili9488_fb.ko /root/
```
3. 使用adb访问设备终端,烧录boot.img
```shell
adb shell

# 此时已位于设备端
dd if=/root/boot.img of=/dev/mmcblk1p4 bs=1M && reboot
```
4. 待设备重启完成后,再次使用adb访问设备终端,加载设备驱动
```shell
adb shell

# 此时已位于设备端
insmod /root/ili9488_fb.ko
```

5. 此时可以看到屏幕已经出现fb console

{{<figure
src="images/luckfox-pico-buildroot-fb.jpg"
>}}

### Ubuntu

## Milk-V Duo{#milk-v-duo}
4 changes: 2 additions & 2 deletions content/docs/other-platform/note.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ seo:

### Linux

- [ ] 幸狐 Luckfox Pico
- [ ] Milk-V Duo
- [x] [幸狐 Luckfox Pico (开发中...)](http://localhost:1313/docs/other-platform/linux/#luckfox_pico)
- [ ] [Milk-V Duo](http://localhost:1313/docs/other-platform/linux/#milk-v-duo)

### ESP32-S3
- [ ] WalnutPi 核桃派PicoW ESP32-S3
Expand Down
18 changes: 17 additions & 1 deletion hugo_stats.json
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@
"3-拉取-pico-sdk-子仓库代码",
"TableOfContents",
"arduino",
"buildroot",
"buttonColorMode",
"clangd未完",
"cmakeliststxt-配置说明",
Expand All @@ -312,16 +313,20 @@
"further-reading",
"fzf",
"h-rh-i-0",
"heading",
"jlink-openocd烧录",
"lcd-相关",
"linux",
"luckfox-pico",
"luckfox-picoluckfox_pico",
"luckfox_pico",
"lvgl-8080显示屏通用工程",
"lvgl-83",
"lvgl-9",
"lvgl-freertos-工程",
"lvgl-裸机工程",
"micropython",
"milk-v-d",
"milk-v-duo",
"nav-tab",
"nav-tabContent",
"no-os-fatfs-sd-spi-rpi-pico",
Expand Down Expand Up @@ -367,6 +372,7 @@
"tabs-upload-program-1",
"tabs-upload-program-1-tab",
"toc",
"ubuntu",
"uf2",
"uf2-烧录",
"vscode相关",
Expand All @@ -379,6 +385,14 @@
"器材准备",
"基于pico-sdk的",
"如果上述版本都无法下载尝试访问如下链接直接下载压缩包",
"如果你觉得太麻烦可以使用我们编译好的文件但是会覆盖您的内核设备树操作步骤如下",
"如果您觉得太麻烦了可以使用我们编译好的文件但是会覆盖您的内核设备树操作步骤如下",
"如果您觉得太麻烦了可以使用我们编译好的文件但是这会覆盖您当前设备的内核设备树操作步骤如下",
"如果您觉得太麻烦了可以使用我们编译好的文件但是这会覆盖您的内核设备树操作步骤如下",
"如果您觉得太麻烦了可以使用我们编译好的文件但是这会覆盖您设备当前的内核设备树操作步骤如下",
"如果您觉得太麻烦了可以使用我们编译好的文件但这会覆盖您设备当前的内核及设备树操作步骤如下",
"如果您觉得太麻烦了可以使用我们编译好的文件但这会覆盖您设备当前的内核设备树操作步骤如下",
"如果您觉得太麻烦可以使用我们编译好的文件但是会覆盖您的内核设备树操作步骤如下",
"官方版本国产版1",
"官方版本国产版2",
"性能优化",
Expand All @@ -396,6 +410,7 @@
"烧录",
"独立于本项目的通用工程",
"电流与时钟速度关系",
"硬件改动-飞线",
"第三方开源",
"编译工程",
"裸机版本",
Expand All @@ -405,6 +420,7 @@
"适用于rp2040的",
"通用",
"部署-pico-sdk",
"飞线",
"驱动支持情况"
]
}
Expand Down

0 comments on commit 53f4974

Please sign in to comment.