board/mender: add a mender board example configuration.
cover board/mender: add a mender board example configuration.
From: Adam Duskett <[email protected]>
Buildroot currently has all of the needed packages to use Mender as the primary update system. However; there isn't any documentation or examples now that provide a starting point for users. This lack of documentation makes setting up a Mender based update system difficult and time-consuming.
Provided in this patch series is a mender_x86_64_efi_defconfig -that sets up an x86_64 EFI based build that is ready to flash to a USB pen drive or use in a QEMU environment. The system partition exchema comprises of two equally sized root partitions and a 64M data partition that is mounted to /var/lib/mender as a persistent data store partition.
There is a board/mender/readme.txt provided which gives users documentation on how to flash the built image or boot the image using QEMU as well.
In the future, I want to also provide a raspberrypi example for Uboot users, and possibly a orangepi and an IMX6 example as well.
Thanks!
Adam
Adam Duskett (1):
board/mender: add a mender board example configuration.
.gitlab-ci.yml | 1 + DEVELOPERS | 1 + board/mender/linux.config | 64 ++++++++++++++++ board/mender/mender_grubenv_defines | 32 ++++++++ board/mender/overlay/etc/fstab | 10 +++ board/mender/overlay/etc/mender/mender.conf | 10 +++ board/mender/post-image-efi-gpt.sh | 83 +++++++++++++++++++++ board/mender/pre-image.sh | 9 +++ board/mender/readme.txt | 58 ++++++++++++++ configs/mender_x86_64_efi_defconfig | 73 ++++++++++++++++++ 10 files changed, 341 insertions(+) create mode 100644 board/mender/linux.config create mode 100644 board/mender/mender_grubenv_defines create mode 100644 board/mender/overlay/etc/fstab create mode 100644 board/mender/overlay/etc/mender/mender.conf create mode 100755 board/mender/post-image-efi-gpt.sh create mode 100755 board/mender/pre-image.sh create mode 100644 board/mender/readme.txt create mode 100644 configs/mender_x86_64_efi_defconfig
Signature · 1 line
2.21.0
PATCH 1/1 board/mender: add a mender board example configuration.
From: Adam Duskett <[email protected]>
Buildroot currently has all of the needed packages to use Mender as the primary update system. However; there isn't any documentation or examples now that provide a starting point for users. This lack of documentation makes setting up a Mender based update system difficult and time-consuming.
Provided in this patch series is a mender_x86_64_efi_defconfig -that sets up an x86_64 EFI based build that is ready to flash to a USB pen drive or use in a QEMU environment. The system partition exchema comprises of two equally sized root partitions and a 64M data partition that is mounted to /var/lib/mender as a persistent data store partition.
There is a board/mender/readme.txt provided which gives users documentation on how to flash the built image or boot the image using QEMU as well.
--- .gitlab-ci.yml | 1 + DEVELOPERS | 1 + board/mender/linux.config | 64 ++++++++++++++++ board/mender/mender_grubenv_defines | 32 ++++++++ board/mender/overlay/etc/fstab | 10 +++ board/mender/overlay/etc/mender/mender.conf | 10 +++ board/mender/post-image-efi-gpt.sh | 83 +++++++++++++++++++++ board/mender/pre-image.sh | 9 +++ board/mender/readme.txt | 58 ++++++++++++++ configs/mender_x86_64_efi_defconfig | 73 ++++++++++++++++++ 10 files changed, 341 insertions(+) create mode 100644 board/mender/linux.config create mode 100644 board/mender/mender_grubenv_defines create mode 100644 board/mender/overlay/etc/fstab create mode 100644 board/mender/overlay/etc/mender/mender.conf create mode 100755 board/mender/post-image-efi-gpt.sh create mode 100755 board/mender/pre-image.sh create mode 100644 board/mender/readme.txt create mode 100644 configs/mender_x86_64_efi_defconfig
.gitlab-ci.yml +1 -0
@@ -203,6 +203,7 @@ imx8mpico_defconfig: { extends: .defconfig } lego_ev3_defconfig: { extends: .defconfig } licheepi_zero_defconfig: { extends: .defconfig } linksprite_pcduino_defconfig: { extends: .defconfig } +mender_x86_64_efi_defconfig: { extends: .defconfig } minnowboard_max-graphical_defconfig: { extends: .defconfig } minnowboard_max_defconfig: { extends: .defconfig } mx25pdk_defconfig: { extends: .defconfig }
DEVELOPERS +1 -0
@@ -27,6 +27,7 @@ # modify packages that use this infrastructure. N: Adam Duskett <[email protected]> +F: configs/mender_x86_64_efi_defconfig F: package/audit/ F: package/busybox/ F: package/checkpolicy/
board/mender/linux.config new file +64 -0
64 lines not on this page · raw message
board/mender/mender_grubenv_defines new file +32 -0
@@ -0,0 +1,32 @@ +################################################################################ +# Mandatory +################################################################################ +# Warning: This file is an example and should be customized to fit your needs! + +# Partition index of root filesystem A +mender_rootfsa_part=2 + +# Partition index of root filesystem B +mender_rootfsb_part=3 + +# Device file corresponding to the root filesystem partitions, without index. +mender_kernel_root_base=/dev/vda + +# Name of the storage device containing root filesystem partitions in GRUB +# format. +mender_grub_storage_device=hd0 + +# Type of kernel (bzImage or zImage) +kernel_imagetype=bzImage + +# Type of initrd image. +# Note: An initrd image is not strictly necessary, and the system will boot and +# update without a initrd image. +initrd_imagetype=initrd.img + +################################################################################ +# Mandatory on ARM +################################################################################ + +# Basename of DTB that should be loaded by the bootloader. +# kernel_devicetree=kernel.dtb
board/mender/overlay/etc/fstab new file +10 -0
@@ -0,0 +1,10 @@ +# <file system> <mount pt> <type> <options> <dump> <pass> +/dev/vda1 /boot/efi vfat defaults 0 0 +/dev/root / ext4 rw,noauto 0 1 +/dev/vda4 /var/lib/mender ext4 defaults 0 0 +proc /proc proc defaults 0 0 +devpts /dev/pts devpts defaults,gid=5,mode=620,ptmxmode=0666 0 0 +tmpfs /dev/shm tmpfs mode=0777 0 0 +tmpfs /tmp tmpfs mode=1777 0 0 +tmpfs /run tmpfs mode=0755,nosuid,nodev 0 0 +sysfs /sys sysfs defaults 0 0
board/mender/overlay/etc/mender/mender.conf new file +10 -0
@@ -0,0 +1,10 @@ +{ + "InventoryPollIntervalSeconds": 1800, + "UpdatePollIntervalSeconds": 1800, + "RetryPollIntervalSeconds": 300, + "RootfsPartA": "/dev/vda2", + "RootfsPartB": "/dev/vda3", + "ServerCertificate": "/etc/mender/server.crt", + "ServerURL": "https://docker.mender.io", + "TenantToken": "dummy" +}
board/mender/post-image-efi-gpt.sh new file +83 -0
83 lines not on this page · raw message
board/mender/pre-image.sh new file +9 -0
@@ -0,0 +1,9 @@ +#!/bin/sh -e + +# The common paradigm is to have the persistent data volume@/data +# for mender. +cd ${TARGET_DIR} +if [ ! -L data ]; then + ln -s var/lib/mender data +fi +
board/mender/readme.txt new file +58 -0
58 lines not on this page · raw message
configs/mender_x86_64_efi_defconfig new file +73 -0
73 lines not on this page · raw message
Signature · 1 line
2.21.0
PATCH 1/1 board/mender: add a mender board example configuration.
Hello Adam,
Quoted 13 lines · On Mon, 26 Aug 2019 13:36:19 -0700 aduskett at gmail.com wrote:
From: Adam Duskett <[email protected]>
Buildroot currently has all of the needed packages to use Mender as the primary update system. However; there isn't any documentation or examples now that provide a starting point for users. This lack of documentation makes setting up a Mender based update system difficult and time-consuming.
Provided in this patch series is a
mender_x86_64_efi_defconfig-that sets up anx86_64EFI based build that is ready to flash to a USB pen drive or use in a QEMU environment. The system partition exchema comprises of two equally sized root partitions and a 64M data partition that is mounted to/var/lib/menderas a persistent data store partition.
Quoted 4 lines
There is a
board/mender/readme.txtprovided which gives users documentation on how to flash the built image or boot the image using QEMU as well.Signed-off-by Adam Duskett <[email protected]>
Thanks for proposing this. I am wondering if adding more and more defconfigs is the right way of "documenting" things like that. It definitely makes sense to have some documented examples/demos to show how to use a particular feature, but I don't know if defconfigs are the right way. Or if they are, perhaps we should have a way to clearly distinguish the regular defconfigs (i.e minimal ones just to get started with a HW platform) from the demo/example ones.
board/mender/post-image-efi-gpt.sh
Quoted 5 lines
board/mender/post-image-efi-gpt.sh new file +0
-0
Please use the genimage capability to generate GPT partition tables. It wasn't supported in genimage back when the pc_x86_64_efi_defconfig was introduced, but there is a patch pending in patchwork to convert pc_x86_64_efi_defconfig to use this genimage capability.
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/1 board/mender: add a mender board example configuration.
Hey Thomas
Quoted 24 lines · Thomas Petazzoni
Hello Adam,
Quoted 13 lines · On Mon, 26 Aug 2019 13:36:19 -0700 aduskett at gmail.com wrote:
From: Adam Duskett <[email protected]>
Buildroot currently has all of the needed packages to use Mender as the primary update system. However; there isn't any documentation or examples now that provide a starting point for users. This lack of documentation makes setting up a Mender based update system difficult and time-consuming.
Provided in this patch series is a
mender_x86_64_efi_defconfig-that sets up anx86_64EFI based build that is ready to flash to a USB pen drive or use in a QEMU environment. The system partition exchema comprises of two equally sized root partitions and a 64M data partition that is mounted to/var/lib/menderas a persistent data store partition.Quoted 4 lines
There is a
board/mender/readme.txtprovided which gives users documentation on how to flash the built image or boot the image using QEMU as well.Signed-off-by Adam Duskett <[email protected]>
Quoted 8 lines
Thanks for proposing this. I am wondering if adding more and more defconfigs is the right way of "documenting" things like that. It definitely makes sense to have some documented examples/demos to show how to use a particular feature, but I don't know if defconfigs are the right way. Or if they are, perhaps we should have a way to clearly distinguish the regular defconfigs (i.e minimal ones just to get started with a HW platform) from the demo/example ones.
Usually, I would agree with documenting the process; however; in this case, the best course of action is a series of examples. The reasoning behind the separate defconfig standard is that using Mender as the update system with Buildroot, several system settings need to be set up; in the case of x86, this includes the following partition layout:
- Root A
- Root B
- Data
Note:
A separate boot partition is also supported; however; Buildroot doesn't
support building multiple file systems in one command. Because of this limitation, I wasn't able to include building an initrd file system in a single example (Perhaps Dracut could do this if we add the package someday).
For ARM, using Mender also requires patching UBoot, so having examples which include the official mender patches and specific UBoot version would be an enormous help for anybody wanting to use Mender on ARM boards.
As for your comment about distinguishing the regular defconfigs, perhaps having _demo or _example in the defconfig names would help?
Quoted 11 lines
board/mender/post-image-efi-gpt.sh
Quoted 5 lines
board/mender/post-image-efi-gpt.sh new file +0
-0Please use the genimage capability to generate GPT partition tables. It wasn't supported in genimage back when the
pc_x86_64_efi_defconfigwas introduced, but there is a patch pending in patchwork to convertpc_x86_64_efi_defconfigto use this genimage capability.
Quoted 7 lines
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Thanks!
Adam
cover board/mender: add a mender board example configuration.
In reply to aduskett at gmail.comHello Adam
Le 26/08/2019 ? 22:36, aduskett at gmail.com a ?crit?:
Quoted 6 lines
From: Adam Duskett <[email protected]>
Buildroot currently has all of the needed packages to use Mender as the primary update system. However; there isn't any documentation or examples now that provide a starting point for users. This lack of documentation makes setting up a Mender based update system difficult and time-consuming.
just FYI, there is a section for Buildroot integrations on Mender hub :) Maybe we can also provide this link somewhere ?
Thanks !
Pierre-Jean
Quoted 40 lines
Provided in this patch series is a
mender_x86_64_efi_defconfig-that sets up anx86_64EFI based build that is ready to flash to a USB pen drive or use in a QEMU environment. The system partition exchema comprises of two equally sized root partitions and a 64M data partition that is mounted to/var/lib/menderas a persistent data store partition.There is a
board/mender/readme.txtprovided which gives users documentation on how to flash the built image or boot the image using QEMU as well.In the future, I want to also provide a raspberrypi example for Uboot users, and possibly a orangepi and an IMX6 example as well.
Thanks!
Adam
Adam Duskett (1):
board/mender: add a mender board example configuration..gitlab-ci.yml | 1 + DEVELOPERS | 1 + board/mender/linux.config | 64 ++++++++++++++++ board/mender/mender_grubenv_defines | 32 ++++++++ board/mender/overlay/etc/fstab | 10 +++ board/mender/overlay/etc/mender/mender.conf | 10 +++ board/mender/post-image-efi-gpt.sh | 83 +++++++++++++++++++++ board/mender/pre-image.sh | 9 +++ board/mender/readme.txt | 58 ++++++++++++++ configs/mender_x86_64_efi_defconfig | 73 ++++++++++++++++++ 10 files changed, 341 insertions(+)create mode 100644
board/mender/linux.config
create mode 100644 board/mender/mender_grubenv_defines create mode 100644 board/mender/overlay/etc/fstab create mode 100644board/mender/overlay/etc/mender/mender.confcreate mode 100755board/mender/post-image-efi-gpt.shcreate mode 100755board/mender/pre-image.sh
create mode 100644board/mender/readme.txt
create mode 100644 configs/mender_x86_64_efi_defconfig
Signature · 3 lines
Pierre-Jean Texier Embedded Linux Engineer https://koncepto.io
cover board/mender: add a mender board example configuration.
Le 26/08/2019 ? 22:49, Pierre-Jean Texier a ?crit?:
Quoted 1 line
just FYI, there is a section for Buildroot integrations on Mender hub
+1 for the link
https://hub.mender.io/c/board-integrations/Board-integrations-for-Buildroot
Thanks !
Signature · 3 lines
Pierre-Jean Texier Embedded Linux Engineer https://koncepto.io