diff options
| author | Pierre-Jean Texier <pjtexier@koncepto.io> | 2020-01-14 23:23:55 +0100 |
|---|---|---|
| committer | Andrei Gherzan <andrei@gherzan.ro> | 2020-01-22 18:09:10 +0000 |
| commit | d058d2a2cf1a40dd39ebf344faad504f3458f7b2 (patch) | |
| tree | 2bcac209c4cd74c4c61e85e8bc7762a939d3a990 | |
| parent | 05c86e3160956813d1dccd372863733b5a4e3438 (diff) | |
| download | meta-raspberrypi-d058d2a2cf1a40dd39ebf344faad504f3458f7b2.tar.gz | |
kas-poky-rpi: add kas file
The kas tool provides an easy mechanism to setup bitbake based projects.
As explained in [1] the key features provided by kas are:
- clone and checkout bitbake layers
- create default bitbake settings (machine, arch, ...)
- launch minimal build environment, reducing risk of host contamination
- initiate bitbake build process
So, let's create a minimal example in this layer to build an image with a
small effort. This seems interesting for new users of the meta-raspberrypi.
For example:
$: sudo pip3 install kas
$: mkdir rpi
$: cd rpi
$: git clone https://github.com/agherzan/meta-raspberrypi.git
$: kas build meta-raspberrypi/kas-poky-rpi.yml
and that's all !
To adjust the construction with specific options (I2C, SPI, ...), simply add
a section as follows:
local_conf_header:
rpi-specific: |
ENABLE_I2C = "1"
RPI_EXTRA_CONFIG = "dtoverlay=pi3-disable-bt"
To configure the machine, the user have to update the 'machine' variable.
And the same for the 'distro'.
[1] - https://kas.readthedocs.io/en/1.0/userguide.html
Signed-off-by: Pierre-Jean Texier <pjtexier@koncepto.io>
| -rw-r--r-- | README.md | 22 | ||||
| -rw-r--r-- | kas-poky-rpi.yml | 58 |
2 files changed, 80 insertions, 0 deletions
| @@ -52,6 +52,28 @@ This layer depends on: | |||
| 52 | 5. dd to a SD card the generated sdimg file (use xzcat if rpi-sdimg.xz is used) | 52 | 5. dd to a SD card the generated sdimg file (use xzcat if rpi-sdimg.xz is used) |
| 53 | 6. Boot your RPI. | 53 | 6. Boot your RPI. |
| 54 | 54 | ||
| 55 | ## Quick Start with kas | ||
| 56 | |||
| 57 | 1. Install kas build tool from PyPi (sudo pip3 install kas) | ||
| 58 | 2. kas build meta-raspberrypi/kas-poky-rpi.yml | ||
| 59 | 3. dd to a SD card the generated sdimg file (use xzcat if rpi-sdimg.xz is used) | ||
| 60 | 4. Boot your RPI. | ||
| 61 | |||
| 62 | To adjust the build configuration with specific options (I2C, SPI, ...), simply add | ||
| 63 | a section as follows: | ||
| 64 | |||
| 65 | ``` | ||
| 66 | local_conf_header: | ||
| 67 | rpi-specific: | | ||
| 68 | ENABLE_I2C = "1" | ||
| 69 | RPI_EXTRA_CONFIG = "dtoverlay=pi3-disable-bt" | ||
| 70 | ``` | ||
| 71 | |||
| 72 | To configure the machine, you have to update the `machine` variable. | ||
| 73 | And the same for the `distro`. | ||
| 74 | |||
| 75 | For further information, you can read more at <https://kas.readthedocs.io/en/1.0/index.html> | ||
| 76 | |||
| 55 | ## Maintainers | 77 | ## Maintainers |
| 56 | 78 | ||
| 57 | * Andrei Gherzan `<andrei at gherzan.ro>` | 79 | * Andrei Gherzan `<andrei at gherzan.ro>` |
diff --git a/kas-poky-rpi.yml b/kas-poky-rpi.yml new file mode 100644 index 0000000..2d80a57 --- /dev/null +++ b/kas-poky-rpi.yml | |||
| @@ -0,0 +1,58 @@ | |||
| 1 | header: | ||
| 2 | version: 8 | ||
| 3 | |||
| 4 | machine: raspberrypi4 | ||
| 5 | distro: poky | ||
| 6 | target: | ||
| 7 | - core-image-base | ||
| 8 | |||
| 9 | repos: | ||
| 10 | meta-raspberry: | ||
| 11 | |||
| 12 | poky: | ||
| 13 | url: https://git.yoctoproject.org/git/poky | ||
| 14 | refspec: master | ||
| 15 | layers: | ||
| 16 | meta: | ||
| 17 | meta-poky: | ||
| 18 | meta-yocto-bsp: | ||
| 19 | |||
| 20 | meta-openembedded: | ||
| 21 | url: http://git.openembedded.org/meta-openembedded | ||
| 22 | refspec: master | ||
| 23 | layers: | ||
| 24 | meta-oe: | ||
| 25 | meta-python: | ||
| 26 | meta-networking: | ||
| 27 | meta-perl: | ||
| 28 | |||
| 29 | meta-qt5: | ||
| 30 | url: https://github.com/meta-qt5/meta-qt5/ | ||
| 31 | refspec: master | ||
| 32 | |||
| 33 | bblayers_conf_header: | ||
| 34 | standard: | | ||
| 35 | POKY_BBLAYERS_CONF_VERSION = "2" | ||
| 36 | BBPATH = "${TOPDIR}" | ||
| 37 | BBFILES ?= "" | ||
| 38 | local_conf_header: | ||
| 39 | reduce_diskspace: | | ||
| 40 | INHERIT += "rm_work_and_downloads" | ||
| 41 | standard: | | ||
| 42 | CONF_VERSION = "1" | ||
| 43 | PACKAGE_CLASSES = "package_rpm" | ||
| 44 | SDKMACHINE = "x86_64" | ||
| 45 | USER_CLASSES = "buildstats image-mklibs image-prelink" | ||
| 46 | PATCHRESOLVE = "noop" | ||
| 47 | debug-tweaks: | | ||
| 48 | EXTRA_IMAGE_FEATURES = "debug-tweaks" | ||
| 49 | diskmon: | | ||
| 50 | BB_DISKMON_DIRS = "\ | ||
| 51 | STOPTASKS,${TMPDIR},1G,100K \ | ||
| 52 | STOPTASKS,${DL_DIR},1G,100K \ | ||
| 53 | STOPTASKS,${SSTATE_DIR},1G,100K \ | ||
| 54 | STOPTASKS,/tmp,100M,100K \ | ||
| 55 | ABORT,${TMPDIR},100M,1K \ | ||
| 56 | ABORT,${DL_DIR},100M,1K \ | ||
| 57 | ABORT,${SSTATE_DIR},100M,1K \ | ||
| 58 | ABORT,/tmp,10M,1K" | ||
