Skip to content

Commit

Permalink
Merge pull request #652 from wu-yue-yu/main
Browse files Browse the repository at this point in the history
lpi3h: sdk and image update
  • Loading branch information
Zepan authored Apr 7, 2024
2 parents 512038e + 714585d commit f000d54
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 7 deletions.
7 changes: 7 additions & 0 deletions docs/hardware/en/longan/h618/lpi3h/3_images.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
title: Images
keywords: Linux, Longan, H618, SBC, ARM, image
update:
- date: 2023-04-07
version: v1.1
author: ztd
content:
- Add Debian CLI image
- date: 2023-12-08
version: v1.0
author: ztd
Expand Down Expand Up @@ -37,6 +42,8 @@ Account: `sipeed`, Password: `licheepi`.
- Add GPIO sysfs
- Allow SSH login as root user
- Add USB gadget functionality
20240407:
- Add Debian CLI image

Download:

Expand Down
16 changes: 13 additions & 3 deletions docs/hardware/en/longan/h618/lpi3h/7_develop_mainline.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
title: Mainline Linux
keywords: Linux, Longan, H618, SBC, ARM, Kernel, SDK, Develop
update:
- date: 2024-04-07
version: v1.1
author: ztd
content:
- Add Debian & Ubuntu CLI image build instructions.
- date: 2023-12-08
version: v1.0
author: ztd
Expand All @@ -26,7 +31,7 @@ cd LonganPi-3H-SDK
./mkatf.sh
./mklinux.sh
./mkuboot.sh
./mkrootfs.sh
sudo ./mkrootfs-debian-gui.sh
```

The generated Image files, device tree files will be copied to the overlay/boot/ folder under the repository directory. The generated kernel modules will be copied to the overlay/usr/ folder under the repository directory.
Expand All @@ -39,6 +44,11 @@ The `uboot` folder stores the U-Boot patch files, which will be automatically ap

The `overlay` folder contains some necessary files that will be automatically overlayed to the constructed rootfs when running mkrootfs.sh. mkrootfs.sh is used to build the required root file system for burning, you can choose whether to skip the construction of the Debian rootfs according to actual needs, see the script comments for details.

The `mkrootfs*.sh` is used to build the root file system required for flashing. You can choose the version of the root file system according to your needs:
**mkrootfs-debian-gui.sh** will build the rootfs of the Debian distribution with a desktop environment included;
**mkrootfs-debian-cli.sh** will build the rootfs of the Debian distribution without a desktop environment;
**mkrootfs-ubuntu-cli.sh** will build the rootfs of the Ubuntu distribution without a desktop environment;

After the construction is complete, the next step is to introduce how to make a TF card for booting and how to package the burnable TF card boot image.

## Make a boot TF card
Expand Down Expand Up @@ -155,7 +165,7 @@ Flash rootfs:
```shell
mkdir -p /tmp/rootfs
sudo mount /dev/sdc2 /tmp/rootfs
sudo tar -vxf build/rootfs.tar -C /tmp/rootfs/
sudo tar -vxf build/rootfs_debian_gui.tar -C /tmp/rootfs/
sync
sudo umount /tmp/rootfs
```
Expand Down Expand Up @@ -242,7 +252,7 @@ sudo cp -r overlay/boot/* /tmp/kernel
# 写入 rootfs:
mkdir -p /tmp/rootfs
sudo mount /dev/loop24 /tmp/rootfs
sudo tar -vxf build/rootfs.tar -C /tmp/rootfs/
sudo tar -vxf build/rootfs_debian_gui.tar -C /tmp/rootfs/
# 取消挂载
sync
Expand Down
7 changes: 7 additions & 0 deletions docs/hardware/zh/longan/h618/lpi3h/3_images.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
title: 镜像集合
keywords: Linux, Longan, H618, SBC, ARM, image
update:
- date: 2023-04-07
version: v1.1
author: ztd
content:
- Add Debian CLI image
- date: 2023-12-08
version: v1.0
author: ztd
Expand Down Expand Up @@ -37,6 +42,8 @@ Sipeed 官方镜像基于 Debian 系统修改适配。
- 添加 GPIO sysfs
- 允许使用 root 用户登陆 SSH
- 添加 USB gadget 功能
20240407:
- 添加 Debian CLI 版本镜像

下载地址:
百度网盘:[点我](https://pan.baidu.com/s/1VGaARAq6dbicFy4VOytRuw) 提取码: cd68
Expand Down
17 changes: 13 additions & 4 deletions docs/hardware/zh/longan/h618/lpi3h/7_develop_mainline.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
title: 主线 Linux
keywords: Linux, Longan, H618, SBC, ARM, Kernel, SDK, Develop
update:
- date: 2024-04-07
version: v1.1
author: ztd
content:
- Add Debian & Ubuntu CLI image build instructions.
- date: 2023-12-08
version: v1.0
author: ztd
Expand All @@ -27,7 +32,7 @@ cd LonganPi-3H-SDK
./mkatf.sh
./mklinux.sh
./mkuboot.sh
./mkrootfs.sh
sudo ./mkrootfs-debian-gui.sh
```

生成的 Image 文件,设备树文件,会复制到该仓库目录下的 overlay/boot/ 文件夹中,生成的内核模块会复制到该仓库目录下的 overlay/usr/ 文件夹中。
Expand All @@ -38,7 +43,11 @@ cd LonganPi-3H-SDK
`uboot` 文件夹下,存放的是 uboot 的 patch 文件, 在运行 mkuboot.sh 时会自动将这些 patch 打入到uboot 源码中。

`overlay` 文件夹下有一些必要的文件,在运行 mkrootfs.sh 时会自动将这些文件覆盖到构建出来的 rootfs 中。
mkrootfs.sh 用于构建烧录所需要的根文件系统,可以根据需要选择是否跳过 debian rootfs 的构建,具体请看脚本中的注释。

`mkrootfs*.sh` 用于构建烧录所需要的根文件系统,可以根据需要选择根文件系统的版本:
**mkrootfs-debian-gui.sh** 将构建包含桌面环境的 Debian 发行版 rootfs;
**mkrootfs-debian-cli.sh** 将构建不包含桌面环境的 Debian 发行版 rootfs;
**mkrootfs-ubuntu-cli.sh** 将构建不包含桌面环境的 Ubuntu 发行版 rootfs;

构建完成后,接下来介绍如何制作一张启动 TF 卡,以及如何打包制作可烧录的 TF 卡启动镜像。

Expand Down Expand Up @@ -155,7 +164,7 @@ sudo umount /tmp/kernel
```shell
mkdir -p /tmp/rootfs
sudo mount /dev/sdc2 /tmp/rootfs
sudo tar -vxf build/rootfs.tar -C /tmp/rootfs/
sudo tar -vxf build/rootfs_debian_gui.tar -C /tmp/rootfs/
sync
sudo umount /tmp/rootfs
```
Expand Down Expand Up @@ -242,7 +251,7 @@ sudo cp -r overlay/boot/* /tmp/kernel
# 写入 rootfs:
mkdir -p /tmp/rootfs
sudo mount /dev/loop24 /tmp/rootfs
sudo tar -vxf build/rootfs.tar -C /tmp/rootfs/
sudo tar -vxf build/rootfs_debian_gui.tar -C /tmp/rootfs/

# 取消挂载
sync
Expand Down

0 comments on commit f000d54

Please sign in to comment.