From d8f457bb0c14371ebe2860f843f969ce74c864bb Mon Sep 17 00:00:00 2001 From: peterwang2050 <129847683+peterwang2050@users.noreply.github.com> Date: Wed, 13 Mar 2024 18:37:05 +0800 Subject: [PATCH 1/2] Update getting_started.md Signed-off-by: peterwang2050 <129847683+peterwang2050@users.noreply.github.com> --- docs/getting_started.md | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/docs/getting_started.md b/docs/getting_started.md index cf753731..f53fa2ca 100644 --- a/docs/getting_started.md +++ b/docs/getting_started.md @@ -52,9 +52,32 @@ by product name instead of specific profiles. This should help new users to test their setup without much `bsp` knowledge: ```bash -# The following command will build linux-stable -# and u-boot-latest for radxa-zero -./bsp radxa-zero + +Command Format: + +bsp [options] [product] + +you can build both kernel and u-boot (e.g. radxa-zero) + +#./bsp radxa-zero + +or you can build kernel or u-boot separately + +Build kernel only (e.g. radxa-zero) + +#./bsp linux radxa-zero + +Build u-boot only (e.g. radxa-zero) + +#./bsp u-boot radxa-zero + +How to get the product parmater of the board: + +Download and run the lastest official debian image on board, +run the `uname -r` on the terminal and get the kernel like `5.10.160-28-rk356x`, +then the last word such as 'rk356x' is what we want, +Or you can get the info from reading the source code. + ``` Custom kernel/firmware developer should at least read the [Development reference](dev_flow.md) From 89100e9da0b7372688d666597cb35748a2b530e6 Mon Sep 17 00:00:00 2001 From: peterwang2050 <129847683+peterwang2050@users.noreply.github.com> Date: Wed, 13 Mar 2024 12:03:35 +0000 Subject: [PATCH 2/2] add more details on the part of the build packages --- docs/getting_started.md | 59 +++++++++++++++++++++++++++++++---------- 1 file changed, 45 insertions(+), 14 deletions(-) diff --git a/docs/getting_started.md b/docs/getting_started.md index f53fa2ca..9e0704e2 100644 --- a/docs/getting_started.md +++ b/docs/getting_started.md @@ -51,34 +51,65 @@ cd bsp by product name instead of specific profiles. This should help new users to test their setup without much `bsp` knowledge: -```bash -Command Format: + + +```bash +# Command Format: bsp [options] [product] -you can build both kernel and u-boot (e.g. radxa-zero) +``` + +There are two steps to build packages + +1. Get the product name + + You can get the product name by the method below: + + Download and run the lastest official debian image on board, + run the `uname -r` on the terminal and get the kernel like `5.10.160-28-rk356x`, + then the last word such as 'rk356x' is what we want, + Or you can get the info from reading the source code. + +2. build kernel, u-boot + +```bash + +# you can build the kernel and u-boot together or separately + +# Build both kernel and u-boot (e.g. radxa-zero) -#./bsp radxa-zero +./bsp radxa-zero -or you can build kernel or u-boot separately +# Build kernel only (e.g. radxa-zero) -Build kernel only (e.g. radxa-zero) +./bsp linux radxa-zero -#./bsp linux radxa-zero +# Build u-boot only (e.g. radxa-zero) -Build u-boot only (e.g. radxa-zero) +./bsp u-boot radxa-zero -#./bsp u-boot radxa-zero +``` -How to get the product parmater of the board: +After compilation is completed, many `deb` packages will be generated in the bsp/output directory. You only need to install the following two `deb` packages. -Download and run the lastest official debian image on board, -run the `uname -r` on the terminal and get the kernel like `5.10.160-28-rk356x`, -then the last word such as 'rk356x' is what we want, -Or you can get the info from reading the source code. +such as ``` +linux-headers-5.10.160-20-rk356x_5.10.160-20_arm64.deb +linux-image-5.10.160-20-rk356x_5.10.160-20_arm64.deb +``` + +The path to the kernel source code is located in the bsp directory at `.src/linux`, and the kernel can be built again after modifying the kernel source code. + +If you don't want to sync the lastest code from server, you can add this parameter `--no-prepare-source`, or your modifications will be overwritten. + +``` +./bsp --no-prepare-source radxa-zero +``` +For more bsp parameter usage instructions, you can execute `./bsp` to view. + Custom kernel/firmware developer should at least read the [Development reference](dev_flow.md) section to better understand the development workflow and the internal data