提交 e2235538 编写于 作者: E ester.zhou

Update docs (22205)

Signed-off-by: Nester.zhou <ester.zhou@huawei.com>
上级 3276fef7
...@@ -19,6 +19,7 @@ You can use the Bootloader provided by the chipset vendor or open-source U-Boot ...@@ -19,6 +19,7 @@ You can use the Bootloader provided by the chipset vendor or open-source U-Boot
## Adaptation, Building, Burning, and Startup ## Adaptation, Building, Burning, and Startup
1. Prepare the kernel configuration files, especially the chipset-related configuration files. 1. Prepare the kernel configuration files, especially the chipset-related configuration files.
Source code directory of the configuration files: **kernel/linux/config/** Source code directory of the configuration files: **kernel/linux/config/**
Create a **<*YOUR_CHIP*>_small_defconfig** file, such as **hi3516dv300_small_defconfig**, in the **linux-4.19/arch/arm/configs/** directory. The configuration file can be created by combining the general-purpose **small_common_defconfig** file and chipset-specific configurations. Create a **<*YOUR_CHIP*>_small_defconfig** file, such as **hi3516dv300_small_defconfig**, in the **linux-4.19/arch/arm/configs/** directory. The configuration file can be created by combining the general-purpose **small_common_defconfig** file and chipset-specific configurations.
...@@ -69,12 +70,19 @@ Based on the preceding process, the recommended verification procedure is as fol ...@@ -69,12 +70,19 @@ Based on the preceding process, the recommended verification procedure is as fol
Create a root file system image **rootfs.img** by following instructions in [Building Procedures](../subsystems/subsys-build-all.md). As shown in the preceding figure, the startup process is closely related to the product configuration. You need to complete the following configuration when creating **rootfs.img**: Create a root file system image **rootfs.img** by following instructions in [Building Procedures](../subsystems/subsys-build-all.md). As shown in the preceding figure, the startup process is closely related to the product configuration. You need to complete the following configuration when creating **rootfs.img**:
- Component configuration - Component configuration
In the product component configuration file ***vendor*/{*company*}/{*product*}/config.json**, configure the **init** component of the startup subsystem and the **linux_4_1_9** component of the kernel subsystem. In the product component configuration file ***vendor*/{*company*}/{*product*}/config.json**, configure the **init** component of the startup subsystem and the **linux_4_1_9** component of the kernel subsystem.
- System service configuration - System service configuration
Modify the system service configuration file ***vendor*/{*company*}/{*product*}/init_configs/init_xxx.cfg** to start the shell service. Modify the system service configuration file ***vendor*/{*company*}/{*product*}/init_configs/init_xxx.cfg** to start the shell service.
- File system configuration - File system configuration
In the file system configuration file ***vendor*/{*company*}/{*product*}/fs.yml**, create the **/bin/sh -> mksh** and **/lib/ld-musl-arm.so.1 -> libc.so** soft links. These two files are the shell executable program and the c library on which the executable program depends, respectively. In the file system configuration file ***vendor*/{*company*}/{*product*}/fs.yml**, create the **/bin/sh -> mksh** and **/lib/ld-musl-arm.so.1 -> libc.so** soft links. These two files are the shell executable program and the c library on which the executable program depends, respectively.
- Startup configuration - Startup configuration
In the ***vendor*/{*company*}/{*product*}/init_configs/etc** directory, configure startup settings, including the **fstab**, **rsS**, and **S*xxx*** files. Configure the startup settings as needed. In the ***vendor*/{*company*}/{*product*}/init_configs/etc** directory, configure startup settings, including the **fstab**, **rsS**, and **S*xxx*** files. Configure the startup settings as needed.
After the build is complete, check the **rootfs** content in the product compilation output directory to determine whether the generated **rootfs.img** file meets the expectation. After the build is complete, check the **rootfs** content in the product compilation output directory to determine whether the generated **rootfs.img** file meets the expectation.
......
...@@ -14,51 +14,37 @@ Perform the following steps on Ubuntu. ...@@ -14,51 +14,37 @@ Perform the following steps on Ubuntu.
1. Run the following command to install hb and update it to the latest version: 1. Run the following command to install hb and update it to the latest version:
``` ```shell
pip3 install --user build/lite python3 -m pip install --user build/hb
``` ```
2. Set an environment variable. 2. Set an environment variable.
``` ```shell
vim ~/.bashrc vim ~/.bashrc
``` ```
Copy the following command to the last line of the .bashrc file, save the file, and exit. Copy the following command to the last line of the .bashrc file, save the file, and exit.
``` ```shell
export PATH=~/.local/bin:$PATH export PATH=~/.local/bin:$PATH
``` ```
Update the environment variable. Update the environment variable.
``` ```shell
source ~/.bashrc source ~/.bashrc
``` ```
3. Run the **hb -h** command in the source code directory. If the following information is displayed, the installation is successful: 3. Run the **hb -h** command in the source code directory. If the following information is displayed, the installation is successful:
``` ![hb_help](figures/hb_help.png)
usage: hb
OHOS build system
positional arguments:
{build,set,env,clean}
build Build source code
set OHOS build settings
env Show OHOS build env
clean Clean output
optional arguments:
-h, --help show this help message and exit
```
> ![icon-notice.gif](public_sys-resources/icon-notice.gif) **NOTICE** > ![icon-notice.gif](public_sys-resources/icon-notice.gif) **NOTICE**
> - To uninstall hb, run the following command: > - To uninstall hb, run the following command:
> >
> ``` > ```shell
> pip3 uninstall ohos-build > python3 -m pip uninstall ohos-build
> ``` > ```
> >
> - If any issue occurs during the hb installation, see [FAQs](quickstart-pkg-common-hberr.md). > - If any issue occurs during the hb installation, see [FAQs](quickstart-pkg-common-hberr.md).
...@@ -78,25 +64,25 @@ Perform the following steps on Ubuntu. ...@@ -78,25 +64,25 @@ Perform the following steps on Ubuntu.
3. Decompress the LLVM installation package to **~/llvm**. 3. Decompress the LLVM installation package to **~/llvm**.
``` ```shell
tar -zxvf llvm.tar -C ~/ tar -zxvf llvm.tar -C ~/
``` ```
4. Set an environment variable. 4. Set an environment variable.
``` ```shell
vim ~/.bashrc vim ~/.bashrc
``` ```
Copy the following command to the last line of the .bashrc file, save the file, and exit. Copy the following command to the last line of the .bashrc file, save the file, and exit.
``` ```shell
export PATH=~/llvm/bin:$PATH export PATH=~/llvm/bin:$PATH
``` ```
5. Validate the environment variable. 5. Validate the environment variable.
``` ```shell
source ~/.bashrc source ~/.bashrc
``` ```
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册