2019-03-02 06:50:28 +00:00
|
|
|
# Yocto
|
|
|
|
|
|
|
|
...
|
|
|
|
|
|
|
|
## Get the repository
|
|
|
|
|
|
|
|
```shell
|
2020-09-19 06:31:13 +00:00
|
|
|
mkdir yocto-bf
|
|
|
|
cd yocto-bf
|
|
|
|
repo init -u "https://git.blackfinn.de/yocto/linux-blackfinn.git"
|
|
|
|
repo sync
|
2019-03-02 06:50:28 +00:00
|
|
|
```
|
|
|
|
|
2021-05-22 06:17:33 +00:00
|
|
|
## Build environment
|
|
|
|
|
|
|
|
For details see <https://git.blackfinn.de/docker/oe-buildenv>.
|
|
|
|
|
|
|
|
### Execute
|
|
|
|
|
|
|
|
```shell
|
|
|
|
docker run -it --rm --network host -v=/var/lib/sss/pipes/:/var/lib/sss/pipes/:rw -v $(pwd):$(pwd) -w $(pwd) -u $(id -u $USER):$(id -g $USER) oe-buildenv /bin/bash
|
|
|
|
```
|
|
|
|
|
2019-03-02 06:50:28 +00:00
|
|
|
## Set Environment
|
|
|
|
|
|
|
|
```shell
|
2020-09-19 06:31:13 +00:00
|
|
|
MACHINE=<machineconf> source blackfinn-init-build-env
|
2019-03-02 06:50:28 +00:00
|
|
|
```
|
|
|
|
|
2019-03-12 08:05:41 +00:00
|
|
|
Supported machineconfs:
|
|
|
|
|
|
|
|
* qemuarm
|
|
|
|
* beaglebone-yocto
|
|
|
|
* raspberrypi3-64
|
2020-09-23 06:30:31 +00:00
|
|
|
* raspberrypi4-64
|
2019-03-12 08:05:41 +00:00
|
|
|
|
|
|
|
|
2019-03-02 06:50:28 +00:00
|
|
|
## Build the Image
|
|
|
|
```shell
|
2020-09-29 14:14:50 +00:00
|
|
|
bitbake <image_name>
|
2019-03-02 06:50:28 +00:00
|
|
|
```
|
|
|
|
|
2020-09-29 14:14:50 +00:00
|
|
|
Supported images:
|
|
|
|
|
|
|
|
* console-image
|
|
|
|
* console-dev-image
|
|
|
|
* docker-image
|
|
|
|
|
2019-03-02 06:50:28 +00:00
|
|
|
## Flash the Image
|
2020-09-19 06:31:13 +00:00
|
|
|
|
|
|
|
### beaglebone-yocto
|
|
|
|
|
|
|
|
```shell
|
|
|
|
dd if=tmp/deploy/images/beaglebone-yocto/docker-image-beaglebone-yocto.wic of=/dev/<sd_card>
|
|
|
|
```
|
|
|
|
|
|
|
|
### raspberrypiX-64
|
|
|
|
|
2019-03-02 06:50:28 +00:00
|
|
|
```shell
|
2020-09-19 06:31:13 +00:00
|
|
|
bmaptool copy --bmap \
|
|
|
|
tmp/deploy/images/raspberrypiX-64/docker-image-raspberrypiX-64.wic.bmap \
|
|
|
|
tmp/deploy/images/raspberrypiX-64/docker-image-raspberrypiX-64.wic.bz2 \
|
|
|
|
/dev/<sd_card>
|
2019-11-29 16:12:06 +00:00
|
|
|
```
|
2019-03-02 06:50:28 +00:00
|
|
|
|
2021-05-22 06:17:33 +00:00
|
|
|
## opkg package handling
|
|
|
|
|
|
|
|
### Build index
|
|
|
|
|
|
|
|
```shell
|
|
|
|
bitbake package index
|
|
|
|
```
|
|
|
|
|
|
|
|
### Synchronize packages
|
|
|
|
|
|
|
|
```shell
|
|
|
|
rsync -avz --progress build/tmp/deploy/ipk/ /srv/files.blackfinn.de/data/yocto/gatesgarth/
|
|
|
|
```
|