Skip to content

Commit 50350f7

Browse files
author
Thomas Roos
committed
meta-rauc-aws-ec2: add README
1 parent 4061cbc commit 50350f7

3 files changed

Lines changed: 115 additions & 0 deletions

File tree

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
This README file contains information on the contents of the meta-rauc-aws-ec2 layer.
2+
3+
Please see the corresponding sections below for details.
4+
5+
Dependencies
6+
============
7+
8+
* URI: git://git.openembedded.org/openembedded-core
9+
* URI: https://github.com/rauc/meta-rauc.git
10+
* URI: https://github.com/aws4embeddedlinux/meta-aws
11+
* URI: https://github.com/lgirdk/meta-virtualization
12+
13+
14+
Patches
15+
=======
16+
17+
Please submit any patches against the meta-rauc-aws-ec2 layer via GitHub
18+
pull request on https://github.com/rauc/meta-rauc-community.
19+
20+
Maintainer: Thomas Roos <throos@amazon.de>
21+
22+
Disclaimer
23+
==========
24+
25+
Note that this is just an example layer that shows a few possible configuration
26+
options how RAUC can be used.
27+
Actual requirements may differ from project to projects and will probably need
28+
a much different RAUC/bootloader/system configuration.
29+
30+
Also note that this layer is for demo purpose only and does not care about
31+
migratability between different layer revision.
32+
33+
I. Adding the meta-rauc-aws-ec2 layer to your build
34+
=======================================================
35+
36+
Run 'bitbake-layers add-layer meta-rauc-aws-ec2'
37+
38+
II. Build The Demo System
39+
=========================
40+
41+
::
42+
43+
$ source oe-init-build-env
44+
45+
Set the ``MACHINE`` to the model you intend to build for. E.g.::
46+
47+
48+
MACHINE = "aws-ec2-arm64"
49+
# or MACHINE = "aws-ec2-x86-64"
50+
51+
Make sure either your distro (recommended) or your local.conf have ``rauc``
52+
``DISTRO_FEATURE`` enabled::
53+
54+
DISTRO_FEATURES:append = " rauc"
55+
56+
Add this to your local.conf
57+
INHERIT += "aws-ec2-image"
58+
59+
Build the image::
60+
61+
$ bitbake core-image-minimal
62+
63+
III. Flash & Run The Demo System
64+
================================
65+
66+
Follow instructions here: https://github.com/aws4embeddedlinux/meta-aws/blob/master/scripts/ec2-ami/README.md
67+
68+
IV. Build and Install The Demo Bundle
69+
=====================================
70+
71+
To build the bundle, run::
72+
73+
$ bitbake ec2-demo-bundle
74+
75+
Copy the generated bundle to the target system via scp.
76+
77+
On the target, you can then install the bundle::
78+
79+
# rauc install /path/to/ec2-demo-bundle.raucb
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
inherit bundle
2+
3+
LICENSE = "MIT"
4+
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
5+
6+
RAUC_BUNDLE_COMPATIBLE = "aws-ec2 demo platform"
7+
8+
RAUC_BUNDLE_FORMAT = "verity"
9+
10+
RAUC_BUNDLE_SLOTS = "rootfs"
11+
12+
RAUC_IMAGE_FSTYPE = "tar.bz2"
13+
14+
RAUC_SLOT_rootfs = "core-image-minimal"
15+
# uncomment for enabling adaptive update method 'block-hash-index'
16+
#RAUC_SLOT_rootfs[fstype] = "ext4"
17+
#RAUC_SLOT_rootfs[adaptive] = "block-hash-index"
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
IMAGE_INSTALL:append = " kernel-image kernel-modules"
2+
3+
inherit aws-ec2-image
4+
WKS_FILE = "ec2_partition.wks.in"
5+
do_image_wic[depends] += "boot-image:do_deploy"
6+
7+
# Optimizations for RAUC adaptive method 'block-hash-index'
8+
# rootfs image size must to be 4K-aligned
9+
IMAGE_ROOTFS_ALIGNMENT = "4"
10+
# ext4 block size should be set to 4K and use a fixed directory hash seed to
11+
# reduce the image delta size (keep oe-core's 4K bytes-per-inode)
12+
EXTRA_IMAGECMD:ext4 = "-i 4096 -b 4096 -E hash_seed=86ca73ff-7379-40bd-a098-fcb03a6e719d"
13+
14+
IMAGE_PREPROCESS_COMMAND:append = " rootfs_user_fstab"
15+
16+
####
17+
rootfs_user_fstab () {
18+
install -d -m 0755 ${IMAGE_ROOTFS}/data
19+
}

0 commit comments

Comments
 (0)