mirror of
https://github.com/brain-hackers/buildbrain
synced 2025-10-28 02:58:35 +09:00
Ready for new generation
This commit is contained in:
51
README.md
51
README.md
@@ -3,7 +3,7 @@ buildbrain
|
||||
|
||||
This repository includes:
|
||||
|
||||
- linux-brain, u-boot-brain and nkbin_maker as submodules
|
||||
- linux-brain, u-boot-brain and boot4u as submodules
|
||||
- Useful build targets in Makefile
|
||||
- r3build.toml to watch changes that occur in submodules
|
||||
|
||||
@@ -20,13 +20,14 @@ Getting Started
|
||||
1. Install dependencies.
|
||||
|
||||
```
|
||||
$ sudo apt install build-essential bison flex libncurses5-dev gcc-arm-linux-gnueabi
|
||||
$ sudo apt install build-essential bison flex libncurses5-dev gcc-arm-linux-gnueabihf libssl-dev bc lzop
|
||||
$ pip install pyelftools
|
||||
```
|
||||
|
||||
1. Clone this repository with recursive clone enabled.
|
||||
|
||||
```
|
||||
$ git clone --recursive git@github.com:puhitaku/buildbrain.git
|
||||
$ git clone --recursive git@github.com:brain-hackers/buildbrain.git
|
||||
```
|
||||
|
||||
- If you've cloned it without `--recursive`, run following command:
|
||||
@@ -35,37 +36,24 @@ Getting Started
|
||||
$ git submodule update --init --recursive
|
||||
```
|
||||
|
||||
1. Install uuu.
|
||||
|
||||
- Follow [the instruction](https://github.com/NXPmicro/mfgtools#linux) and build `uuu` executable.
|
||||
- Put `uuu` where the PATH executable points to.
|
||||
|
||||
|
||||
Build and inject U-Boot
|
||||
-----------------------
|
||||
|
||||
1. Run `make udefconfig-sh*` to generate `.config`.
|
||||
|
||||
- For Sx1: `make udefconfig-sh1`
|
||||
- For Sx6: `make udefconfig-sh6`
|
||||
|
||||
2. Run `make ubuild` to build whole repository and generate `u-boot.sb`.
|
||||
|
||||
- i.MX283 loads a packed U-Boot executable called `u-boot.sb`.
|
||||
|
||||
3. To inject the executable into i.MX283 in recovery mode, run `make uuu`.
|
||||
|
||||
|
||||
Build and make NK.bin
|
||||
Build U-Boot
|
||||
-----------------------
|
||||
|
||||
1. Run `make udefconfig` to generate `.config`.
|
||||
|
||||
2. Run `make ubuild` to build whole repository and generate `u-boot.bin`.
|
||||
|
||||
3. To make `nk.bin`, run `make nkbin`.
|
||||
|
||||
- nkbin_maker packs `u-boot.bin` into `nk.bin`.
|
||||
Build and deploy boot4u
|
||||
-----------------------
|
||||
|
||||
1. Run `make boot4u`
|
||||
|
||||
1. Create index.din and copy AppMain.bin
|
||||
- `mkdir /path/to/your/sd/1st/partition/App/boot4u`
|
||||
- `touch /path/to/your/sd/1st/partition/App/boot4u/index.din`
|
||||
- `cp boot4u/AppMain.bin /path/to/your/sd/1st/partition/App/boot4u/`
|
||||
|
||||
|
||||
Build Linux
|
||||
@@ -89,18 +77,23 @@ Bootstrap Debian 10 (buster)
|
||||
1. Build and copy the Linux kernel.
|
||||
|
||||
- Run `make ldefconfig lbuild`.
|
||||
- Copy `/linux-brain/arch/arm/boot/zImage` and `/linux-brain/arch/arm/boot/dts/imx28-evk.dtb` into the 1st partition.
|
||||
- Copy `/linux-brain/arch/arm/boot/zImage` and `/linux-brain/arch/arm/boot/dts/imx7ulp-pwh1.dtb` into the 1st partition.
|
||||
|
||||
1. Run APT cache in background (mandatory): `make aptcache`.
|
||||
|
||||
1. Run `make debian`.
|
||||
|
||||
1. Copy all contents in `./debian` into the 2nd partition.
|
||||
1. Copy all contents in `./brainux` into the 2nd partition.
|
||||
|
||||
- `sudo cp -ar ./debian/* /path/to/your/sd/2nd/partition/`
|
||||
- `sudo cp -ar ./brainux/* /path/to/your/sd/2nd/partition/`
|
||||
- Please make sure that all attributes are preserved with `-a` flag.
|
||||
|
||||
|
||||
Known issues
|
||||
----------------------------------------
|
||||
If you using gcc 10 for host compiler, `make ubuild` may fail.
|
||||
To complete build, open u-boot-brain/scripts/dtc/dtc-lexer.lex.c or u-boot-brain/scripts/dtc/dtc-parser.tab.c then comment out `YYLTYPE yylloc;`
|
||||
|
||||
Watch changes in submodules & auto-build
|
||||
----------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user