Vdelana programska oprema - VisionFive - Mender - Yocto - 2. del: posnetek zaslona računalnika

VisionFive - Mender - Yocto

2. del – Osnovna nastavitev za vključitev menderja

Nastavitev Mender Yocto

Nastavitev osnovnega menderja za tablo VisionFive

Za razvoj uporabljamo podružnico Yocto Kirkstone. Predvidevamo, da imate že nameščeno delovno razvojno okolje in nastavite svoje okolje, kot je opisano v VisionFive - Mender - Yocto - Part 1.

Nastavitev strežnika Mender

Namestitev strežnika Mender ni del te serije člankov. Za naše testno okolje smo namestili strežnik Mender z uporabo namestitvenega tutorial z docker-compose, kot je opisano v Namestitvi z Docker Compose.

Opomba

Deviant na vajah, uporabljamo naše nadomestno kartico CA certifikat. Če želite to storiti, morate pred zagonom ukaza "./run up -d" kopirati javni in zasebni ključ na '/mender-server/production/keys-generated/cert'.

Preden nadaljujete, se lahko prijavite v strežnik Mender, ne da bi dobili sporočila o napakah.

Kloni meta-mender

Pojdi v svoj poky imenik - v mojem primeru poky-kirkstone - in kloni meta-mender repozitorij. Ker še ni veje Kirkstone, morate klonirate "master-next" vejo.

cd poky-kirkstone
git clone -b master-next https://github.com/mendersoftware/meta-mender.git

Lokalna.conf in bblayers.conf

Kopirajte bblayers.conf.sample-mender in local.conf.sample-mender iz meta-interelectronix-vision5ve imenika v konf imenik in ga preimenujte v bblayers.conf in local.conf:

cp ../poky-kirkstone/meta-interelectronix-visionfive/conf/bblayers.conf.sample-mender conf/bblayers.conf
cp ../poky-kirkstone/meta-interelectronix-visionfive/conf/local.conf.sample-mender conf/local.conf

V datoteki bblayers.conf morate prilagoditi pot do vašega poky-kirkstone imenika. Izbrišite tudi vrstico '/workdir/poky-kirkstone/meta-interelectronix ' - potrebna je le za našo psplash prilagoditev.

Pomembne nastavitve v local.conf so:

# mender settings
# The name of the disk image and Artifact that will be built.
# This is what the device will report that it is running, and different updates must have different names
# because Mender will skip installation of an Artifact if it is already installed.
MENDER_ARTIFACT_NAME = "release-1"

INHERIT += "mender-full"

# The version of Mender to build. This needs to match an existing recipe in the meta-mender repository.
#
# Given your Yocto Project version, see which versions of Mender you can currently build here:
# https://docs.mender.io/overview/compatibility#mender-client-and-yocto-project-version
#
# Given a Mender client version, see the corresponding version of the mender-artifact utility:
# https://docs.mender.io/overview/compatibility#mender-clientserver-and-artifact-format
#
# By default this will select the latest version of the tools that is backwards compatible with the
# given Yocto branch.
# If you need an earlier version, or a later version even though it may not be backwards compatible,
# please uncomment the following and set to the required version. If you want to use the bleeding
# edge version, specify "master-git%", but keep in mind that these versions may not be stable:
#
# PREFERRED_VERSION_mender-client = "3.3.0"
# PREFERRED_VERSION_mender-artifact = "3.8.0"
# PREFERRED_VERSION_mender-artifact-native = "3.8.0"
# PREFERRED_VERSION_mender-connect = "2.0.1"

# The following settings to enable systemd are needed for all Yocto
# releases sumo and older.  Newer releases have these settings conditionally
# based on the MENDER_FEATURES settings and the inherit of mender-full above.
DISTRO_FEATURES:append = " systemd"
VIRTUAL-RUNTIME:init_manager = "systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
VIRTUAL-RUNTIME_initscripts = ""

ARTIFACTIMG_FSTYPE = "ext4"

# Example: Memory card storage
MENDER_STORAGE_DEVICE = "/dev/mmcblk0"
# Example: Memory card with 2GiB of storage.
#MENDER_STORAGE_TOTAL_SIZE_MB = "29476"
#MENDER_STORAGE_TOTAL_SIZE_MB = "14738"
MENDER_STORAGE_TOTAL_SIZE_MB = "7369"

MENDER_UBOOT_STORAGE_INTERFACE = "mmc"
MENDER_UBOOT_STORAGE_DEVICE = "0"

MENDER_BOOT_PART = "${MENDER_STORAGE_DEVICE_BASE}1"
MENDER_DATA_PART = "${MENDER_STORAGE_DEVICE_BASE}4"
MENDER_ROOTFS_PART_A = "${MENDER_STORAGE_DEVICE_BASE}2"
MENDER_ROOTFS_PART_B = "${MENDER_STORAGE_DEVICE_BASE}3"

MENDER_FEATURES_ENABLE:append = " mender-uboot mender-image-sd"
MENDER_FEATURES_DISABLE:append = " mender-grub mender-image-uefi"

MACHINE_ESSENTIAL_EXTRA_RDEPENDS:append = " kernel-image kernel-devicetree"

PREFERRED_VERSION:mender-client = "3.3.0"

Prilagodi meta-starfive-bsp

Če želite dodati nastavitve, ki so potrebna za nastavitev programa Mender, ustvarite vejo meta-starfive-bsp.

Prilagoditve so potrebna v:

  • conf/machine/starfive-visionfive-jh7100.conf: Odstranite ali komentirajte te dve vrstici
UBOOT_ENV ?= "uEnv"
UBOOT_ENV_SUFFIX = "txt"
  • recepti-bsp/bootfiles/files/uEnv.txt: Zamenjajte naslednjo vrstico, da vključite Mender spremenljivke med zagonom
bootcmd=load mmc 0:1 ${kernel_addr_r} @IMAGETYPE@; load mmc 0:1 ${fdt_addr_r} jh7100-starfive-visionfive-v1.dtb; setenv bootargs 'root=${mender_kernel_root} rw rootfstype=ext4 rootwait earlycon console=ttyS0,115200n8'; booti ${kernel_addr_r} - ${fdt_addr_r}
  • recepti-bsp/u-boot/u-boot-visionfive_v2022.03.bb: Dodajte naslednje vrstice, da poveste meta-mender, da se uporablja u-boot po meri
require recipes-bsp/u-boot/u-boot-mender.inc

PROVIDES += "u-boot"
RPROVIDES_${PN} += "u-boot"

BOOT_FILES:append = " uEnv.txt"

Recepti v meta-interelektronix-vision5ve

Nekatere nastavitve in spremenljivke je treba nastaviti v meta-plasti po meri, kot to počnemo v meta-interelektronix-vision5ve.

  • recepti-mender/mender-client/mender-client_%.bbappend: Dodajte URL strežnika Mender
MENDER_SERVER_URL = "https://mender.interelectronix.com"
  • recepti-bsp/u-boot/u-boot-visionfive_%.bbappend: Dodajte naslednje vrstice
MENDER_UBOOT_AUTO_CONFIGURE = "1"
BOOTENV_SIZE = "0x20000"
  • recepti-bsp/u-boot-env/*: Dodaj ta recept iz prenesene zip datoteke. Vsebuje dve datoteki uEnv, ki se uporabljata v korenski datotečni sistem. uEnv_visionfive.txt se uporablja v rootfs, pri zagonu iz particije A in uEnv_visionfive3.txt se uporablja pri zagonu iz particije B.

  • recepti-core/images/vision-five-image-mender.bb: Take this image recept or add 'u-boot-env' to your image recept

    IMAGE_INSTALL:append = " v4l-utils u-boot-env"

Pomemben

Preden lahko bitbake svojo sliko, morate prilagoditi u-boot, kot je opisano v naslednjem delu serije člankov.

Oglejte si, kako nastaviti u-boot za Mender v VisionFive - Mender - Yocto - Del 3.

Licenca za avtorske pravice

Copyright © 2022 Interelectronix e.K.
Izvorna koda projekta je licencirana pod licenco GPL-3.0.

Vdelana programska oprema - VisionFive - Mender - Yocto: posnetek zaslona računalnika
1. del - Osnovna nastavitev okolja Yocto
  1. del serije člankov, kako nastaviti Yocto okolje za ustvarjanje Yocto Linuxa z integracijo mender odjemalca.
Vdelana programska oprema - VisionFive - Mender - Yocto: posnetek zaslona računalnika
4. del - Ustvarjanje artefakta za mender
  1. del serije člankov, kako nastaviti Yocto okolje za ustvarjanje Yocto Linuxa z integracijo mender odjemalca.
Vdelana programska oprema - VisionFive - Mender - Yocto: posnetek zaslona računalnika
3. del - konfiguracija zagona za Mender
  1. del serije člankov, kako nastaviti Yocto okolje za ustvarjanje Yocto Linux z integracijo mender odjemalca.