-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Patch/rocko3 #75
Closed
Closed
Patch/rocko3 #75
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
1c8da62
example: Prepare for installing npms manually
jan-kiszka fcad25e
example: Provide own linux-libc-headers_4.4 recipe
jan-kiszka 1b3f5a8
example: Avoid rsync dependency in galileo-target installation
jan-kiszka 718b5cf
bsp: Port to rocko
jan-kiszka 6b9dc3d
example: Port to rocko
jan-kiszka e7c44d9
example: Rework setledcolor command line interface
jan-kiszka 8823915
bsp: Remove obsolete MACHINE_ESSENTIAL_EXTRA_RDEPENDS override
jan-kiszka 859753e
bsp: Enable support for QEMU emulation
jan-kiszka 870425a
Add meta-efibootguard to kas file
8c00033
meta-iot2000-bsp: Change EFI_PROVIDER
9bbf171
Add gptfdisk for wic
59ef398
Change partition layout and bootloader params
3c9f280
Use official meta-swupdate layer
cf26973
wic: Export needed bitbake variables to wic
872ca86
Add native bg_setenv to the image dependencies
1abad60
Add efibootguard tools and swupdate to example image
63c42f2
Add ext4.gz to IMAGE_FSTYPES for swupdate
6947b47
Add update-image recipe and sw-description
b649176
Add kas yml for update image generation
1038f13
Be sure do_bootimg ends before do_image_wic starts
b83d149
Improve expandfs script
4b90604
Add some information about swupdate
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Example for efibootguard + SWUpdate support with meta-iot2000 | ||
|
||
The [kas](https://pypi.python.org/pypi/kas) recipes in | ||
|
||
``` | ||
meta-iot2000/meta-iot2000-example/kas-update{,-rt}.yml | ||
``` | ||
|
||
build the base image as well as an update artifact without and with a | ||
real-time kernel respectively, ready to be fed to `SWUpdate`. The recipes contain all needed layer | ||
references. | ||
|
||
For `SWUpdate` integration, the official [meta-swupdate](https://github.com/sbabic/meta-swupdate) | ||
layer is used. Per default it installs an init script to start up a webserver for update purposes, | ||
which is not needed for manual updates. For this purpose, it is replaced by an empty | ||
init script. | ||
|
||
This example of `SWUpdate` and `efibootguard` integration provides manual update capability only. | ||
|
||
|
||
The manual update process means, that the `swu` file must be copied onto the finished SD-card. To use it with swupdate, the following command is used: | ||
|
||
``` | ||
swupdate -i <filepath>.swu | ||
``` | ||
|
||
## Created artifacts | ||
|
||
The aforementioned kas yml files produce the folllowing artifacts in the build folder: | ||
|
||
* A flashable image: `tmp/deploy/images/iot2000/iot2000-example-image-iot2000.wic` | ||
* An update artifact: `tmp/deploy/images/iot2000/iot2000-update-image-iot2000.swu` | ||
|
||
*Note*: | ||
Per default, the root filesystem included in the update artifact is identical to the one contained in the wic file. The simplest way to enhance the update artifact is to make it depend on a different image and set `SWUPDATE_IMAGES, SWUPDATE_IMAGES_FSTYPES, and IMAGE_DEPENDS` accordingly. See `meta-iot2000-example/recipes-core/images/iot2000-update-image.bb` for example. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
inherit npm | ||
|
||
do_install() { | ||
mkdir -p ${NPM_INSTALLDIR}/ | ||
cp -a ${S}/* ${NPM_INSTALLDIR}/ --no-preserve=ownership | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
header: | ||
version: 2 | ||
includes: | ||
- kas.yml | ||
|
||
target: iot2000-update-image | ||
|
||
local_conf_header: | ||
rt_kernel: | | ||
PREFERRED_PROVIDER_virtual/kernel = "linux-cip-rt" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
header: | ||
version: 2 | ||
includes: | ||
- kas.yml | ||
|
||
target: iot2000-update-image | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
meta-iot2000-example/recipes-core/images/files/sw-description
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
software = | ||
{ | ||
version = "0.1.0"; | ||
bootenv: ({ | ||
name = "kernelfile"; | ||
value = "C:BOOT1:bzImage"; | ||
}, | ||
{ | ||
name = "kernelparams"; | ||
value = "root=/dev/mmcblk0p3 console=ttyS1,115200 earlyprintk"; | ||
}, | ||
{ | ||
name = "watchdog_timeout_sec"; | ||
value = "60"; | ||
} | ||
); | ||
images: ({ | ||
filename = "iot2000-example-image-iot2000.ext4.gz"; | ||
device = "/dev/mmcblk0p3"; | ||
compressed = true; | ||
}); | ||
files: ({ | ||
filename = "bzImage"; | ||
path = "bzImage"; | ||
device = "/dev/mmcblk0p5"; | ||
filesystem = "vfat"; | ||
}); | ||
} | ||
|
6 changes: 6 additions & 0 deletions
6
meta-iot2000-example/recipes-core/images/iot2000-example-image.bb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
IMAGE_FSTYPES += "ext4.gz" | ||
|
||
require recipes-core/images/core-image-minimal.bb | ||
require recipes-core/images/core-image-iot2000.inc | ||
require iot2000-example-image.inc | ||
|
||
IMAGE_INSTALL_append += "swupdate efibootguard-tools" | ||
|
||
DEPENDS += "gptfdisk-native efibootguard-native" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
meta-iot2000-example/recipes-core/images/iot2000-update-image.bb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
DESCRIPTION = "iot2000 example update image" | ||
|
||
DEPENDS += "iot2000-example-image" | ||
|
||
SRC_URI = "file://sw-description" | ||
|
||
IMAGE_DEPENDS = "iot2000-example-image" | ||
|
||
LICENSE = "MIT" | ||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" | ||
|
||
SWUPDATE_IMAGES = "iot2000-example-image bzImage" | ||
|
||
SWUPDATE_IMAGES_FSTYPES[iot2000-example-image] = ".ext4.gz" | ||
SWUPDATE_IMAGES_NOAPPEND_MACHINE[bzImage] = "1" | ||
|
||
inherit swupdate |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then I need
reboot
(swupdate tells me, but better state this again). But how do I declare the update successful after the reboot? Without that, I will fall back into v1 again.bg_setenv -c
is what I want, I suppose.