Skip to content

Commit 8abf327

Browse files
authored
Merge pull request #11 from zarhus/use-kas-machine-var
Use KAS_MACHINE var
2 parents 0167f51 + c7220ee commit 8abf327

File tree

5 files changed

+51
-26
lines changed

5 files changed

+51
-26
lines changed

docs/getting-started/building.md

+34-9
Original file line numberDiff line numberDiff line change
@@ -52,26 +52,51 @@ This guide will demonstrate how to build a Zarhus OS image from zero!
5252

5353
## Build
5454

55-
From `yocto` directory run:
55+
Depending on which features you want to have in your build, pass the desired
56+
`.yml` files via command line. You can read more on that in
57+
[kas documentation.](https://kas.readthedocs.io/en/latest/userguide/project-configuration.html#including-configuration-files-via-the-command-line)
58+
The files should be passed in a specific order. The file which is passed after
59+
some file will override settings set by the previously-passed file.
60+
61+
Currently, the following files are present in `meta-zarhus/kas`:
62+
63+
* `common.yml`: common configuration file, should be included in all builds;
64+
* `cache.yml`: file for cache mirrors configuration;
65+
* `debug.yml`: adds debug functionalities into the final image;
66+
* `rockchip.yml`: Rockchip-specific target configuration file, should be used
67+
for Rockchip builds;
68+
* `webkit.yml`: includes Webkit and some additional functionalities into build.
69+
70+
Then check BSP layers for available target platform (target platforms configs
71+
are located in `conf/machine` directory of every BSP layer) and choose one.
72+
Then, from `yocto` directory run:
5673

5774
```shell
58-
$ SHELL=/bin/bash kas-container build meta-zarhus/kas-IMAGE_TYPE.yml
75+
SHELL=/bin/bash KAS_MACHINE=<TARGET_NAME> kas-container build <KAS_FILES>
5976
```
6077

6178
!!! note
6279

63-
Replace `IMAGE_TYPE` with either `debug` or `prod`.
80+
Replace `<TARGET_NAME>` with the name of the chosen target
81+
configuration file, and `<KAS_FILES>` with a list of kas files, separated by
82+
`:`.
6483

65-
Image build takes time, so be patient and after the build finishes you should see
66-
something similar to this (the exact tasks numbers may differ):
84+
For example:
6785

6886
```shell
69-
Initialising tasks: 100% |###########################################################################################| Time: 0:00:01
70-
Sstate summary: Wanted 2 Found 0 Missed 2 Current 931 (0% match, 99% complete)
71-
NOTE: Executing Tasks
72-
NOTE: Tasks Summary: Attempted 2532 tasks of which 2524 didn't need to be rerun and all succeeded.
87+
SHELL=/bin/bash KAS_MACHINE=orangepi-cm4 kas-container build meta-zarhus/kas/common.yml:meta-zarhus/kas/rockchip.yml
7388
```
7489

90+
* Image build takes time, so be patient and after build's finish you should see
91+
something similar to (the exact tasks numbers may differ):
92+
93+
```shell
94+
Initialising tasks: 100% |###########################################################################################| Time: 0:00:01
95+
Sstate summary: Wanted 2 Found 0 Missed 2 Current 931 (0% match, 99% complete)
96+
NOTE: Executing Tasks
97+
NOTE: Tasks Summary: Attempted 2532 tasks of which 2524 didn't need to be rerun and all succeeded.
98+
```
99+
75100
# Verification
76101
77102
The build should finish without errors or warnings.

docs/getting-started/flashing.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ You should see output similar to this:
6666
```shell
6767
bmaptool: info: block map format version 2.0
6868
bmaptool: info: 85971 blocks of size 4096 (335.8 MiB), mapped 42910 blocks (167.6 MiB or 49.9%)
69-
bmaptool: info: copying image 'zarhus-base-image-debug-zarhus-machine-cm3.rootfs.wic.gz' to block device '/dev/sdx' using bmap file 'zarhus-base-image-debug-zarhus-machine-cm3.rootfs.wic.bmap'
69+
bmaptool: info: copying image 'zarhus-base-image-debug-radxa-cm3.rootfs.wic.gz' to block device '/dev/sdx' using bmap file 'zarhus-base-image-debug-radxa-cm3.rootfs.wic.bmap'
7070
bmaptool: info: 100% copied
7171
bmaptool: info: synchronizing '/dev/sdx'
7272
bmaptool: info: copying time: 11.1s, copying speed 15.1 MiB/sec

docs/getting-started/verification.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ Welcome to Distro for Zarhus product 0.1.0 (scarthgap)!
8585
[ OK ] Finished Record Runlevel Change in UTMP.
8686
[ OK ] Finished Virtual Console Setup.
8787

88-
Distro for Zarhus product 0.1.0 zarhus-machine-cm3 ttyS2
88+
Distro for Zarhus product 0.1.0 radxa-cm3 ttyS2
8989

90-
zarhus-machine-cm3 login:
90+
radxa-cm3 login:
9191
```
9292
9393
!!! note

docs/supported-targets/radxa-cm3.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ guide](../getting-started/building.md).
131131
After the image has been built - locate and copy the image to a known location:
132132

133133
```bash
134-
cp build/tmp/deploy/images/zarhus-machine-cm3/zarhus-base-image-IMAGE_VER-zarhus-machine-cm3.rootfs.wic.gz ./
134+
cp build/tmp/deploy/images/radxa-cm3/zarhus-base-image-IMAGE_VER-radxa-cm3.rootfs.wic.gz ./
135135
```
136136

137137
!!! note
@@ -142,7 +142,7 @@ cp build/tmp/deploy/images/zarhus-machine-cm3/zarhus-base-image-IMAGE_VER-zarhus
142142
Decompress the image (`rkdeveloptool` needs decompressed image):
143143

144144
```bash
145-
gunzip zarhus-base-image-IMAGE_VER-zarhus-machine-cm3.rootfs.wic.gz
145+
gunzip zarhus-base-image-IMAGE_VER-radxa-cm3.rootfs.wic.gz
146146
```
147147

148148
!!! note
@@ -153,8 +153,8 @@ gunzip zarhus-base-image-IMAGE_VER-zarhus-machine-cm3.rootfs.wic.gz
153153
Now you should have decompressed image file in your directory:
154154

155155
```bash
156-
file ./zarhus-base-image-IMAGE_VER-zarhus-machine-cm3.rootfs.wic
157-
zarhus-base-image-IMAGE_VER-zarhus-machine-cm3.rootfs.wic: DOS/MBR boot sector; partition 1 : ID=0xee, start-CHS (0x0,0,2), end-CHS (0x3ff,255,63), startsector 1, 687763 sectors, extended partition table (last)
156+
file ./zarhus-base-image-IMAGE_VER-radxa-cm3.rootfs.wic
157+
zarhus-base-image-IMAGE_VER-radxa-cm3.rootfs.wic: DOS/MBR boot sector; partition 1 : ID=0xee, start-CHS (0x0,0,2), end-CHS (0x3ff,255,63), startsector 1, 687763 sectors, extended partition table (last)
158158
```
159159

160160
!!! note
@@ -216,7 +216,7 @@ Downloading bootloader succeeded.
216216
Flash eMMC:
217217

218218
```bash
219-
rkdeveloptool wl 0x0 zarhus-base-image-IMAGE_VER-zarhus-machine-cm3.rootfs.wic
219+
rkdeveloptool wl 0x0 zarhus-base-image-IMAGE_VER-radxa-cm3.rootfs.wic
220220
Write LBA from file (100%)
221221
```
222222

mkdocs.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ extra:
2424
social:
2525
- icon: fontawesome/brands/github
2626
link: https://github.com/zarhus
27-
# - icon: fontawesome/brands/mastodon
28-
# link: https://fosstodon.org/@TBD
29-
# - icon: fontawesome/brands/twitter
30-
# link: https://twitter.com/TBD
31-
# - icon: fontawesome/brands/reddit
32-
# link: https://www.reddit.com/r/TBD
27+
# - icon: fontawesome/brands/mastodon
28+
# link: https://fosstodon.org/@TBD
29+
# - icon: fontawesome/brands/twitter
30+
# link: https://twitter.com/TBD
31+
# - icon: fontawesome/brands/reddit
32+
# link: https://www.reddit.com/r/TBD
3333
extra_css:
3434
- stylesheets/extra.css
3535
markdown_extensions:
@@ -73,9 +73,9 @@ nav:
7373
- 'Radxa':
7474
- 'Radxa CM3': supported-targets/radxa-cm3.md
7575
- 'Guides':
76-
- 'Managing packages': guides/managing-packages.md
77-
- 'Managing layers': guides/managing-layers.md
78-
- 'Secure Boot Verification': guides/secure-boot/secure-boot-verification.md
76+
- 'Managing packages': guides/managing-packages.md
77+
- 'Managing layers': guides/managing-layers.md
78+
- 'Secure Boot Verification': guides/secure-boot/secure-boot-verification.md
7979
- 'Development Process':
8080
- 'Standard Release Process': development-process/standard-release-process.md
8181
- 'FAQ': faq.md

0 commit comments

Comments
 (0)