README.en.md 2.9 KB
Newer Older
O
openeuler-ci-bot 已提交
1 2 3 4
# raspberrypi

#### Description

Y
yafen 已提交
5
This repository provides scripts for building openEuler image for Raspberry Pi and related documents:
O
openeuler-ci-bot 已提交
6

Y
yafen 已提交
7 8
* [Script for building openEuler image for Raspberry Pi](build_img.sh)
* [Building openEuler image for Raspberry Pi](documents/openEuler镜像的构建.md)
Y
yafen 已提交
9
* [Cross-compile the kernel](documents/交叉编译内核.md)
Y
yafen 已提交
10 11
* [Install openEuler on a SD card](documents/树莓派刷机.md)
* [How to use Raspberry Pi](documents/树莓派使用.md)
O
openeuler-ci-bot 已提交
12 13


Y
yafen 已提交
14
#### Build openEuler image
O
openeuler-ci-bot 已提交
15

Y
yafen 已提交
16
##### Prepare the environment
O
openeuler-ci-bot 已提交
17

Y
yafen 已提交
18
To build openEuler AArch64 image for Raspberry Pi, the requirements of runing scripts of this repository are as follows:
Y
yafen 已提交
19
- OS: openEuler or Centos 7/8
Y
yafen 已提交
20
- Architecture: AArch64
O
openeuler-ci-bot 已提交
21

Y
yafen 已提交
22
For example, you can use [QEMU](https://www.qemu.org/) to build AArch64 system emulation or directly use an AArch64 hardware such as Raspberry Pi.
O
openeuler-ci-bot 已提交
23

Y
yafen 已提交
24
##### Run the scripts to build image
O
openeuler-ci-bot 已提交
25

Y
yafen 已提交
26
Refer to [Script for building openEuler image for Raspberry Pi](documents/openEuler镜像的构建.md) for details.
O
openeuler-ci-bot 已提交
27

Y
yafen 已提交
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
Build script: build_img.sh,which can be set 0/5/7 parameters.

1. Build with default parameters

`sudo bash build_img.sh`

2. Build with custom parameters

`sudo bash build_img.sh KERNEL_URL KERNEL_BRANCH KERNEL_DEFCONFIG DEFAULT_DEFCONFIG REPO_FILE_URL --cores MAKE_CORES`

or

`sudo bash build_img.sh KERNEL_URL KERNEL_BRANCH KERNEL_DEFCONFIG DEFAULT_DEFCONFIG REPO_FILE_URL`

The meaning of each parameter:

- KERNEL_URL:The URL of kernel source's repository,which defaults to `git@gitee.com:openeuler/raspberrypi-kernel.git`.
- KERNEL_BRANCH:The branch name of kernel source's repository,which defaults to `openEuler-1.0-LTS-raspi`.
- KERNEL_DEFCONFIG:The filename of configuration for compiling kernel, which defaults to `openeuler-raspi_defconfig`. The configuration file should be in the config directory or in arch/arm64/configs of the kernel source. If this configuration file does not exist, the script uses the next parameter: DEFAULT_DEFCONFIG.
- DEFAULT_DEFCONFIG:The filename of configuration for kernel, which defaults to `openeuler-raspi_defconfig`. The configuration file should be in arch/arm64/configs of the kernel source. If both KERNEL_DEFCONFIG and this file do not exist, the process of building image will exit.
Y
yafen 已提交
48
- REPO_FILE:The URL or name of openEuler's file, which defaults to `openEuler-20.03-LTS.repo`. Caution, if REPO_FILE is a file name, please make sure this file in the config directory. Otherwise, if REPO_FILE is a URL, please make sure you can get a correct repo file from this URL.
Y
yafen 已提交
49 50 51 52 53 54
- --cores:Followed by parameter MAKE_CORES
- MAKE_CORES:The number of parallel compilations, according to the actual number of CPU of the server running the script. The default is 18.

#### Use image

Refer to [Install openEuler on a SD card](documents/树莓派刷机.md) and [How to use Raspberry Pi](documents/树莓派使用.md) for details about how to use the image on Raspberry Pi.