mirror of
https://git.yoctoproject.org/meta-arm
synced 2026-07-24 06:27:10 +00:00
Compare commits
322 Commits
TC0-2020.10.29
...
3.3
| Author | SHA1 | Date | |
|---|---|---|---|
| cec4d317e9 | |||
| bcbd365cfe | |||
| f723b6b593 | |||
| 696773771f | |||
| 5c5cd66675 | |||
| 65382e51b7 | |||
| b43c30089c | |||
| 8baef3984a | |||
| 70e9b1ffde | |||
| 2354c9e06e | |||
| 587b8ab87d | |||
| 850c324189 | |||
| e3bfb5d746 | |||
| f88a69768a | |||
| 1c151dba07 | |||
| 0519634f2d | |||
| 31e1428ea5 | |||
| 0f29c11d2a | |||
| 4b3343b4a9 | |||
| 976cebdf6e | |||
| d45c837137 | |||
| cbf547e222 | |||
| c1123c3d63 | |||
| 738c20d752 | |||
| 43203a464d | |||
| 219fd34b76 | |||
| 2f2258d1d2 | |||
| a7f4f7d2bd | |||
| 2261d39412 | |||
| 77ac287518 | |||
| 8b123ffe85 | |||
| 885415312b | |||
| 16b93fa033 | |||
| 3032b80ed3 | |||
| d1cb358f52 | |||
| 7b0e704dfd | |||
| f65c5c4217 | |||
| a52d805faf | |||
| d2f8a13d3c | |||
| e5ed951abe | |||
| 95087cf374 | |||
| e45cfb9e8f | |||
| de5dc9be14 | |||
| 682c330600 | |||
| d6e18c885d | |||
| 8855e397bc | |||
| 452bc97276 | |||
| 465471fbb9 | |||
| e37127939b | |||
| 205e4bb760 | |||
| e6770c2160 | |||
| 92da257b83 | |||
| 66939c8f35 | |||
| 943dd5943a | |||
| 8195b2c953 | |||
| 5e3d09e234 | |||
| 1a77ae9d5f | |||
| e74b3c2f24 | |||
| 7fd85df7d7 | |||
| e875122778 | |||
| 79d60476bb | |||
| 01a13b11ad | |||
| ac1dc0b894 | |||
| 950c68dbab | |||
| 61291f6d80 | |||
| 4f1f77d660 | |||
| 403de1121e | |||
| d4f7fd1788 | |||
| f8d65dddc8 | |||
| debff92415 | |||
| 67faf6c7dc | |||
| 4f8766b081 | |||
| a949ebfd06 | |||
| a82ed3cfc9 | |||
| 255ca59858 | |||
| 2bc44548b9 | |||
| 1682eb1f44 | |||
| 7c1cb547b9 | |||
| 4865c69658 | |||
| 676caf30d0 | |||
| 5d401b9a77 | |||
| 214e3eb43a | |||
| aaaf3fac58 | |||
| e06ae8431c | |||
| d0de844df6 | |||
| af36a66128 | |||
| 9b830fbd97 | |||
| 856291f071 | |||
| a915ff3931 | |||
| b4659361b3 | |||
| 50850e8eca | |||
| 9eeeda7169 | |||
| d38e10e58b | |||
| 0d50124e51 | |||
| 78c8bfdd34 | |||
| 977c7e6613 | |||
| a8cb17f982 | |||
| 46bb624631 | |||
| fc0bed464e | |||
| 2c44ddd93a | |||
| 957fefc816 | |||
| 2720a1b32b | |||
| 808115fe13 | |||
| 0cec3e584d | |||
| aa63e31b6e | |||
| fdcf7b7b3b | |||
| d3c35b4a0e | |||
| e5523d626f | |||
| a9644d39c5 | |||
| 1f872c3c83 | |||
| 3be0996065 | |||
| 101abf89c6 | |||
| 549f362d2f | |||
| cb4c230b56 | |||
| 460210f4a8 | |||
| 568d4d7f9c | |||
| 1350f983ae | |||
| 15512adf39 | |||
| 63c9974493 | |||
| a6de147dc0 | |||
| ea931f83e3 | |||
| d692df24cd | |||
| e0c74f3b3b | |||
| 82b31654b0 | |||
| 57192fd8a5 | |||
| 67f57f35da | |||
| 0978f5a74c | |||
| 232b411b47 | |||
| 98f3779210 | |||
| 7ae8a30b6b | |||
| 933df12da8 | |||
| bc4cd77370 | |||
| 5b823a1eb4 | |||
| a8f32f990a | |||
| 51e014fd47 | |||
| f8e79562f9 | |||
| 980f559e87 | |||
| 44a3c5cf80 | |||
| 603a7657e2 | |||
| 7453f06afc | |||
| b595d1ea47 | |||
| a3481e5016 | |||
| 9fdf9297ac | |||
| 9e00b6b884 | |||
| ee8a242e7a | |||
| 43a25b2e96 | |||
| e25c325197 | |||
| 761bcbb365 | |||
| d9fe9a3eac | |||
| e627b698e7 | |||
| 84683227ed | |||
| 312a25202b | |||
| 1f548fce10 | |||
| 75c9cc3bf8 | |||
| 9e2ff72858 | |||
| 68a113c0a0 | |||
| f14be5995f | |||
| eb3a6b74b7 | |||
| a56011bf30 | |||
| 0a1d96948f | |||
| 6dbf49d633 | |||
| e454387d9f | |||
| b566fbce82 | |||
| 756e695b48 | |||
| 1f6d3f6ef2 | |||
| 9ed331bbd7 | |||
| a780470d96 | |||
| 800249ac61 | |||
| 5a44edaa0e | |||
| cff5aafc67 | |||
| 60ef8543f4 | |||
| 235b7539d8 | |||
| d9a0f4fe59 | |||
| 6a85fdbd77 | |||
| 7fdd34516c | |||
| 9b7905b994 | |||
| caaa21d84f | |||
| 65618b753f | |||
| 511c1ca429 | |||
| 16d10f9c58 | |||
| 7a3e9d5087 | |||
| 35adaace0e | |||
| e40b99e131 | |||
| fecf206b7d | |||
| 9b5f0a0cc4 | |||
| 88a5524a61 | |||
| eea9ce959a | |||
| 98014d1c1c | |||
| a230baa675 | |||
| da32f5c1c8 | |||
| 293d1e0e8d | |||
| e59fc3233b | |||
| c90cf8ce5a | |||
| 5b98ef9d65 | |||
| 35c0bcceea | |||
| fabf4a3c0f | |||
| b578b45092 | |||
| e05be1a396 | |||
| be19ce6b94 | |||
| 7cd87c3ee3 | |||
| a49c59daf6 | |||
| 7577cecab6 | |||
| 3c9486fb31 | |||
| 2a530c3419 | |||
| 0d83df0bd2 | |||
| 966e15826a | |||
| 719a003508 | |||
| 79360345fb | |||
| d683a5bc92 | |||
| 780fba3481 | |||
| afa281b7a9 | |||
| f54bb78861 | |||
| de5d5e611a | |||
| 2ab2f5e179 | |||
| 9d8bb0bea2 | |||
| 4b1d39b87d | |||
| 4ba96e72fd | |||
| cd9cdaad2a | |||
| e3b06f63b1 | |||
| 03f2d78e45 | |||
| e64c553fa0 | |||
| 7f5a3b06ee | |||
| a8a44f6916 | |||
| fda2117467 | |||
| 095d9e314d | |||
| 148103bf84 | |||
| f8fc3b463d | |||
| e18ee052f7 | |||
| 22948879f8 | |||
| 99da50c473 | |||
| b0188cd0cc | |||
| fb045c9019 | |||
| df93a23ad4 | |||
| 87d12f6fa4 | |||
| 42b114e5e0 | |||
| 39ae13d44e | |||
| 390aa6e354 | |||
| 8e2fa5edc8 | |||
| 342d2ec158 | |||
| ce8369461e | |||
| 3bbddbe213 | |||
| 02994f94df | |||
| aa35796c80 | |||
| 5331993f8c | |||
| 9b075d12de | |||
| 91225be953 | |||
| 7c34d0affc | |||
| d8dbaa20b2 | |||
| e52410e281 | |||
| 60f5176196 | |||
| 136207e7c1 | |||
| 56180fce2b | |||
| 067a259cbd | |||
| 197b0732e3 | |||
| 214ec04498 | |||
| 42c4ba9c96 | |||
| 9872afc6c7 | |||
| a996166e85 | |||
| e9e01e9be7 | |||
| ce9650ec84 | |||
| a9cd4fc12f | |||
| 171616a183 | |||
| 3c738c4f69 | |||
| 222fcf4281 | |||
| aee22517e4 | |||
| 167c854412 | |||
| 9a2847c0d6 | |||
| 55daf196a6 | |||
| 5fa6bc3a9c | |||
| 0f0a971458 | |||
| 658faaff76 | |||
| db1d714029 | |||
| a47060c989 | |||
| 94c7031e4e | |||
| 2d1e4b2af1 | |||
| 1df9bebacf | |||
| c333787f64 | |||
| dbe4f2c92d | |||
| 628b8bc19a | |||
| 9dd5fcd6ce | |||
| 598e1cc32c | |||
| fc36f9d163 | |||
| 9fa07405df | |||
| 2c84a019c2 | |||
| 3dab98935e | |||
| 91d5c596a6 | |||
| d57027cc02 | |||
| 0de8e065f4 | |||
| 5b35ed7d4d | |||
| 9a7ab6a47e | |||
| c0f9746d58 | |||
| 496763e0cc | |||
| 9425dbafc0 | |||
| f24f7fde73 | |||
| 93ceeb7349 | |||
| 1091c186c5 | |||
| 45d7cf50a4 | |||
| cd39898f06 | |||
| 6c88dba4a4 | |||
| 8dddb06aa2 | |||
| c760240dd2 | |||
| e03b824d78 | |||
| 46b3f67814 | |||
| 90cf59de1a | |||
| 2b91b8383b | |||
| accb5d3bb4 | |||
| 15e525c0e5 | |||
| acac8ed6ce | |||
| 5f8eabe68f | |||
| eb332aec8c | |||
| 8bb333df5e | |||
| 2d3ded053a | |||
| ceb5902e56 | |||
| 128af6b2d0 | |||
| cdfe259d13 | |||
| 7221a0c0fe | |||
| d931feb6b3 | |||
| 1a97691749 | |||
| e2a09790bb | |||
| a878c3371c | |||
| 1a8c987158 | |||
| f35c7f282d |
+192
@@ -0,0 +1,192 @@
|
|||||||
|
# Use our custom Crops-derived image
|
||||||
|
image: $CI_REGISTRY/$CI_PROJECT_NAMESPACE/yocto-builder:master
|
||||||
|
|
||||||
|
# First do a common bootstrap, and then build all the targets
|
||||||
|
stages:
|
||||||
|
- prep
|
||||||
|
- bootstrap
|
||||||
|
- build
|
||||||
|
|
||||||
|
# Common job fragment to get a worker ready
|
||||||
|
.setup:
|
||||||
|
stage: build
|
||||||
|
variables:
|
||||||
|
KAS_WORK_DIR: $CI_PROJECT_DIR/work
|
||||||
|
KAS_REPO_REF_DIR: $CI_BUILDS_DIR/persist/repos
|
||||||
|
SSTATE_DIR: $CI_BUILDS_DIR/persist/sstate
|
||||||
|
DL_DIR: $CI_BUILDS_DIR/persist/downloads
|
||||||
|
BB_LOGCONFIG: $CI_PROJECT_DIR/ci/logging.yml
|
||||||
|
before_script:
|
||||||
|
- echo KAS_WORK_DIR = $KAS_WORK_DIR
|
||||||
|
- echo SSTATE_DIR = $SSTATE_DIR
|
||||||
|
- echo DL_DIR = $DL_DIR
|
||||||
|
- mkdir --verbose --parents $KAS_WORK_DIR $KAS_REPO_REF_DIR $SSTATE_DIR $DL_DIR
|
||||||
|
|
||||||
|
# Generalised fragment to do a Kas build
|
||||||
|
.build:
|
||||||
|
extends: .setup
|
||||||
|
script:
|
||||||
|
- KASFILES=$(./ci/jobs-to-kas $CI_JOB_NAME)
|
||||||
|
- kas shell --update --force-checkout $KASFILES -c 'cat conf/*.conf'
|
||||||
|
- kas build $KASFILES
|
||||||
|
- ./ci/check-warnings $KAS_WORK_DIR/build/warnings.log
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Prep stage, update repositories once
|
||||||
|
#
|
||||||
|
update-repos:
|
||||||
|
extends: .setup
|
||||||
|
stage: prep
|
||||||
|
script:
|
||||||
|
- flock --verbose --timeout 60 $KAS_REPO_REF_DIR ./ci/update-repos
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bootstrap stage, bootstrap and machine coverage
|
||||||
|
#
|
||||||
|
|
||||||
|
# Build a number of native tools first to ensure the other builders don't race
|
||||||
|
# over them
|
||||||
|
n1sdp/bootstrap:
|
||||||
|
extends: .build
|
||||||
|
stage: bootstrap
|
||||||
|
|
||||||
|
# What percentage of machines in the layer do we build
|
||||||
|
machine-coverage:
|
||||||
|
stage: bootstrap
|
||||||
|
script:
|
||||||
|
- ./ci/check-machine-coverage
|
||||||
|
coverage: '/Coverage: \d+/'
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Build stage, the actual build jobs
|
||||||
|
#
|
||||||
|
|
||||||
|
corstone500:
|
||||||
|
extends: .build
|
||||||
|
|
||||||
|
corstone700-fvp:
|
||||||
|
extends: .build
|
||||||
|
|
||||||
|
corstone700-mps3:
|
||||||
|
extends: .build
|
||||||
|
|
||||||
|
fvp-base:
|
||||||
|
extends: .build
|
||||||
|
|
||||||
|
fvp-base-arm32:
|
||||||
|
extends: .build
|
||||||
|
|
||||||
|
fvp-base-arm32/external-gcc-arm32:
|
||||||
|
extends: .build
|
||||||
|
|
||||||
|
fvp-baser-aemv8r64:
|
||||||
|
extends: .build
|
||||||
|
|
||||||
|
gem5-arm64:
|
||||||
|
extends: .build
|
||||||
|
|
||||||
|
gem5-arm64-xen:
|
||||||
|
extends: .build
|
||||||
|
|
||||||
|
gem5-atp-arm64:
|
||||||
|
extends: .build
|
||||||
|
|
||||||
|
generic-arm64:
|
||||||
|
extends: .build
|
||||||
|
|
||||||
|
juno:
|
||||||
|
extends: .build
|
||||||
|
|
||||||
|
juno/clang:
|
||||||
|
extends: .build
|
||||||
|
|
||||||
|
microbit-v1:
|
||||||
|
extends: .build
|
||||||
|
|
||||||
|
musca-b1:
|
||||||
|
extends: .build
|
||||||
|
|
||||||
|
musca-s1:
|
||||||
|
extends: .build
|
||||||
|
|
||||||
|
n1sdp:
|
||||||
|
extends: .build
|
||||||
|
|
||||||
|
n1sdp/armgcc:
|
||||||
|
extends: .build
|
||||||
|
|
||||||
|
qemu-cortex-a53:
|
||||||
|
extends: .build
|
||||||
|
|
||||||
|
qemuarm:
|
||||||
|
extends: .build
|
||||||
|
|
||||||
|
qemuarm64-sbsa:
|
||||||
|
extends: .build
|
||||||
|
|
||||||
|
qemuarm64-secureboot:
|
||||||
|
extends: .build
|
||||||
|
|
||||||
|
qemuarm64-secureboot/clang:
|
||||||
|
extends: .build
|
||||||
|
|
||||||
|
qemuarm64-secureboot/clang/musl:
|
||||||
|
extends: .build
|
||||||
|
|
||||||
|
qemuarm64-secureboot/musl:
|
||||||
|
extends: .build
|
||||||
|
|
||||||
|
qemuarmv5:
|
||||||
|
extends: .build
|
||||||
|
|
||||||
|
sgi575:
|
||||||
|
extends: .build
|
||||||
|
|
||||||
|
tc0:
|
||||||
|
extends: .build
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Utility tasks, not executed automatically
|
||||||
|
#
|
||||||
|
|
||||||
|
# Report on disk usage
|
||||||
|
usage:
|
||||||
|
extends: .setup
|
||||||
|
stage: prep
|
||||||
|
when: manual
|
||||||
|
script:
|
||||||
|
- du -h -s $DL_DIR $SSTATE_DIR $KAS_REPO_REF_DIR
|
||||||
|
|
||||||
|
delete-dl-dir:
|
||||||
|
extends: .setup
|
||||||
|
stage: prep
|
||||||
|
when: manual
|
||||||
|
script:
|
||||||
|
- rm -rf $DL_DIR/*
|
||||||
|
|
||||||
|
delete-repo-dir:
|
||||||
|
extends: .setup
|
||||||
|
stage: prep
|
||||||
|
when: manual
|
||||||
|
script:
|
||||||
|
- rm -rf $KAS_REPO_REF_DIR/*
|
||||||
|
|
||||||
|
# Wipe out old sstate
|
||||||
|
prune-sstate:
|
||||||
|
extends: .setup
|
||||||
|
stage: prep
|
||||||
|
when: manual
|
||||||
|
script:
|
||||||
|
- find $SSTATE_DIR -type f -atime +30 -delete
|
||||||
|
|
||||||
|
# Delete all sstate
|
||||||
|
delete-sstate:
|
||||||
|
extends: .setup
|
||||||
|
stage: prep
|
||||||
|
when: manual
|
||||||
|
script:
|
||||||
|
- rm -rf $SSTATE_DIR/*
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
header:
|
||||||
|
version: 9
|
||||||
|
|
||||||
|
local_conf_header:
|
||||||
|
cc: |
|
||||||
|
GCCVERSION = "arm-10.2"
|
||||||
+44
@@ -0,0 +1,44 @@
|
|||||||
|
header:
|
||||||
|
version: 9
|
||||||
|
|
||||||
|
distro: poky
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
repos:
|
||||||
|
refspec: hardknott
|
||||||
|
|
||||||
|
repos:
|
||||||
|
meta-arm:
|
||||||
|
layers:
|
||||||
|
meta-arm:
|
||||||
|
meta-arm-bsp:
|
||||||
|
meta-arm-toolchain:
|
||||||
|
|
||||||
|
poky:
|
||||||
|
url: https://git.yoctoproject.org/git/poky
|
||||||
|
layers:
|
||||||
|
meta:
|
||||||
|
meta-poky:
|
||||||
|
|
||||||
|
env:
|
||||||
|
BB_LOGCONFIG: ""
|
||||||
|
|
||||||
|
local_conf_header:
|
||||||
|
base: |
|
||||||
|
CONF_VERSION = "1"
|
||||||
|
PACKAGE_CLASSES = "package_ipk"
|
||||||
|
LICENSE_FLAGS_WHITELIST += "armcompiler"
|
||||||
|
PACKAGECONFIG_remove_pn-qemu-system-native = "gtk+ sdl"
|
||||||
|
BB_NUMBER_THREADS = "16"
|
||||||
|
PARALLEL_MAKE = "-j16"
|
||||||
|
INHERIT += "rm_work"
|
||||||
|
PACKAGECONFIG_append_pn-perf = " coresight"
|
||||||
|
ERROR_QA = "${WARN_QA}"
|
||||||
|
noptest: |
|
||||||
|
DISTRO_FEATURES_remove = "ptest"
|
||||||
|
|
||||||
|
machine: unset
|
||||||
|
|
||||||
|
target:
|
||||||
|
- core-image-base
|
||||||
|
- perf
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
header:
|
||||||
|
version: 9
|
||||||
|
|
||||||
|
target:
|
||||||
|
- binutils-cross-aarch64
|
||||||
|
- gcc-cross-aarch64
|
||||||
|
- python3-native
|
||||||
|
- opkg-native
|
||||||
|
- rpm-native
|
||||||
Executable
+26
@@ -0,0 +1,26 @@
|
|||||||
|
#! /usr/bin/env python3
|
||||||
|
|
||||||
|
from pathlib import Path
|
||||||
|
import sys
|
||||||
|
|
||||||
|
metaarm = Path.cwd()
|
||||||
|
|
||||||
|
if metaarm.name != "meta-arm":
|
||||||
|
print("Not running inside meta-arm")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
# All machine configurations
|
||||||
|
machines = metaarm.glob("meta-*/conf/machine/*.conf")
|
||||||
|
machines = set(p.stem for p in machines)
|
||||||
|
|
||||||
|
# All kas files
|
||||||
|
kas = metaarm.glob("ci/*.yml")
|
||||||
|
kas = set(p.stem for p in kas)
|
||||||
|
|
||||||
|
missing = machines - kas
|
||||||
|
print(f"The following machines are missing: {', '.join(sorted(missing))}.")
|
||||||
|
|
||||||
|
covered = len(machines) - len(missing)
|
||||||
|
total = len(machines)
|
||||||
|
percent = int(covered / total * 100)
|
||||||
|
print(f"Coverage: {percent}%")
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
# Expects the path to a log file as $1, and if this file has any content
|
||||||
|
# then display the contents and exit with an error code.
|
||||||
|
|
||||||
|
set -e -u
|
||||||
|
|
||||||
|
LOGFILE=$1
|
||||||
|
|
||||||
|
if test -s $LOGFILE; then
|
||||||
|
echo ==============================
|
||||||
|
echo The build had warnings/errors:
|
||||||
|
echo ==============================
|
||||||
|
cat $LOGFILE
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
header:
|
||||||
|
version: 9
|
||||||
|
|
||||||
|
repos:
|
||||||
|
meta-clang:
|
||||||
|
url: https://github.com/kraj/meta-clang
|
||||||
|
|
||||||
|
local_conf_header:
|
||||||
|
clang: |
|
||||||
|
TOOLCHAIN = "clang"
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
header:
|
||||||
|
version: 9
|
||||||
|
includes:
|
||||||
|
- base.yml
|
||||||
|
|
||||||
|
machine: corstone500
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
header:
|
||||||
|
version: 9
|
||||||
|
includes:
|
||||||
|
- base.yml
|
||||||
|
|
||||||
|
machine: corstone700-fvp
|
||||||
|
|
||||||
|
local_conf_header:
|
||||||
|
image: |
|
||||||
|
CORE_IMAGE_EXTRA_INSTALL = "corstone700-test-app"
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
header:
|
||||||
|
version: 9
|
||||||
|
includes:
|
||||||
|
- corstone700-fvp.yml
|
||||||
|
|
||||||
|
machine: corstone700-mps3
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
header:
|
||||||
|
version: 9
|
||||||
|
|
||||||
|
local_conf_header:
|
||||||
|
cc: |
|
||||||
|
PNBLACKLIST[gcc-cross-arm] = "Using external toolchain"
|
||||||
|
TCMODE = "external-arm"
|
||||||
|
EXTERNAL_TOOLCHAIN = "/usr/local/gcc-arm-10.2-2020.11-aarch64-arm-none-linux-gnueabihf"
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
header:
|
||||||
|
version: 9
|
||||||
|
includes:
|
||||||
|
- base.yml
|
||||||
|
|
||||||
|
machine: fvp-base-arm32
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
header:
|
||||||
|
version: 9
|
||||||
|
includes:
|
||||||
|
- base.yml
|
||||||
|
|
||||||
|
machine: fvp-base
|
||||||
|
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
header:
|
||||||
|
version: 9
|
||||||
|
includes:
|
||||||
|
- base.yml
|
||||||
|
|
||||||
|
machine: fvp-baser-aemv8r64
|
||||||
|
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
|
||||||
|
header:
|
||||||
|
version: 9
|
||||||
|
includes:
|
||||||
|
- base.yml
|
||||||
|
- meta-python.yml
|
||||||
|
|
||||||
|
repos:
|
||||||
|
meta-arm:
|
||||||
|
layers:
|
||||||
|
meta-gem5:
|
||||||
|
meta-openembedded:
|
||||||
|
url: https://git.openembedded.org/meta-openembedded
|
||||||
|
layers:
|
||||||
|
meta-oe:
|
||||||
|
meta-filesystems:
|
||||||
|
meta-networking:
|
||||||
|
meta-virtualization:
|
||||||
|
url: git://git.yoctoproject.org/meta-virtualization
|
||||||
|
|
||||||
|
machine: gem5-arm64
|
||||||
|
|
||||||
|
local_conf_header:
|
||||||
|
meta-virt:
|
||||||
|
DISTRO_FEATURES_append = " virtualization xen"
|
||||||
|
|
||||||
|
target:
|
||||||
|
- xen-image-minimal
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
header:
|
||||||
|
version: 9
|
||||||
|
includes:
|
||||||
|
- base.yml
|
||||||
|
|
||||||
|
repos:
|
||||||
|
meta-arm:
|
||||||
|
layers:
|
||||||
|
meta-gem5:
|
||||||
|
|
||||||
|
meta-openembedded:
|
||||||
|
url: https://git.openembedded.org/meta-openembedded
|
||||||
|
layers:
|
||||||
|
meta-oe:
|
||||||
|
|
||||||
|
machine: gem5-arm64
|
||||||
|
|
||||||
|
target:
|
||||||
|
- core-image-minimal
|
||||||
|
- perf
|
||||||
|
- gem5-aarch64-native
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
header:
|
||||||
|
version: 9
|
||||||
|
includes:
|
||||||
|
- gem5-arm64.yml
|
||||||
|
|
||||||
|
repos:
|
||||||
|
meta-arm:
|
||||||
|
layers:
|
||||||
|
meta-atp:
|
||||||
|
|
||||||
|
machine: gem5-atp-arm64
|
||||||
|
|
||||||
|
target:
|
||||||
|
- atp-native
|
||||||
|
- core-image-minimal
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
header:
|
||||||
|
version: 9
|
||||||
|
includes:
|
||||||
|
- base.yml
|
||||||
|
|
||||||
|
machine: generic-arm64
|
||||||
Executable
+19
@@ -0,0 +1,19 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
# Read a GitLab CI job name on $1 and transform it to a
|
||||||
|
# list of Kas yaml files
|
||||||
|
|
||||||
|
set -e -u
|
||||||
|
|
||||||
|
# Read Job namne from $1 and split on /
|
||||||
|
IFS=/ read -r -a PARTS<<<$1
|
||||||
|
|
||||||
|
# Prefix each part with ci/
|
||||||
|
PARTS=("${PARTS[@]/#/ci/}")
|
||||||
|
|
||||||
|
# Suffix each part with .yml
|
||||||
|
PARTS=("${PARTS[@]/%/.yml}")
|
||||||
|
|
||||||
|
# Print colon-separated
|
||||||
|
IFS=":"
|
||||||
|
echo "${PARTS[*]}"
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
header:
|
||||||
|
version: 9
|
||||||
|
includes:
|
||||||
|
- base.yml
|
||||||
|
|
||||||
|
machine: juno
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Python logging configuration to write all warnings to a separate file
|
||||||
|
version: 1
|
||||||
|
|
||||||
|
handlers:
|
||||||
|
warnings:
|
||||||
|
class: logging.FileHandler
|
||||||
|
level: WARNING
|
||||||
|
filename: warnings.log
|
||||||
|
formatter: BitBake.logfileFormatter
|
||||||
|
|
||||||
|
loggers:
|
||||||
|
BitBake:
|
||||||
|
handlers: [warnings]
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
header:
|
||||||
|
version: 9
|
||||||
|
|
||||||
|
repos:
|
||||||
|
meta-openembedded:
|
||||||
|
url: https://git.openembedded.org/meta-openembedded
|
||||||
|
layers:
|
||||||
|
meta-oe:
|
||||||
|
meta-python:
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
header:
|
||||||
|
version: 9
|
||||||
|
includes:
|
||||||
|
- meta-python.yml
|
||||||
|
|
||||||
|
repos:
|
||||||
|
meta-zephyr:
|
||||||
|
url: https://git.yoctoproject.org/git/meta-zephyr
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
header:
|
||||||
|
version: 9
|
||||||
|
includes:
|
||||||
|
- base.yml
|
||||||
|
- meta-zephyr.yml
|
||||||
|
|
||||||
|
machine: microbit-v1
|
||||||
|
|
||||||
|
target:
|
||||||
|
- zephyr-philosophers
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
header:
|
||||||
|
version: 9
|
||||||
|
includes:
|
||||||
|
- base.yml
|
||||||
|
- meta-zephyr.yml
|
||||||
|
|
||||||
|
machine: musca-b1
|
||||||
|
|
||||||
|
target:
|
||||||
|
- trusted-firmware-m
|
||||||
|
- zephyr-philosophers
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
header:
|
||||||
|
version: 9
|
||||||
|
includes:
|
||||||
|
- base.yml
|
||||||
|
- meta-python.yml
|
||||||
|
|
||||||
|
machine: musca-s1
|
||||||
|
|
||||||
|
target:
|
||||||
|
- trusted-firmware-m
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
header:
|
||||||
|
version: 9
|
||||||
|
|
||||||
|
local_conf_header:
|
||||||
|
libc: |
|
||||||
|
TCLIBC = "musl"
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
header:
|
||||||
|
version: 9
|
||||||
|
includes:
|
||||||
|
- base.yml
|
||||||
|
|
||||||
|
machine: n1sdp
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
header:
|
||||||
|
version: 9
|
||||||
|
includes:
|
||||||
|
- base.yml
|
||||||
|
- meta-zephyr.yml
|
||||||
|
|
||||||
|
machine: qemu-cortex-a53
|
||||||
|
|
||||||
|
target:
|
||||||
|
- zephyr-philosophers
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
header:
|
||||||
|
version: 9
|
||||||
|
includes:
|
||||||
|
- base.yml
|
||||||
|
|
||||||
|
machine: qemuarm
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
header:
|
||||||
|
version: 9
|
||||||
|
includes:
|
||||||
|
- base.yml
|
||||||
|
|
||||||
|
machine: qemuarm64-sbsa
|
||||||
|
|
||||||
|
target:
|
||||||
|
- core-image-base
|
||||||
|
- perf
|
||||||
|
- sbsa-acs
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
header:
|
||||||
|
version: 9
|
||||||
|
includes:
|
||||||
|
- base.yml
|
||||||
|
|
||||||
|
machine: qemuarm64-secureboot
|
||||||
|
|
||||||
|
target:
|
||||||
|
- core-image-base
|
||||||
|
- perf
|
||||||
|
- optee-examples
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
header:
|
||||||
|
version: 9
|
||||||
|
includes:
|
||||||
|
- base.yml
|
||||||
|
|
||||||
|
machine: qemuarmv5
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
header:
|
||||||
|
version: 9
|
||||||
|
includes:
|
||||||
|
- base.yml
|
||||||
|
|
||||||
|
machine: sgi575
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
header:
|
||||||
|
version: 9
|
||||||
|
includes:
|
||||||
|
- base.yml
|
||||||
|
|
||||||
|
machine: tc0
|
||||||
Executable
+43
@@ -0,0 +1,43 @@
|
|||||||
|
#! /usr/bin/env python3
|
||||||
|
|
||||||
|
# Update clones of the repositories we need in KAS_REPO_REF_DIR to speed up fetches
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import os
|
||||||
|
import subprocess
|
||||||
|
import pathlib
|
||||||
|
|
||||||
|
def repo_shortname(url):
|
||||||
|
# Taken from Kas (Repo.__getattr__) to ensure the logic is right
|
||||||
|
from urllib.parse import urlparse
|
||||||
|
url = urlparse(url)
|
||||||
|
return ('{url.netloc}{url.path}'
|
||||||
|
.format(url=url)
|
||||||
|
.replace('@', '.')
|
||||||
|
.replace(':', '.')
|
||||||
|
.replace('/', '.')
|
||||||
|
.replace('*', '.'))
|
||||||
|
|
||||||
|
repositories = (
|
||||||
|
"https://git.yoctoproject.org/git/poky",
|
||||||
|
"https://git.openembedded.org/meta-openembedded",
|
||||||
|
"https://git.yoctoproject.org/git/meta-virtualization",
|
||||||
|
"https://git.yoctoproject.org/git/meta-zephyr",
|
||||||
|
"https://github.com/kraj/meta-clang",
|
||||||
|
)
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
if "KAS_REPO_REF_DIR" not in os.environ:
|
||||||
|
print("KAS_REPO_REF_DIR needs to be set")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
base_repodir = pathlib.Path(os.environ["KAS_REPO_REF_DIR"])
|
||||||
|
|
||||||
|
for repo in repositories:
|
||||||
|
repodir = base_repodir / repo_shortname(repo)
|
||||||
|
if repodir.exists():
|
||||||
|
print("Updating %s..." % repo)
|
||||||
|
subprocess.run(["git", "-C", repodir, "fetch"], check=True)
|
||||||
|
else:
|
||||||
|
print("Cloning %s..." % repo)
|
||||||
|
subprocess.run(["git", "clone", "--bare", repo, repodir], check=True)
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
header:
|
||||||
|
version: 9
|
||||||
|
|
||||||
|
distro: poky
|
||||||
|
machine: fvp-baser-aemv8r64
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
repos:
|
||||||
|
refspec: hardknott
|
||||||
|
|
||||||
|
repos:
|
||||||
|
meta-arm:
|
||||||
|
layers:
|
||||||
|
meta-arm:
|
||||||
|
meta-arm-bsp:
|
||||||
|
meta-arm-toolchain:
|
||||||
|
|
||||||
|
poky:
|
||||||
|
url: https://git.yoctoproject.org/git/poky
|
||||||
|
layers:
|
||||||
|
meta:
|
||||||
|
meta-poky:
|
||||||
|
|
||||||
|
local_conf_header:
|
||||||
|
base: |
|
||||||
|
CONF_VERSION = "1"
|
||||||
|
PACKAGE_CLASSES = "package_ipk"
|
||||||
|
PACKAGECONFIG_remove_pn-qemu-system-native = "gtk+ sdl"
|
||||||
|
EXTRA_IMAGE_FEATURES_append = " debug-tweaks"
|
||||||
|
|
||||||
|
target:
|
||||||
|
- core-image-minimal
|
||||||
+18
-17
@@ -4,8 +4,8 @@ meta-arm-autonomy Yocto Layer
|
|||||||
Introduction
|
Introduction
|
||||||
------------
|
------------
|
||||||
This layer provides an hypervisor based solution (currently based on Xen) for
|
This layer provides an hypervisor based solution (currently based on Xen) for
|
||||||
autonomous system. It contains recipes and classes to build host and guests
|
autonomous system. It contains recipes and classes to build host and guest
|
||||||
systems.
|
images.
|
||||||
|
|
||||||
To start using this layer, please check the
|
To start using this layer, please check the
|
||||||
[Quick Start Guide](documentation/arm-autonomy-quickstart.md).
|
[Quick Start Guide](documentation/arm-autonomy-quickstart.md).
|
||||||
@@ -16,13 +16,14 @@ This layer depends on several other Yocto layers:
|
|||||||
* meta-openembedded (https://git.openembedded.org/meta-openembedded)
|
* meta-openembedded (https://git.openembedded.org/meta-openembedded)
|
||||||
* poky (https://git.yoctoproject.org/poky)
|
* poky (https://git.yoctoproject.org/poky)
|
||||||
* meta-virtualization (https://git.yoctoproject.org/meta-virtualization)
|
* meta-virtualization (https://git.yoctoproject.org/meta-virtualization)
|
||||||
|
* meta-networking (git://git.openembedded.org/meta-openembedded)
|
||||||
|
|
||||||
Distribution Features
|
Distribution Features
|
||||||
---------------------
|
---------------------
|
||||||
This layer is adding the following Yocto DISTRO_FEATURES:
|
This layer adds the following Yocto DISTRO_FEATURES:
|
||||||
|
|
||||||
* arm-autonomy-host: this feature activates functionalities required to build
|
* arm-autonomy-host: this feature activates functionalities required to build
|
||||||
an autonomy host system. It is doing the following:
|
an autonomy host system. It has the following effects:
|
||||||
- add 'xen' and 'ipv4' to DISTRO_FEATURES.
|
- add 'xen' and 'ipv4' to DISTRO_FEATURES.
|
||||||
- add xen backend drivers to linux kernel configuration.
|
- add xen backend drivers to linux kernel configuration.
|
||||||
- To reduce the root filesystem image size the kernel image is not installed.
|
- To reduce the root filesystem image size the kernel image is not installed.
|
||||||
@@ -43,40 +44,40 @@ its documentation.
|
|||||||
Those documentation files should be checked for variables:
|
Those documentation files should be checked for variables:
|
||||||
- [xen-devicetree](documentation/xen-devicetree.md)
|
- [xen-devicetree](documentation/xen-devicetree.md)
|
||||||
- [xenguest-manager](documentation/xenguest-manager.md)
|
- [xenguest-manager](documentation/xenguest-manager.md)
|
||||||
- [xenguest-network-bridge](documentation/xenguest-network-bridge.md)
|
- [xenguest-network](documentation/xenguest-network.md)
|
||||||
|
|
||||||
BSPs
|
BSPs
|
||||||
----
|
----
|
||||||
This layer is adding the following machines:
|
This layer adds the following machine:
|
||||||
|
|
||||||
* arm64-autonomy-guest: this machines creates a minimal BSP suitable to be used
|
* arm64-autonomy-guest: This machine creates a minimal BSP suitable to be used
|
||||||
as an autonomy guest. It is in fact only activating ARM64 architecture and
|
as an autonomy guest. It is in fact only activating ARM64 architecture and
|
||||||
SMP in the linux kernel and is enabling the DISTRO_FEATURE
|
SMP in the linux kernel and is enabling the DISTRO_FEATURE
|
||||||
arm-autonomy-guest.
|
'arm-autonomy-guest'.
|
||||||
|
|
||||||
Images
|
Images
|
||||||
------
|
------
|
||||||
This layer is adding the following images:
|
This layer is adding the following images:
|
||||||
|
|
||||||
* arm-autonomy-host-image-minimal: this image includes all elements required
|
* arm-autonomy-host-image-minimal: This image includes all elements required
|
||||||
to create a minimal arm-autonomy-host system. This includes xen and tools to
|
to create a minimal arm-autonomy-host system. This includes xen, and tools to
|
||||||
manage xen guests. This image depends on 'arm-autonomy-host' distribution
|
manage xen guests and xenguest images. This image depends on
|
||||||
feature.
|
'arm-autonomy-host' distribution feature.
|
||||||
|
|
||||||
Recipes and classes
|
Recipes and classes
|
||||||
-------------------
|
-------------------
|
||||||
This layer is adding the following recipes and classes:
|
This layer adds the following recipes and classes:
|
||||||
|
|
||||||
* [xen-devicetree](documentation/xen-devicetree.md): this is a recipe to modify
|
* [xen-devicetree](documentation/xen-devicetree.md): This is a recipe to modify
|
||||||
a device tree blob to add information required to boot xen and a Dom0 linux.
|
a device tree blob to add information required to boot xen and a Dom0 linux.
|
||||||
|
|
||||||
* [xenguest-mkimage](documentation/xenguest-mkimage.md): this is a tool to
|
* [xenguest-mkimage](documentation/xenguest-mkimage.md): This is a tool used to
|
||||||
create and modify images to be used as Xen guests.
|
create and modify images to be used as Xen guests.
|
||||||
|
|
||||||
* [xenguest-manager](documentation/xenguest-manager.md): this is a tool to
|
* [xenguest-manager](documentation/xenguest-manager.md): This is a tool used to
|
||||||
create/remove/start/stop xen guest generated using xenguest-mkimage.
|
create/remove/start/stop xen guest generated using xenguest-mkimage.
|
||||||
|
|
||||||
* [xenguest-network-bridge](documentation/xenguest-network-bridge.md): this
|
* [xenguest-network](documentation/xenguest-network.md): This
|
||||||
recipe add tools and init scripts to create a bridge connected to the
|
recipe add tools and init scripts to create a bridge connected to the
|
||||||
external network on the host and allow guests to be connected to it.
|
external network on the host and allow guests to be connected to it.
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
# This class is to be inherited by image recipes that want to build and install
|
||||||
|
# an alternate kernel (set via PREFERRED_PROVIDER_alternate/kernel).
|
||||||
|
#
|
||||||
|
# It is mandatory to also set the KERNEL_PACKAGE_NAME for the alternate kernel
|
||||||
|
# recipe via KERNEL_PACKAGE_NAME_pn-${PREFERRED_PROVIDER_alternate/kernel} and
|
||||||
|
# its value needs to be different from "kernel" since this is the default set
|
||||||
|
# for PREFERRED_PROVIDER_virtual/kernel.
|
||||||
|
#
|
||||||
|
# An example of these settings can be found at meta-arm-autonomy/dynamic-layers/meta-arm-bsp/conf/machine/n1sdp-extra-settings.inc
|
||||||
|
#
|
||||||
|
# When building and installing an alternate kernel, the kernel-modules packages
|
||||||
|
# for both virtual/kernel and alternate/kernel will be installed.
|
||||||
|
|
||||||
|
PREFERRED_PROVIDER_alternate/kernel ??= ""
|
||||||
|
|
||||||
|
python () {
|
||||||
|
alternate_kernel = d.getVar('PREFERRED_PROVIDER_alternate/kernel')
|
||||||
|
if alternate_kernel:
|
||||||
|
alternate_kernel_pkg_name = d.getVar('KERNEL_PACKAGE_NAME_pn-%s' % alternate_kernel)
|
||||||
|
if alternate_kernel_pkg_name:
|
||||||
|
d.appendVar('EXTRA_IMAGEDEPENDS', ' ' + alternate_kernel)
|
||||||
|
d.appendVar('IMAGE_INSTALL', ' kernel-modules')
|
||||||
|
d.appendVar('IMAGE_INSTALL', ' ' + alternate_kernel_pkg_name + '-modules')
|
||||||
|
else:
|
||||||
|
raise bb.parse.SkipRecipe("No KERNEL_PACKAGE_NAME_pn-%s set" % alternate_kernel )
|
||||||
|
}
|
||||||
@@ -0,0 +1,115 @@
|
|||||||
|
# Docker Extern Containers
|
||||||
|
#
|
||||||
|
# This class allows docker image tarballs to be installed in the rootfs
|
||||||
|
#
|
||||||
|
# The images can be selected using the variable CONTAINER_IMAGE_FILES which
|
||||||
|
# should contain a space seperated list of absolute paths or yocto urls for
|
||||||
|
# docker images that have been exported using docker export:
|
||||||
|
# - https://docs.docker.com/engine/reference/commandline/export/
|
||||||
|
#
|
||||||
|
# src_uri_parse_var.bbclass is used to parse CONTAINER_IMAGE_FILES
|
||||||
|
#
|
||||||
|
# There are 4 supported formats for CONTAINER_IMAGE_FILES entries:
|
||||||
|
#
|
||||||
|
# - http/https url
|
||||||
|
# - CONTAINER_IMAGE_FILES = "https://[url]:[port]/alpine.tar;md5sum=..."
|
||||||
|
#
|
||||||
|
# - file:// absolute local path from root
|
||||||
|
# - CONTAINER_IMAGE_FILES = "file:///containers/alpine2.tar"
|
||||||
|
#
|
||||||
|
# - file:// path relative to FILESEXTRAPATHS
|
||||||
|
# - CONTAINER_IMAGE_FILES = "file://foo/alpine3.tar"
|
||||||
|
# FILESEXTRAPATHS .= "/containers:"
|
||||||
|
#
|
||||||
|
# - plain absolute local path from root
|
||||||
|
# - CONTAINER_IMAGE_FILES = "/containers/foo/bar/alpine4.tar"
|
||||||
|
#
|
||||||
|
# It is not recommended to use other yocto URL types, as they may result in
|
||||||
|
# undefined behaviour.
|
||||||
|
#
|
||||||
|
# A semicolon seperated list of install arguments can follow each image path:
|
||||||
|
# - conname : the name that will be attached when the image is imported
|
||||||
|
# (default: [filename, without extension])
|
||||||
|
# - contag : the tag that will be attached when the image is imported
|
||||||
|
# (default: local)
|
||||||
|
# - conkeep : Flag for whether the exported container image file should be
|
||||||
|
# kept once the import has been completed
|
||||||
|
# (default: 0)
|
||||||
|
#
|
||||||
|
# Any other arguments, for example an md5sum, will be assumed to be fetch
|
||||||
|
# arguments, and will be kept when the path is added to the SRC_URI
|
||||||
|
#
|
||||||
|
# e.g. CONTAINER_IMAGE_FILES = "\
|
||||||
|
# https://[url]:[port]/alpine.tar;md5sum=[checksum];conkeep=1 \
|
||||||
|
# file:///containers/alpine2.tar;contag=latest;conname=docker2 \
|
||||||
|
# file://foo/alpine3.tar \
|
||||||
|
# /containers/foo/bar/alpine4.tar;contag=1.0;conkeep=1 "
|
||||||
|
#
|
||||||
|
# Resulting Manifest:
|
||||||
|
# ARCHIVE NAME TAG KEEP
|
||||||
|
# alpine.tar alpine local 1
|
||||||
|
# alpine2.tar docker2 latest 0
|
||||||
|
# alpine3.tar alpine3 local 0
|
||||||
|
# alpine4.tar alpine4 1.0 1
|
||||||
|
#
|
||||||
|
# Other configurable variables:
|
||||||
|
# CONTAINERS_INSTALL_DIR : The folder underneath ${WORKDIR} where the docker
|
||||||
|
# images will be stored
|
||||||
|
# (default: "/usr/share/docker/images")
|
||||||
|
# CONTAINERS_MANIFEST : The name of the manifest file containing image
|
||||||
|
# parameters, also stored in CONTAINERS_INSTALL_DIR
|
||||||
|
# (default: "containers.manifest")
|
||||||
|
# CONTAINERS_TAG_DEFAULT : Use this to change the value that will be used as
|
||||||
|
# contag if no value is provided
|
||||||
|
# (default: "local")
|
||||||
|
# CONTAINERS_KEEP_DEFAULT : Use this to change the value that will be used for
|
||||||
|
# conkeep if no value is provided
|
||||||
|
# (default: "0")
|
||||||
|
#
|
||||||
|
|
||||||
|
inherit features_check
|
||||||
|
|
||||||
|
REQUIRED_DISTRO_FEATURES = "docker"
|
||||||
|
|
||||||
|
RDEPENDS_${PN} = "packagegroup-docker-runtime-minimal"
|
||||||
|
|
||||||
|
CONTAINER_IMAGE_FILES ??= ""
|
||||||
|
CONTAINERS_INSTALL_DIR ??= "${datadir}/docker/images"
|
||||||
|
CONTAINERS_MANIFEST ??= "containers.manifest"
|
||||||
|
CONTAINERS_TAG_DEFAULT ??= "local"
|
||||||
|
CONTAINERS_KEEP_DEFAULT ??= "0"
|
||||||
|
|
||||||
|
inherit set_src_uri_from_var
|
||||||
|
|
||||||
|
SRC_URI_FROM_VAR_NAME = "CONTAINER_IMAGE_FILES"
|
||||||
|
# Define installation params
|
||||||
|
SRC_URI_FROM_VAR_MANIFEST_PARAMS = "conname=[basename] \
|
||||||
|
contag=${CONTAINERS_TAG_DEFAULT} conkeep=${CONTAINERS_KEEP_DEFAULT}"
|
||||||
|
|
||||||
|
SRC_URI_FROM_VAR_UNPACK_DIR = "containers"
|
||||||
|
|
||||||
|
# Read manifest and install container images
|
||||||
|
do_install() {
|
||||||
|
local archive name tag keep
|
||||||
|
|
||||||
|
if [ -f "${WORKDIR}/${SRC_URI_FROM_VAR_UNPACK_DIR}/manifest" ]; then
|
||||||
|
|
||||||
|
install -d "${D}${CONTAINERS_INSTALL_DIR}"
|
||||||
|
install -m 644 \
|
||||||
|
"${WORKDIR}/${SRC_URI_FROM_VAR_UNPACK_DIR}/manifest" \
|
||||||
|
"${D}${CONTAINERS_INSTALL_DIR}/${CONTAINERS_MANIFEST}"
|
||||||
|
|
||||||
|
while read -r archive name tag keep _; do
|
||||||
|
[ -f "${WORKDIR}/${SRC_URI_FROM_VAR_UNPACK_DIR}/${archive}" ] ||
|
||||||
|
bbfatal "${archive} does not exist"
|
||||||
|
|
||||||
|
install -m 644 \
|
||||||
|
"${WORKDIR}/${SRC_URI_FROM_VAR_UNPACK_DIR}/${archive}" \
|
||||||
|
"${D}${CONTAINERS_INSTALL_DIR}/${archive}"
|
||||||
|
done < "${D}${CONTAINERS_INSTALL_DIR}/${CONTAINERS_MANIFEST}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
do_install[vardeps] += "CONTAINER_IMAGE_FILES"
|
||||||
|
|
||||||
|
FILES_${PN} += "${CONTAINERS_INSTALL_DIR}"
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
# Create a xenguest image with kernel and filesystem produced by Yocto
|
# Create a xenguest image with kernel and filesystem produced by Yocto
|
||||||
# This will create a .xenguest file that the xenguest-manager can use.
|
# This will create a .xenguest file that the xenguest-manager can use.
|
||||||
|
|
||||||
inherit xenguest-image
|
inherit xenguest_image
|
||||||
|
|
||||||
# We are creating our guest in a local subdirectory
|
# We are creating our guest in a local subdirectory
|
||||||
# force the value so that we are not impacted if the user is changing it
|
# force the value so that we are not impacted if the user is changing it
|
||||||
@@ -63,6 +63,67 @@ IMAGE_TYPEDEP_xenguest ?= "tar"
|
|||||||
IMAGE_TYPES_MASKED += "xenguest"
|
IMAGE_TYPES_MASKED += "xenguest"
|
||||||
IMAGE_TYPES += "xenguest"
|
IMAGE_TYPES += "xenguest"
|
||||||
|
|
||||||
|
XENGUEST_IMAGE_RECIPE = "${PN}"
|
||||||
|
XENGUEST_IMAGE_VARS += "XENGUEST_IMAGE_RECIPE"
|
||||||
|
|
||||||
|
# Merge intermediate env files from all recipes into a single file
|
||||||
|
python do_merge_xenguestenv () {
|
||||||
|
|
||||||
|
import re
|
||||||
|
|
||||||
|
# Open final merged file in DEPLOY_DIR_IMAGE for writing, or create
|
||||||
|
outdir = d.getVar('DEPLOY_DIR_IMAGE')
|
||||||
|
with open(os.path.join(outdir,'xenguest.env'), 'w') as merged_file:
|
||||||
|
|
||||||
|
# Adds vars from xenguest_image to list
|
||||||
|
merged_env = []
|
||||||
|
xenguest_vars = d.getVar('XENGUEST_IMAGE_VARS')
|
||||||
|
for var in xenguest_vars.split():
|
||||||
|
value = d.getVar(var)
|
||||||
|
if value:
|
||||||
|
merged_env.append(var + "=" + " ".join(value.split()) + "\n")
|
||||||
|
|
||||||
|
# Resolve dependencies for this task to find names of intermediate
|
||||||
|
# .xenguestenv files
|
||||||
|
taskdepdata = d.getVar('BB_TASKDEPDATA')
|
||||||
|
task_mc = d.getVar('BB_CURRENT_MC')
|
||||||
|
task_file = d.getVar('FILE')
|
||||||
|
|
||||||
|
# See runqueue.py function build_taskdepdata
|
||||||
|
DEPS_INDEX = 3
|
||||||
|
|
||||||
|
depdata_key = task_file + ":do_merge_xenguestenv"
|
||||||
|
|
||||||
|
# If in a multiconfig, need to add that to the key
|
||||||
|
if task_mc != "default":
|
||||||
|
depdata_key = "mc:" + task_mc + ":" + depdata_key
|
||||||
|
|
||||||
|
# Retrieve filename using regex
|
||||||
|
get_filename = re.compile(r'/([^/]+\.bb):do_deploy_xenguestenv$')
|
||||||
|
env_dir = d.getVar('XENGUEST_ENV_STAGING_DIR')
|
||||||
|
|
||||||
|
for task_dep in taskdepdata[depdata_key][DEPS_INDEX]:
|
||||||
|
if task_dep.endswith(":do_deploy_xenguestenv"):
|
||||||
|
filename = re.search(get_filename, task_dep).group(1) + ".xenguestenv"
|
||||||
|
bb.note("Merging: " + filename)
|
||||||
|
try:
|
||||||
|
with open(env_dir + "/" + filename, 'r') as f:
|
||||||
|
# Eliminate duplicates
|
||||||
|
merged_env = list(set(merged_env + f.readlines()))
|
||||||
|
except (FileNotFoundError, IOError):
|
||||||
|
bb.note(" " + filename + " has no extra vars")
|
||||||
|
|
||||||
|
# Sort Alphabetically and write
|
||||||
|
merged_env.sort()
|
||||||
|
merged_file.write("".join(merged_env))
|
||||||
|
}
|
||||||
|
do_merge_xenguestenv[dirs] = "${DEPLOY_DIR_IMAGE}"
|
||||||
|
do_merge_xenguestenv[vardeps] += "${XENGUEST_IMAGE_VARS}"
|
||||||
|
do_merge_xenguestenv[vardepsexclude] += "BB_TASKDEPDATA"
|
||||||
|
do_merge_xenguestenv[recrdeptask] += "do_deploy_xenguestenv"
|
||||||
|
|
||||||
|
addtask merge_xenguestenv before do_populate_lic_deploy after do_image_complete
|
||||||
|
|
||||||
python __anonymous() {
|
python __anonymous() {
|
||||||
# Do not do anything if we are not in the want FSTYPES
|
# Do not do anything if we are not in the want FSTYPES
|
||||||
if bb.utils.contains_any('IMAGE_FSTYPES', 'xenguest', '1', '0', d):
|
if bb.utils.contains_any('IMAGE_FSTYPES', 'xenguest', '1', '0', d):
|
||||||
|
|||||||
@@ -3,7 +3,10 @@
|
|||||||
# This is done using kernel-fitimage as model
|
# This is done using kernel-fitimage as model
|
||||||
# To activate this, kernel-xenguest must be added to KERNEL_CLASSES
|
# To activate this, kernel-xenguest must be added to KERNEL_CLASSES
|
||||||
|
|
||||||
inherit xenguest-image
|
# Add a variable name to XENGUEST_IMAGE_VARS_EXTRA if you want it to
|
||||||
|
# appear in xenguest.env when the image is deployed
|
||||||
|
|
||||||
|
inherit xenguest_image
|
||||||
|
|
||||||
# use a local copy to pack all together
|
# use a local copy to pack all together
|
||||||
XENGUEST_IMAGE_DEPLOY_DIR = "${WORKDIR}/tmp-xenguest"
|
XENGUEST_IMAGE_DEPLOY_DIR = "${WORKDIR}/tmp-xenguest"
|
||||||
@@ -24,7 +27,7 @@ do_assemble_xenguest_initramfs() {
|
|||||||
rm -f ${B}/${KERNEL_OUTPUT_DIR}/Image-initramfs.xenguest
|
rm -f ${B}/${KERNEL_OUTPUT_DIR}/Image-initramfs.xenguest
|
||||||
call_xenguest_mkimage pack ${B}/${KERNEL_OUTPUT_DIR}/Image-initramfs.xenguest
|
call_xenguest_mkimage pack ${B}/${KERNEL_OUTPUT_DIR}/Image-initramfs.xenguest
|
||||||
}
|
}
|
||||||
do_assemble_xenguest_initramfs[depends] += "${INITRAMFS_IMAGE}:do_image_complete"
|
do_assemble_xenguest_initramfs[depends] += "${INITRAMFS_IMAGE}:do_merge_xenguestenv"
|
||||||
|
|
||||||
kernel_do_deploy_append() {
|
kernel_do_deploy_append() {
|
||||||
if [ -f "${B}/${KERNEL_OUTPUT_DIR}/Image-initramfs.xenguest" ]; then
|
if [ -f "${B}/${KERNEL_OUTPUT_DIR}/Image-initramfs.xenguest" ]; then
|
||||||
|
|||||||
@@ -0,0 +1,224 @@
|
|||||||
|
# Set SRC_URI from Variable
|
||||||
|
|
||||||
|
# This class parses a variable named in SRC_URI_FROM_VAR_NAME for entries that
|
||||||
|
# should be added to the SRC_URI
|
||||||
|
#
|
||||||
|
# There are 4 supported formats for entries:
|
||||||
|
#
|
||||||
|
# - http/https url
|
||||||
|
# - Note that a checksum (md5sum or sha256sum) must be provided for http(s)
|
||||||
|
#
|
||||||
|
# - file:// absolute local path from root
|
||||||
|
# - In this case the filename will be added to SRC_URI and the path from '/'
|
||||||
|
# added to FILESEXTRAPATHS
|
||||||
|
#
|
||||||
|
# - file:// path relative to FILESEXTRAPATHS
|
||||||
|
# - In this case the filename will be added to SRC_URI and the preceding path
|
||||||
|
# added to FILESOVERRIDES, so that the full path to the file will
|
||||||
|
# be available in FILESPATH when it is generated by combining
|
||||||
|
# FILESEXTRAPATHS and FILESOVERRIDES.
|
||||||
|
#
|
||||||
|
# - plain absolute local path from root
|
||||||
|
# - This will be treated the same as an file:// path from root. Plain paths
|
||||||
|
# must be absolute, and cannot be relative to FILESEXTRAPATHS
|
||||||
|
#
|
||||||
|
# It is not recommended to use other yocto URL types, as they may result in
|
||||||
|
# undefined behaviour.
|
||||||
|
#
|
||||||
|
# These entries will be added to the SRC_URI so that the yocto fetcher can
|
||||||
|
# unpack a copy into ${WORKDIR}/${SRC_URI_FROM_VAR_UNPACK_DIR}
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# A list of arguments can follow each entry in the input variable, seperated
|
||||||
|
# by semi-colons (;). Arguments may be FETCH arguments or MANIFEST arguments.
|
||||||
|
#
|
||||||
|
# FETCH arguments will be appended to the entry in SRC_URI, for example
|
||||||
|
# "downloadfilename" to specify the filename used when storing a
|
||||||
|
# downloaded file.
|
||||||
|
# Each SRC_URI entry will automatically have the arguments
|
||||||
|
# "unpack=0;subdir=${SRC_URI_FROM_VAR_UNPACK_DIR}" added to them, so do not
|
||||||
|
# attempt to set these options.
|
||||||
|
#
|
||||||
|
# MANIFEST arguments are defined in the variable
|
||||||
|
# SRC_URI_FROM_VAR_MANIFEST_PARAMS which should be a space seperated list of
|
||||||
|
# names, each optionally followed by an equals sign (=) and a default value.
|
||||||
|
#
|
||||||
|
# The values provided for the manifest arguments will be written to the manifest
|
||||||
|
# file in ${WORKDIR}/${SRC_URI_FROM_VAR_UNPACK_DIR} as columns, in the same
|
||||||
|
# order as they appear in SRC_URI_FROM_VAR_MANIFEST_PARAMS.
|
||||||
|
#
|
||||||
|
# For entries that do not provide a value for a manifest argument, the default
|
||||||
|
# value will be used if possible.
|
||||||
|
# If no default is availale, omitting the parameter on any item will cause
|
||||||
|
# an error.
|
||||||
|
#
|
||||||
|
# "[basename]" is a special case default that will set the value to
|
||||||
|
# the filename without the path or file extension.
|
||||||
|
#
|
||||||
|
# e.g.
|
||||||
|
# SRC_URI_FROM_VAR_MANIFEST_PARAMS="conname=[basename] contag=local conkeep"
|
||||||
|
#
|
||||||
|
# Any arguments that follow an entry in SRC_URI_FROM_VAR_NAME, that are not
|
||||||
|
# named in SRC_URI_FROM_VAR_MANIFEST_PARAMS are assumed to be FETCH arguments,
|
||||||
|
# so are added to the corresponding entry in the SRC_URI.
|
||||||
|
|
||||||
|
SRC_URI_FROM_VAR_NAME ??= ""
|
||||||
|
SRC_URI_FROM_VAR_MANIFEST_PARAMS ??= ""
|
||||||
|
SRC_URI_FROM_VAR_UNPACK_DIR ??= "items"
|
||||||
|
|
||||||
|
python __anonymous() {
|
||||||
|
|
||||||
|
parse_var = d.getVar('SRC_URI_FROM_VAR_NAME')
|
||||||
|
|
||||||
|
if not parse_var:
|
||||||
|
return
|
||||||
|
|
||||||
|
parse_var_items = d.getVar(parse_var)
|
||||||
|
|
||||||
|
if parse_var_items:
|
||||||
|
for item in parse_var_items.split(' '):
|
||||||
|
if not item:
|
||||||
|
continue
|
||||||
|
|
||||||
|
if item.startswith('/'):
|
||||||
|
# If not a Yocto URL, must be an absolute path
|
||||||
|
yocto_url = "file://" + item
|
||||||
|
else:
|
||||||
|
# Otherwise assume valid Yocto URL.
|
||||||
|
# Error case is caught later
|
||||||
|
yocto_url = item
|
||||||
|
|
||||||
|
fetcher = host = path = parm = None
|
||||||
|
try:
|
||||||
|
# Attempt to parse a Yocto URL
|
||||||
|
fetcher,host,path,_,_,parm = bb.fetch.decodeurl(yocto_url)
|
||||||
|
except:
|
||||||
|
# Something invalid is in the variable!
|
||||||
|
raise bb.parse.SkipRecipe(parse_var + \
|
||||||
|
" contains an invalid entry:\n'" + \
|
||||||
|
item + "'")
|
||||||
|
|
||||||
|
# This var is space seperated list of parameter names,
|
||||||
|
# with optional default value following an equals sign
|
||||||
|
# (name=default)
|
||||||
|
item_params_str = d.getVar('SRC_URI_FROM_VAR_MANIFEST_PARAMS')
|
||||||
|
|
||||||
|
# remove directories from path
|
||||||
|
filename = os.path.basename(path)
|
||||||
|
|
||||||
|
if "downloadfilename" in parm:
|
||||||
|
filename = parm["downloadfilename"]
|
||||||
|
|
||||||
|
item_manifest_args = {"filename": filename}
|
||||||
|
|
||||||
|
if item_params_str:
|
||||||
|
# required manifest arguments have been provided
|
||||||
|
|
||||||
|
# If no default is given add "=" for map parsing
|
||||||
|
item_params_list = [ arg + "=" if '=' not in arg
|
||||||
|
else arg
|
||||||
|
for arg in item_params_str.split(' ')
|
||||||
|
]
|
||||||
|
|
||||||
|
# Generate key value pairs of argument names and
|
||||||
|
# default values
|
||||||
|
item_params_map = dict( (name.strip(), val.strip())
|
||||||
|
for name, val in (arg.split('=')
|
||||||
|
for arg in item_params_list)
|
||||||
|
)
|
||||||
|
|
||||||
|
for argname in item_params_map:
|
||||||
|
# Iterate over required manifest arguments
|
||||||
|
|
||||||
|
argvalue = parm.pop(argname, None)
|
||||||
|
if argvalue:
|
||||||
|
# a value has been provided for this item
|
||||||
|
item_manifest_args[argname] = argvalue
|
||||||
|
|
||||||
|
else:
|
||||||
|
# No value provided, process default value
|
||||||
|
default = item_params_map[argname]
|
||||||
|
if default:
|
||||||
|
# A default value is provided
|
||||||
|
if default == "[basename]":
|
||||||
|
# use the filename without extension
|
||||||
|
default = os.path.splitext(filename)[0]
|
||||||
|
|
||||||
|
# store default value in dict
|
||||||
|
item_manifest_args[argname] = default
|
||||||
|
|
||||||
|
else:
|
||||||
|
# No default provided
|
||||||
|
raise bb.fatal(parse_var + \
|
||||||
|
" entry is missing a required parameter '" + \
|
||||||
|
argname + "':\n'" + item + "'")
|
||||||
|
|
||||||
|
# Write value to var flags to ensure data structure is preserved
|
||||||
|
# Each entry of parse_var will have a varflag where the value
|
||||||
|
# is a dictionary of argument names and values
|
||||||
|
d.setVarFlags(parse_var, {item: item_manifest_args})
|
||||||
|
|
||||||
|
src_uri_entry_suffix = ';'
|
||||||
|
|
||||||
|
# HTTP(S) fetcher must provide a checksum
|
||||||
|
if fetcher.startswith('http') and not \
|
||||||
|
( 'md5sum' in parm or 'sha256sum' in parm ):
|
||||||
|
# Ensure http/https fetchers get a checksum
|
||||||
|
raise bb.parse.SkipRecipe(parse_var + \
|
||||||
|
" entry is missing a checksum:\n'" + \
|
||||||
|
item + "'")
|
||||||
|
|
||||||
|
# add remaining fetch parameters including checksum
|
||||||
|
for arg in parm:
|
||||||
|
src_uri_entry_suffix += ";" + arg + "=" + parm[arg]
|
||||||
|
|
||||||
|
# Add default and extra parameters to SRC_URI entry
|
||||||
|
src_uri_entry_suffix += ';unpack=0;subdir=' + \
|
||||||
|
d.getVar('SRC_URI_FROM_VAR_UNPACK_DIR')
|
||||||
|
|
||||||
|
if fetcher == 'file':
|
||||||
|
# Prevent local fetcher from re-creating dir structure
|
||||||
|
filedir = os.path.split(path)[0]
|
||||||
|
if filedir.startswith('/'):
|
||||||
|
# Path is from the root
|
||||||
|
d.appendVar('FILESEXTRAPATHS', filedir + ':')
|
||||||
|
else:
|
||||||
|
# Path is relative to FILESEXTRAPATHS
|
||||||
|
d.appendVar('FILESOVERRIDES', ':' + filedir)
|
||||||
|
|
||||||
|
# Add filename without path to SRC_URI
|
||||||
|
d.appendVar('SRC_URI', ' file://' + \
|
||||||
|
filename + src_uri_entry_suffix)
|
||||||
|
else:
|
||||||
|
# Add full entry to SRC_URI
|
||||||
|
d.appendVar('SRC_URI', ' ' + fetcher + \
|
||||||
|
"://" + host + path + src_uri_entry_suffix)
|
||||||
|
}
|
||||||
|
|
||||||
|
python generate_manifest() {
|
||||||
|
|
||||||
|
parse_var = d.getVar('SRC_URI_FROM_VAR_NAME')
|
||||||
|
|
||||||
|
if not parse_var:
|
||||||
|
return
|
||||||
|
|
||||||
|
target_dir = os.path.join(d.getVar('WORKDIR'),
|
||||||
|
d.getVar('SRC_URI_FROM_VAR_UNPACK_DIR'))
|
||||||
|
|
||||||
|
# Write a manifest file containing the parameters so SRC_URI
|
||||||
|
# doesn't need to be parsed by do_install
|
||||||
|
with open (target_dir + "/manifest", 'w') as manifest_file:
|
||||||
|
manifest_args = d.getVarFlags(parse_var)
|
||||||
|
|
||||||
|
parse_var_items = d.getVar(parse_var)
|
||||||
|
|
||||||
|
if parse_var_items:
|
||||||
|
for item in parse_var_items.split():
|
||||||
|
|
||||||
|
manifest_file.write(" ".join(manifest_args[item].values())+"\n")
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
do_unpack[cleandirs] += "${WORKDIR}/${SRC_URI_FROM_VAR_UNPACK_DIR}"
|
||||||
|
do_unpack[postfuncs] += "generate_manifest"
|
||||||
|
do_unpack[vardeps] += "${SRC_URI_FROM_VAR_NAME}"
|
||||||
+74
-22
@@ -30,7 +30,7 @@ XENGUEST_IMAGE_ROOT ??= "/dev/xvda1"
|
|||||||
# Guest kernel command line arguments
|
# Guest kernel command line arguments
|
||||||
XENGUEST_IMAGE_CMDLINE ??= "earlyprintk=xenboot console=hvc0 rw"
|
XENGUEST_IMAGE_CMDLINE ??= "earlyprintk=xenboot console=hvc0 rw"
|
||||||
|
|
||||||
# Extra commands to add to xenguest-image when creating the image
|
# Extra commands to add to xenguest_image when creating the image
|
||||||
XENGUEST_IMAGE_EXTRA_CMD ??= ""
|
XENGUEST_IMAGE_EXTRA_CMD ??= ""
|
||||||
|
|
||||||
# Kernel binary
|
# Kernel binary
|
||||||
@@ -43,14 +43,17 @@ XENGUEST_IMAGE_KERNEL ??= "Image"
|
|||||||
# be included in the xenguest image)
|
# be included in the xenguest image)
|
||||||
XENGUEST_IMAGE_DISK_SIZE ??= "${@ '4' if not d.getVar('INITRAMFS_IMAGE') else '0'}"
|
XENGUEST_IMAGE_DISK_SIZE ??= "${@ '4' if not d.getVar('INITRAMFS_IMAGE') else '0'}"
|
||||||
|
|
||||||
|
# set empty partition to be used by xenguest-manager for this image
|
||||||
|
XENGUEST_IMAGE_DISK_DEVICE ??= ""
|
||||||
|
|
||||||
#
|
#
|
||||||
# XENGUEST_IMAGE_DISK PARTITIONS is used to describe the partitions to setup
|
# XENGUEST_IMAGE_DISK_PARTITIONS is used to describe the partitions to setup
|
||||||
# and their content.
|
# and their content.
|
||||||
# It must be set to a space separated list of entries with each entry having
|
# It must be set to a space separated list of entries with each entry having
|
||||||
# the format num:sz:fs:[file] where:
|
# the format num:sz:[fs]:[file] where:
|
||||||
# - num is a partition number
|
# - num is a partition number
|
||||||
# - sz is the partition size in Gigabit
|
# - sz is the partition size in MB or GB(default), e.g 1000M or 1[G]
|
||||||
# - fs is the filesystem to use for the partition
|
# - fs is optional filesystem to use for the partition
|
||||||
# - file is optionally pointing to a file to use as content of the partition
|
# - file is optionally pointing to a file to use as content of the partition
|
||||||
# Please check image_types_xenguest.bbclass for rootfs handling of files
|
# Please check image_types_xenguest.bbclass for rootfs handling of files
|
||||||
#
|
#
|
||||||
@@ -62,7 +65,7 @@ XENGUEST_IMAGE_DISK_PARTITIONS ??= "1:${XENGUEST_IMAGE_DISK_SIZE}:ext4:rootfs.ta
|
|||||||
# The "bridge" type will share the physical eth interface from dom0 with the
|
# The "bridge" type will share the physical eth interface from dom0 with the
|
||||||
# domU. This will allow the domU to have access to the external network.
|
# domU. This will allow the domU to have access to the external network.
|
||||||
# The "nat" type will setup a virtual network between dom0 and domU and also
|
# The "nat" type will setup a virtual network between dom0 and domU and also
|
||||||
# configure and run the dhcpd on dom0 to serve the domU.
|
# configure and run the kea dhcp4 server on dom0 to serve the domU.
|
||||||
# The "none" type will not affect any networking setting between on dom0 and
|
# The "none" type will not affect any networking setting between on dom0 and
|
||||||
# domU.
|
# domU.
|
||||||
XENGUEST_IMAGE_NETWORK_TYPE ??= "bridge"
|
XENGUEST_IMAGE_NETWORK_TYPE ??= "bridge"
|
||||||
@@ -80,6 +83,18 @@ XENGUEST_IMAGE_DEPLOY_SUBDIR ?= "xenguest"
|
|||||||
# - something in ${WORKDIR} if you need to clone and manipulate an image
|
# - something in ${WORKDIR} if you need to clone and manipulate an image
|
||||||
XENGUEST_IMAGE_DEPLOY_DIR ??= "${DEPLOYDIR}"
|
XENGUEST_IMAGE_DEPLOY_DIR ??= "${DEPLOYDIR}"
|
||||||
|
|
||||||
|
# These vars are used by image_types_xenguest.bbclass to generate the
|
||||||
|
# xenguest.env file. In a recipe that inherits this class and extra variables
|
||||||
|
# that should be included in xenguest.env need to be added to
|
||||||
|
# XENGUEST_IMAGE_VARS_EXTRA
|
||||||
|
XENGUEST_IMAGE_VARS ?= "\
|
||||||
|
MACHINE DISTRO DISTRO_VERSION DISTRO_FEATURES TUNE_FEATURES TARGET_FPU \
|
||||||
|
IMAGE_FEATURES INITRAMFS_IMAGE_BUNDLE INITRAMFS_IMAGE \
|
||||||
|
XENGUEST_IMAGE_MEMORY_SIZE XENGUEST_IMAGE_NUM_VCPUS XENGUEST_IMAGE_AUTOBOOT \
|
||||||
|
XENGUEST_IMAGE_ROOT XENGUEST_IMAGE_CMDLINE XENGUEST_IMAGE_EXTRA_CMD \
|
||||||
|
XENGUEST_IMAGE_KERNEL XENGUEST_IMAGE_DISK_SIZE XENGUEST_IMAGE_DISK_DEVICE \
|
||||||
|
XENGUEST_IMAGE_DISK_PARTITIONS XENGUEST_IMAGE_NETWORK_TYPE"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Wrapper to call xenguest-mkimage
|
# Wrapper to call xenguest-mkimage
|
||||||
# It is using XENGUEST_IMAGE_DEPLOY_DIR and XENGUEST_IMAGE_DEPLOY_SUBDIR
|
# It is using XENGUEST_IMAGE_DEPLOY_DIR and XENGUEST_IMAGE_DEPLOY_SUBDIR
|
||||||
@@ -129,21 +144,27 @@ xenguest_image_create() {
|
|||||||
|
|
||||||
# create disk if needed
|
# create disk if needed
|
||||||
disksize="${XENGUEST_IMAGE_DISK_SIZE}"
|
disksize="${XENGUEST_IMAGE_DISK_SIZE}"
|
||||||
if [ -z "$disksize" ]; then
|
case ${disksize:=0} in
|
||||||
disksize="0"
|
0|0M|0G)
|
||||||
fi
|
;;
|
||||||
if [ $disksize -gt 0 ]; then
|
*)
|
||||||
# setup disk size
|
# setup disk size
|
||||||
call_xenguest_mkimage update --disk-reset-config --disk-size=$disksize
|
call_xenguest_mkimage update --disk-reset-config --disk-size=$disksize
|
||||||
|
|
||||||
|
diskparts="${XENGUEST_IMAGE_DISK_PARTITIONS}"
|
||||||
|
if [ -n "$diskparts" ]; then
|
||||||
|
for arg in $diskparts; do
|
||||||
|
call_xenguest_mkimage update --disk-add-part=$arg
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
diskdevice="${XENGUEST_IMAGE_DISK_DEVICE}"
|
||||||
|
if [ -n "$diskdevice" ]; then
|
||||||
|
call_xenguest_mkimage update --disk-device="${diskdevice}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
diskparts="${XENGUEST_IMAGE_DISK_PARTITIONS}"
|
|
||||||
if [ -n "$diskparts" ]; then
|
|
||||||
for arg in $diskparts; do
|
|
||||||
call_xenguest_mkimage update --disk-add-part=$arg
|
|
||||||
partnum="$(expr $partnum + 1)"
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "${XENGUEST_IMAGE_AUTOBOOT}" = "1" ]; then
|
if [ "${XENGUEST_IMAGE_AUTOBOOT}" = "1" ]; then
|
||||||
call_xenguest_mkimage update --set-param=GUEST_AUTOBOOT=1
|
call_xenguest_mkimage update --set-param=GUEST_AUTOBOOT=1
|
||||||
@@ -158,7 +179,38 @@ xenguest_image_create() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
XENGUEST_ENV_STAGING_DIR ??= "${STAGING_DIR}/${MACHINE}/xenguestenv"
|
||||||
|
|
||||||
|
# Create an intermediary file containing all variables used to by a
|
||||||
|
# particular recipe that inherits this class
|
||||||
|
|
||||||
|
# File will contain the values of all variables listed in:
|
||||||
|
# XENGUEST_IMAGE_VARS_EXTRA
|
||||||
|
python do_deploy_xenguestenv () {
|
||||||
|
xenguest_vars = d.getVar('XENGUEST_IMAGE_VARS_EXTRA')
|
||||||
|
if not xenguest_vars:
|
||||||
|
return
|
||||||
|
|
||||||
|
outdir = d.getVar('XENGUEST_ENV_STAGING_DIR')
|
||||||
|
|
||||||
|
# Writes file to tmp/sysroots/${MACHINE}/xenguestenv/ by default
|
||||||
|
filename = os.path.basename(d.getVar('FILE')) + '.xenguestenv'
|
||||||
|
with open(os.path.join(outdir, filename), 'w') as envf:
|
||||||
|
for var in xenguest_vars.split():
|
||||||
|
value = d.getVar(var)
|
||||||
|
if value:
|
||||||
|
# Write value only if set
|
||||||
|
envf.write('%s="%s"\n' % (var, " ".join(value.split())))
|
||||||
|
envf.close()
|
||||||
|
}
|
||||||
|
|
||||||
|
# Since the intermediary file is deleted by do_merge_xenguestenv it
|
||||||
|
# must be re-created every time
|
||||||
|
do_deploy_xenguestenv[vardeps] += "${XENGUEST_IMAGE_VARS_EXTRA}"
|
||||||
|
do_deploy_xenguestenv[dirs] = "${XENGUEST_ENV_STAGING_DIR}"
|
||||||
|
|
||||||
|
addtask deploy_xenguestenv before do_populate_sysroot
|
||||||
|
|
||||||
# Clone the current xenguest from deploy to manipulate it locally
|
# Clone the current xenguest from deploy to manipulate it locally
|
||||||
# This is required if you need to change things before packing an image
|
# This is required if you need to change things before packing an image
|
||||||
# To set the local directory where to clone you must set
|
# To set the local directory where to clone you must set
|
||||||
@@ -172,7 +224,7 @@ xenguest_image_clone() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f ${DEPLOY_DIR_IMAGE}/${XENGUEST_IMAGE_DEPLOY_SUBDIR}/guest.cfg ]; then
|
if [ ! -f ${DEPLOY_DIR_IMAGE}/${XENGUEST_IMAGE_DEPLOY_SUBDIR}/guest.cfg ]; then
|
||||||
die "xenguest-image: ${DEPLOY_DIR_IMAGE}/${XENGUEST_IMAGE_DEPLOY_SUBDIR} does not contain a valid guest"
|
die "xenguest_image: ${DEPLOY_DIR_IMAGE}/${XENGUEST_IMAGE_DEPLOY_SUBDIR} does not contain a valid guest"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -rf ${XENGUEST_IMAGE_DEPLOY_DIR}/${XENGUEST_IMAGE_DEPLOY_SUBDIR}
|
rm -rf ${XENGUEST_IMAGE_DEPLOY_DIR}/${XENGUEST_IMAGE_DEPLOY_SUBDIR}
|
||||||
+20
-11
@@ -4,8 +4,11 @@
|
|||||||
# The class is extending deploy function so you recipe must inherit deploy and
|
# The class is extending deploy function so you recipe must inherit deploy and
|
||||||
# have a do_deploy function (even if it is empty)
|
# have a do_deploy function (even if it is empty)
|
||||||
|
|
||||||
# Use standard xenguest-image
|
# Add a variable name to XENGUEST_IMAGE_VARS_EXTRA if you want it to
|
||||||
inherit xenguest-image
|
# appear in xenguest.env when the image is deployed
|
||||||
|
|
||||||
|
# Use standard xenguest_image
|
||||||
|
inherit xenguest_image
|
||||||
|
|
||||||
# Add a DTB file for the guest
|
# Add a DTB file for the guest
|
||||||
# Only one file should be added, if this is set multiple times or in several
|
# Only one file should be added, if this is set multiple times or in several
|
||||||
@@ -39,6 +42,12 @@ XENGUEST_EXTRA_FILES ??= ""
|
|||||||
# dir1/file1 file in the disk content parameters).
|
# dir1/file1 file in the disk content parameters).
|
||||||
XENGUEST_EXTRA_DISK_FILES ??= ""
|
XENGUEST_EXTRA_DISK_FILES ??= ""
|
||||||
|
|
||||||
|
# Extra vars to be written to xenguest.env
|
||||||
|
XENGUEST_IMAGE_VARS_EXTRA += "\
|
||||||
|
XENGUEST_EXTRA_DTB XENGUEST_EXTRA_RAMDISK XENGUEST_EXTRA_XENCONFIG \
|
||||||
|
XENGUEST_EXTRA_INIT_PRE XENGUEST_EXTRA_INIT XENGUEST_EXTRA_INIT_POST \
|
||||||
|
XENGUEST_EXTRA_FILES XENGUEST_EXTRA_DISK_FILES"
|
||||||
|
|
||||||
do_deploy_append() {
|
do_deploy_append() {
|
||||||
if [ -z "${XENGUEST_IMAGE_DEPLOY_DIR}" -o \
|
if [ -z "${XENGUEST_IMAGE_DEPLOY_DIR}" -o \
|
||||||
-z "${XENGUEST_IMAGE_DEPLOY_SUBDIR}" ]; then
|
-z "${XENGUEST_IMAGE_DEPLOY_SUBDIR}" ]; then
|
||||||
@@ -49,14 +58,14 @@ do_deploy_append() {
|
|||||||
|
|
||||||
if [ -n "${XENGUEST_EXTRA_DTB}" ]; then
|
if [ -n "${XENGUEST_EXTRA_DTB}" ]; then
|
||||||
if [ ! -f ${XENGUEST_EXTRA_DTB} ]; then
|
if [ ! -f ${XENGUEST_EXTRA_DTB} ]; then
|
||||||
die "xenguest-image: DTB file ${XENGUEST_EXTRA_DTB} does not exist"
|
die "xenguest_image: DTB file ${XENGUEST_EXTRA_DTB} does not exist"
|
||||||
fi
|
fi
|
||||||
call_xenguest_mkimage partial --xen-device-tree=${XENGUEST_EXTRA_DTB}
|
call_xenguest_mkimage partial --xen-device-tree=${XENGUEST_EXTRA_DTB}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "${XENGUEST_EXTRA_RAMDISK}" ]; then
|
if [ -n "${XENGUEST_EXTRA_RAMDISK}" ]; then
|
||||||
if [ ! -f ${XENGUEST_EXTRA_RAMDISK} ]; then
|
if [ ! -f ${XENGUEST_EXTRA_RAMDISK} ]; then
|
||||||
die "xenguest-image: DTB file ${XENGUEST_EXTRA_RAMDISK} does not exist"
|
die "xenguest_image: DTB file ${XENGUEST_EXTRA_RAMDISK} does not exist"
|
||||||
fi
|
fi
|
||||||
call_xenguest_mkimage partial --xen-ramdisk=${XENGUEST_EXTRA_RAMDISK}
|
call_xenguest_mkimage partial --xen-ramdisk=${XENGUEST_EXTRA_RAMDISK}
|
||||||
fi
|
fi
|
||||||
@@ -64,7 +73,7 @@ do_deploy_append() {
|
|||||||
if [ -n "${XENGUEST_EXTRA_XENCONFIG}" ]; then
|
if [ -n "${XENGUEST_EXTRA_XENCONFIG}" ]; then
|
||||||
for f in ${XENGUEST_EXTRA_XENCONFIG}; do
|
for f in ${XENGUEST_EXTRA_XENCONFIG}; do
|
||||||
if [ ! -f $f ]; then
|
if [ ! -f $f ]; then
|
||||||
die "xenguest-image: Xen config $f does not exist"
|
die "xenguest_image: Xen config $f does not exist"
|
||||||
fi
|
fi
|
||||||
call_xenguest_mkimage partial --xen-append=$f
|
call_xenguest_mkimage partial --xen-append=$f
|
||||||
done
|
done
|
||||||
@@ -72,21 +81,21 @@ do_deploy_append() {
|
|||||||
|
|
||||||
if [ -n "${XENGUEST_EXTRA_INIT_PRE}" ]; then
|
if [ -n "${XENGUEST_EXTRA_INIT_PRE}" ]; then
|
||||||
if [ ! -f ${XENGUEST_EXTRA_INIT_PRE} ]; then
|
if [ ! -f ${XENGUEST_EXTRA_INIT_PRE} ]; then
|
||||||
die "xenguest-image: Init script ${XENGUEST_EXTRA_INIT_PRE} does not exist"
|
die "xenguest_image: Init script ${XENGUEST_EXTRA_INIT_PRE} does not exist"
|
||||||
fi
|
fi
|
||||||
call_xenguest_mkimage partial --init-pre=${XENGUEST_EXTRA_INIT_PRE}
|
call_xenguest_mkimage partial --init-pre=${XENGUEST_EXTRA_INIT_PRE}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "${XENGUEST_EXTRA_INIT}" ]; then
|
if [ -n "${XENGUEST_EXTRA_INIT}" ]; then
|
||||||
if [ ! -f ${XENGUEST_EXTRA_INIT} ]; then
|
if [ ! -f ${XENGUEST_EXTRA_INIT} ]; then
|
||||||
die "xenguest-image: Init script ${XENGUEST_EXTRA_INIT} does not exist"
|
die "xenguest_image: Init script ${XENGUEST_EXTRA_INIT} does not exist"
|
||||||
fi
|
fi
|
||||||
call_xenguest_mkimage partial --init-script=${XENGUEST_EXTRA_INIT}
|
call_xenguest_mkimage partial --init-script=${XENGUEST_EXTRA_INIT}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "${XENGUEST_EXTRA_INIT_POST}" ]; then
|
if [ -n "${XENGUEST_EXTRA_INIT_POST}" ]; then
|
||||||
if [ ! -f ${XENGUEST_EXTRA_INIT_POST} ]; then
|
if [ ! -f ${XENGUEST_EXTRA_INIT_POST} ]; then
|
||||||
die "xenguest-image: Init script ${XENGUEST_EXTRA_INIT_POST} does not exist"
|
die "xenguest_image: Init script ${XENGUEST_EXTRA_INIT_POST} does not exist"
|
||||||
fi
|
fi
|
||||||
call_xenguest_mkimage partial --init-post=${XENGUEST_EXTRA_INIT_POST}
|
call_xenguest_mkimage partial --init-post=${XENGUEST_EXTRA_INIT_POST}
|
||||||
fi
|
fi
|
||||||
@@ -94,7 +103,7 @@ do_deploy_append() {
|
|||||||
if [ -n "${XENGUEST_EXTRA_FILES}" ]; then
|
if [ -n "${XENGUEST_EXTRA_FILES}" ]; then
|
||||||
for f in ${XENGUEST_EXTRA_FILES}; do
|
for f in ${XENGUEST_EXTRA_FILES}; do
|
||||||
if [ ! -f $f ]; then
|
if [ ! -f $f ]; then
|
||||||
die "xenguest-image: Xen file $f does not exist"
|
die "xenguest_image: Xen file $f does not exist"
|
||||||
fi
|
fi
|
||||||
call_xenguest_mkimage partial --xen-add-file=$f
|
call_xenguest_mkimage partial --xen-add-file=$f
|
||||||
done
|
done
|
||||||
@@ -103,12 +112,12 @@ do_deploy_append() {
|
|||||||
if [ -n "${XENGUEST_EXTRA_DISK_FILES}" ]; then
|
if [ -n "${XENGUEST_EXTRA_DISK_FILES}" ]; then
|
||||||
for f in ${XENGUEST_EXTRA_DISK_FILES}; do
|
for f in ${XENGUEST_EXTRA_DISK_FILES}; do
|
||||||
if [ ! -f $f ]; then
|
if [ ! -f $f ]; then
|
||||||
die "xenguest-image: Disk file $f does not exist"
|
die "xenguest_image: Disk file $f does not exist"
|
||||||
fi
|
fi
|
||||||
call_xenguest_mkimage partial --disk-add-file=$f
|
call_xenguest_mkimage partial --disk-add-file=$f
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
# Need to have xenguest-image tool
|
# Need to have xenguest_image tool
|
||||||
do_deploy[depends] += "xenguest-base-image:do_deploy"
|
do_deploy[depends] += "xenguest-base-image:do_deploy"
|
||||||
|
|
||||||
@@ -4,15 +4,16 @@
|
|||||||
DISTRO_FEATURES_append = " xen ipv4"
|
DISTRO_FEATURES_append = " xen ipv4"
|
||||||
DISTRO_FEATURES_NATIVE_append = " arm-autonomy-host"
|
DISTRO_FEATURES_NATIVE_append = " arm-autonomy-host"
|
||||||
|
|
||||||
|
# Since meta-virtualization master branch bumped to 4.15+stable we need to
|
||||||
|
# force the 4.14+stable selection until we validate the new version
|
||||||
|
PREFERRED_VERSION_xen = "4.14+stable%"
|
||||||
|
PREFERRED_VERSION_xen-tools = "4.14+stable%"
|
||||||
|
|
||||||
# Don't include kernels in standard images when building arm-autonomy-host
|
# Don't include kernels in standard images when building arm-autonomy-host
|
||||||
# If the kernel image is needed in the rootfs the following should be set from
|
# If the kernel image is needed in the rootfs the following should be set from
|
||||||
# a bbappend: RDEPENDS_${KERNEL_PACKAGE_NAME}-base = "${KERNEL_PACKAGE_NAME}-image"
|
# a bbappend: RDEPENDS_${KERNEL_PACKAGE_NAME}-base = "${KERNEL_PACKAGE_NAME}-image"
|
||||||
RDEPENDS_${KERNEL_PACKAGE_NAME}-base ?= ""
|
RDEPENDS_${KERNEL_PACKAGE_NAME}-base ?= ""
|
||||||
|
|
||||||
# Until we don't move to use the kea dhcp-server we build dhcp_4.4.2.bb recipe
|
|
||||||
# which depends on bind_9.11.22.bb recipe.
|
|
||||||
PREFERRED_VERSION_bind ?= "9.11%"
|
|
||||||
|
|
||||||
# Require extra machine specific settings from meta-arm-bsp dynamic-layers only
|
# Require extra machine specific settings from meta-arm-bsp dynamic-layers only
|
||||||
# if meta-arm-bsp is in the bblayers.conf
|
# if meta-arm-bsp is in the bblayers.conf
|
||||||
# Directory for meta-arm-autonomy/dynamic-layers/meta-arm-bsp machine extra settings
|
# Directory for meta-arm-autonomy/dynamic-layers/meta-arm-bsp machine extra settings
|
||||||
|
|||||||
@@ -9,14 +9,15 @@ BBFILES += " \
|
|||||||
|
|
||||||
BBFILE_COLLECTIONS += "meta-arm-autonomy"
|
BBFILE_COLLECTIONS += "meta-arm-autonomy"
|
||||||
BBFILE_PATTERN_meta-arm-autonomy = "^${LAYERDIR}/"
|
BBFILE_PATTERN_meta-arm-autonomy = "^${LAYERDIR}/"
|
||||||
BBFILE_PRIORITY_meta-arm-autonomy = "6"
|
BBFILE_PRIORITY_meta-arm-autonomy = "5"
|
||||||
LAYERDEPENDS_meta-arm-autonomy = " \
|
LAYERDEPENDS_meta-arm-autonomy = " \
|
||||||
core \
|
core \
|
||||||
yocto \
|
yocto \
|
||||||
openembedded-layer \
|
openembedded-layer \
|
||||||
|
networking-layer \
|
||||||
virtualization-layer \
|
virtualization-layer \
|
||||||
"
|
"
|
||||||
LAYERSERIES_COMPAT_meta-arm-autonomy = "gatesgarth"
|
LAYERSERIES_COMPAT_meta-arm-autonomy = "hardknott"
|
||||||
|
|
||||||
# We don't activate virtualization feature from meta-virtualization as it
|
# We don't activate virtualization feature from meta-virtualization as it
|
||||||
# brings in lots of stuff we don't need. We need to disable the sanity check
|
# brings in lots of stuff we don't need. We need to disable the sanity check
|
||||||
@@ -32,7 +33,7 @@ USER_CLASSES_append = " arm-autonomy-features"
|
|||||||
|
|
||||||
BBFILES_DYNAMIC += " \
|
BBFILES_DYNAMIC += " \
|
||||||
meta-arm-bsp:${LAYERDIR}/dynamic-layers/meta-arm-bsp/*/*/*.bbappend \
|
meta-arm-bsp:${LAYERDIR}/dynamic-layers/meta-arm-bsp/*/*/*.bbappend \
|
||||||
meta-gem5:${LAYERDIR}/dynamic-layers/meta-gem5/*/*/*.bbappend \
|
meta-arm-bsp:${LAYERDIR}/dynamic-layers/meta-arm-bsp/*/*/*.bb \
|
||||||
"
|
"
|
||||||
# Root directory for the meta-arm-autonomy/dynamic-layers/meta-arm-bsp
|
# Root directory for the meta-arm-autonomy/dynamic-layers/meta-arm-bsp
|
||||||
ARM_AUTONOMY_ARM_BSP_DYNAMIC_DIR = "${ARM_AUTONOMY_LAYERDIR}/dynamic-layers/meta-arm-bsp"
|
ARM_AUTONOMY_ARM_BSP_DYNAMIC_DIR = "${ARM_AUTONOMY_LAYERDIR}/dynamic-layers/meta-arm-bsp"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ KERNEL_IMAGETYPE = "Image"
|
|||||||
IMAGE_FSTYPES += "tar.bz2"
|
IMAGE_FSTYPES += "tar.bz2"
|
||||||
|
|
||||||
PREFERRED_PROVIDER_virtual/kernel = "linux-yocto"
|
PREFERRED_PROVIDER_virtual/kernel = "linux-yocto"
|
||||||
PREFERRED_VERSION_linux-yocto ?= "5.4%"
|
PREFERRED_VERSION_linux-yocto ?= "5.10%"
|
||||||
|
|
||||||
DISTRO_FEATURES += "arm-autonomy-guest"
|
DISTRO_FEATURES += "arm-autonomy-guest"
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# This file will be required by different xenguest recipes to provide
|
||||||
|
# common variables, which can be configured in local.conf
|
||||||
|
|
||||||
|
# Xenguest image file install location
|
||||||
|
XENGUEST_MANAGER_GUEST_DIR ?= "${datadir}/guests/"
|
||||||
@@ -0,0 +1,226 @@
|
|||||||
|
arm-autonomy Multiconfig Build Environment Instructions
|
||||||
|
==================
|
||||||
|
|
||||||
|
This documentation explains how to simplify the process of building hosts
|
||||||
|
and guests in a single bitbake command, rather than in seperate build
|
||||||
|
folders. You can read more about multiconfig in the bitbake documentation:
|
||||||
|
|
||||||
|
- [bitbake user manual](https://www.yoctoproject.org/docs/latest/bitbake-user-manual/bitbake-user-manual.html)
|
||||||
|
|
||||||
|
To achieve a multiconfig build, a number of different config files need to
|
||||||
|
be created in a single build directory.
|
||||||
|
|
||||||
|
Create a new project
|
||||||
|
----------------
|
||||||
|
|
||||||
|
Before you start, you will need to follow the instructions in
|
||||||
|
"Create a project" from the quickstart guide, to create a new project
|
||||||
|
directory with
|
||||||
|
```
|
||||||
|
oe-init-build-env my-mc-project
|
||||||
|
```
|
||||||
|
Ensure it has all the required layers in bblayers.conf as listed in
|
||||||
|
`arm-autonomy-quickstart.md`. The result should be a directory containing:
|
||||||
|
|
||||||
|
```
|
||||||
|
-- conf
|
||||||
|
| -- bblayers.conf
|
||||||
|
| -- local.conf
|
||||||
|
| -- templateconf.cfg
|
||||||
|
```
|
||||||
|
|
||||||
|
Add multiconfig
|
||||||
|
----------------
|
||||||
|
|
||||||
|
The steps required to make the project build both the host and any
|
||||||
|
number of guests as required are:
|
||||||
|
|
||||||
|
1. Create a new directory under `conf/` named `multiconfig/`
|
||||||
|
|
||||||
|
2. Create two new files in this directory:
|
||||||
|
`multiconfig/host.conf`
|
||||||
|
`multiconfig/guest.conf`
|
||||||
|
These files will contain any configurations that are specific to either the
|
||||||
|
host or the guest. The resulting directory tree should be:
|
||||||
|
|
||||||
|
```
|
||||||
|
-- conf
|
||||||
|
| -- bblayers.conf
|
||||||
|
| -- local.conf
|
||||||
|
| -- templateconf.cfg
|
||||||
|
| -- multiconfig
|
||||||
|
| -- host.conf
|
||||||
|
| -- guest.conf
|
||||||
|
```
|
||||||
|
|
||||||
|
3. In `local.conf` the following config variables must be added:
|
||||||
|
|
||||||
|
```
|
||||||
|
MACHINE ?= "fvp-base"
|
||||||
|
|
||||||
|
# ---Guest Config Start--- #
|
||||||
|
MC_GUEST = "guest"
|
||||||
|
|
||||||
|
MC_GUEST_NAME = "guest1"
|
||||||
|
|
||||||
|
MC_GUEST_IMAGERECIPE = "core-image-minimal"
|
||||||
|
MC_GUEST_MACHINE = "arm64-autonomy-guest"
|
||||||
|
|
||||||
|
MC_GUEST_INITRAMFS_IMAGE_BUNDLE ?= ""
|
||||||
|
MC_GUEST_INITRAMFS_IMAGE ?= ""
|
||||||
|
|
||||||
|
# Uncomment for initramfs
|
||||||
|
#MC_GUEST_INITRAMFS_IMAGE_BUNDLE = "1"
|
||||||
|
#MC_GUEST_INITRAMFS_IMAGE = "${MC_GUEST_IMAGERECIPE}"
|
||||||
|
|
||||||
|
# These variables are set automatically, don't override them!
|
||||||
|
MC_GUEST_FILENAME_PREFIX = "${@ 'Image-initramfs' if d.getVar('MC_GUEST_INITRAMFS_IMAGE_BUNDLE',d) else '${MC_GUEST_IMAGERECIPE}' }"
|
||||||
|
|
||||||
|
MC_GUEST_FILENAME = "${MC_GUEST_FILENAME_PREFIX}-${MC_GUEST_MACHINE}.xenguest"
|
||||||
|
|
||||||
|
MC_GUEST_DEP = "${@ 'virtual/kernel:do_deploy' if d.getVar('MC_GUEST_INITRAMFS_IMAGE_BUNDLE',d) else '${MC_GUEST_IMAGERECIPE}:do_merge_xenguestenv'}"
|
||||||
|
|
||||||
|
MC_DOIMAGE_MCDEPENDS += "mc:${MC_HOST}:${MC_GUEST}:${MC_GUEST_DEP} "
|
||||||
|
|
||||||
|
BBMULTICONFIG += "${MC_GUEST} "
|
||||||
|
|
||||||
|
ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS += "file://${TOPDIR}/${MC_GUEST}/deploy/images/${MC_GUEST_MACHINE}/${MC_GUEST_FILENAME};guestname=${MC_GUEST_NAME} "
|
||||||
|
# ---Guest Config End--- #
|
||||||
|
|
||||||
|
# ---Host Config Start--- #
|
||||||
|
MC_HOST = "host"
|
||||||
|
|
||||||
|
BBMULTICONFIG += "${MC_HOST} "
|
||||||
|
# ---Host Config End--- #
|
||||||
|
```
|
||||||
|
|
||||||
|
These variables will be used in both of the multiconf files. `MC_HOST` and
|
||||||
|
`MC_GUEST` should not be altered without renaming the conf files, but most
|
||||||
|
`MC_GUEST_*` variables can be customised if you desire.
|
||||||
|
|
||||||
|
4. Next set the contents of `multiconfig/guest.conf`:
|
||||||
|
|
||||||
|
```
|
||||||
|
TMPDIR = "${TOPDIR}/${MC_GUEST}"
|
||||||
|
|
||||||
|
MACHINE = "${MC_GUEST_MACHINE}"
|
||||||
|
DISTRO_FEATURES += " arm-autonomy-guest"
|
||||||
|
|
||||||
|
INITRAMFS_IMAGE_BUNDLE = "${MC_GUEST_INITRAMFS_IMAGE_BUNDLE}"
|
||||||
|
INITRAMFS_IMAGE = "${MC_GUEST_INITRAMFS_IMAGE}"
|
||||||
|
|
||||||
|
IMAGE_FSTYPES += "${@ 'cpio' if d.getVar('MC_GUEST_INITRAMFS_IMAGE_BUNDLE',d) else ''}"
|
||||||
|
|
||||||
|
# ANY OTHER GUEST CONFIG
|
||||||
|
```
|
||||||
|
|
||||||
|
To modify the MACHINE or INITRAMFS variables change the equivalent
|
||||||
|
config in local.conf rather than modifying this file directly. You can also
|
||||||
|
append any other config desired for the guest after "ANY OTHER GUEST CONFIG",
|
||||||
|
for example `XENGUEST_IMAGE_DISK_SIZE`.
|
||||||
|
|
||||||
|
Make sure not to change `${DEPLOY_DIR_IMAGE}` to anything other than
|
||||||
|
`${TMPDIR}/deploy/images`, as this is assumed by local.conf.
|
||||||
|
|
||||||
|
5. Lastly set the contents of `multiconfig/host.conf`:
|
||||||
|
|
||||||
|
```
|
||||||
|
TMPDIR = "${TOPDIR}/${MC_HOST}"
|
||||||
|
|
||||||
|
DISTRO_FEATURES += " arm-autonomy-host"
|
||||||
|
|
||||||
|
# ANY OTHER HOST CONFIG
|
||||||
|
```
|
||||||
|
|
||||||
|
Building the image
|
||||||
|
----------------
|
||||||
|
|
||||||
|
To build the multiconfig image the command is:
|
||||||
|
```
|
||||||
|
bitbake mc:host:arm-autonomy-host-image-minimal
|
||||||
|
```
|
||||||
|
|
||||||
|
The first time this is run you may see a warning related to the SRC_URI:
|
||||||
|
```
|
||||||
|
Unable to get checksum for xenguest-extern-guests SRC_URI entry foo.xenguest: file could not be found
|
||||||
|
```
|
||||||
|
|
||||||
|
This is expected, and only indicates that the guest image has not yet been
|
||||||
|
generated when the host parses the SRC_URI. By the time it is needed by the
|
||||||
|
host recipe fetch task it will be present.
|
||||||
|
|
||||||
|
During the build you should see that guest tasks are also being executed in
|
||||||
|
parallel. Once the build completes the guest will already be in the rootfs of
|
||||||
|
the host thanks to `ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUEST`
|
||||||
|
|
||||||
|
The final host image including the guests will be deployed in
|
||||||
|
`host/deploy/images/`
|
||||||
|
|
||||||
|
|
||||||
|
Multiple Guests
|
||||||
|
----------------
|
||||||
|
|
||||||
|
To have multiple guests with the same config the line which appends to
|
||||||
|
`ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS` just needs to pass the argument
|
||||||
|
'guestcount=#' to install symlink copies of the xenguest file on the host.
|
||||||
|
Documentation for the guestcount parameter can be found in
|
||||||
|
documentation/arm-autonomy-quickstart.md in the section titled
|
||||||
|
'Include guests directly in the host image'. This will ensure that the guest
|
||||||
|
is still only built once, despite resulting in multiple copies on the target.
|
||||||
|
|
||||||
|
If guests are required to have different configurations, each will need its own
|
||||||
|
config file, e.g. 'netguest.conf'. Ensure that the name of the conf file does
|
||||||
|
not contain any hyphens, as this will create errors when it becomes part of a
|
||||||
|
function name. In this file the values of TMPDIR, MACHINE, DISTRO_FEATURES etc.
|
||||||
|
should be the same as above, but with the prefix "MC_GUEST_*" modified to
|
||||||
|
something different to avoid collisions (e.g. MC_GUEST_2_*).
|
||||||
|
|
||||||
|
As before, your additional config for the guest type should
|
||||||
|
follow "ANY OTHER GUEST CONFIG"
|
||||||
|
|
||||||
|
In your local.conf, everything between `---Guest Config Start---` and
|
||||||
|
`---Guest Config End---` will need to be duplicated for each desired guest type.
|
||||||
|
All copies of variables that start `MC_GUEST` must be modified with the same
|
||||||
|
prefix as in the new guest config file (e.g. `MC_GUEST_2_*`).
|
||||||
|
|
||||||
|
Each chunk of guest config in local.conf has automatic guest variables
|
||||||
|
(found after the line "These variables are set automatically...").
|
||||||
|
These should all use the same prefix as their chunk in their values,
|
||||||
|
for example:
|
||||||
|
```
|
||||||
|
MC_GUEST_2_FILENAME_PREFIX = "${@ 'Image-initramfs' if d.getVar('MC_GUEST_2_INITRAMFS_IMAGE_BUNDLE',d) else '${MC_GUEST_2_IMAGERECIPE}' }"
|
||||||
|
```
|
||||||
|
|
||||||
|
Guest with provisioned disk
|
||||||
|
----------------
|
||||||
|
|
||||||
|
To add guest rootfs partition to host wic image,
|
||||||
|
set `AUTONOMY_HOST_EXTRA_PARTITION` with proper wks partition entry, e.g:
|
||||||
|
|
||||||
|
```
|
||||||
|
AUTONOMY_HOST_EXTRA_PARTITION = "part --label provisioned-guest --source rawcopy --fstype=ext4 --ondisk sda --align 1024 \
|
||||||
|
--sourceparams=file=${TOPDIR}/${MC_GUEST}/deploy/images/${MC_GUEST_MACHINE}/${MC_GUEST_FILENAME_PREFIX}-${MC_GUEST_MACHINE}.ext4"
|
||||||
|
```
|
||||||
|
|
||||||
|
inside your host.conf file.
|
||||||
|
|
||||||
|
The rest of the configuration has to be appended to guest.conf file:
|
||||||
|
|
||||||
|
```
|
||||||
|
# ANY OTHER GUEST CONFIG
|
||||||
|
XENGUEST_IMAGE_DISK_SIZE = "0"
|
||||||
|
XENGUEST_IMAGE_SRC_URI_XEN_CONFIG = "file://\${TOPDIR}/path/to/rootdisk.cfg"
|
||||||
|
XENGUEST_IMAGE_DISK_DEVICE = "_GUEST_DISK_DEVICE_"
|
||||||
|
XENGUEST_IMAGE_ROOT = "/dev/xvda"
|
||||||
|
IMAGE_ROOTFS_SIZE = "102400"
|
||||||
|
IMAGE_FSTYPES = "ext4"
|
||||||
|
```
|
||||||
|
|
||||||
|
Example content of rootdisk.cfg:
|
||||||
|
|
||||||
|
```
|
||||||
|
disk = ["phy:_GUEST_DISK_DEVICE_,xvda,w"]
|
||||||
|
```
|
||||||
|
|
||||||
|
`_GUEST_DISK_DEVICE_` should be substituted with `/dev/sdaX`,
|
||||||
|
according to wks file.
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
arm-autonomy Quick Start
|
arm-autonomy Quick Start
|
||||||
==================
|
==================
|
||||||
|
|
||||||
This documentation is explaining how to quickly start with arm-autonomy layer
|
This documentation explains how to quickly start with the arm-autonomy layer,
|
||||||
and the main features provided.
|
and the main features provided.
|
||||||
You will find in the documentation directory some more detailed documentation
|
In the documentation directory you will find some more detailed documentation
|
||||||
for each of the functionalites provided by this layer.
|
for each of the functionalites provided by this layer.
|
||||||
|
|
||||||
What to use this layer for?
|
What to use this layer for?
|
||||||
@@ -26,11 +26,10 @@ First you must download the Yocto layers needed:
|
|||||||
- [poky](https://git.yoctoproject.org/poky)
|
- [poky](https://git.yoctoproject.org/poky)
|
||||||
- [meta-virtualization](https://git.yoctoproject.org/meta-virtualization)
|
- [meta-virtualization](https://git.yoctoproject.org/meta-virtualization)
|
||||||
- [meta-arm](https://git.yoctoproject.org/meta-arm)
|
- [meta-arm](https://git.yoctoproject.org/meta-arm)
|
||||||
- [meta-kernel](https://gitlab.com/openembedded/community/meta-kernel.git)
|
|
||||||
- all other layers you might want to use
|
- all other layers you might want to use
|
||||||
|
|
||||||
For each of the downloaded layer make sure you checkout the release of Yocto
|
For each of the downloaded layer make sure you checkout the release of Yocto
|
||||||
you want to use (for example zeus using `git checkout zeus`).
|
you want to use (for example hardknott using `git checkout hardknott`).
|
||||||
|
|
||||||
Please follow [Yocto documentation](https://www.yoctoproject.org/docs/latest/brief-yoctoprojectqs/brief-yoctoprojectqs.html)
|
Please follow [Yocto documentation](https://www.yoctoproject.org/docs/latest/brief-yoctoprojectqs/brief-yoctoprojectqs.html)
|
||||||
in order to have the required dependencies.
|
in order to have the required dependencies.
|
||||||
@@ -57,7 +56,6 @@ Here are the main steps to create an arm-autonomy project:
|
|||||||
bitbake-layers add-layer $LAYERDIR_BASE/meta-poky $LAYERDIR_BASE/meta-yocto-bsp \
|
bitbake-layers add-layer $LAYERDIR_BASE/meta-poky $LAYERDIR_BASE/meta-yocto-bsp \
|
||||||
$LAYERDIR_BASE/meta-openembedded/meta-oe $LAYERDIR_BASE/meta-openembedded/meta-python \
|
$LAYERDIR_BASE/meta-openembedded/meta-oe $LAYERDIR_BASE/meta-openembedded/meta-python \
|
||||||
$LAYERDIR_BASE/meta-openembedded/meta-filesystems $LAYERDIR_BASE/meta-openembedded/meta-networking \
|
$LAYERDIR_BASE/meta-openembedded/meta-filesystems $LAYERDIR_BASE/meta-openembedded/meta-networking \
|
||||||
$LAYERDIR_BASE/meta-virtualization $LAYERDIR_BASE/meta-kernel \
|
|
||||||
$LAYERDIR_BASE/meta-arm/meta-arm $LAYERDIR_BASE/meta-arm/meta-arm-toolchain \
|
$LAYERDIR_BASE/meta-arm/meta-arm $LAYERDIR_BASE/meta-arm/meta-arm-toolchain \
|
||||||
$LAYERDIR_BASE/meta-arm/meta-arm-bsp $LAYERDIR_BASE/meta-arm/meta-arm-autonomy \
|
$LAYERDIR_BASE/meta-arm/meta-arm-bsp $LAYERDIR_BASE/meta-arm/meta-arm-autonomy \
|
||||||
```
|
```
|
||||||
@@ -73,7 +71,6 @@ Here are the main steps to create an arm-autonomy project:
|
|||||||
/home/user/arm-autonomy/meta-openembedded/meta-filesystems \
|
/home/user/arm-autonomy/meta-openembedded/meta-filesystems \
|
||||||
/home/user/arm-autonomy/meta-openembedded/meta-networking \
|
/home/user/arm-autonomy/meta-openembedded/meta-networking \
|
||||||
/home/user/arm-autonomy/meta-virtualization \
|
/home/user/arm-autonomy/meta-virtualization \
|
||||||
/home/user/arm-autonomy/meta-kernel \
|
|
||||||
/home/user/arm-autonomy/meta-arm/meta-arm \
|
/home/user/arm-autonomy/meta-arm/meta-arm \
|
||||||
/home/user/arm-autonomy/meta-arm/meta-arm-toolchain \
|
/home/user/arm-autonomy/meta-arm/meta-arm-toolchain \
|
||||||
/home/user/arm-autonomy/meta-arm/meta-arm-bsp \
|
/home/user/arm-autonomy/meta-arm/meta-arm-bsp \
|
||||||
@@ -113,7 +110,8 @@ The project will generate a Linux kernel, a root filesystem, a Xen binary and
|
|||||||
a DTB modified to include the required entries to boot Xen and Linux as Dom0
|
a DTB modified to include the required entries to boot Xen and Linux as Dom0
|
||||||
(this DTB has the extension `-xen.dtb`).
|
(this DTB has the extension `-xen.dtb`).
|
||||||
|
|
||||||
To boot the system using an u-boot base board you will need to:
|
To boot the system using a u-boot base board for machines other than FVP-Base
|
||||||
|
you will need to:
|
||||||
- Load the kernel (by default at 0x80080000 unless you modify
|
- Load the kernel (by default at 0x80080000 unless you modify
|
||||||
XEN_DEVICETREE_DOM0_ADDR value)
|
XEN_DEVICETREE_DOM0_ADDR value)
|
||||||
- Load the xen device tree (for example at 0x83000000)
|
- Load the xen device tree (for example at 0x83000000)
|
||||||
@@ -122,46 +120,88 @@ To boot the system using an u-boot base board you will need to:
|
|||||||
|
|
||||||
In this example the addresses might need to be adapted depending on your board.
|
In this example the addresses might need to be adapted depending on your board.
|
||||||
|
|
||||||
|
For arm-autonomy host on FVP-Base, u-boot has been modified such that
|
||||||
|
`booti 0x84000000 - 0x83000000` is the default boot command. If FVP-Base is your
|
||||||
|
MACHINE target there should be no need to interfere with u-boot.
|
||||||
|
|
||||||
Guest project
|
Guest project
|
||||||
-------------
|
-------------
|
||||||
The guest projects are not target specific and will use a Yocto MACHINE defined
|
The guest projects are not target specific and will instead use a Yocto MACHINE
|
||||||
in meta-arm-autonomy to include only the Linux configuration required to run
|
defined in meta-arm-autonomy to include only the Linux configuration required to
|
||||||
a xen guest.
|
run a xen guest.
|
||||||
|
|
||||||
To create a guest project:
|
To create a guest project:
|
||||||
|
|
||||||
1. Follow the steps of "Create a project"
|
1. Follow the steps of "Create a project"
|
||||||
|
|
||||||
2. Optionaly add layers required to build the image and features you need.
|
2. Optionally add layers required to build the guest image, and any features you
|
||||||
|
need.
|
||||||
|
|
||||||
3. edit conf/local.conf to add `arm-autonomy-guest` to the DISTRO_FEATURES and
|
3. Edit conf/local.conf to add `arm-autonomy-guest` to the DISTRO_FEATURES and
|
||||||
set MACHINE to `arm64-autonomy-guest`:
|
set MACHINE to `arm64-autonomy-guest`:
|
||||||
```
|
```
|
||||||
MACHINE = "arm64-autonomy-guest"
|
MACHINE = "arm64-autonomy-guest"
|
||||||
DISTRO_FEATURES += "arm-autonomy-guest"
|
DISTRO_FEATURES += "arm-autonomy-guest"
|
||||||
```
|
```
|
||||||
|
|
||||||
4. build the image you want.
|
4. Build the image you want.
|
||||||
For example `bitbake core-image-minimal`
|
For example `bitbake core-image-minimal`
|
||||||
|
|
||||||
The build will create a ".xenguest" image that can be use on an host project
|
The build will create a ".xenguest" image that can be use on an host project
|
||||||
with the xenguest-manager.
|
with the xenguest-manager, as well as a file "xenguest.env" containing the
|
||||||
|
variables used to configure and generate the guest image.
|
||||||
|
|
||||||
|
The guest can also be built as a 'multiconfig' sub project of the host, see
|
||||||
|
`meta-arm-autonomy/documentation/arm-autonomy-multiconfig.md` for more
|
||||||
|
information
|
||||||
|
|
||||||
Include guests directly in the host image
|
Include guests directly in the host image
|
||||||
-----------------------------------------
|
-----------------------------------------
|
||||||
The layer provides a way to directly include in the host project one or several
|
The layer provides a way to directly include one or more images generated by
|
||||||
images generated by guest projects.
|
guest projects in the host project.
|
||||||
|
|
||||||
To use this feature, you must edit your host project `local.conf` file and
|
To use this feature, you must edit your host project `local.conf` file and
|
||||||
add set ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS to the list of xenguest images
|
add set the value of 'ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS' to the list of
|
||||||
you want to include in your host. Each xenguest image must be given using a
|
paths to xenguest images you want to include in your host.
|
||||||
full path to it.
|
|
||||||
|
There are 4 supported formats for ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS
|
||||||
|
entries:
|
||||||
|
|
||||||
|
- http/https url
|
||||||
|
- "https://[url]:[port]/foo.xenguest;md5sum=..."
|
||||||
|
|
||||||
|
- file:// absolute local path from root
|
||||||
|
- "file:///xenguests/bar.xenguest"
|
||||||
|
|
||||||
|
- file:// path relative to FILESEXTRAPATHS
|
||||||
|
- "file://relative/baz.xenguest"
|
||||||
|
|
||||||
|
- plain absolute local path from root
|
||||||
|
- "/xenguests/absolute/xyzzy.xenguest"
|
||||||
|
|
||||||
|
It is not recommended to use other bitbake URL types, as they may result in
|
||||||
|
undefined behaviour.
|
||||||
|
|
||||||
|
A semicolon seperated list of install arguments can follow each image path:
|
||||||
|
- guestname : the name that will be attached when the image is imported
|
||||||
|
(default: [filename, without extension])
|
||||||
|
- guestcount : the number of copies of the guest to install, with
|
||||||
|
incrementing numbers appended to the name
|
||||||
|
(default: 1)
|
||||||
|
|
||||||
|
Any other arguments, for example an md5sum, will be assumed to be fetch
|
||||||
|
arguments, and will be appended to the path in the SRC_URI.
|
||||||
For example:
|
For example:
|
||||||
```
|
```
|
||||||
ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS = "/home/user/guest-project/tmp/deploy/images/arm64-autonomy-guest/core-image-minimal-arm64-autonomy-guest.xenguest;guestname=myguest"
|
ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS = "\
|
||||||
|
https://[url]:[port]/base.xenguest;md5sum=[checksum];guestname=http \
|
||||||
|
file:///guests/base.xenguest;guestname=file_abs \
|
||||||
|
file://foo/base.xenguest;guestname=file_rel;guestcount=2 \
|
||||||
|
/guests/foo/bar/base.xenguest;guestname=no_fetcher \ "
|
||||||
```
|
```
|
||||||
This will add the guest and name it `myguest` on the host project image and
|
|
||||||
the xenguest-manager will automatically boot it during startup.
|
Documentation for setting up a multiconfig build can be found in:
|
||||||
|
meta-arm-autonomy/documentation/arm-autonomy-multiconfig.md
|
||||||
|
|
||||||
Add support for your board
|
Add support for your board
|
||||||
--------------------------
|
--------------------------
|
||||||
@@ -182,7 +222,7 @@ started). You can find the complete list of the kernel configuration elements
|
|||||||
required in `recipes-kernel/linux/arm-autonomy-kmeta/features/arm-autonomy/xen-host.cfg`.
|
required in `recipes-kernel/linux/arm-autonomy-kmeta/features/arm-autonomy/xen-host.cfg`.
|
||||||
|
|
||||||
### Define the drive and partition to use for the LVM volume
|
### Define the drive and partition to use for the LVM volume
|
||||||
The xenguest-manager is creating disk hard drive using LVM on an empty
|
The xenguest-manager creates guest storage drives using LVM on an empty
|
||||||
partition. The default value is set to use /dev/sda2.
|
partition. The default value is set to use /dev/sda2.
|
||||||
You can change this for your board by setting XENGUEST_MANAGER_VOLUME_DEVICE.
|
You can change this for your board by setting XENGUEST_MANAGER_VOLUME_DEVICE.
|
||||||
|
|
||||||
@@ -191,37 +231,37 @@ Check `recipes-extended/xenguest/xenguest-manager.bbappend` for examples.
|
|||||||
Please also read xenguest-manager.md.
|
Please also read xenguest-manager.md.
|
||||||
|
|
||||||
### Define the interface to add to xenguest network bridge
|
### Define the interface to add to xenguest network bridge
|
||||||
xenguest-network bridge is creating a bridge on the host and adds network
|
xenguest-network bridge creates a bridge on the host and adds network
|
||||||
interfaces to it so that guest connected to it have access to external network.
|
interfaces to it so that guests connected to it have access to external network.
|
||||||
By default `eth0` is set as the list of interfaces to be added to the bridge.
|
By default `eth0` is set as the list of interfaces to be added to the bridge.
|
||||||
Depending on your board or use case you might want to use an other interface
|
Depending on your board or use case you might want to use an other interface
|
||||||
or use multiple interfaces.
|
or use multiple interfaces.
|
||||||
You can change this for your board by setting XENGUEST_NETWORK_BRIDGE_MEMBERS.
|
You can change this for your board by setting XENGUEST_NETWORK_BRIDGE_MEMBERS.
|
||||||
|
|
||||||
Check `recipes-extended/xenguest/xenguest-network-bridge.bbappend` for
|
Check `recipes-extended/xenguest/xenguest-network.bbappend` for
|
||||||
exmaples.
|
exmaples.
|
||||||
|
|
||||||
Please also read xenguest-network-bridge.md.
|
Please also read xenguest-network-bridge.md.
|
||||||
|
|
||||||
### Define the network configuration of the xenguest network bridge
|
### Define the network configuration of the xenguest network bridge
|
||||||
xenguest network bridge is putting the host network interfaces in a bridge
|
xenguest-network puts the host network interfaces in a bridge and configures it
|
||||||
and is configuring it by default to use dhcp.
|
by default to use dhcp.
|
||||||
If you need a different type of configuration you can set
|
If you need a different type of configuration you can set
|
||||||
XENGUEST_NETWORK_BRIDGE_CONFIG in a xenguest-network-bridge.bbappend to use
|
XENGUEST_NETWORK_BRIDGE_CONFIG in your xenguest-network-bridge.bbappend to use
|
||||||
a different file.
|
a different file.
|
||||||
The recipe will look for the file in ${WORKDIR} so you will need to add it to
|
The recipe will look for the file in ${WORKDIR}, so you will need to add it to
|
||||||
SRC_URI in your bbappend.
|
the SRC_URI in your bbappend.
|
||||||
The recipe will also substitute `###BRIDGE_NAME###` with the bridge name
|
The recipe will also substitute `###BRIDGE_NAME###` with the bridge name
|
||||||
configured in ${XENGUEST_NETWORK_BRIDGE_NAME}.
|
configured in ${XENGUEST_NETWORK_BRIDGE_NAME} when the config file is installed.
|
||||||
|
|
||||||
You can find an example configuration file in
|
You can find an example configuration file in
|
||||||
`recipes-extended/xenguest/files/xenguest-network-bridge-dhcp.cfg.in`.
|
`recipes-extended/xenguest/files/xenguest-network-bridge-dhcp.cfg.in`.
|
||||||
|
|
||||||
Please also read xenguest-network-bridge.md.
|
Please also read xenguest-network.md.
|
||||||
|
|
||||||
### Customize Dom0 and Xen boot arguments for you board
|
### Customize Dom0 and Xen boot arguments for you board
|
||||||
xen-devicetree is writting inside the generated DTB Xen and Linux boot
|
xen-devicetree modifies the generated DTB Xen and Linux boot arguments,
|
||||||
arguments as long as the address where Dom0 Linux kernel can be found.
|
as long as the address where Dom0 Linux kernel can be found.
|
||||||
You might need to have different values for your board or depending on your
|
You might need to have different values for your board or depending on your
|
||||||
use case.
|
use case.
|
||||||
|
|
||||||
|
|||||||
@@ -11,19 +11,24 @@ perform a couple of customizations in the generated wic image:
|
|||||||
1 MiB per physical volume, hence it needs to be taken into account when
|
1 MiB per physical volume, hence it needs to be taken into account when
|
||||||
setting GUEST_PART_SIZE.
|
setting GUEST_PART_SIZE.
|
||||||
|
|
||||||
2. The wic image partition layout and contents with a custom wks file via
|
2. Set the boot partition size (default: 100M) via `BOOT_PART_SIZE` and
|
||||||
|
`BOOT_PART_SIZE_UNIT` (M or G) variables in any conf file. The default
|
||||||
|
bootimg is ~44M so 100M leaves just over 50M of free space.
|
||||||
|
|
||||||
|
3. The wic image partition layout and contents with a custom wks file via
|
||||||
`ARM_AUTONOMY_WKS_FILE` variable (default:
|
`ARM_AUTONOMY_WKS_FILE` variable (default:
|
||||||
arm-autonomy-n1sdp-efidisk.wks.in which is affected by GUEST_PART_SIZE,
|
arm-autonomy-n1sdp-efidisk.wks.in which is affected by GUEST_PART_SIZE,
|
||||||
GUEST_PART_SIZE_UNIT and GRUB_CFG_FILE variables).
|
GUEST_PART_SIZE_UNIT, BOOT_PART_SIZE, BOOT_PART_SIZE_UNIT and
|
||||||
|
GRUB_CFG_FILE variables).
|
||||||
|
|
||||||
3. Custom grub.cfg file via `GRUB_CFG_FILE` (default:
|
4. Custom grub.cfg file via `GRUB_CFG_FILE` (default:
|
||||||
arm-autonomy-n1sdp-grub.cfg) variable to be set in any conf file. The full
|
arm-autonomy-n1sdp-grub.cfg) variable to be set in any conf file. The full
|
||||||
path or relative to `ARM_AUTONOMY_WKS_FILE` should be set.
|
path or relative to `ARM_AUTONOMY_WKS_FILE` should be set.
|
||||||
|
|
||||||
The `arm-autonomy-n1sdp-efidisk.wks.in` and `arm-autonomy-n1sdp-grub.cfg` files
|
The `arm-autonomy-n1sdp-efidisk.wks.in` and `arm-autonomy-n1sdp-grub.cfg` files
|
||||||
are located at `meta-arm-autonomy/dynamic-layers/meta-arm-bsp/wic`.
|
are located at `meta-arm-autonomy/dynamic-layers/meta-arm-bsp/wic`.
|
||||||
|
|
||||||
Other variables can also be custmized to set what files need to be included
|
Other variables can also be customized to set what files need to be included
|
||||||
in the wic image boot partition. Please refer to
|
in the wic image boot partition. Please refer to
|
||||||
`meta-arm-autonomy/dynamic-layers/meta-arm-bsp/conf/machine/n1sdp-extra-settings.inc`
|
`meta-arm-autonomy/dynamic-layers/meta-arm-bsp/conf/machine/n1sdp-extra-settings.inc`
|
||||||
for more details.
|
for more details.
|
||||||
|
|||||||
@@ -56,7 +56,8 @@ The following parameters are available:
|
|||||||
the xen devicetrees are properly regenerated if the source DTBs are changed.
|
the xen devicetrees are properly regenerated if the source DTBs are changed.
|
||||||
This variable is set by default to "virtual/kernel:do_deploy" to use DTBs
|
This variable is set by default to "virtual/kernel:do_deploy" to use DTBs
|
||||||
generated during the compilation of the Linux kernel. This must be changed
|
generated during the compilation of the Linux kernel. This must be changed
|
||||||
if the machine your are using is not using a DTB listed in KERNEL_DEVICETREE.
|
if the machine you are using is not using a DTB listed in
|
||||||
|
KERNEL_DEVICETREE.
|
||||||
|
|
||||||
- XEN_DEVICETREE_DTBS: This should be set to the list of DTBs you want to be
|
- XEN_DEVICETREE_DTBS: This should be set to the list of DTBs you want to be
|
||||||
modified by xen-devicetree. Those must be files that xen-devicetree can find
|
modified by xen-devicetree. Those must be files that xen-devicetree can find
|
||||||
@@ -70,7 +71,10 @@ The following parameters are available:
|
|||||||
This variable is only used if XEN_DEVICETREE_XEN_BOOTARGS has a value
|
This variable is only used if XEN_DEVICETREE_XEN_BOOTARGS has a value
|
||||||
containing "dom0_mem=${XEN_DEVICETREE_DOM0_MEM}" as the memory assigned to
|
containing "dom0_mem=${XEN_DEVICETREE_DOM0_MEM}" as the memory assigned to
|
||||||
dom0 is defined using Xen boot arguments.
|
dom0 is defined using Xen boot arguments.
|
||||||
This variable is set by default to "1024M".
|
This variable is set by default to "1024M,max:1024", and cannot be empty.
|
||||||
|
The value can simply specify a size, e.g. "1024M", but best practice is to
|
||||||
|
also provide a max, documented here:
|
||||||
|
https://wiki.xenproject.org/wiki/Xen_Project_Best_Practices
|
||||||
|
|
||||||
- XEN_DEVICETREE_DOM0_BOOTARGS: Boot arguments to pass to Dom0 Linux when
|
- XEN_DEVICETREE_DOM0_BOOTARGS: Boot arguments to pass to Dom0 Linux when
|
||||||
booting it.
|
booting it.
|
||||||
@@ -84,7 +88,8 @@ The following parameters are available:
|
|||||||
- XEN_DEVICETREE_DOM0_ADDR: This is the address from which the Linux kernel to
|
- XEN_DEVICETREE_DOM0_ADDR: This is the address from which the Linux kernel to
|
||||||
be used for Dom0 will be copied. When using u-boot, this is the address at
|
be used for Dom0 will be copied. When using u-boot, this is the address at
|
||||||
which you will load the kernel Image before starting Xen.
|
which you will load the kernel Image before starting Xen.
|
||||||
This variable is set by default to "0x80080000".
|
This variable is set by default to "0x80080000", and cannot be empty.
|
||||||
|
Values for this variable can be in hex (prefixed with '0x') or in decimal.
|
||||||
|
|
||||||
- XEN_DEVICETREE_DOM0_SIZE: This is the size of the kernel loaded at
|
- XEN_DEVICETREE_DOM0_SIZE: This is the size of the kernel loaded at
|
||||||
${XEN_DEVICETREE_DOM0_ADDR}. Xen will copy this amount of data inside the
|
${XEN_DEVICETREE_DOM0_ADDR}. Xen will copy this amount of data inside the
|
||||||
@@ -92,7 +97,8 @@ The following parameters are available:
|
|||||||
size but can be bigger. You must be careful not to have a value too big as it
|
size but can be bigger. You must be careful not to have a value too big as it
|
||||||
could slow down boot or copy other parts with it (like the DTB).
|
could slow down boot or copy other parts with it (like the DTB).
|
||||||
You might need to increase this if you use a kernel with a bundled initramfs.
|
You might need to increase this if you use a kernel with a bundled initramfs.
|
||||||
This variable is set by default to "0x01000000".
|
This variable is set by default to "0x01000000" and cannot be empty.
|
||||||
|
Values for this variable can be in hex (prefixed with '0x') or in decimal.
|
||||||
|
|
||||||
- XEN_DEVICETREE_DTSI_MERGE: This variable contains the list of dtsi files that
|
- XEN_DEVICETREE_DTSI_MERGE: This variable contains the list of dtsi files that
|
||||||
must be included inside the generated DTB file. By default the only one
|
must be included inside the generated DTB file. By default the only one
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ Introduction
|
|||||||
xenguest-manager is a tool to manage Xenguest images generated by
|
xenguest-manager is a tool to manage Xenguest images generated by
|
||||||
[xenguest-mkimage](xenguest-mkimage.md).
|
[xenguest-mkimage](xenguest-mkimage.md).
|
||||||
|
|
||||||
On a Xen Dom0 system it will:
|
On a Xen Dom0 system it can:
|
||||||
- create a xen guest from a xenguest image: extract its components, create a
|
- create a xen guest from a xenguest image: extract its components, create a
|
||||||
disk for the guest using LVM volumes.
|
disk for the guest using LVM volumes.
|
||||||
- start/stop a xen guest (during init or using xenguest-manager directly).
|
- start/stop a xen guest (during init or using xenguest-manager directly).
|
||||||
@@ -23,7 +23,7 @@ Usage
|
|||||||
-----
|
-----
|
||||||
|
|
||||||
xenguest-manager must be called like this:
|
xenguest-manager must be called like this:
|
||||||
`xenguest-manager OPERATION [OPTIONS]`
|
`xenguest-manager [-v(v)] OPERATION [OPTIONS]`
|
||||||
The following operations are available:
|
The following operations are available:
|
||||||
- create XENGUEST_IMAGE [GUESTNAME]: create a guest from a xenguest image file
|
- create XENGUEST_IMAGE [GUESTNAME]: create a guest from a xenguest image file
|
||||||
as guest GUESTNAME. If GUESTNAME is not given the image file name is used
|
as guest GUESTNAME. If GUESTNAME is not given the image file name is used
|
||||||
@@ -37,6 +37,9 @@ The following operations are available:
|
|||||||
- status [GUESTNAME]: print the current status of GUESTNAME. If GUESTNAME is
|
- status [GUESTNAME]: print the current status of GUESTNAME. If GUESTNAME is
|
||||||
not given, print the status of all guests.
|
not given, print the status of all guests.
|
||||||
|
|
||||||
|
Passing -v or -vv will increase the logging written to the logfile.
|
||||||
|
The terminal will always show only error messages, regardless of the logfile.
|
||||||
|
|
||||||
For a detailed help on available options please use:
|
For a detailed help on available options please use:
|
||||||
`xenguest-manager --help`
|
`xenguest-manager --help`
|
||||||
|
|
||||||
@@ -45,19 +48,20 @@ Bitbake parameters
|
|||||||
|
|
||||||
Several parameters are available to configure the xenguest manager during Yocto
|
Several parameters are available to configure the xenguest manager during Yocto
|
||||||
project compilation (those can be set in your project local.conf, for example).
|
project compilation (those can be set in your project local.conf, for example).
|
||||||
|
This config will be written to a file xenguest-manager.conf in /etc/xenguest/.
|
||||||
|
|
||||||
The following parameters are available:
|
The following parameters are available:
|
||||||
|
|
||||||
- XENGUEST_MANAGER_VOLUME_DEVICE: This is the device path used by the
|
- XENGUEST_MANAGER_VOLUME_DEVICE: This is the device path used by the
|
||||||
xenguest-manager on the device to create LVM disks when guests have a disk
|
xenguest-manager on the device to create LVM disks when guests have a disk
|
||||||
configuration.
|
configuration.
|
||||||
This is set by default to "/dev/sda2".
|
This is set by default to "/dev/sda2".
|
||||||
|
|
||||||
- XENGUEST_MANAGER_VOLUME_NAME: This is the LVM volume name that the
|
- XENGUEST_MANAGER_VOLUME_NAME: This is the LVM volume name that the
|
||||||
xenguest-manager will create and use to create guest LVM disks.
|
xenguest-manager will create and use to create guest LVM disks.
|
||||||
This is set by default to "vg-xen".
|
This is set by default to "vg-xen".
|
||||||
|
|
||||||
- XENGUEST_MANAGER_GUEST_DIR: This is the directory on Dom0 where the
|
- XENGUEST_MANAGER_GUEST_DIR: This is the directory on Dom0 where the
|
||||||
xenguest-manager will look for xenguest images to create during init. That's
|
xenguest-manager will look for xenguest images to create during init. That's
|
||||||
the place where xenguest images can be added to have them automatically
|
the place where xenguest images can be added to have them automatically
|
||||||
created during next Dom0 boot. The xenguests found there will only be created
|
created during next Dom0 boot. The xenguests found there will only be created
|
||||||
@@ -65,3 +69,76 @@ The following parameters are available:
|
|||||||
name).
|
name).
|
||||||
This is set by default to "/usr/share/guests".
|
This is set by default to "/usr/share/guests".
|
||||||
|
|
||||||
|
- XENGUEST_MANAGER_LOG_LEVEL: Set the default log level for xenguest manager.
|
||||||
|
Must be one of ERROR, INFO, VERBOSE (default: ERROR). The logs will be
|
||||||
|
written to /var/log/xenguest.
|
||||||
|
|
||||||
|
If a verbosity argument (-v or -vv) is passed to xenguest-manager directly, it
|
||||||
|
will override the setting in xenguest-manager.conf
|
||||||
|
|
||||||
|
Since /var/log is by default a volatile location, extra configuration is
|
||||||
|
required if logs are desired to be kept between reboots:
|
||||||
|
VOLATILE_LOG_DIR="no"
|
||||||
|
|
||||||
|
Read more here: https://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#var-VOLATILE_LOG_DIR
|
||||||
|
|
||||||
|
When this is enabled, logrotate will monitor the file to ensure it does not
|
||||||
|
grow excessively large. See recipes-extended/xenguest/files/logrotate-xenguest
|
||||||
|
|
||||||
|
Init scripts
|
||||||
|
------------
|
||||||
|
|
||||||
|
Shell scripts can be executed on the host when a guest is started. Depending on
|
||||||
|
when the script should be executed it should be installed in a different
|
||||||
|
directory on the target:
|
||||||
|
|
||||||
|
- /etc/xenguest/init.pre : Executed first, prior to guest creation
|
||||||
|
|
||||||
|
- /etc/xenguest/init.d : Executed after guest creation, but before it is started
|
||||||
|
|
||||||
|
- /etc/xenguest/init.post : Executed after starting the guest
|
||||||
|
|
||||||
|
Inside the directory, scripts will be executed in alphabetical order.
|
||||||
|
|
||||||
|
Since these scripts are sourced by xenguest-manager, they can acccess functions
|
||||||
|
and variables from the parent file's scope, including:
|
||||||
|
|
||||||
|
- ${guestname} : The name of the guest being created
|
||||||
|
|
||||||
|
- ${guestdir} : The path to the guest directory
|
||||||
|
|
||||||
|
- ${guestcfgfile} : The name of the config file for the starting guest
|
||||||
|
|
||||||
|
- log() : Used to write a log to the logfile, default level INFO.
|
||||||
|
Takes an optional log level and a message body
|
||||||
|
e.g. log ERROR "blah"
|
||||||
|
|
||||||
|
Options for log level: ERROR, INFO, VERBOSE,
|
||||||
|
and FATAL which will call exit 1 immediately after logging
|
||||||
|
the message at level ERROR.
|
||||||
|
|
||||||
|
- log_command() : Used to call a shell command and log that it has been
|
||||||
|
called, as well as capturing both stdout and stderr.
|
||||||
|
|
||||||
|
By default the command output is dumped to the logfile as an
|
||||||
|
error if the command returns a status > 0, or as a verbose
|
||||||
|
message if the whole script is running in verbose mode.
|
||||||
|
|
||||||
|
An optional log level can be passed to alter the level the
|
||||||
|
log should be if the command returns a status >0, which may
|
||||||
|
be useful if the command is expected to return a non-zero
|
||||||
|
result.
|
||||||
|
e.g. log_command INFO "ls -lh ~"
|
||||||
|
|
||||||
|
Options for log level: ERROR, INFO, and VERBOSE
|
||||||
|
|
||||||
|
Attempting to call any other functions from xenguest_manager in an init script
|
||||||
|
may result in a fatal error, from which cleanup is not guarenteed.
|
||||||
|
|
||||||
|
|
||||||
|
Init scripts also have access to config variables defined in params.cfg.
|
||||||
|
|
||||||
|
An example of how to create the directory and install an init shell script can
|
||||||
|
be found in:
|
||||||
|
recipes-extended/xenguest/xenguest-network.bb
|
||||||
|
Where network-bridge.sh is installed from network-bridge.sh.in
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ Xenguest mkimage
|
|||||||
Introduction
|
Introduction
|
||||||
------------
|
------------
|
||||||
|
|
||||||
xenguest-mkimage is a tool to create and modify images to be used as Guest with
|
xenguest-mkimage is a tool to create and modify images to be used as a Guest
|
||||||
Xen. It defines a format to store completely defined guests as a file or as
|
with Xen. It defines a format to store completely defined guests as a file or as
|
||||||
a directory and provides options to create and modify those images.
|
a directory, and provides options to create and modify those images.
|
||||||
|
|
||||||
A xenguest image contains all elements required to create a xen guest.
|
A xenguest image contains all elements required to create a xen guest.
|
||||||
This is the base elements like a Xen configuration and a Linux kernel binary
|
This is the base elements like a Xen configuration and a Linux kernel binary
|
||||||
@@ -15,8 +15,8 @@ but also some more advanced elements like init scripts or a disk definition.
|
|||||||
The format is made to be deployable easily by storing everything in a single
|
The format is made to be deployable easily by storing everything in a single
|
||||||
file and provide tools to easily manipulate the images. It can also easily be
|
file and provide tools to easily manipulate the images. It can also easily be
|
||||||
extended to have features like encryption or signature of images, updates or
|
extended to have features like encryption or signature of images, updates or
|
||||||
complex configurations by providing features to have init script that will be
|
complex configurations by providing the ability to have init scripts embedded
|
||||||
executed on the host embedded inside the image.
|
inside the image that will be executed on the host when the guest is started.
|
||||||
|
|
||||||
Xenguest images content
|
Xenguest images content
|
||||||
-----------------------
|
-----------------------
|
||||||
@@ -35,7 +35,7 @@ before starting the guest.
|
|||||||
|
|
||||||
### files
|
### files
|
||||||
This directory contains files that can be used by the xen configuration, for
|
This directory contains files that can be used by the xen configuration, for
|
||||||
example the binary of the kernel referenced in xen configuration).
|
example the kernel image referenced in xen configuration.
|
||||||
This is where the kernel binary, the dtb or a ramdisk will be stored.
|
This is where the kernel binary, the dtb or a ramdisk will be stored.
|
||||||
|
|
||||||
### init.pre, init.d and init.post
|
### init.pre, init.d and init.post
|
||||||
@@ -47,7 +47,7 @@ contains scripts called at a different time:
|
|||||||
generate part of the xen configuration dynamically.
|
generate part of the xen configuration dynamically.
|
||||||
- init.d: scripts executed when the guest has been created but before it is
|
- init.d: scripts executed when the guest has been created but before it is
|
||||||
started. This can be used to do some xenstore operations or configure the
|
started. This can be used to do some xenstore operations or configure the
|
||||||
guest behaviour using xl, for example.
|
guest behaviour, using xl for example.
|
||||||
- init.post: scripts executed just after starting the guest. This can be
|
- init.post: scripts executed just after starting the guest. This can be
|
||||||
used to configure things created by xen for the guest like network
|
used to configure things created by xen for the guest like network
|
||||||
network interfaces.
|
network interfaces.
|
||||||
@@ -58,12 +58,19 @@ order.
|
|||||||
### disk.cfg and disk-files
|
### disk.cfg and disk-files
|
||||||
disk.cfg contains the guest disk description (disk size and disk partitions).
|
disk.cfg contains the guest disk description (disk size and disk partitions).
|
||||||
The file contains the following entries:
|
The file contains the following entries:
|
||||||
- `DISK_SIZE=X`: size of the disk to create in GB
|
- `DISK_SIZE=X`: size of the disk to create in MB or GB(default),
|
||||||
|
e.g. 1000M or 4[G]
|
||||||
- `DISK_PARTX=SIZE:FS:CONTENT`: create a partition number X (1 to 4) with a
|
- `DISK_PARTX=SIZE:FS:CONTENT`: create a partition number X (1 to 4) with a
|
||||||
size of SIZE GB, format it with filesystem FS (can be ext2, ext3, ext4, vfat
|
size of SIZE MB or GB(default), e.g 1000M or 2[G].
|
||||||
or swap) and extract CONTENT as initial partition content
|
Format it with filesystem FS (can be ext2, ext3, ext4, vfat or swap)
|
||||||
(.tar[.gz|.xz|.bz2] file or img[.gz|.bz2] file to be dumped in the partition). FS and
|
and extract CONTENT as initial partition content (.tar[.gz|.xz|.bz2] file
|
||||||
CONTENT can be empty.
|
or img[.gz|.bz2] file to be dumped in the partition).
|
||||||
|
FS and CONTENT can be empty.
|
||||||
|
- `DISK_DEVICE=X`: disk or partition to be used by lvm. Setting this option
|
||||||
|
allows to bind guest disk with any partition or disk available on host,
|
||||||
|
e.g. /dev/sda3 or /dev/sdb.
|
||||||
|
This variable is not set by default, but if set, it overrides disk settings
|
||||||
|
inside xenguest-manager.conf - 'XENGUEST_VOLUME_DEVICE'.
|
||||||
|
|
||||||
The disk-files contain files to be used for initializing the disk partitions
|
The disk-files contain files to be used for initializing the disk partitions
|
||||||
content. Those should be used to create a LVM or a physical disk and initialize
|
content. Those should be used to create a LVM or a physical disk and initialize
|
||||||
@@ -105,12 +112,12 @@ For a detailed help on available operations, please use:
|
|||||||
image file. Several script can be added and the basename of FILE is used to
|
image file. Several script can be added and the basename of FILE is used to
|
||||||
distinguish them (calling the option twice with the same file will update the
|
distinguish them (calling the option twice with the same file will update the
|
||||||
script in the image with the second one).
|
script in the image with the second one).
|
||||||
--disk-size=SIZE: set the guest disk size to SIZE in GB. Calling this with 0
|
--disk-size=SIZE: set the guest disk size to SIZE in MB or GB(default),
|
||||||
disable the guest disk.
|
e.g 1000M or 2[G]. Calling this with 0 disable the guest disk.
|
||||||
- --disk-add-part=NUM:SIZE:FS:CONTENT: This is adding a partition to the
|
- --disk-add-part=NUM:SIZE:FS:CONTENT: This is adding a partition to the
|
||||||
xenguest image disk. The partition is described with the arguments:
|
xenguest image disk. The partition is described with the arguments:
|
||||||
- NUM: partition number.
|
- NUM: partition number.
|
||||||
- SIZE: partition size in GB.
|
- SIZE: partition size in MB or GB(default), e.g 1000M or 2[G].
|
||||||
- FS: filesystem to format the partition with. This can be ext2, ext3, ext4,
|
- FS: filesystem to format the partition with. This can be ext2, ext3, ext4,
|
||||||
vfat of swap. If empty the partition is not formated.
|
vfat of swap. If empty the partition is not formated.
|
||||||
- CONTENT: tar of img file to use to initialize the partition. The file must
|
- CONTENT: tar of img file to use to initialize the partition. The file must
|
||||||
|
|||||||
@@ -12,9 +12,10 @@ At the moment 3 types of network arrangements are provided:
|
|||||||
|
|
||||||
- Bridge: where the guest vif is added to the created bridge interface;
|
- Bridge: where the guest vif is added to the created bridge interface;
|
||||||
|
|
||||||
- NAT: where a private subnet is created for the guest, a dhcpd is started on
|
- NAT: where a private subnet is created for the guest,
|
||||||
the host to serve the guest and the proper iptables rules are created to
|
a kea dhcp4 server is started on the host to serve the guest
|
||||||
allow the guest to access the external network;
|
and the proper iptables rules are created
|
||||||
|
to allow the guest to access the external network;
|
||||||
|
|
||||||
- None: the guest vif is not connected to the bridge.
|
- None: the guest vif is not connected to the bridge.
|
||||||
|
|
||||||
@@ -55,17 +56,20 @@ The following parameters are available:
|
|||||||
contains the dom0 physical interface giving the guest direct access to the
|
contains the dom0 physical interface giving the guest direct access to the
|
||||||
external network.
|
external network.
|
||||||
The **nat** type will setup a private network between dom0 and domU, setup
|
The **nat** type will setup a private network between dom0 and domU, setup
|
||||||
the appropriate routing table, configure and run the dhcpd on dom0 to serve
|
the appropriate routing table, configure and run the kea dhcp4 server
|
||||||
the domU and apply the iptables rules to allow the guest to acess the
|
on dom0 to serve the domU and apply the iptables rules to allow the guest
|
||||||
external network. The dhcpd configuration for the guest can be customised by
|
to acess the external network. The kea dhcp4 server configuration for
|
||||||
replacing the
|
the guest can be customised by replacing the
|
||||||
"meta-arm-autonomy/recipes-extended/xenguest/files/dhcpd-params.cfg" file
|
"meta-arm-autonomy/recipes-extended/xenguest/files/kea-subnet4.json" file
|
||||||
in a xenguest-network.bbappend. The dhcpd-params.cfg file is installed in
|
in a xenguest-network.bbappend. The kea-subnet4.json file is installed in
|
||||||
the xenguest image and copied to
|
the xenguest image and copied to
|
||||||
"/etc/xenguest/guests/${guestname}/files/dhcpd-params.cfg" when the guest
|
"/etc/xenguest/guests/${guestname}/files/kea-subnet4.json" when the guest
|
||||||
image is created. It will be consumed by the
|
image is created. It will be consumed by the
|
||||||
"/etc/xen/scripts/vif-post.d/00-vif-xenguest.hook" script which is called by
|
"/etc/xen/scripts/vif-post.d/00-vif-xenguest.hook" script which is called by
|
||||||
"/etc/xen/scripts/vif-nat" script when starting/stopping the xenguest.
|
"/etc/xen/scripts/vif-nat" script when starting/stopping the xenguest.
|
||||||
|
After guest start, "/etc/xenguest/init.post/xenguest-network-init-post.sh"
|
||||||
|
script is called to reload kea dhcp4 server with updated configuration,
|
||||||
|
after virtual network interface is ready.
|
||||||
In the guest project, the NAT port forward can be customised by changing
|
In the guest project, the NAT port forward can be customised by changing
|
||||||
the XENGUEST_IMAGE_HOST_PORT (default: "1000 + ${domid}") and
|
the XENGUEST_IMAGE_HOST_PORT (default: "1000 + ${domid}") and
|
||||||
XENGUEST_IMAGE_GUEST_PORT (default: "22") variables in local.conf or
|
XENGUEST_IMAGE_GUEST_PORT (default: "22") variables in local.conf or
|
||||||
|
|||||||
@@ -1,4 +1,26 @@
|
|||||||
# Extra machine settings for juno
|
# Extra machine settings for juno
|
||||||
|
KERNEL_ALT_IMAGETYPE = "Image.lzma"
|
||||||
|
|
||||||
# Juno board has 2 network interfaces, add both of them to the bridge
|
# Juno board has 2 network interfaces, add both of them to the bridge
|
||||||
XENGUEST_NETWORK_BRIDGE_MEMBERS ?= "eth0 eth1"
|
XENGUEST_NETWORK_BRIDGE_MEMBERS ?= "eth0 eth1"
|
||||||
|
XEN_DEVICETREE_DOM0_SIZE ?= "0x02400000"
|
||||||
|
|
||||||
|
# We need to extend the wks search path to be able to find the wks file set in
|
||||||
|
# ARM_AUTONOMY_WKS_FILE.
|
||||||
|
WKS_SEARCH_PATH_prepend := "${ARM_AUTONOMY_ARM_BSP_DYNAMIC_DIR}/wic:"
|
||||||
|
|
||||||
|
ARM_AUTONOMY_WKS_FILE ?= "arm-autonomy-juno-disk.wks.in"
|
||||||
|
# set wks file only if INITRAMFS_IMAGE_BUNDLE is not set
|
||||||
|
WKS_FILE = "${@bb.utils.contains('INITRAMFS_IMAGE_BUNDLE', '1', '',\
|
||||||
|
'${ARM_AUTONOMY_WKS_FILE}', d)}"
|
||||||
|
|
||||||
|
# Set the wks guest partition size and unit. It must be aligned with the sum of
|
||||||
|
# all XENGUEST_IMAGE_DISK_SIZE set for the guests. By default, LVM2 metadata is
|
||||||
|
# 1 MiB per physical volume, hence it needs to be taken into account when
|
||||||
|
# setting GUEST_PART_SIZE. The XENGUEST_IMAGE_DISK_SIZE default value is 4GiB.
|
||||||
|
GUEST_PART_SIZE ?= "4097"
|
||||||
|
GUEST_PART_SIZE_UNIT ?= "M"
|
||||||
|
|
||||||
|
# set wic image type only if INITRAMFS_IMAGE_BUNDLE is not set
|
||||||
|
IMAGE_FSTYPES += "${@bb.utils.contains('INITRAMFS_IMAGE_BUNDLE', '1', '',\
|
||||||
|
'wic wic.gz wic.bmap', d)}"
|
||||||
|
|||||||
+47
-1
@@ -14,8 +14,19 @@ WKS_FILE = "${ARM_AUTONOMY_WKS_FILE}"
|
|||||||
GUEST_PART_SIZE ?= "4097"
|
GUEST_PART_SIZE ?= "4097"
|
||||||
GUEST_PART_SIZE_UNIT ?= "M"
|
GUEST_PART_SIZE_UNIT ?= "M"
|
||||||
|
|
||||||
|
# Set default boot partition size and unit
|
||||||
|
BOOT_PART_SIZE ?= "100"
|
||||||
|
BOOT_PART_SIZE_UNIT ?= "M"
|
||||||
|
|
||||||
# The GRUB_CFG_FILE affects arm-autonomy-n1sdp-efidisk.wks.in file
|
# The GRUB_CFG_FILE affects arm-autonomy-n1sdp-efidisk.wks.in file
|
||||||
GRUB_CFG_FILE ?= "${ARM_AUTONOMY_ARM_BSP_DYNAMIC_DIR}/wic/arm-autonomy-n1sdp-grub.cfg"
|
#
|
||||||
|
# When alternate-kernel DISTRO_FEATURE is present we set the
|
||||||
|
# arm-autonomy-n1sdp-rt-grub.cfg by default. This GRUB config file has
|
||||||
|
# additional entries for booting with the PREEMPT_RT kernel.
|
||||||
|
GRUB_CFG_FILE ?= "${@bb.utils.contains('DISTRO_FEATURES','alternate-kernel', \
|
||||||
|
'${ARM_AUTONOMY_ARM_BSP_DYNAMIC_DIR}/wic/arm-autonomy-n1sdp-rt-grub.cfg', \
|
||||||
|
'${ARM_AUTONOMY_ARM_BSP_DYNAMIC_DIR}/wic/arm-autonomy-n1sdp-grub.cfg' \
|
||||||
|
, d)}"
|
||||||
|
|
||||||
# From arm-autonomy-n1sdp-efidisk.wks.in, the /boot partition is /dev/sda1, and
|
# From arm-autonomy-n1sdp-efidisk.wks.in, the /boot partition is /dev/sda1, and
|
||||||
# the "/" partition is /dev/sda2.
|
# the "/" partition is /dev/sda2.
|
||||||
@@ -38,3 +49,38 @@ do_image_wic[depends] += "xen:do_deploy"
|
|||||||
IMAGE_EFI_BOOT_FILES += "xen-n1sdp.efi;xen.efi"
|
IMAGE_EFI_BOOT_FILES += "xen-n1sdp.efi;xen.efi"
|
||||||
IMAGE_EFI_BOOT_FILES += "${XEN_MOD_DEVICETREE_DTBS}"
|
IMAGE_EFI_BOOT_FILES += "${XEN_MOD_DEVICETREE_DTBS}"
|
||||||
|
|
||||||
|
# When alternate-kernel DISTRO_FEATURE is present we set the linux-yocto-rt
|
||||||
|
# by default
|
||||||
|
PREFERRED_PROVIDER_alternate/kernel ?= "\
|
||||||
|
${@bb.utils.contains('DISTRO_FEATURES', 'alternate-kernel', \
|
||||||
|
'linux-yocto-rt', '', d)}"
|
||||||
|
|
||||||
|
KERNEL_PACKAGE_NAME_alternate/kernel ?= "kernel-rt"
|
||||||
|
# When alternate-kernel DISTRO_FEATURE is present we set the kernel-rt by
|
||||||
|
# default
|
||||||
|
KERNEL_PACKAGE_NAME_pn-linux-yocto-rt = "\
|
||||||
|
${@ d.getVar('KERNEL_PACKAGE_NAME_alternate/kernel') \
|
||||||
|
if bb.utils.contains('DISTRO_FEATURES', 'alternate-kernel', True, False, d) \
|
||||||
|
else 'kernel' }"
|
||||||
|
|
||||||
|
# Relative path from DEPLOY_DIR_IMAGE of the Kernel PREEMPT_RT deployed Image
|
||||||
|
KERNEL_RT_IMAGE ?= "kernel-rt/Image-n1sdp.bin;Image-preempt-rt"
|
||||||
|
# Only include the Kernel PREEMPT_RT Image if we are building with
|
||||||
|
# alternate-kernel DISTRO_FEATURE
|
||||||
|
IMAGE_EFI_BOOT_FILES += "\
|
||||||
|
${@ d.getVar('KERNEL_RT_IMAGE',d) or '' \
|
||||||
|
if bb.utils.contains('DISTRO_FEATURES', 'alternate-kernel', True, False, d) and \
|
||||||
|
d.getVar('PREFERRED_PROVIDER_alternate/kernel') else ''}"
|
||||||
|
|
||||||
|
|
||||||
|
EFIDIR ?= "/EFI/BOOT"
|
||||||
|
GRUB_CFG_EXTRA_FILE ?= "${ARM_AUTONOMY_ARM_BSP_DYNAMIC_DIR}/wic/arm-autonomy-n1sdp-grub.cfg;.${EFIDIR}}"
|
||||||
|
|
||||||
|
# When alternate-kernel DISTRO_FEATURE is present we set the
|
||||||
|
# arm-autonomy-n1sdp-rt-grub.cfg by default. This GRUB config file has
|
||||||
|
# additional entries for booting with the PREEMPT_RT kernel and also includes
|
||||||
|
# the main GRUB config file set by GRUB_CFG_EXTRA_FILE.
|
||||||
|
IMAGE_EFI_BOOT_FILES += "\
|
||||||
|
${@ d.getVar('GRUB_CFG_EXTRA_FILE',d) or '' \
|
||||||
|
if bb.utils.contains('DISTRO_FEATURES', 'alternate-kernel', True, False, d) and \
|
||||||
|
d.getVar('PREFERRED_PROVIDER_alternate/kernel') else ''}"
|
||||||
|
|||||||
+38
-9
@@ -1,21 +1,50 @@
|
|||||||
# Use OVERRIDES to minimize the usage of
|
# Use OVERRIDES to minimize the usage of
|
||||||
# ${@bb.utils.contains('DISTRO_FEATURES', 'xen', ...
|
# ${@bb.utils.contains('DISTRO_FEATURES', 'autonomy-host', ...
|
||||||
OVERRIDES_append = "${@bb.utils.contains('DISTRO_FEATURES', 'xen', ':xen', '', d)}"
|
OVERRIDES_append = "${@bb.utils.contains('DISTRO_FEATURES', 'arm-autonomy-host', ':autonomy-host', '', d)}"
|
||||||
|
|
||||||
FILESEXTRAPATHS_prepend_xen := "${THISDIR}/${PN}:"
|
FILESEXTRAPATHS_prepend_autonomy-host := "${THISDIR}/${PN}:"
|
||||||
|
|
||||||
|
DEPENDS_append_autonomy-host = " dos2unix-native"
|
||||||
|
|
||||||
|
SRC_URI_append_autonomy-host = " file://add-xen-support.patch;patchdir=../"
|
||||||
|
|
||||||
|
do_install_append_autonomy-host() {
|
||||||
|
mv -v ${D}/${UNPACK_DIR}/SOFTWARE/uEnv.txt \
|
||||||
|
${D}/${UNPACK_DIR}/SOFTWARE/uenvfile
|
||||||
|
for dir in $(ls ${D}/${UNPACK_DIR}/SITE1/)
|
||||||
|
do
|
||||||
|
unix2dos ${D}/${UNPACK_DIR}/SITE1/${dir}/images.txt
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
DEPLOY_EXTRA_DEPS ??= ""
|
DEPLOY_EXTRA_DEPS ??= ""
|
||||||
DEPLOY_EXTRA_DEPS_xen = "xen:do_deploy xen-devicetree:do_deploy"
|
DEPLOY_EXTRA_DEPS_autonomy-host = "xen:do_deploy xen-devicetree:do_deploy"
|
||||||
|
|
||||||
do_deploy[depends] += "${DEPLOY_EXTRA_DEPS}"
|
do_deploy[depends] += "${DEPLOY_EXTRA_DEPS}"
|
||||||
|
|
||||||
do_deploy_prepend_xen() {
|
do_deploy_prepend_autonomy-host() {
|
||||||
# To avoid dependency loop between firmware-image-juno:do_install,
|
# To avoid dependency loop between firmware-image-juno:do_install,
|
||||||
# xen:do_deploy and xen-devicetree:do_deploy when
|
# xen:do_deploy and xen-devicetree:do_deploy when
|
||||||
# INITRAMFS_IMAGE_BUNDLE = "1", we need to handle the xen and
|
# INITRAMFS_IMAGE_BUNDLE = "1", we need to handle the xen and
|
||||||
# xen-devicetree binaries copying in the do_deploy task.
|
# xen-devicetree binaries copying in the do_deploy task.
|
||||||
cp ${DEPLOY_DIR_IMAGE}/xen-${COMPATIBLE_MACHINE}.efi \
|
|
||||||
${D}/${UNPACK_DIR}/SOFTWARE/xen
|
mkdir -p ${D}/${UNPACK_DIR}/SOFTWARE/XEN
|
||||||
cp ${DEPLOY_DIR_IMAGE}/*xen.dtb \
|
cp -v ${DEPLOY_DIR_IMAGE}/xen-${COMPATIBLE_MACHINE}.efi \
|
||||||
${D}/${UNPACK_DIR}/SOFTWARE/
|
${D}/${UNPACK_DIR}/SOFTWARE/XEN/xen
|
||||||
|
|
||||||
|
for dtb in $(basename -s .dtb ${KERNEL_DEVICETREE})
|
||||||
|
do
|
||||||
|
cp -v ${DEPLOY_DIR_IMAGE}/${dtb}-xen.dtb \
|
||||||
|
${D}/${UNPACK_DIR}/SOFTWARE/XEN/${dtb}.dtb
|
||||||
|
done
|
||||||
|
|
||||||
|
bbnote "Xen binaries added under SOFTWARE/XEN directory"
|
||||||
|
|
||||||
|
if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" -a "${KERNEL_ALT_IMAGETYPE}" = "Image.lzma" ]; then
|
||||||
|
# KERNEL_ALT_IMAGETYPE is expected to be Image.lzma,
|
||||||
|
# however NOR flash filesystem is DOS compatible with 8.3 naming,
|
||||||
|
# so we need to replace ".lzma" with ".lzm"
|
||||||
|
cp -L -f ${DEPLOY_DIR_IMAGE}/${KERNEL_ALT_IMAGETYPE} \
|
||||||
|
${D}/${UNPACK_DIR}/SOFTWARE/Image.lzm
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
+173
@@ -0,0 +1,173 @@
|
|||||||
|
arm-bsp/firmware-image-juno: add xen support
|
||||||
|
|
||||||
|
This patch adds xen and dtbs binaries entries to images-r[012].txt files.
|
||||||
|
These images-r[012].txt files contain NOR filesystem entries details,
|
||||||
|
like file offset, name, path etc.
|
||||||
|
|
||||||
|
It also adds customization for uEnv.txt file, that allows to autoboot xen.
|
||||||
|
|
||||||
|
Upstream-Status: Inappropriate [configuration]
|
||||||
|
Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com>
|
||||||
|
|
||||||
|
diff -u a/images-r0.txt b/images-r0.txt
|
||||||
|
--- a/images-r0.txt 2020-11-25 20:25:38.677687712 +0100
|
||||||
|
+++ b/images-r0.txt 2020-11-25 20:36:55.482194294 +0100
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
TITLE: Versatile Express Images Configuration File
|
||||||
|
|
||||||
|
[IMAGES]
|
||||||
|
-TOTALIMAGES: 10 ;Number of Images (Max: 32)
|
||||||
|
+TOTALIMAGES: 11 ;Number of Images (Max: 32)
|
||||||
|
|
||||||
|
NOR0UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
||||||
|
NOR0ADDRESS: 0x00000000 ;Image Flash Address
|
||||||
|
@@ -17,14 +17,14 @@
|
||||||
|
|
||||||
|
NOR2UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
||||||
|
NOR2ADDRESS: 0x00500000 ;Image Flash Address
|
||||||
|
-NOR2FILE: \SOFTWARE\Image ;Image File Name
|
||||||
|
-NOR2NAME: norkern ;Rename kernel to norkern
|
||||||
|
+NOR2FILE: \SOFTWARE\Image.lzm ;Image File Name
|
||||||
|
+NOR2NAME: norkern.lzm ;Rename kernel to norkern.lzm
|
||||||
|
NOR2LOAD: 00000000 ;Image Load Address
|
||||||
|
NOR2ENTRY: 00000000 ;Image Entry Point
|
||||||
|
|
||||||
|
NOR3UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
||||||
|
NOR3ADDRESS: 0x02900000 ;Image Flash Address
|
||||||
|
-NOR3FILE: \SOFTWARE\juno.dtb ;Image File Name
|
||||||
|
+NOR3FILE: \SOFTWARE\XEN\juno.dtb ;Image File Name
|
||||||
|
NOR3NAME: board.dtb ;Specify target filename to preserve file extension
|
||||||
|
NOR3LOAD: 00000000 ;Image Load Address
|
||||||
|
NOR3ENTRY: 00000000 ;Image Entry Point
|
||||||
|
@@ -64,8 +64,13 @@
|
||||||
|
NOR9UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
||||||
|
NOR9ADDRESS: 0x02A80000 ;Image Flash Address
|
||||||
|
NOR9NAME: uEnv.txt
|
||||||
|
-NOR9FILE: \SOFTWARE\uEnv.txt ;Image File Name
|
||||||
|
+NOR9FILE: \SOFTWARE\uenvfile ;Image File Name
|
||||||
|
NOR9LOAD: 00000000 ;Image Load Address
|
||||||
|
NOR9ENTRY: 00000000 ;Image Entry Point
|
||||||
|
|
||||||
|
-
|
||||||
|
+NOR10UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
||||||
|
+NOR10ADDRESS: 0x03000000 ;Image Flash Address
|
||||||
|
+NOR10FILE: \SOFTWARE\XEN\xen ;Image File Name
|
||||||
|
+NOR10NAME: xen
|
||||||
|
+NOR10LOAD: 00000000 ;Image Load Address
|
||||||
|
+NOR10ENTRY: 00000000 ;Image Entry Point
|
||||||
|
diff -u a/images-r1.txt b/images-r1.txt
|
||||||
|
--- a/images-r1.txt 2020-11-25 20:40:19.005177152 +0100
|
||||||
|
+++ b/images-r1.txt 2020-11-25 20:41:17.500886263 +0100
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
TITLE: Versatile Express Images Configuration File
|
||||||
|
|
||||||
|
[IMAGES]
|
||||||
|
-TOTALIMAGES: 10 ;Number of Images (Max: 32)
|
||||||
|
+TOTALIMAGES: 11 ;Number of Images (Max: 32)
|
||||||
|
|
||||||
|
NOR0UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
||||||
|
NOR0ADDRESS: 0x00000000 ;Image Flash Address
|
||||||
|
@@ -17,14 +17,14 @@
|
||||||
|
|
||||||
|
NOR2UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
||||||
|
NOR2ADDRESS: 0x00500000 ;Image Flash Address
|
||||||
|
-NOR2FILE: \SOFTWARE\Image ;Image File Name
|
||||||
|
-NOR2NAME: norkern ;Rename kernel to norkern
|
||||||
|
+NOR2FILE: \SOFTWARE\Image.lzm ;Image File Name
|
||||||
|
+NOR2NAME: norkern.lzm ;Rename kernel to norkern.lzm
|
||||||
|
NOR2LOAD: 00000000 ;Image Load Address
|
||||||
|
NOR2ENTRY: 00000000 ;Image Entry Point
|
||||||
|
|
||||||
|
NOR3UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
||||||
|
NOR3ADDRESS: 0x02900000 ;Image Flash Address
|
||||||
|
-NOR3FILE: \SOFTWARE\juno-r1.dtb ;Image File Name
|
||||||
|
+NOR3FILE: \SOFTWARE\XEN\juno-r1.dtb ;Image File Name
|
||||||
|
NOR3NAME: board.dtb ;Specify target filename to preserve file extension
|
||||||
|
NOR3LOAD: 00000000 ;Image Load Address
|
||||||
|
NOR3ENTRY: 00000000 ;Image Entry Point
|
||||||
|
@@ -64,8 +64,13 @@
|
||||||
|
NOR9UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
||||||
|
NOR9ADDRESS: 0x02A80000 ;Image Flash Address
|
||||||
|
NOR9NAME: uEnv.txt
|
||||||
|
-NOR9FILE: \SOFTWARE\uEnv.txt ;Image File Name
|
||||||
|
+NOR9FILE: \SOFTWARE\uenvfile ;Image File Name
|
||||||
|
NOR9LOAD: 00000000 ;Image Load Address
|
||||||
|
NOR9ENTRY: 00000000 ;Image Entry Point
|
||||||
|
|
||||||
|
-
|
||||||
|
+NOR10UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
||||||
|
+NOR10ADDRESS: 0x03000000 ;Image Flash Address
|
||||||
|
+NOR10FILE: \SOFTWARE\XEN\xen ;Image File Name
|
||||||
|
+NOR10NAME: xen
|
||||||
|
+NOR10LOAD: 00000000 ;Image Load Address
|
||||||
|
+NOR10ENTRY: 00000000 ;Image Entry Point
|
||||||
|
diff -u a/images-r2.txt b/images-r2.txt
|
||||||
|
--- a/images-r2.txt 2020-11-25 20:40:30.625119321 +0100
|
||||||
|
+++ b/images-r2.txt 2020-11-25 20:41:30.720820597 +0100
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
TITLE: Versatile Express Images Configuration File
|
||||||
|
|
||||||
|
[IMAGES]
|
||||||
|
-TOTALIMAGES: 10 ;Number of Images (Max: 32)
|
||||||
|
+TOTALIMAGES: 11 ;Number of Images (Max: 32)
|
||||||
|
|
||||||
|
NOR0UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
||||||
|
NOR0ADDRESS: 0x00000000 ;Image Flash Address
|
||||||
|
@@ -17,14 +17,14 @@
|
||||||
|
|
||||||
|
NOR2UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
||||||
|
NOR2ADDRESS: 0x00500000 ;Image Flash Address
|
||||||
|
-NOR2FILE: \SOFTWARE\Image ;Image File Name
|
||||||
|
-NOR2NAME: norkern ;Rename kernel to norkern
|
||||||
|
+NOR2FILE: \SOFTWARE\Image.lzm ;Image File Name
|
||||||
|
+NOR2NAME: norkern.lzm ;Rename kernel to norkern.lzm
|
||||||
|
NOR2LOAD: 00000000 ;Image Load Address
|
||||||
|
NOR2ENTRY: 00000000 ;Image Entry Point
|
||||||
|
|
||||||
|
NOR3UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
||||||
|
NOR3ADDRESS: 0x02900000 ;Image Flash Address
|
||||||
|
-NOR3FILE: \SOFTWARE\juno-r2.dtb ;Image File Name
|
||||||
|
+NOR3FILE: \SOFTWARE\XEN\juno-r2.dtb ;Image File Name
|
||||||
|
NOR3NAME: board.dtb ;Specify target filename to preserve file extension
|
||||||
|
NOR3LOAD: 00000000 ;Image Load Address
|
||||||
|
NOR3ENTRY: 00000000 ;Image Entry Point
|
||||||
|
@@ -64,8 +64,13 @@
|
||||||
|
NOR9UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
||||||
|
NOR9ADDRESS: 0x02A80000 ;Image Flash Address
|
||||||
|
NOR9NAME: uEnv.txt
|
||||||
|
-NOR9FILE: \SOFTWARE\uEnv.txt ;Image File Name
|
||||||
|
+NOR9FILE: \SOFTWARE\uenvfile ;Image File Name
|
||||||
|
NOR9LOAD: 00000000 ;Image Load Address
|
||||||
|
NOR9ENTRY: 00000000 ;Image Entry Point
|
||||||
|
|
||||||
|
-
|
||||||
|
+NOR10UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
||||||
|
+NOR10ADDRESS: 0x03000000 ;Image Flash Address
|
||||||
|
+NOR10FILE: \SOFTWARE\XEN\xen ;Image File Name
|
||||||
|
+NOR10NAME: xen
|
||||||
|
+NOR10LOAD: 00000000 ;Image Load Address
|
||||||
|
+NOR10ENTRY: 00000000 ;Image Entry Point
|
||||||
|
diff -u a/uEnv.txt b/uEnv.txt
|
||||||
|
--- a/uEnv.txt 2020-11-20 13:48:31.845078690 +0100
|
||||||
|
+++ b/uEnv.txt 2020-11-25 20:30:00.572306675 +0100
|
||||||
|
@@ -1,11 +1,16 @@
|
||||||
|
+xen_name=xen
|
||||||
|
+xen_addr=0x84000000
|
||||||
|
uenvcmd=run mybootcmd
|
||||||
|
+kernel_alt_name=norkern.lzm
|
||||||
|
+kernel_comp_addr_r=0x88080000
|
||||||
|
mybootcmd=echo Loading custom boot command; \
|
||||||
|
echo Loading kernel; \
|
||||||
|
afs load ${kernel_name} ${kernel_addr_r} ; \
|
||||||
|
-if test $? -eq 1; then echo Loading ${kernel_alt_name} instead of ${kernel_name}; afs load ${kernel_alt_name} ${kernel_addr_r}; fi; \
|
||||||
|
+if test $? -eq 1; then echo Loading ${kernel_alt_name} instead of ${kernel_name}; afs load ${kernel_alt_name} ${kernel_comp_addr_r}; lzmadec ${kernel_comp_addr_r} ${kernel_addr_r}; fi; \
|
||||||
|
echo Loading device tree; \
|
||||||
|
afs load ${fdtfile} ${fdt_addr_r}; \
|
||||||
|
if test $? -eq 1; then echo Loading ${fdt_alt_name} instead of ${fdtfile}; \
|
||||||
|
afs load ${fdt_alt_name} ${fdt_addr_r}; fi; fdt addr ${fdt_addr_r}; fdt resize; \
|
||||||
|
-booti ${kernel_addr_r} - ${fdt_addr_r};
|
||||||
|
-
|
||||||
|
+echo Loading Xen; \
|
||||||
|
+afs load ${xen_name} ${xen_addr}; \
|
||||||
|
+if test $? -eq 0; then echo Booting Xen; bootefi ${xen_addr} ${fdt_addr_r}; fi;
|
||||||
|
|
||||||
-78
@@ -1,78 +0,0 @@
|
|||||||
TITLE: Versatile Express Images Configuration File
|
|
||||||
|
|
||||||
[IMAGES]
|
|
||||||
TOTALIMAGES: 11 ;Number of Images (Max: 32)
|
|
||||||
|
|
||||||
NOR0UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
|
||||||
NOR0ADDRESS: 0x00000000 ;Image Flash Address
|
|
||||||
NOR0FILE: \SOFTWARE\fip.bin ;Image File Name
|
|
||||||
NOR0LOAD: 00000000 ;Image Load Address
|
|
||||||
NOR0ENTRY: 00000000 ;Image Entry Point
|
|
||||||
|
|
||||||
NOR1UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
|
||||||
NOR1ADDRESS: 0x03EC0000 ;Image Flash Address
|
|
||||||
NOR1FILE: \SOFTWARE\bl1.bin ;Image File Name
|
|
||||||
NOR1LOAD: 00000000 ;Image Load Address
|
|
||||||
NOR1ENTRY: 00000000 ;Image Entry Point
|
|
||||||
|
|
||||||
NOR2UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
|
||||||
NOR2ADDRESS: 0x00500000 ;Image Flash Address
|
|
||||||
NOR2FILE: \SOFTWARE\Image ;Image File Name
|
|
||||||
NOR2NAME: norkern ;Rename kernel to norkern
|
|
||||||
NOR2LOAD: 00000000 ;Image Load Address
|
|
||||||
NOR2ENTRY: 00000000 ;Image Entry Point
|
|
||||||
|
|
||||||
NOR3UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
|
||||||
NOR3ADDRESS: 0x02700000 ;Image Flash Address
|
|
||||||
NOR3FILE: \SOFTWARE\juno-xen.dtb ;Image File Name
|
|
||||||
NOR3NAME: board.dtb ;Specify target filename to preserve file extension
|
|
||||||
NOR3LOAD: 00000000 ;Image Load Address
|
|
||||||
NOR3ENTRY: 00000000 ;Image Entry Point
|
|
||||||
|
|
||||||
NOR4UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
|
||||||
NOR4ADDRESS: 0x01D00000 ;Image Flash Address
|
|
||||||
NOR4FILE: \SOFTWARE\xen ;Image File Name
|
|
||||||
NOR4NAME: xen
|
|
||||||
NOR4LOAD: 00000000 ;Image Load Address
|
|
||||||
NOR4ENTRY: 00000000 ;Image Entry Point
|
|
||||||
|
|
||||||
NOR5UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
|
||||||
NOR5ADDRESS: 0x025C0000 ;Image Flash Address
|
|
||||||
NOR5FILE: \SOFTWARE\hdlcdclk.dat ;Image File Name
|
|
||||||
NOR5LOAD: 00000000 ;Image Load Address
|
|
||||||
NOR5ENTRY: 00000000 ;Image Entry Point
|
|
||||||
|
|
||||||
NOR6UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
|
||||||
NOR6ADDRESS: 0x03E40000 ;Image Flash Address
|
|
||||||
NOR6FILE: \SOFTWARE\scp_bl1.bin ;Image File Name
|
|
||||||
NOR6LOAD: 00000000 ;Image Load Address
|
|
||||||
NOR6ENTRY: 00000000 ;Image Entry Point
|
|
||||||
|
|
||||||
NOR7UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
|
||||||
NOR7ADDRESS: 0x0BF00000 ;Image Flash Address
|
|
||||||
NOR7FILE: \SOFTWARE\startup.nsh ;Image File Name
|
|
||||||
NOR7NAME: startup.nsh
|
|
||||||
NOR7LOAD: 00000000 ;Image Load Address
|
|
||||||
NOR7ENTRY: 00000000 ;Image Entry Point
|
|
||||||
|
|
||||||
NOR8UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
|
||||||
NOR8ADDRESS: 0x0BFC0000 ;Image Flash Address
|
|
||||||
NOR8FILE: \SOFTWARE\blank.img ;Image File Name
|
|
||||||
NOR8NAME: BOOTENV
|
|
||||||
NOR8LOAD: 00000000 ;Image Load Address
|
|
||||||
NOR8ENTRY: 00000000 ;Image Entry Point
|
|
||||||
|
|
||||||
NOR9UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
|
||||||
NOR9ADDRESS: 0x02600000 ;Image Flash Address
|
|
||||||
NOR9FILE: \SOFTWARE\selftest ;Image File Name
|
|
||||||
NOR9LOAD: 00000000 ;Image Load Address
|
|
||||||
NOR9ENTRY: 00000000 ;Image Entry Point
|
|
||||||
|
|
||||||
NOR10UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
|
||||||
NOR10ADDRESS: 0x02780000 ;Image Flash Address
|
|
||||||
NOR10NAME: uEnv.txt
|
|
||||||
NOR10FILE: \SOFTWARE\uEnv.txt ;Image File Name
|
|
||||||
NOR10LOAD: 00000000 ;Image Load Address
|
|
||||||
NOR10ENTRY: 00000000 ;Image Entry Point
|
|
||||||
|
|
||||||
|
|
||||||
-78
@@ -1,78 +0,0 @@
|
|||||||
TITLE: Versatile Express Images Configuration File
|
|
||||||
|
|
||||||
[IMAGES]
|
|
||||||
TOTALIMAGES: 11 ;Number of Images (Max: 32)
|
|
||||||
|
|
||||||
NOR0UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
|
||||||
NOR0ADDRESS: 0x00000000 ;Image Flash Address
|
|
||||||
NOR0FILE: \SOFTWARE\fip.bin ;Image File Name
|
|
||||||
NOR0LOAD: 00000000 ;Image Load Address
|
|
||||||
NOR0ENTRY: 00000000 ;Image Entry Point
|
|
||||||
|
|
||||||
NOR1UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
|
||||||
NOR1ADDRESS: 0x03EC0000 ;Image Flash Address
|
|
||||||
NOR1FILE: \SOFTWARE\bl1.bin ;Image File Name
|
|
||||||
NOR1LOAD: 00000000 ;Image Load Address
|
|
||||||
NOR1ENTRY: 00000000 ;Image Entry Point
|
|
||||||
|
|
||||||
NOR2UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
|
||||||
NOR2ADDRESS: 0x00500000 ;Image Flash Address
|
|
||||||
NOR2FILE: \SOFTWARE\Image ;Image File Name
|
|
||||||
NOR2NAME: norkern ;Rename kernel to norkern
|
|
||||||
NOR2LOAD: 00000000 ;Image Load Address
|
|
||||||
NOR2ENTRY: 00000000 ;Image Entry Point
|
|
||||||
|
|
||||||
NOR3UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
|
||||||
NOR3ADDRESS: 0x02700000 ;Image Flash Address
|
|
||||||
NOR3FILE: \SOFTWARE\juno-r1-xen.dtb ;Image File Name
|
|
||||||
NOR3NAME: board.dtb ;Specify target filename to preserve file extension
|
|
||||||
NOR3LOAD: 00000000 ;Image Load Address
|
|
||||||
NOR3ENTRY: 00000000 ;Image Entry Point
|
|
||||||
|
|
||||||
NOR4UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
|
||||||
NOR4ADDRESS: 0x01D00000 ;Image Flash Address
|
|
||||||
NOR4FILE: \SOFTWARE\xen ;Image File Name
|
|
||||||
NOR4NAME: xen
|
|
||||||
NOR4LOAD: 00000000 ;Image Load Address
|
|
||||||
NOR4ENTRY: 00000000 ;Image Entry Point
|
|
||||||
|
|
||||||
NOR5UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
|
||||||
NOR5ADDRESS: 0x025C0000 ;Image Flash Address
|
|
||||||
NOR5FILE: \SOFTWARE\hdlcdclk.dat ;Image File Name
|
|
||||||
NOR5LOAD: 00000000 ;Image Load Address
|
|
||||||
NOR5ENTRY: 00000000 ;Image Entry Point
|
|
||||||
|
|
||||||
NOR6UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
|
||||||
NOR6ADDRESS: 0x03E40000 ;Image Flash Address
|
|
||||||
NOR6FILE: \SOFTWARE\scp_bl1.bin ;Image File Name
|
|
||||||
NOR6LOAD: 00000000 ;Image Load Address
|
|
||||||
NOR6ENTRY: 00000000 ;Image Entry Point
|
|
||||||
|
|
||||||
NOR7UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
|
||||||
NOR7ADDRESS: 0x0BF00000 ;Image Flash Address
|
|
||||||
NOR7FILE: \SOFTWARE\startup.nsh ;Image File Name
|
|
||||||
NOR7NAME: startup.nsh
|
|
||||||
NOR7LOAD: 00000000 ;Image Load Address
|
|
||||||
NOR7ENTRY: 00000000 ;Image Entry Point
|
|
||||||
|
|
||||||
NOR8UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
|
||||||
NOR8ADDRESS: 0x0BFC0000 ;Image Flash Address
|
|
||||||
NOR8FILE: \SOFTWARE\blank.img ;Image File Name
|
|
||||||
NOR8NAME: BOOTENV
|
|
||||||
NOR8LOAD: 00000000 ;Image Load Address
|
|
||||||
NOR8ENTRY: 00000000 ;Image Entry Point
|
|
||||||
|
|
||||||
NOR9UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
|
||||||
NOR9ADDRESS: 0x02600000 ;Image Flash Address
|
|
||||||
NOR9FILE: \SOFTWARE\selftest ;Image File Name
|
|
||||||
NOR9LOAD: 00000000 ;Image Load Address
|
|
||||||
NOR9ENTRY: 00000000 ;Image Entry Point
|
|
||||||
|
|
||||||
NOR10UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
|
||||||
NOR10ADDRESS: 0x02780000 ;Image Flash Address
|
|
||||||
NOR10NAME: uEnv.txt
|
|
||||||
NOR10FILE: \SOFTWARE\uEnv.txt ;Image File Name
|
|
||||||
NOR10LOAD: 00000000 ;Image Load Address
|
|
||||||
NOR10ENTRY: 00000000 ;Image Entry Point
|
|
||||||
|
|
||||||
|
|
||||||
-78
@@ -1,78 +0,0 @@
|
|||||||
TITLE: Versatile Express Images Configuration File
|
|
||||||
|
|
||||||
[IMAGES]
|
|
||||||
TOTALIMAGES: 11 ;Number of Images (Max: 32)
|
|
||||||
|
|
||||||
NOR0UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
|
||||||
NOR0ADDRESS: 0x00000000 ;Image Flash Address
|
|
||||||
NOR0FILE: \SOFTWARE\fip.bin ;Image File Name
|
|
||||||
NOR0LOAD: 00000000 ;Image Load Address
|
|
||||||
NOR0ENTRY: 00000000 ;Image Entry Point
|
|
||||||
|
|
||||||
NOR1UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
|
||||||
NOR1ADDRESS: 0x03EC0000 ;Image Flash Address
|
|
||||||
NOR1FILE: \SOFTWARE\bl1.bin ;Image File Name
|
|
||||||
NOR1LOAD: 00000000 ;Image Load Address
|
|
||||||
NOR1ENTRY: 00000000 ;Image Entry Point
|
|
||||||
|
|
||||||
NOR2UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
|
||||||
NOR2ADDRESS: 0x00500000 ;Image Flash Address
|
|
||||||
NOR2FILE: \SOFTWARE\Image ;Image File Name
|
|
||||||
NOR2NAME: norkern ;Rename kernel to norkern
|
|
||||||
NOR2LOAD: 00000000 ;Image Load Address
|
|
||||||
NOR2ENTRY: 00000000 ;Image Entry Point
|
|
||||||
|
|
||||||
NOR3UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
|
||||||
NOR3ADDRESS: 0x02700000 ;Image Flash Address
|
|
||||||
NOR3FILE: \SOFTWARE\juno-r2-xen.dtb ;Image File Name
|
|
||||||
NOR3NAME: board.dtb ;Specify target filename to preserve file extension
|
|
||||||
NOR3LOAD: 00000000 ;Image Load Address
|
|
||||||
NOR3ENTRY: 00000000 ;Image Entry Point
|
|
||||||
|
|
||||||
NOR4UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
|
||||||
NOR4ADDRESS: 0x01D00000 ;Image Flash Address
|
|
||||||
NOR4FILE: \SOFTWARE\xen ;Image File Name
|
|
||||||
NOR4NAME: xen
|
|
||||||
NOR4LOAD: 00000000 ;Image Load Address
|
|
||||||
NOR4ENTRY: 00000000 ;Image Entry Point
|
|
||||||
|
|
||||||
NOR5UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
|
||||||
NOR5ADDRESS: 0x025C0000 ;Image Flash Address
|
|
||||||
NOR5FILE: \SOFTWARE\hdlcdclk.dat ;Image File Name
|
|
||||||
NOR5LOAD: 00000000 ;Image Load Address
|
|
||||||
NOR5ENTRY: 00000000 ;Image Entry Point
|
|
||||||
|
|
||||||
NOR6UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
|
||||||
NOR6ADDRESS: 0x03E40000 ;Image Flash Address
|
|
||||||
NOR6FILE: \SOFTWARE\scp_bl1.bin ;Image File Name
|
|
||||||
NOR6LOAD: 00000000 ;Image Load Address
|
|
||||||
NOR6ENTRY: 00000000 ;Image Entry Point
|
|
||||||
|
|
||||||
NOR7UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
|
||||||
NOR7ADDRESS: 0x0BF00000 ;Image Flash Address
|
|
||||||
NOR7FILE: \SOFTWARE\startup.nsh ;Image File Name
|
|
||||||
NOR7NAME: startup.nsh
|
|
||||||
NOR7LOAD: 00000000 ;Image Load Address
|
|
||||||
NOR7ENTRY: 00000000 ;Image Entry Point
|
|
||||||
|
|
||||||
NOR8UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
|
||||||
NOR8ADDRESS: 0x0BFC0000 ;Image Flash Address
|
|
||||||
NOR8FILE: \SOFTWARE\blank.img ;Image File Name
|
|
||||||
NOR8NAME: BOOTENV
|
|
||||||
NOR8LOAD: 00000000 ;Image Load Address
|
|
||||||
NOR8ENTRY: 00000000 ;Image Entry Point
|
|
||||||
|
|
||||||
NOR9UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
|
||||||
NOR9ADDRESS: 0x02600000 ;Image Flash Address
|
|
||||||
NOR9FILE: \SOFTWARE\selftest ;Image File Name
|
|
||||||
NOR9LOAD: 00000000 ;Image Load Address
|
|
||||||
NOR9ENTRY: 00000000 ;Image Entry Point
|
|
||||||
|
|
||||||
NOR10UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
|
||||||
NOR10ADDRESS: 0x02780000 ;Image Flash Address
|
|
||||||
NOR10NAME: uEnv.txt
|
|
||||||
NOR10FILE: \SOFTWARE\uEnv.txt ;Image File Name
|
|
||||||
NOR10LOAD: 00000000 ;Image Load Address
|
|
||||||
NOR10ENTRY: 00000000 ;Image Entry Point
|
|
||||||
|
|
||||||
|
|
||||||
-15
@@ -1,15 +0,0 @@
|
|||||||
xen_name=xen
|
|
||||||
xen_addr=0x84000000
|
|
||||||
uenvcmd=run mybootcmd
|
|
||||||
mybootcmd=echo Loading custom boot command; \
|
|
||||||
echo Loading kernel; \
|
|
||||||
afs load ${kernel_name} ${kernel_addr} ; \
|
|
||||||
if test $? -eq 1; then echo Loading ${kernel_alt_name} instead of ${kernel_name}; afs load ${kernel_alt_name} ${kernel_addr}; fi; \
|
|
||||||
echo Loading device tree; \
|
|
||||||
afs load ${fdtfile} ${fdt_addr}; \
|
|
||||||
if test $? -eq 1; then echo Loading ${fdt_alt_name} instead of ${fdtfile}; \
|
|
||||||
afs load ${fdt_alt_name} ${fdt_addr}; fi; fdt addr ${fdt_addr}; fdt resize; \
|
|
||||||
echo Loading Xen; \
|
|
||||||
afs load ${xen_name} ${xen_addr}; \
|
|
||||||
if test $? -eq 0; then echo Booting Xen; bootefi ${xen_addr} ${fdt_addr}; fi;
|
|
||||||
|
|
||||||
+6
@@ -0,0 +1,6 @@
|
|||||||
|
define KMACHINE n1sdp
|
||||||
|
define KTYPE preempt-rt
|
||||||
|
define KARCH arm64
|
||||||
|
|
||||||
|
kconf non-hardware ktypes/developer/developer.cfg
|
||||||
|
kconf non-hardware ktypes/preempt-rt/preempt-rt.cfg
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
# Yocto kernel-cache sets CONFIG_NLS_CODEPAGE_437=m for LINUX_KERNEL_TYPR=preempt-rt
|
||||||
|
CONFIG_NLS_CODEPAGE_437=y
|
||||||
|
# Yocto kernel-cache sets CONFIG_NLS_ISO8859_1=m for LINUX_KERNEL_TYPR=preempt-rt
|
||||||
|
CONFIG_NLS_ISO8859_1=y
|
||||||
|
|
||||||
|
# Set the timer interrupt run at 1000 Hz to have a fast response
|
||||||
|
CONFIG_HZ_1000=y
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
define KFEATURE_DESCRIPTION "Extra kernel configs when building with PREEMPT_RT"
|
||||||
|
|
||||||
|
kconf non-hardware preempt-rt-extras.cfg
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
# short-description: Create a disk image
|
||||||
|
# long-description: Creates a partitioned disk image that the user
|
||||||
|
# can directly dd to boot media.
|
||||||
|
|
||||||
|
# For Juno first partition is rootfs normally populated as /dev/sda1
|
||||||
|
part / --source rootfs --ondisk sda --fstype=ext4 --label root --align 1024
|
||||||
|
|
||||||
|
# Second partition to accomodate guests images normally populated as /dev/sda2 (used by XENGUEST_MANAGER_VOLUME_DEVICE)
|
||||||
|
part --label guests --source empty --ondisk sda --size="${GUEST_PART_SIZE}${GUEST_PART_SIZE_UNIT}" --system-id 8e --align 1024
|
||||||
|
|
||||||
|
# Third partition is user defined entry normally populated as /dev/sda3
|
||||||
|
${AUTONOMY_HOST_EXTRA_PARTITION}
|
||||||
|
|
||||||
|
bootloader --ptable msdos
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
# can directly dd to boot media. Uses a custom grub.cfg file to configure the boot.
|
# can directly dd to boot media. Uses a custom grub.cfg file to configure the boot.
|
||||||
|
|
||||||
# First boot partition normally populated as /dev/sda1
|
# First boot partition normally populated as /dev/sda1
|
||||||
part /boot --source bootimg-efi --sourceparams="loader=grub-efi" --ondisk sda --label msdos --active --align 1024
|
part /boot --source bootimg-efi --sourceparams="loader=grub-efi" --ondisk sda --size="${BOOT_PART_SIZE}${BOOT_PART_SIZE_UNIT}" --label msdos --active --align 1024
|
||||||
|
|
||||||
# Second rootfs partition normally populated as /dev/sda2
|
# Second rootfs partition normally populated as /dev/sda2
|
||||||
part / --source rootfs --ondisk sda --fstype=ext4 --label root --align 1024
|
part / --source rootfs --ondisk sda --fstype=ext4 --label root --align 1024
|
||||||
@@ -11,4 +11,7 @@ part / --source rootfs --ondisk sda --fstype=ext4 --label root --align 1024
|
|||||||
# Third partition to accomodate guests images normally populated as /dev/sda3 (used by XENGUEST_MANAGER_VOLUME_DEVICE)
|
# Third partition to accomodate guests images normally populated as /dev/sda3 (used by XENGUEST_MANAGER_VOLUME_DEVICE)
|
||||||
part --label guests --source empty --ondisk sda --size="${GUEST_PART_SIZE}${GUEST_PART_SIZE_UNIT}" --system-id 8e --align 1024
|
part --label guests --source empty --ondisk sda --size="${GUEST_PART_SIZE}${GUEST_PART_SIZE_UNIT}" --system-id 8e --align 1024
|
||||||
|
|
||||||
|
# Fourth partition is user defined entry normally populated as /dev/sda4
|
||||||
|
${AUTONOMY_HOST_EXTRA_PARTITION}
|
||||||
|
|
||||||
bootloader --ptable msdos --configfile="${GRUB_CFG_FILE}"
|
bootloader --ptable msdos --configfile="${GRUB_CFG_FILE}"
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
set term="vt100"
|
||||||
|
set default="3"
|
||||||
|
set timeout="5"
|
||||||
|
|
||||||
|
source $prefix/arm-autonomy-n1sdp-grub.cfg
|
||||||
|
|
||||||
|
menuentry 'N1SDP PREEMPT_RT ACPI Boot' {
|
||||||
|
linux /Image-preempt-rt $kernel_cmdline acpi=force
|
||||||
|
}
|
||||||
|
|
||||||
|
menuentry 'N1SDP PREEMPT_RT Single-Chip Boot (Device Tree)' {
|
||||||
|
devicetree /n1sdp-single-chip.dtb
|
||||||
|
linux /Image-preempt-rt $kernel_cmdline
|
||||||
|
}
|
||||||
|
|
||||||
|
menuentry 'N1SDP PREEMPT_RT Multi-Chip Boot (Device Tree)' {
|
||||||
|
devicetree /n1sdp-multi-chip.dtb
|
||||||
|
linux /Image-preempt-rt $kernel_cmdline
|
||||||
|
}
|
||||||
|
|
||||||
|
menuentry 'N1SDP PREEMPT_RT Arm Autonomy (Xen) Single-Chip Boot (Device Tree)' {
|
||||||
|
# no_argumants under here is a workaround for a bug
|
||||||
|
# also any kernel or dom0 cmdline arguments has to be passed via dtb
|
||||||
|
# because any arguments put here will be ignored by xen
|
||||||
|
xen_hypervisor /xen.efi no_arguments=use_dtb_for_xen_or_kernel_cmdline
|
||||||
|
xen_module /Image-preempt-rt
|
||||||
|
devicetree /n1sdp-single-chip-xen.dtb
|
||||||
|
}
|
||||||
-1
@@ -1 +0,0 @@
|
|||||||
XENGUEST_NETWORK_BRIDGE_MEMBERS_gem5-arm64 ?= "eth0"
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
FILESEXTRAPATHS_prepend_gem5-arm64 := "${THISDIR}:"
|
|
||||||
|
|
||||||
#
|
|
||||||
# arm-autonomy kmeta extra
|
|
||||||
#
|
|
||||||
SRC_URI_append_gem5-arm64 = " file://arm-autonomy-kmeta-extra-gem5;type=kmeta;name=arm-autonomy-kmeta-extra-gem5;destsuffix=arm-autonomy-kmeta-extra-gem5"
|
|
||||||
|
|
||||||
# We need to turn off SVE support in the Linux kernel otherwise Xen is stopping
|
|
||||||
# Linux kernel with a coredump while trying to access XEN bit of CPACR1 core
|
|
||||||
# register.
|
|
||||||
LINUX_ARM_AUTONOMY_DISABLE_ARM64_SVE_gem5-arm64 = "${@bb.utils.contains_any('DISTRO_FEATURES', \
|
|
||||||
'arm-autonomy-host arm-autonomy-guest', \
|
|
||||||
' features/arm-autonomy/disable-arm64-sve.scc','',d)}"
|
|
||||||
|
|
||||||
KERNEL_FEATURES_append_gem5-arm64 = "${LINUX_ARM_AUTONOMY_DISABLE_ARM64_SVE}"
|
|
||||||
@@ -1 +1 @@
|
|||||||
GRUB_BUILDIN += "${@bb.utils.contains('DISTRO_FEATURES', 'xen', 'xen_boot', '', d)}"
|
GRUB_BUILDIN += "${@bb.utils.contains('DISTRO_FEATURES', 'arm-autonomy-host', 'xen_boot', '', d)}"
|
||||||
|
|||||||
+16
@@ -0,0 +1,16 @@
|
|||||||
|
Upstream Status: Inappropriate [meta-arm-autonomy specifc u-boot config]
|
||||||
|
Signed-off-by: Nathan Dunne <nathan.dunne@arm.com>
|
||||||
|
|
||||||
|
diff --git a/include/configs/vexpress_aemv8a.h b/include/configs/vexpress_aemv8a.h
|
||||||
|
index e63c335f85..9ee050a4a6 100644
|
||||||
|
--- a/include/configs/vexpress_aemv8a.h
|
||||||
|
+++ b/include/configs/vexpress_aemv8a.h
|
||||||
|
@@ -162,7 +162,7 @@
|
||||||
|
#elif CONFIG_TARGET_VEXPRESS64_BASE_FVP
|
||||||
|
#define CONFIG_EXTRA_ENV_SETTINGS \
|
||||||
|
"kernel_name=Image\0" \
|
||||||
|
- "kernel_addr=0x80080000\0" \
|
||||||
|
+ "kernel_addr=0x84000000\0" \
|
||||||
|
"initrd_name=ramdisk.img\0" \
|
||||||
|
"initrd_addr=0x88000000\0" \
|
||||||
|
"fdtfile=devtree.dtb\0" \
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# Machine specific u-boot
|
||||||
|
|
||||||
|
FILESEXTRAPATHS_prepend := "${THISDIR}/${BP}:"
|
||||||
|
|
||||||
|
#
|
||||||
|
# FVP BASE
|
||||||
|
#
|
||||||
|
|
||||||
|
SRC_URI_append_fvp-base = "${@bb.utils.contains('DISTRO_FEATURES', 'arm-autonomy-host', ' file://xen_u-boot_kernel_addr.patch', '', d)}"
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
For now, arm-autonomy-host-image-minimal installs the dhcp-server package and
|
|
||||||
the dchp-4.4.2 depends on bind 9.11 which recipe was copied from oe-core tree
|
|
||||||
https://git.openembedded.org/openembedded-core/tree/meta/recipes-connectivity/bind?id=087e4fafeef82cfd3d71402d6b200fe831f48697
|
|
||||||
since it got removed in the https://git.openembedded.org/openembedded-core/commit/meta/recipes-connectivity?id=29949cd7cf3a660fb3bcf251f5127a4cdb2804ec patch.
|
|
||||||
-27
@@ -1,27 +0,0 @@
|
|||||||
From 31dde3562f287429eea94b77250d184818b49063 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Chen Qi <Qi.Chen@windriver.com>
|
|
||||||
Date: Mon, 15 Oct 2018 16:55:09 +0800
|
|
||||||
Subject: [PATCH] avoid start failure with bind user
|
|
||||||
|
|
||||||
Upstream-Status: Pending
|
|
||||||
|
|
||||||
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
|
|
||||||
---
|
|
||||||
init.d | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/init.d b/init.d
|
|
||||||
index b2eec60..6e03936 100644
|
|
||||||
--- a/init.d
|
|
||||||
+++ b/init.d
|
|
||||||
@@ -57,6 +57,7 @@ case "$1" in
|
|
||||||
modprobe capability >/dev/null 2>&1 || true
|
|
||||||
if [ ! -f /etc/bind/rndc.key ]; then
|
|
||||||
/usr/sbin/rndc-confgen -a -b 512 -r /dev/urandom
|
|
||||||
+ chown root:bind /etc/bind/rndc.key >/dev/null 2>&1 || true
|
|
||||||
chmod 0640 /etc/bind/rndc.key
|
|
||||||
fi
|
|
||||||
if [ -f /var/run/named/named.pid ]; then
|
|
||||||
--
|
|
||||||
2.7.4
|
|
||||||
|
|
||||||
-30
@@ -1,30 +0,0 @@
|
|||||||
From 2325a92f1896a2a7f586611686801b41fbc91b50 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Hongxu Jia <hongxu.jia@windriver.com>
|
|
||||||
Date: Mon, 27 Aug 2018 15:00:51 +0800
|
|
||||||
Subject: [PATCH] configure.in: remove useless `-L$use_openssl/lib'
|
|
||||||
|
|
||||||
Since `--with-openssl=${STAGING_DIR_HOST}${prefix}' is used in bind recipe,
|
|
||||||
the `-L$use_openssl/lib' has a hardcoded suffix, removing it is harmless
|
|
||||||
and helpful for clean up host build path in isc-config.sh
|
|
||||||
|
|
||||||
Upstream-Status: Inappropriate [oe-core specific]
|
|
||||||
|
|
||||||
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
|
|
||||||
|
|
||||||
---
|
|
||||||
configure.ac | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/configure.ac b/configure.ac
|
|
||||||
index e85a5c6..2bbfc58 100644
|
|
||||||
--- a/configure.ac
|
|
||||||
+++ b/configure.ac
|
|
||||||
@@ -1631,7 +1631,7 @@ If you don't want OpenSSL, use --without-openssl])
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
- DST_OPENSSL_LIBS="-L$use_openssl/lib -lcrypto"
|
|
||||||
+ DST_OPENSSL_LIBS="-lcrypto"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
-34
@@ -1,34 +0,0 @@
|
|||||||
From a3af4a405baf5ff582e82aaba392dd9667d94bdc Mon Sep 17 00:00:00 2001
|
|
||||||
From: Hongxu Jia <hongxu.jia@windriver.com>
|
|
||||||
Date: Mon, 27 Aug 2018 21:24:20 +0800
|
|
||||||
Subject: [PATCH] `named/lwresd -V' and start log hide build options
|
|
||||||
|
|
||||||
The build options expose build path directories, so hide them.
|
|
||||||
[snip]
|
|
||||||
$ named -V
|
|
||||||
|built by make with *** (options are hidden)
|
|
||||||
[snip]
|
|
||||||
|
|
||||||
Upstream-Status: Inappropriate [oe-core specific]
|
|
||||||
|
|
||||||
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
|
|
||||||
---
|
|
||||||
bin/named/include/named/globals.h | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/bin/named/include/named/globals.h b/bin/named/include/named/globals.h
|
|
||||||
index ba3457e..7741da7 100644
|
|
||||||
--- a/bin/named/include/named/globals.h
|
|
||||||
+++ b/bin/named/include/named/globals.h
|
|
||||||
@@ -68,7 +68,7 @@ EXTERN const char * ns_g_version INIT(VERSION);
|
|
||||||
EXTERN const char * ns_g_product INIT(PRODUCT);
|
|
||||||
EXTERN const char * ns_g_description INIT(DESCRIPTION);
|
|
||||||
EXTERN const char * ns_g_srcid INIT(SRCID);
|
|
||||||
-EXTERN const char * ns_g_configargs INIT(CONFIGARGS);
|
|
||||||
+EXTERN const char * ns_g_configargs INIT("*** (options are hidden)");
|
|
||||||
EXTERN const char * ns_g_builder INIT(BUILDER);
|
|
||||||
EXTERN in_port_t ns_g_port INIT(0);
|
|
||||||
EXTERN isc_dscp_t ns_g_dscp INIT(-1);
|
|
||||||
--
|
|
||||||
2.7.4
|
|
||||||
|
|
||||||
-47
@@ -1,47 +0,0 @@
|
|||||||
From edda20fb5a6e88548f85e39d34d6c074306e15bc Mon Sep 17 00:00:00 2001
|
|
||||||
From: Paul Gortmaker <paul.gortmaker@windriver.com>
|
|
||||||
Date: Tue, 9 Jun 2015 11:22:00 -0400
|
|
||||||
Subject: [PATCH] bind: ensure searching for json headers searches sysroot
|
|
||||||
|
|
||||||
Bind can fail configure by detecting headers w/o libs[1], or
|
|
||||||
it can fail the host contamination check as per below:
|
|
||||||
|
|
||||||
ERROR: This autoconf log indicates errors, it looked at host include and/or library paths while determining system capabilities.
|
|
||||||
Rerun configure task after fixing this. The path was 'build/tmp/work/core2-64-poky-linux/bind/9.10.2-r1/build'
|
|
||||||
ERROR: Function failed: do_qa_configure
|
|
||||||
ERROR: Logfile of failure stored in: build/tmp/work/core2-64-poky-linux/bind/9.10.2-r1/temp/log.do_configure.5242
|
|
||||||
ERROR: Task 5 (meta/recipes-connectivity/bind/bind_9.10.2.bb, do_configure) failed with exit code '1'
|
|
||||||
NOTE: Tasks Summary: Attempted 773 tasks of which 768 didn't need to be rerun and 1 failed.
|
|
||||||
No currently running tasks (773 of 781)
|
|
||||||
|
|
||||||
Summary: 1 task failed:
|
|
||||||
/meta/recipes-connectivity/bind/bind_9.10.2.bb, do_configure
|
|
||||||
|
|
||||||
One way to fix it would be to unconditionally disable json in bind
|
|
||||||
configure[2] but here we fix it by using the path to where we would
|
|
||||||
put the header if we had json in the sysroot, in case someone wants
|
|
||||||
to make use of the combination some day.
|
|
||||||
|
|
||||||
[1] https://trac.macports.org/ticket/45305
|
|
||||||
[2] https://trac.macports.org/changeset/126406
|
|
||||||
|
|
||||||
Upstream-Status: Inappropriate [OE Specific]
|
|
||||||
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
|
|
||||||
|
|
||||||
---
|
|
||||||
configure.ac | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/configure.ac b/configure.ac
|
|
||||||
index 17392fd..e85a5c6 100644
|
|
||||||
--- a/configure.ac
|
|
||||||
+++ b/configure.ac
|
|
||||||
@@ -2449,7 +2449,7 @@ case "$use_libjson" in
|
|
||||||
libjson_libs=""
|
|
||||||
;;
|
|
||||||
auto|yes)
|
|
||||||
- for d in /usr /usr/local /opt/local
|
|
||||||
+ for d in "${STAGING_INCDIR}"
|
|
||||||
do
|
|
||||||
if test -f "${d}/include/json/json.h"
|
|
||||||
then
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
# startup options for the server
|
|
||||||
OPTIONS="-u bind"
|
|
||||||
@@ -1,330 +0,0 @@
|
|||||||
Upstream-Status: Inappropriate [configuration]
|
|
||||||
|
|
||||||
the patch is imported from openembedded project
|
|
||||||
|
|
||||||
11/30/2010 - Qing He <qing.he@intel.com>
|
|
||||||
|
|
||||||
diff -urN bind-9.3.1.orig/conf/db.0 bind-9.3.1/conf/db.0
|
|
||||||
--- bind-9.3.1.orig/conf/db.0 1970-01-01 01:00:00.000000000 +0100
|
|
||||||
+++ bind-9.3.1/conf/db.0 2005-07-10 22:14:00.000000000 +0200
|
|
||||||
@@ -0,0 +1,12 @@
|
|
||||||
+;
|
|
||||||
+; BIND reverse data file for broadcast zone
|
|
||||||
+;
|
|
||||||
+$TTL 604800
|
|
||||||
+@ IN SOA localhost. root.localhost. (
|
|
||||||
+ 1 ; Serial
|
|
||||||
+ 604800 ; Refresh
|
|
||||||
+ 86400 ; Retry
|
|
||||||
+ 2419200 ; Expire
|
|
||||||
+ 604800 ) ; Negative Cache TTL
|
|
||||||
+;
|
|
||||||
+@ IN NS localhost.
|
|
||||||
diff -urN bind-9.3.1.orig/conf/db.127 bind-9.3.1/conf/db.127
|
|
||||||
--- bind-9.3.1.orig/conf/db.127 1970-01-01 01:00:00.000000000 +0100
|
|
||||||
+++ bind-9.3.1/conf/db.127 2005-07-10 22:14:00.000000000 +0200
|
|
||||||
@@ -0,0 +1,13 @@
|
|
||||||
+;
|
|
||||||
+; BIND reverse data file for local loopback interface
|
|
||||||
+;
|
|
||||||
+$TTL 604800
|
|
||||||
+@ IN SOA localhost. root.localhost. (
|
|
||||||
+ 1 ; Serial
|
|
||||||
+ 604800 ; Refresh
|
|
||||||
+ 86400 ; Retry
|
|
||||||
+ 2419200 ; Expire
|
|
||||||
+ 604800 ) ; Negative Cache TTL
|
|
||||||
+;
|
|
||||||
+@ IN NS localhost.
|
|
||||||
+1.0.0 IN PTR localhost.
|
|
||||||
diff -urN bind-9.3.1.orig/conf/db.empty bind-9.3.1/conf/db.empty
|
|
||||||
--- bind-9.3.1.orig/conf/db.empty 1970-01-01 01:00:00.000000000 +0100
|
|
||||||
+++ bind-9.3.1/conf/db.empty 2005-07-10 22:14:00.000000000 +0200
|
|
||||||
@@ -0,0 +1,14 @@
|
|
||||||
+; BIND reverse data file for empty rfc1918 zone
|
|
||||||
+;
|
|
||||||
+; DO NOT EDIT THIS FILE - it is used for multiple zones.
|
|
||||||
+; Instead, copy it, edit named.conf, and use that copy.
|
|
||||||
+;
|
|
||||||
+$TTL 86400
|
|
||||||
+@ IN SOA localhost. root.localhost. (
|
|
||||||
+ 1 ; Serial
|
|
||||||
+ 604800 ; Refresh
|
|
||||||
+ 86400 ; Retry
|
|
||||||
+ 2419200 ; Expire
|
|
||||||
+ 86400 ) ; Negative Cache TTL
|
|
||||||
+;
|
|
||||||
+@ IN NS localhost.
|
|
||||||
diff -urN bind-9.3.1.orig/conf/db.255 bind-9.3.1/conf/db.255
|
|
||||||
--- bind-9.3.1.orig/conf/db.255 1970-01-01 01:00:00.000000000 +0100
|
|
||||||
+++ bind-9.3.1/conf/db.255 2005-07-10 22:14:00.000000000 +0200
|
|
||||||
@@ -0,0 +1,12 @@
|
|
||||||
+;
|
|
||||||
+; BIND reserve data file for broadcast zone
|
|
||||||
+;
|
|
||||||
+$TTL 604800
|
|
||||||
+@ IN SOA localhost. root.localhost. (
|
|
||||||
+ 1 ; Serial
|
|
||||||
+ 604800 ; Refresh
|
|
||||||
+ 86400 ; Retry
|
|
||||||
+ 2419200 ; Expire
|
|
||||||
+ 604800 ) ; Negative Cache TTL
|
|
||||||
+;
|
|
||||||
+@ IN NS localhost.
|
|
||||||
diff -urN bind-9.3.1.orig/conf/db.local bind-9.3.1/conf/db.local
|
|
||||||
--- bind-9.3.1.orig/conf/db.local 1970-01-01 01:00:00.000000000 +0100
|
|
||||||
+++ bind-9.3.1/conf/db.local 2005-07-10 22:14:00.000000000 +0200
|
|
||||||
@@ -0,0 +1,13 @@
|
|
||||||
+;
|
|
||||||
+; BIND data file for local loopback interface
|
|
||||||
+;
|
|
||||||
+$TTL 604800
|
|
||||||
+@ IN SOA localhost. root.localhost. (
|
|
||||||
+ 1 ; Serial
|
|
||||||
+ 604800 ; Refresh
|
|
||||||
+ 86400 ; Retry
|
|
||||||
+ 2419200 ; Expire
|
|
||||||
+ 604800 ) ; Negative Cache TTL
|
|
||||||
+;
|
|
||||||
+@ IN NS localhost.
|
|
||||||
+@ IN A 127.0.0.1
|
|
||||||
diff -urN bind-9.3.1.orig/conf/db.root bind-9.3.1/conf/db.root
|
|
||||||
--- bind-9.3.1.orig/conf/db.root 1970-01-01 01:00:00.000000000 +0100
|
|
||||||
+++ bind-9.3.1/conf/db.root 2005-07-10 22:14:00.000000000 +0200
|
|
||||||
@@ -0,0 +1,45 @@
|
|
||||||
+
|
|
||||||
+; <<>> DiG 9.2.3 <<>> ns . @a.root-servers.net.
|
|
||||||
+;; global options: printcmd
|
|
||||||
+;; Got answer:
|
|
||||||
+;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18944
|
|
||||||
+;; flags: qr aa rd; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 13
|
|
||||||
+
|
|
||||||
+;; QUESTION SECTION:
|
|
||||||
+;. IN NS
|
|
||||||
+
|
|
||||||
+;; ANSWER SECTION:
|
|
||||||
+. 518400 IN NS A.ROOT-SERVERS.NET.
|
|
||||||
+. 518400 IN NS B.ROOT-SERVERS.NET.
|
|
||||||
+. 518400 IN NS C.ROOT-SERVERS.NET.
|
|
||||||
+. 518400 IN NS D.ROOT-SERVERS.NET.
|
|
||||||
+. 518400 IN NS E.ROOT-SERVERS.NET.
|
|
||||||
+. 518400 IN NS F.ROOT-SERVERS.NET.
|
|
||||||
+. 518400 IN NS G.ROOT-SERVERS.NET.
|
|
||||||
+. 518400 IN NS H.ROOT-SERVERS.NET.
|
|
||||||
+. 518400 IN NS I.ROOT-SERVERS.NET.
|
|
||||||
+. 518400 IN NS J.ROOT-SERVERS.NET.
|
|
||||||
+. 518400 IN NS K.ROOT-SERVERS.NET.
|
|
||||||
+. 518400 IN NS L.ROOT-SERVERS.NET.
|
|
||||||
+. 518400 IN NS M.ROOT-SERVERS.NET.
|
|
||||||
+
|
|
||||||
+;; ADDITIONAL SECTION:
|
|
||||||
+A.ROOT-SERVERS.NET. 3600000 IN A 198.41.0.4
|
|
||||||
+B.ROOT-SERVERS.NET. 3600000 IN A 192.228.79.201
|
|
||||||
+C.ROOT-SERVERS.NET. 3600000 IN A 192.33.4.12
|
|
||||||
+D.ROOT-SERVERS.NET. 3600000 IN A 128.8.10.90
|
|
||||||
+E.ROOT-SERVERS.NET. 3600000 IN A 192.203.230.10
|
|
||||||
+F.ROOT-SERVERS.NET. 3600000 IN A 192.5.5.241
|
|
||||||
+G.ROOT-SERVERS.NET. 3600000 IN A 192.112.36.4
|
|
||||||
+H.ROOT-SERVERS.NET. 3600000 IN A 128.63.2.53
|
|
||||||
+I.ROOT-SERVERS.NET. 3600000 IN A 192.36.148.17
|
|
||||||
+J.ROOT-SERVERS.NET. 3600000 IN A 192.58.128.30
|
|
||||||
+K.ROOT-SERVERS.NET. 3600000 IN A 193.0.14.129
|
|
||||||
+L.ROOT-SERVERS.NET. 3600000 IN A 198.32.64.12
|
|
||||||
+M.ROOT-SERVERS.NET. 3600000 IN A 202.12.27.33
|
|
||||||
+
|
|
||||||
+;; Query time: 81 msec
|
|
||||||
+;; SERVER: 198.41.0.4#53(a.root-servers.net.)
|
|
||||||
+;; WHEN: Sun Feb 1 11:27:14 2004
|
|
||||||
+;; MSG SIZE rcvd: 436
|
|
||||||
+
|
|
||||||
diff -urN bind-9.3.1.orig/conf/named.conf bind-9.3.1/conf/named.conf
|
|
||||||
--- bind-9.3.1.orig/conf/named.conf 1970-01-01 01:00:00.000000000 +0100
|
|
||||||
+++ bind-9.3.1/conf/named.conf 2005-07-10 22:33:46.000000000 +0200
|
|
||||||
@@ -0,0 +1,49 @@
|
|
||||||
+// This is the primary configuration file for the BIND DNS server named.
|
|
||||||
+//
|
|
||||||
+// If you are just adding zones, please do that in /etc/bind/named.conf.local
|
|
||||||
+
|
|
||||||
+include "/etc/bind/named.conf.options";
|
|
||||||
+
|
|
||||||
+// prime the server with knowledge of the root servers
|
|
||||||
+zone "." {
|
|
||||||
+ type hint;
|
|
||||||
+ file "/etc/bind/db.root";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+// be authoritative for the localhost forward and reverse zones, and for
|
|
||||||
+// broadcast zones as per RFC 1912
|
|
||||||
+
|
|
||||||
+zone "localhost" {
|
|
||||||
+ type master;
|
|
||||||
+ file "/etc/bind/db.local";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+zone "127.in-addr.arpa" {
|
|
||||||
+ type master;
|
|
||||||
+ file "/etc/bind/db.127";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+zone "0.in-addr.arpa" {
|
|
||||||
+ type master;
|
|
||||||
+ file "/etc/bind/db.0";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+zone "255.in-addr.arpa" {
|
|
||||||
+ type master;
|
|
||||||
+ file "/etc/bind/db.255";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+// zone "com" { type delegation-only; };
|
|
||||||
+// zone "net" { type delegation-only; };
|
|
||||||
+
|
|
||||||
+// From the release notes:
|
|
||||||
+// Because many of our users are uncomfortable receiving undelegated answers
|
|
||||||
+// from root or top level domains, other than a few for whom that behaviour
|
|
||||||
+// has been trusted and expected for quite some length of time, we have now
|
|
||||||
+// introduced the "root-delegations-only" feature which applies delegation-only
|
|
||||||
+// logic to all top level domains, and to the root domain. An exception list
|
|
||||||
+// should be specified, including "MUSEUM" and "DE", and any other top level
|
|
||||||
+// domains from whom undelegated responses are expected and trusted.
|
|
||||||
+// root-delegation-only exclude { "DE"; "MUSEUM"; };
|
|
||||||
+
|
|
||||||
+include "/etc/bind/named.conf.local";
|
|
||||||
diff -urN bind-9.3.1.orig/conf/named.conf.local bind-9.3.1/conf/named.conf.local
|
|
||||||
--- bind-9.3.1.orig/conf/named.conf.local 1970-01-01 01:00:00.000000000 +0100
|
|
||||||
+++ bind-9.3.1/conf/named.conf.local 2005-07-10 22:14:06.000000000 +0200
|
|
||||||
@@ -0,0 +1,8 @@
|
|
||||||
+//
|
|
||||||
+// Do any local configuration here
|
|
||||||
+//
|
|
||||||
+
|
|
||||||
+// Consider adding the 1918 zones here, if they are not used in your
|
|
||||||
+// organization
|
|
||||||
+//include "/etc/bind/zones.rfc1918";
|
|
||||||
+
|
|
||||||
diff -urN bind-9.3.1.orig/conf/named.conf.options bind-9.3.1/conf/named.conf.options
|
|
||||||
--- bind-9.3.1.orig/conf/named.conf.options 1970-01-01 01:00:00.000000000 +0100
|
|
||||||
+++ bind-9.3.1/conf/named.conf.options 2005-07-10 22:14:06.000000000 +0200
|
|
||||||
@@ -0,0 +1,24 @@
|
|
||||||
+options {
|
|
||||||
+ directory "/var/cache/bind";
|
|
||||||
+
|
|
||||||
+ // If there is a firewall between you and nameservers you want
|
|
||||||
+ // to talk to, you might need to uncomment the query-source
|
|
||||||
+ // directive below. Previous versions of BIND always asked
|
|
||||||
+ // questions using port 53, but BIND 8.1 and later use an unprivileged
|
|
||||||
+ // port by default.
|
|
||||||
+
|
|
||||||
+ // query-source address * port 53;
|
|
||||||
+
|
|
||||||
+ // If your ISP provided one or more IP addresses for stable
|
|
||||||
+ // nameservers, you probably want to use them as forwarders.
|
|
||||||
+ // Uncomment the following block, and insert the addresses replacing
|
|
||||||
+ // the all-0's placeholder.
|
|
||||||
+
|
|
||||||
+ // forwarders {
|
|
||||||
+ // 0.0.0.0;
|
|
||||||
+ // };
|
|
||||||
+
|
|
||||||
+ auth-nxdomain no; # conform to RFC1035
|
|
||||||
+
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
diff -urN bind-9.3.1.orig/conf/zones.rfc1918 bind-9.3.1/conf/zones.rfc1918
|
|
||||||
--- bind-9.3.1.orig/conf/zones.rfc1918 1970-01-01 01:00:00.000000000 +0100
|
|
||||||
+++ bind-9.3.1/conf/zones.rfc1918 2005-07-10 22:14:10.000000000 +0200
|
|
||||||
@@ -0,0 +1,20 @@
|
|
||||||
+zone "10.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
|
|
||||||
+
|
|
||||||
+zone "16.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
|
|
||||||
+zone "17.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
|
|
||||||
+zone "18.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
|
|
||||||
+zone "19.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
|
|
||||||
+zone "20.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
|
|
||||||
+zone "21.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
|
|
||||||
+zone "22.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
|
|
||||||
+zone "23.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
|
|
||||||
+zone "24.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
|
|
||||||
+zone "25.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
|
|
||||||
+zone "26.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
|
|
||||||
+zone "27.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
|
|
||||||
+zone "28.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
|
|
||||||
+zone "29.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
|
|
||||||
+zone "30.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
|
|
||||||
+zone "31.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
|
|
||||||
+
|
|
||||||
+zone "168.192.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
|
|
||||||
diff -urN bind-9.3.1.orig/init.d bind-9.3.1/init.d
|
|
||||||
--- bind-9.3.1.orig/init.d 1970-01-01 01:00:00.000000000 +0100
|
|
||||||
+++ bind-9.3.1/init.d 2005-07-10 23:09:58.000000000 +0200
|
|
||||||
@@ -0,0 +1,70 @@
|
|
||||||
+#!/bin/sh
|
|
||||||
+
|
|
||||||
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
|
||||||
+
|
|
||||||
+# for a chrooted server: "-u bind -t /var/lib/named"
|
|
||||||
+# Don't modify this line, change or create /etc/default/bind9.
|
|
||||||
+OPTIONS=""
|
|
||||||
+
|
|
||||||
+test -f /etc/default/bind9 && . /etc/default/bind9
|
|
||||||
+
|
|
||||||
+test -x /usr/sbin/rndc || exit 0
|
|
||||||
+
|
|
||||||
+case "$1" in
|
|
||||||
+ start)
|
|
||||||
+ echo -n "Starting domain name service: named"
|
|
||||||
+
|
|
||||||
+ modprobe capability >/dev/null 2>&1 || true
|
|
||||||
+ if [ ! -f /etc/bind/rndc.key ]; then
|
|
||||||
+ /usr/sbin/rndc-confgen -a -b 512 -r /dev/urandom
|
|
||||||
+ chmod 0640 /etc/bind/rndc.key
|
|
||||||
+ fi
|
|
||||||
+ if [ -f /var/run/named/named.pid ]; then
|
|
||||||
+ ps `cat /var/run/named/named.pid` > /dev/null && exit 1
|
|
||||||
+ fi
|
|
||||||
+
|
|
||||||
+ # dirs under /var/run can go away on reboots.
|
|
||||||
+ mkdir -p /var/run/named
|
|
||||||
+ mkdir -p /var/cache/bind
|
|
||||||
+ chmod 775 /var/run/named
|
|
||||||
+ chown root:bind /var/run/named >/dev/null 2>&1 || true
|
|
||||||
+
|
|
||||||
+ if [ ! -x /usr/sbin/named ]; then
|
|
||||||
+ echo "named binary missing - not starting"
|
|
||||||
+ exit 1
|
|
||||||
+ fi
|
|
||||||
+ if start-stop-daemon --start --quiet --exec /usr/sbin/named \
|
|
||||||
+ --pidfile /var/run/named/named.pid -- $OPTIONS; then
|
|
||||||
+ if [ -x /sbin/resolvconf ] ; then
|
|
||||||
+ echo "nameserver 127.0.0.1" | /sbin/resolvconf -a lo
|
|
||||||
+ fi
|
|
||||||
+ fi
|
|
||||||
+ echo "."
|
|
||||||
+ ;;
|
|
||||||
+
|
|
||||||
+ stop)
|
|
||||||
+ echo -n "Stopping domain name service: named"
|
|
||||||
+ if [ -x /sbin/resolvconf ]; then
|
|
||||||
+ /sbin/resolvconf -d lo
|
|
||||||
+ fi
|
|
||||||
+ /usr/sbin/rndc stop >/dev/null 2>&1
|
|
||||||
+ echo "."
|
|
||||||
+ ;;
|
|
||||||
+
|
|
||||||
+ reload)
|
|
||||||
+ /usr/sbin/rndc reload
|
|
||||||
+ ;;
|
|
||||||
+
|
|
||||||
+ restart|force-reload)
|
|
||||||
+ $0 stop
|
|
||||||
+ sleep 2
|
|
||||||
+ $0 start
|
|
||||||
+ ;;
|
|
||||||
+
|
|
||||||
+ *)
|
|
||||||
+ echo "Usage: /etc/init.d/bind {start|stop|reload|restart|force-reload}" >&2
|
|
||||||
+ exit 1
|
|
||||||
+ ;;
|
|
||||||
+esac
|
|
||||||
+
|
|
||||||
+exit 0
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
if [ ! -s /etc/bind/rndc.key ]; then
|
|
||||||
echo -n "Generating /etc/bind/rndc.key:"
|
|
||||||
/usr/sbin/rndc-confgen -a -b 512 -r /dev/urandom
|
|
||||||
chown root:bind /etc/bind/rndc.key
|
|
||||||
chmod 0640 /etc/bind/rndc.key
|
|
||||||
fi
|
|
||||||
-65
@@ -1,65 +0,0 @@
|
|||||||
Subject: init.d: add support for read-only rootfs
|
|
||||||
|
|
||||||
Upstream-Status: Inappropriate [oe specific]
|
|
||||||
|
|
||||||
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
|
|
||||||
---
|
|
||||||
init.d | 40 ++++++++++++++++++++++++++++++++++++++++
|
|
||||||
1 file changed, 40 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/init.d b/init.d
|
|
||||||
index 0111ed4..24677c8 100644
|
|
||||||
--- a/init.d
|
|
||||||
+++ b/init.d
|
|
||||||
@@ -6,8 +6,48 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
|
||||||
# Don't modify this line, change or create /etc/default/bind9.
|
|
||||||
OPTIONS=""
|
|
||||||
|
|
||||||
+test -f /etc/default/rcS && . /etc/default/rcS
|
|
||||||
test -f /etc/default/bind9 && . /etc/default/bind9
|
|
||||||
|
|
||||||
+# This function is here because it's possible that /var and / are on different partitions.
|
|
||||||
+is_on_read_only_partition () {
|
|
||||||
+ DIRECTORY=$1
|
|
||||||
+ dir=`readlink -f $DIRECTORY`
|
|
||||||
+ while true; do
|
|
||||||
+ if [ ! -d "$dir" ]; then
|
|
||||||
+ echo "ERROR: $dir is not a directory"
|
|
||||||
+ exit 1
|
|
||||||
+ else
|
|
||||||
+ for flag in `awk -v dir=$dir '{ if ($2 == dir) { print "FOUND"; split($4,FLAGS,",") } }; \
|
|
||||||
+ END { for (f in FLAGS) print FLAGS[f] }' < /proc/mounts`; do
|
|
||||||
+ [ "$flag" = "FOUND" ] && partition="read-write"
|
|
||||||
+ [ "$flag" = "ro" ] && { partition="read-only"; break; }
|
|
||||||
+ done
|
|
||||||
+ if [ "$dir" = "/" -o -n "$partition" ]; then
|
|
||||||
+ break
|
|
||||||
+ else
|
|
||||||
+ dir=`dirname $dir`
|
|
||||||
+ fi
|
|
||||||
+ fi
|
|
||||||
+ done
|
|
||||||
+ [ "$partition" = "read-only" ] && echo "yes" || echo "no"
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+bind_mount () {
|
|
||||||
+ olddir=$1
|
|
||||||
+ newdir=$2
|
|
||||||
+ mkdir -p $olddir
|
|
||||||
+ cp -a $newdir/* $olddir
|
|
||||||
+ mount --bind $olddir $newdir
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+# Deal with read-only rootfs
|
|
||||||
+if [ "$ROOTFS_READ_ONLY" = "yes" ]; then
|
|
||||||
+ [ "$VERBOSE" != "no" ] && echo "WARN: start bind service in read-only rootfs"
|
|
||||||
+ [ `is_on_read_only_partition /etc/bind` = "yes" ] && bind_mount /var/volatile/bind/etc /etc/bind
|
|
||||||
+ [ `is_on_read_only_partition /var/named` = "yes" ] && bind_mount /var/volatile/bind/named /var/named
|
|
||||||
+fi
|
|
||||||
+
|
|
||||||
test -x /usr/sbin/rndc || exit 0
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
--
|
|
||||||
1.7.9.5
|
|
||||||
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
bind: make "/etc/init.d/bind stop" work
|
|
||||||
|
|
||||||
Upstream-Status: Inappropriate [configuration]
|
|
||||||
|
|
||||||
Add some configurations, make rndc command be able to controls
|
|
||||||
the named daemon.
|
|
||||||
|
|
||||||
Signed-off-by: Roy Li <rongqing.li@windriver.com>
|
|
||||||
---
|
|
||||||
conf/named.conf | 5 +++++
|
|
||||||
conf/rndc.conf | 5 +++++
|
|
||||||
2 files changed, 10 insertions(+), 0 deletions(-)
|
|
||||||
create mode 100644 conf/rndc.conf
|
|
||||||
|
|
||||||
diff --git a/conf/named.conf b/conf/named.conf
|
|
||||||
index 95829cf..c8899e7 100644
|
|
||||||
--- a/conf/named.conf
|
|
||||||
+++ b/conf/named.conf
|
|
||||||
@@ -47,3 +47,8 @@ zone "255.in-addr.arpa" {
|
|
||||||
// root-delegation-only exclude { "DE"; "MUSEUM"; };
|
|
||||||
|
|
||||||
include "/etc/bind/named.conf.local";
|
|
||||||
+include "/etc/bind/rndc.key" ;
|
|
||||||
+controls {
|
|
||||||
+ inet 127.0.0.1 allow { localhost; }
|
|
||||||
+ keys { rndc-key; };
|
|
||||||
+};
|
|
||||||
diff --git a/conf/rndc.conf b/conf/rndc.conf
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..a0b481d
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/conf/rndc.conf
|
|
||||||
@@ -0,0 +1,5 @@
|
|
||||||
+include "/etc/bind/rndc.key";
|
|
||||||
+options {
|
|
||||||
+ default-server localhost;
|
|
||||||
+ default-key rndc-key;
|
|
||||||
+};
|
|
||||||
|
|
||||||
--
|
|
||||||
1.7.5.4
|
|
||||||
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=Berkeley Internet Name Domain (DNS)
|
|
||||||
Wants=nss-lookup.target
|
|
||||||
Before=nss-lookup.target
|
|
||||||
After=network.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=forking
|
|
||||||
EnvironmentFile=-/etc/default/bind9
|
|
||||||
PIDFile=/run/named/named.pid
|
|
||||||
|
|
||||||
ExecStartPre=@SBINDIR@/generate-rndc-key.sh
|
|
||||||
ExecStart=@SBINDIR@/named $OPTIONS
|
|
||||||
|
|
||||||
ExecReload=@BASE_BINDIR@/sh -c '@SBINDIR@/rndc reload > /dev/null 2>&1 || @BASE_BINDIR@/kill -HUP $MAINPID'
|
|
||||||
|
|
||||||
ExecStop=@BASE_BINDIR@/sh -c '@SBINDIR@/rndc stop > /dev/null 2>&1 || @BASE_BINDIR@/kill -TERM $MAINPID'
|
|
||||||
|
|
||||||
PrivateTmp=true
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
@@ -1,140 +0,0 @@
|
|||||||
SUMMARY = "ISC Internet Domain Name Server"
|
|
||||||
HOMEPAGE = "http://www.isc.org/sw/bind/"
|
|
||||||
SECTION = "console/network"
|
|
||||||
|
|
||||||
LICENSE = "ISC & BSD"
|
|
||||||
LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=bf39058a7f64b2a934ce14dc9ec1dd45"
|
|
||||||
|
|
||||||
DEPENDS = "openssl libcap zlib"
|
|
||||||
|
|
||||||
SRC_URI = "https://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.gz \
|
|
||||||
file://conf.patch \
|
|
||||||
file://named.service \
|
|
||||||
file://bind9 \
|
|
||||||
file://generate-rndc-key.sh \
|
|
||||||
file://make-etc-initd-bind-stop-work.patch \
|
|
||||||
file://init.d-add-support-for-read-only-rootfs.patch \
|
|
||||||
file://bind-ensure-searching-for-json-headers-searches-sysr.patch \
|
|
||||||
file://0001-configure.in-remove-useless-L-use_openssl-lib.patch \
|
|
||||||
file://0001-named-lwresd-V-and-start-log-hide-build-options.patch \
|
|
||||||
file://0001-avoid-start-failure-with-bind-user.patch \
|
|
||||||
"
|
|
||||||
|
|
||||||
SRC_URI[sha256sum] = "afc6d8015006f1cabf699ff19f517bb8fd9c1811e5231f26baf51c3550262ac9"
|
|
||||||
|
|
||||||
UPSTREAM_CHECK_URI = "https://ftp.isc.org/isc/bind9/"
|
|
||||||
# stay at 9.11 until 9.16, from 9.16 follow the ESV versions divisible by 4
|
|
||||||
UPSTREAM_CHECK_REGEX = "(?P<pver>9.(11|16|20|24|28)(\.\d+)+(-P\d+)*)/"
|
|
||||||
|
|
||||||
# BIND >= 9.11.2 need dhcpd >= 4.4.0,
|
|
||||||
# don't report it here since dhcpd is already recent enough.
|
|
||||||
CVE_CHECK_WHITELIST += "CVE-2019-6470"
|
|
||||||
|
|
||||||
inherit autotools update-rc.d systemd useradd pkgconfig multilib_script multilib_header
|
|
||||||
|
|
||||||
MULTILIB_SCRIPTS = "${PN}:${bindir}/bind9-config ${PN}:${bindir}/isc-config.sh"
|
|
||||||
|
|
||||||
# PACKAGECONFIGs readline and libedit should NOT be set at same time
|
|
||||||
PACKAGECONFIG ?= "readline"
|
|
||||||
PACKAGECONFIG[httpstats] = "--with-libxml2=${STAGING_DIR_HOST}${prefix},--without-libxml2,libxml2"
|
|
||||||
PACKAGECONFIG[readline] = "--with-readline=-lreadline,,readline"
|
|
||||||
PACKAGECONFIG[libedit] = "--with-readline=-ledit,,libedit"
|
|
||||||
PACKAGECONFIG[urandom] = "--with-randomdev=/dev/urandom,--with-randomdev=/dev/random,,"
|
|
||||||
PACKAGECONFIG[python3] = "--with-python=yes --with-python-install-dir=${PYTHON_SITEPACKAGES_DIR} , --without-python, python3-ply-native,"
|
|
||||||
|
|
||||||
ENABLE_IPV6 = "--enable-ipv6=${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'yes', 'no', d)}"
|
|
||||||
EXTRA_OECONF = " ${ENABLE_IPV6} --with-libtool --enable-threads \
|
|
||||||
--disable-devpoll --enable-epoll --with-gost=no \
|
|
||||||
--with-gssapi=no --with-ecdsa=yes --with-eddsa=no \
|
|
||||||
--with-lmdb=no \
|
|
||||||
--sysconfdir=${sysconfdir}/bind \
|
|
||||||
--with-openssl=${STAGING_DIR_HOST}${prefix} \
|
|
||||||
"
|
|
||||||
|
|
||||||
inherit ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3native distutils3-base', '', d)}
|
|
||||||
|
|
||||||
# dhcp needs .la so keep them
|
|
||||||
REMOVE_LIBTOOL_LA = "0"
|
|
||||||
|
|
||||||
USERADD_PACKAGES = "${PN}"
|
|
||||||
USERADD_PARAM_${PN} = "--system --home ${localstatedir}/cache/bind --no-create-home \
|
|
||||||
--user-group bind"
|
|
||||||
|
|
||||||
INITSCRIPT_NAME = "bind"
|
|
||||||
INITSCRIPT_PARAMS = "defaults"
|
|
||||||
|
|
||||||
SYSTEMD_SERVICE_${PN} = "named.service"
|
|
||||||
|
|
||||||
do_install_prepend() {
|
|
||||||
# clean host path in isc-config.sh before the hardlink created
|
|
||||||
# by "make install":
|
|
||||||
# bind9-config -> isc-config.sh
|
|
||||||
sed -i -e "s,${STAGING_LIBDIR},${libdir}," ${B}/isc-config.sh
|
|
||||||
}
|
|
||||||
|
|
||||||
do_install_append() {
|
|
||||||
|
|
||||||
rmdir "${D}${localstatedir}/run"
|
|
||||||
rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
|
|
||||||
install -d -o bind "${D}${localstatedir}/cache/bind"
|
|
||||||
install -d "${D}${sysconfdir}/bind"
|
|
||||||
install -d "${D}${sysconfdir}/init.d"
|
|
||||||
install -m 644 ${S}/conf/* "${D}${sysconfdir}/bind/"
|
|
||||||
install -m 755 "${S}/init.d" "${D}${sysconfdir}/init.d/bind"
|
|
||||||
if ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'true', 'false', d)}; then
|
|
||||||
sed -i -e '1s,#!.*python3,#! /usr/bin/python3,' \
|
|
||||||
${D}${sbindir}/dnssec-coverage \
|
|
||||||
${D}${sbindir}/dnssec-checkds \
|
|
||||||
${D}${sbindir}/dnssec-keymgr
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Install systemd related files
|
|
||||||
install -d ${D}${sbindir}
|
|
||||||
install -m 755 ${WORKDIR}/generate-rndc-key.sh ${D}${sbindir}
|
|
||||||
install -d ${D}${systemd_unitdir}/system
|
|
||||||
install -m 0644 ${WORKDIR}/named.service ${D}${systemd_unitdir}/system
|
|
||||||
sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
|
|
||||||
-e 's,@SBINDIR@,${sbindir},g' \
|
|
||||||
${D}${systemd_unitdir}/system/named.service
|
|
||||||
|
|
||||||
install -d ${D}${sysconfdir}/default
|
|
||||||
install -m 0644 ${WORKDIR}/bind9 ${D}${sysconfdir}/default
|
|
||||||
|
|
||||||
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
|
|
||||||
install -d ${D}${sysconfdir}/tmpfiles.d
|
|
||||||
echo "d /run/named 0755 bind bind - -" > ${D}${sysconfdir}/tmpfiles.d/bind.conf
|
|
||||||
fi
|
|
||||||
|
|
||||||
oe_multilib_header isc/platform.h
|
|
||||||
}
|
|
||||||
|
|
||||||
CONFFILES_${PN} = " \
|
|
||||||
${sysconfdir}/bind/named.conf \
|
|
||||||
${sysconfdir}/bind/named.conf.local \
|
|
||||||
${sysconfdir}/bind/named.conf.options \
|
|
||||||
${sysconfdir}/bind/db.0 \
|
|
||||||
${sysconfdir}/bind/db.127 \
|
|
||||||
${sysconfdir}/bind/db.empty \
|
|
||||||
${sysconfdir}/bind/db.local \
|
|
||||||
${sysconfdir}/bind/db.root \
|
|
||||||
"
|
|
||||||
|
|
||||||
ALTERNATIVE_${PN}-utils = "nslookup"
|
|
||||||
ALTERNATIVE_LINK_NAME[nslookup] = "${bindir}/nslookup"
|
|
||||||
ALTERNATIVE_PRIORITY = "100"
|
|
||||||
|
|
||||||
PACKAGE_BEFORE_PN += "${PN}-utils"
|
|
||||||
FILES_${PN}-utils = "${bindir}/host ${bindir}/dig ${bindir}/mdig ${bindir}/nslookup ${bindir}/nsupdate"
|
|
||||||
FILES_${PN}-dev += "${bindir}/isc-config.h"
|
|
||||||
FILES_${PN} += "${sbindir}/generate-rndc-key.sh"
|
|
||||||
|
|
||||||
PACKAGE_BEFORE_PN += "${PN}-libs"
|
|
||||||
FILES_${PN}-libs = "${libdir}/*.so*"
|
|
||||||
FILES_${PN}-staticdev += "${libdir}/*.la"
|
|
||||||
|
|
||||||
PACKAGE_BEFORE_PN += "${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3-bind', '', d)}"
|
|
||||||
FILES_python3-bind = "${sbindir}/dnssec-coverage ${sbindir}/dnssec-checkds \
|
|
||||||
${sbindir}/dnssec-keymgr ${PYTHON_SITEPACKAGES_DIR}"
|
|
||||||
|
|
||||||
RDEPENDS_${PN}-dev = ""
|
|
||||||
RDEPENDS_python3-bind = "python3-core python3-ply"
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
For now, arm-autonomy-host-image-minimal installs the dhcp-server package and
|
|
||||||
the dchp recipe was copied from oe-core tree https://git.openembedded.org/openembedded-core/tree/meta/recipes-connectivity/dhcp?id=087e4fafeef82cfd3d71402d6b200fe831f48697
|
|
||||||
since it got removed in the https://git.openembedded.org/openembedded-core/commit/meta/recipes-connectivity?id=7e3357892f204788162747e907d68f857118cf42 patch.
|
|
||||||
@@ -1,149 +0,0 @@
|
|||||||
SECTION = "console/network"
|
|
||||||
SUMMARY = "Internet Software Consortium DHCP package"
|
|
||||||
DESCRIPTION = "DHCP (Dynamic Host Configuration Protocol) is a protocol \
|
|
||||||
which allows individual devices on an IP network to get their own \
|
|
||||||
network configuration information from a server. DHCP helps make it \
|
|
||||||
easier to administer devices."
|
|
||||||
|
|
||||||
HOMEPAGE = "http://www.isc.org/"
|
|
||||||
|
|
||||||
LICENSE = "ISC"
|
|
||||||
LIC_FILES_CHKSUM = "file://LICENSE;beginline=4;md5=004a4db50a1e20972e924a8618747c01"
|
|
||||||
|
|
||||||
DEPENDS = "openssl bind"
|
|
||||||
|
|
||||||
SRC_URI = "http://ftp.isc.org/isc/dhcp/${PV}/dhcp-${PV}.tar.gz \
|
|
||||||
file://init-relay file://default-relay \
|
|
||||||
file://init-server file://default-server \
|
|
||||||
file://dhclient.conf file://dhcpd.conf \
|
|
||||||
file://dhclient-systemd-wrapper \
|
|
||||||
file://dhclient.service \
|
|
||||||
file://dhcpd.service file://dhcrelay.service \
|
|
||||||
file://dhcpd6.service \
|
|
||||||
"
|
|
||||||
UPSTREAM_CHECK_URI = "http://ftp.isc.org/isc/dhcp/"
|
|
||||||
UPSTREAM_CHECK_REGEX = "(?P<pver>\d+\.\d+\.(\d+?))/"
|
|
||||||
|
|
||||||
inherit autotools-brokensep systemd useradd update-rc.d
|
|
||||||
|
|
||||||
USERADD_PACKAGES = "${PN}-server"
|
|
||||||
USERADD_PARAM_${PN}-server = "--system --no-create-home --home-dir /var/run/${BPN} --shell /bin/false --user-group ${BPN}"
|
|
||||||
|
|
||||||
SYSTEMD_PACKAGES = "${PN}-server ${PN}-relay ${PN}-client"
|
|
||||||
SYSTEMD_SERVICE_${PN}-server = "dhcpd.service dhcpd6.service"
|
|
||||||
SYSTEMD_AUTO_ENABLE_${PN}-server = "disable"
|
|
||||||
|
|
||||||
SYSTEMD_SERVICE_${PN}-relay = "dhcrelay.service"
|
|
||||||
SYSTEMD_AUTO_ENABLE_${PN}-relay = "disable"
|
|
||||||
|
|
||||||
SYSTEMD_SERVICE_${PN}-client = "dhclient.service"
|
|
||||||
SYSTEMD_AUTO_ENABLE_${PN}-client = "disable"
|
|
||||||
|
|
||||||
INITSCRIPT_PACKAGES = "dhcp-server"
|
|
||||||
INITSCRIPT_NAME_dhcp-server = "dhcp-server"
|
|
||||||
INITSCRIPT_PARAMS_dhcp-server = "defaults"
|
|
||||||
|
|
||||||
CFLAGS += "-D_GNU_SOURCE"
|
|
||||||
EXTRA_OECONF = "--with-srv-lease-file=${localstatedir}/lib/dhcp/dhcpd.leases \
|
|
||||||
--with-srv6-lease-file=${localstatedir}/lib/dhcp/dhcpd6.leases \
|
|
||||||
--with-cli-lease-file=${localstatedir}/lib/dhcp/dhclient.leases \
|
|
||||||
--with-cli6-lease-file=${localstatedir}/lib/dhcp/dhclient6.leases \
|
|
||||||
--enable-paranoia --disable-static \
|
|
||||||
--with-randomdev=/dev/random \
|
|
||||||
--with-libbind=${STAGING_DIR_HOST} \
|
|
||||||
--enable-libtool \
|
|
||||||
"
|
|
||||||
|
|
||||||
#Enable shared libs per dhcp README
|
|
||||||
do_configure_prepend () {
|
|
||||||
cp configure.ac+lt configure.ac
|
|
||||||
}
|
|
||||||
|
|
||||||
do_install_append () {
|
|
||||||
install -d ${D}${sysconfdir}/init.d
|
|
||||||
install -d ${D}${sysconfdir}/default
|
|
||||||
install -d ${D}${sysconfdir}/dhcp
|
|
||||||
install -m 0755 ${WORKDIR}/init-relay ${D}${sysconfdir}/init.d/dhcp-relay
|
|
||||||
install -m 0644 ${WORKDIR}/default-relay ${D}${sysconfdir}/default/dhcp-relay
|
|
||||||
install -m 0755 ${WORKDIR}/init-server ${D}${sysconfdir}/init.d/dhcp-server
|
|
||||||
install -m 0644 ${WORKDIR}/default-server ${D}${sysconfdir}/default/dhcp-server
|
|
||||||
|
|
||||||
rm -f ${D}${sysconfdir}/dhclient.conf*
|
|
||||||
rm -f ${D}${sysconfdir}/dhcpd.conf*
|
|
||||||
install -m 0644 ${WORKDIR}/dhclient.conf ${D}${sysconfdir}/dhcp/dhclient.conf
|
|
||||||
install -m 0644 ${WORKDIR}/dhcpd.conf ${D}${sysconfdir}/dhcp/dhcpd.conf
|
|
||||||
|
|
||||||
install -d ${D}${base_sbindir}/
|
|
||||||
if [ "${sbindir}" != "${base_sbindir}" ]; then
|
|
||||||
mv ${D}${sbindir}/dhclient ${D}${base_sbindir}/
|
|
||||||
fi
|
|
||||||
install -m 0755 ${S}/client/scripts/linux ${D}${base_sbindir}/dhclient-script
|
|
||||||
|
|
||||||
# Install systemd unit files
|
|
||||||
install -d ${D}${systemd_unitdir}/system
|
|
||||||
install -m 0644 ${WORKDIR}/dhcpd.service ${D}${systemd_unitdir}/system
|
|
||||||
install -m 0644 ${WORKDIR}/dhcpd6.service ${D}${systemd_unitdir}/system
|
|
||||||
install -m 0644 ${WORKDIR}/dhcrelay.service ${D}${systemd_unitdir}/system
|
|
||||||
sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/dhcpd*.service ${D}${systemd_unitdir}/system/dhcrelay.service
|
|
||||||
sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' ${D}${systemd_unitdir}/system/dhcpd*.service
|
|
||||||
sed -i -e 's,@base_bindir@,${base_bindir},g' ${D}${systemd_unitdir}/system/dhcpd*.service
|
|
||||||
sed -i -e 's,@localstatedir@,${localstatedir},g' ${D}${systemd_unitdir}/system/dhcpd*.service
|
|
||||||
sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' ${D}${systemd_unitdir}/system/dhcrelay.service
|
|
||||||
|
|
||||||
install -d ${D}${base_sbindir}
|
|
||||||
install -m 0755 ${WORKDIR}/dhclient-systemd-wrapper ${D}${base_sbindir}/dhclient-systemd-wrapper
|
|
||||||
install -m 0644 ${WORKDIR}/dhclient.service ${D}${systemd_unitdir}/system
|
|
||||||
sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' ${D}${systemd_unitdir}/system/dhclient.service
|
|
||||||
sed -i -e 's,@BASE_SBINDIR@,${base_sbindir},g' ${D}${systemd_unitdir}/system/dhclient.service
|
|
||||||
}
|
|
||||||
|
|
||||||
PACKAGES += "dhcp-libs dhcp-server dhcp-server-config dhcp-client dhcp-relay dhcp-omshell"
|
|
||||||
|
|
||||||
PACKAGES_remove = "${PN}"
|
|
||||||
RDEPENDS_${PN}-client += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'iproute2', '', d)}"
|
|
||||||
RDEPENDS_${PN}-dev = ""
|
|
||||||
RDEPENDS_${PN}-staticdev = ""
|
|
||||||
FILES_${PN}-libs = "${libdir}/libdhcpctl.so.0* ${libdir}/libomapi.so.0* ${libdir}/libdhcp.so.0*"
|
|
||||||
|
|
||||||
FILES_${PN}-server = "${sbindir}/dhcpd ${sysconfdir}/init.d/dhcp-server"
|
|
||||||
RRECOMMENDS_${PN}-server = "dhcp-server-config"
|
|
||||||
|
|
||||||
FILES_${PN}-server-config = "${sysconfdir}/default/dhcp-server ${sysconfdir}/dhcp/dhcpd.conf"
|
|
||||||
|
|
||||||
FILES_${PN}-relay = "${sbindir}/dhcrelay ${sysconfdir}/init.d/dhcp-relay ${sysconfdir}/default/dhcp-relay"
|
|
||||||
|
|
||||||
FILES_${PN}-client = "${base_sbindir}/dhclient \
|
|
||||||
${base_sbindir}/dhclient-script \
|
|
||||||
${sysconfdir}/dhcp/dhclient.conf \
|
|
||||||
${base_sbindir}/dhclient-systemd-wrapper \
|
|
||||||
"
|
|
||||||
|
|
||||||
FILES_${PN}-omshell = "${bindir}/omshell"
|
|
||||||
|
|
||||||
pkg_postinst_dhcp-server() {
|
|
||||||
mkdir -p $D/${localstatedir}/lib/dhcp
|
|
||||||
touch $D/${localstatedir}/lib/dhcp/dhcpd.leases
|
|
||||||
touch $D/${localstatedir}/lib/dhcp/dhcpd6.leases
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postinst_dhcp-client() {
|
|
||||||
mkdir -p $D/${localstatedir}/lib/dhcp
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postrm_dhcp-server() {
|
|
||||||
rm -f $D/${localstatedir}/lib/dhcp/dhcpd.leases
|
|
||||||
rm -f $D/${localstatedir}/lib/dhcp/dhcpd6.leases
|
|
||||||
|
|
||||||
if ! rmdir $D/${localstatedir}/lib/dhcp 2>/dev/null; then
|
|
||||||
echo "Not removing ${localstatedir}/lib/dhcp as it is non-empty."
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postrm_dhcp-client() {
|
|
||||||
rm -f $D/${localstatedir}/lib/dhcp/dhclient.leases
|
|
||||||
rm -f $D/${localstatedir}/lib/dhcp/dhclient6.leases
|
|
||||||
|
|
||||||
if ! rmdir $D/${localstatedir}/lib/dhcp 2>/dev/null; then
|
|
||||||
echo "Not removing ${localstatedir}/lib/dhcp as it is non-empty."
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
-27
@@ -1,27 +0,0 @@
|
|||||||
From 7cc29144535a622fc671dc86eb1da65b0473a7c4 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Hongxu Jia <hongxu.jia@windriver.com>
|
|
||||||
Date: Tue, 15 Aug 2017 16:14:22 +0800
|
|
||||||
Subject: [PATCH 01/11] define macro _PATH_DHCPD_CONF and _PATH_DHCLIENT_CONF
|
|
||||||
|
|
||||||
Upstream-Status: Inappropriate [OE specific]
|
|
||||||
|
|
||||||
Rebase to 4.3.6
|
|
||||||
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
|
|
||||||
---
|
|
||||||
includes/site.h | 3 ++-
|
|
||||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
Index: dhcp-4.4.1/includes/site.h
|
|
||||||
===================================================================
|
|
||||||
--- dhcp-4.4.1.orig/includes/site.h
|
|
||||||
+++ dhcp-4.4.1/includes/site.h
|
|
||||||
@@ -148,7 +148,8 @@
|
|
||||||
/* Define this if you want the dhcpd.conf file to go somewhere other than
|
|
||||||
the default location. By default, it goes in /etc/dhcpd.conf. */
|
|
||||||
|
|
||||||
-/* #define _PATH_DHCPD_CONF "/etc/dhcpd.conf" */
|
|
||||||
+#define _PATH_DHCPD_CONF "/etc/dhcp/dhcpd.conf"
|
|
||||||
+#define _PATH_DHCLIENT_CONF "/etc/dhcp/dhclient.conf"
|
|
||||||
|
|
||||||
/* Network API definitions. You do not need to choose one of these - if
|
|
||||||
you don't choose, one will be chosen for you in your system's config
|
|
||||||
-65
@@ -1,65 +0,0 @@
|
|||||||
From eec0503cfc36f63d777f5cb3f2719cecedcb8468 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Haris Okanovic <haris.okanovic@ni.com>
|
|
||||||
Date: Mon, 7 Jan 2019 13:22:09 -0600
|
|
||||||
Subject: [PATCH] Workaround busybox limitation in Linux dhclient-script
|
|
||||||
|
|
||||||
Busybox is a lightweight implementation of coreutils commonly used on
|
|
||||||
space-constrained embedded Linux distributions. It's implementation of
|
|
||||||
chown and chmod doesn't provide a "--reference" option added to
|
|
||||||
client/scripts/linux as of commit 9261cb14. This change works around
|
|
||||||
that limitation by using stat to read ownership and permissions flags
|
|
||||||
and simple chown/chmod calls supported in both coreutils and busybox.
|
|
||||||
|
|
||||||
modified: client/scripts/linux
|
|
||||||
|
|
||||||
Signed-off-by: Haris Okanovic <haris.okanovic@ni.com>
|
|
||||||
Upstream-Status: Pending [ISC-Bugs #48771]
|
|
||||||
---
|
|
||||||
client/scripts/linux | 17 +++++++++++++----
|
|
||||||
1 file changed, 13 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/client/scripts/linux b/client/scripts/linux
|
|
||||||
index 0c429697..2435a44b 100755
|
|
||||||
--- a/client/scripts/linux
|
|
||||||
+++ b/client/scripts/linux
|
|
||||||
@@ -32,6 +32,17 @@
|
|
||||||
# if your system holds ip tool in a non-standard location.
|
|
||||||
ip=/sbin/ip
|
|
||||||
|
|
||||||
+chown_chmod_by_reference() {
|
|
||||||
+ local reference_file="$1"
|
|
||||||
+ local target_file="$2"
|
|
||||||
+
|
|
||||||
+ local owner=$(stat -c "%u:%g" "$reference_file")
|
|
||||||
+ local perm=$(stat -c "%a" "$reference_file")
|
|
||||||
+
|
|
||||||
+ chown "$owner" "$target_file"
|
|
||||||
+ chmod "$perm" "$target_file"
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
# update /etc/resolv.conf based on received values
|
|
||||||
# This updated version mostly follows Debian script by Andrew Pollock et al.
|
|
||||||
make_resolv_conf() {
|
|
||||||
@@ -74,8 +85,7 @@ make_resolv_conf() {
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f /etc/resolv.conf ]; then
|
|
||||||
- chown --reference=/etc/resolv.conf $new_resolv_conf
|
|
||||||
- chmod --reference=/etc/resolv.conf $new_resolv_conf
|
|
||||||
+ chown_chmod_by_reference /etc/resolv.conf $new_resolv_conf
|
|
||||||
fi
|
|
||||||
mv -f $new_resolv_conf /etc/resolv.conf
|
|
||||||
# DHCPv6
|
|
||||||
@@ -101,8 +111,7 @@ make_resolv_conf() {
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f /etc/resolv.conf ]; then
|
|
||||||
- chown --reference=/etc/resolv.conf $new_resolv_conf
|
|
||||||
- chmod --reference=/etc/resolv.conf $new_resolv_conf
|
|
||||||
+ chown_chmod_by_reference /etc/resolv.conf $new_resolv_conf
|
|
||||||
fi
|
|
||||||
mv -f $new_resolv_conf /etc/resolv.conf
|
|
||||||
fi
|
|
||||||
--
|
|
||||||
2.20.0
|
|
||||||
|
|
||||||
@@ -1,117 +0,0 @@
|
|||||||
From be7540d31c356e80ee02e90e8bf162b7ac6e5ba5 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Hongxu Jia <hongxu.jia@windriver.com>
|
|
||||||
Date: Tue, 15 Aug 2017 14:56:56 +0800
|
|
||||||
Subject: [PATCH 02/11] dhclient dbus
|
|
||||||
|
|
||||||
Upstream-Status: Inappropriate [distribution]
|
|
||||||
|
|
||||||
Rebase to 4.3.6
|
|
||||||
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
|
|
||||||
---
|
|
||||||
client/scripts/bsdos | 5 +++++
|
|
||||||
client/scripts/freebsd | 5 +++++
|
|
||||||
client/scripts/linux | 5 +++++
|
|
||||||
client/scripts/netbsd | 5 +++++
|
|
||||||
client/scripts/openbsd | 5 +++++
|
|
||||||
client/scripts/solaris | 5 +++++
|
|
||||||
6 files changed, 30 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/client/scripts/bsdos b/client/scripts/bsdos
|
|
||||||
index d69d0d8..095b143 100755
|
|
||||||
--- a/client/scripts/bsdos
|
|
||||||
+++ b/client/scripts/bsdos
|
|
||||||
@@ -45,6 +45,11 @@ exit_with_hooks() {
|
|
||||||
. /etc/dhclient-exit-hooks
|
|
||||||
fi
|
|
||||||
# probably should do something with exit status of the local script
|
|
||||||
+ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
|
|
||||||
+ dbus-send --system --dest=com.redhat.dhcp \
|
|
||||||
+ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
|
|
||||||
+ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
|
|
||||||
+ fi
|
|
||||||
exit $exit_status
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/client/scripts/freebsd b/client/scripts/freebsd
|
|
||||||
index 8f3e2a2..ad7fb44 100755
|
|
||||||
--- a/client/scripts/freebsd
|
|
||||||
+++ b/client/scripts/freebsd
|
|
||||||
@@ -89,6 +89,11 @@ exit_with_hooks() {
|
|
||||||
. /etc/dhclient-exit-hooks
|
|
||||||
fi
|
|
||||||
# probably should do something with exit status of the local script
|
|
||||||
+ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
|
|
||||||
+ dbus-send --system --dest=com.redhat.dhcp \
|
|
||||||
+ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
|
|
||||||
+ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
|
|
||||||
+ fi
|
|
||||||
exit $exit_status
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/client/scripts/linux b/client/scripts/linux
|
|
||||||
index 5fb1612..3d447b6 100755
|
|
||||||
--- a/client/scripts/linux
|
|
||||||
+++ b/client/scripts/linux
|
|
||||||
@@ -174,6 +174,11 @@ exit_with_hooks() {
|
|
||||||
exit_status=$?
|
|
||||||
fi
|
|
||||||
|
|
||||||
+ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
|
|
||||||
+ dbus-send --system --dest=com.redhat.dhcp \
|
|
||||||
+ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
|
|
||||||
+ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
|
|
||||||
+ fi
|
|
||||||
exit $exit_status
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/client/scripts/netbsd b/client/scripts/netbsd
|
|
||||||
index 07383b7..aaba8e8 100755
|
|
||||||
--- a/client/scripts/netbsd
|
|
||||||
+++ b/client/scripts/netbsd
|
|
||||||
@@ -45,6 +45,11 @@ exit_with_hooks() {
|
|
||||||
. /etc/dhclient-exit-hooks
|
|
||||||
fi
|
|
||||||
# probably should do something with exit status of the local script
|
|
||||||
+ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
|
|
||||||
+ dbus-send --system --dest=com.redhat.dhcp \
|
|
||||||
+ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
|
|
||||||
+ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
|
|
||||||
+ fi
|
|
||||||
exit $exit_status
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/client/scripts/openbsd b/client/scripts/openbsd
|
|
||||||
index e7f4746..56b980c 100644
|
|
||||||
--- a/client/scripts/openbsd
|
|
||||||
+++ b/client/scripts/openbsd
|
|
||||||
@@ -45,6 +45,11 @@ exit_with_hooks() {
|
|
||||||
. /etc/dhclient-exit-hooks
|
|
||||||
fi
|
|
||||||
# probably should do something with exit status of the local script
|
|
||||||
+ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
|
|
||||||
+ dbus-send --system --dest=com.redhat.dhcp \
|
|
||||||
+ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
|
|
||||||
+ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
|
|
||||||
+ fi
|
|
||||||
exit $exit_status
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/client/scripts/solaris b/client/scripts/solaris
|
|
||||||
index af553b9..4a2aa69 100755
|
|
||||||
--- a/client/scripts/solaris
|
|
||||||
+++ b/client/scripts/solaris
|
|
||||||
@@ -26,6 +26,11 @@ exit_with_hooks() {
|
|
||||||
. /etc/dhclient-exit-hooks
|
|
||||||
fi
|
|
||||||
# probably should do something with exit status of the local script
|
|
||||||
+ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
|
|
||||||
+ dbus-send --system --dest=com.redhat.dhcp \
|
|
||||||
+ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
|
|
||||||
+ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
|
|
||||||
+ fi
|
|
||||||
exit $exit_status
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
From d80bd792323dbd56269309f85b4506eb6b1b60e9 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Andrei Gherzan <andrei@gherzan.ro>
|
|
||||||
Date: Tue, 15 Aug 2017 15:05:47 +0800
|
|
||||||
Subject: [PATCH 03/11] link with lcrypto
|
|
||||||
|
|
||||||
From 4.2.0 final release, -lcrypto check was removed and we compile
|
|
||||||
static libraries
|
|
||||||
from bind that are linked to libcrypto. This is why i added a patch in
|
|
||||||
order to add
|
|
||||||
-lcrypto to LIBS.
|
|
||||||
|
|
||||||
Upstream-Status: Pending
|
|
||||||
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
|
|
||||||
|
|
||||||
Rebase to 4.3.6
|
|
||||||
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
|
|
||||||
---
|
|
||||||
configure.ac | 4 ++++
|
|
||||||
1 file changed, 4 insertions(+)
|
|
||||||
|
|
||||||
Index: dhcp-4.4.1/configure.ac
|
|
||||||
===================================================================
|
|
||||||
--- dhcp-4.4.1.orig/configure.ac
|
|
||||||
+++ dhcp-4.4.1/configure.ac
|
|
||||||
@@ -612,6 +612,10 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],
|
|
||||||
# Look for optional headers.
|
|
||||||
AC_CHECK_HEADERS(sys/socket.h net/if_dl.h net/if6.h regex.h)
|
|
||||||
|
|
||||||
+# find an MD5 library
|
|
||||||
+AC_SEARCH_LIBS(MD5_Init, [crypto])
|
|
||||||
+AC_SEARCH_LIBS(MD5Init, [crypto])
|
|
||||||
+
|
|
||||||
# Solaris needs some libraries for functions
|
|
||||||
AC_SEARCH_LIBS(socket, [socket])
|
|
||||||
AC_SEARCH_LIBS(inet_ntoa, [nsl])
|
|
||||||
@@ -1,95 +0,0 @@
|
|||||||
From cccec0344d68dac4100b6f260ee24e7c2da9dfda Mon Sep 17 00:00:00 2001
|
|
||||||
From: Hongxu Jia <hongxu.jia@windriver.com>
|
|
||||||
Date: Tue, 15 Aug 2017 15:08:22 +0800
|
|
||||||
Subject: [PATCH 04/11] Fix out of tree builds
|
|
||||||
|
|
||||||
Upstream-Status: Pending
|
|
||||||
|
|
||||||
RP 2013/03/21
|
|
||||||
|
|
||||||
Rebase to 4.3.6
|
|
||||||
|
|
||||||
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
|
|
||||||
---
|
|
||||||
client/Makefile.am | 4 ++--
|
|
||||||
common/Makefile.am | 3 ++-
|
|
||||||
dhcpctl/Makefile.am | 2 ++
|
|
||||||
omapip/Makefile.am | 1 +
|
|
||||||
relay/Makefile.am | 2 +-
|
|
||||||
server/Makefile.am | 2 +-
|
|
||||||
6 files changed, 9 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
Index: dhcp-4.4.1/common/Makefile.am
|
|
||||||
===================================================================
|
|
||||||
--- dhcp-4.4.1.orig/common/Makefile.am
|
|
||||||
+++ dhcp-4.4.1/common/Makefile.am
|
|
||||||
@@ -1,4 +1,5 @@
|
|
||||||
-AM_CPPFLAGS = -I$(top_srcdir) -DLOCALSTATEDIR='"@localstatedir@"'
|
|
||||||
+AM_CPPFLAGS = -I$(top_srcdir)/includes -I$(top_srcdir) -DLOCALSTATEDIR='"@localstatedir@"'
|
|
||||||
+
|
|
||||||
AM_CFLAGS = $(LDAP_CFLAGS)
|
|
||||||
|
|
||||||
lib_LIBRARIES = libdhcp.a
|
|
||||||
Index: dhcp-4.4.1/dhcpctl/Makefile.am
|
|
||||||
===================================================================
|
|
||||||
--- dhcp-4.4.1.orig/dhcpctl/Makefile.am
|
|
||||||
+++ dhcp-4.4.1/dhcpctl/Makefile.am
|
|
||||||
@@ -3,6 +3,8 @@ BINDLIBDNSDIR=@BINDLIBDNSDIR@
|
|
||||||
BINDLIBISCCFGDIR=@BINDLIBISCCFGDIR@
|
|
||||||
BINDLIBISCDIR=@BINDLIBISCDIR@
|
|
||||||
|
|
||||||
+AM_CPPFLAGS = -I$(top_srcdir)/includes -I$(top_srcdir)
|
|
||||||
+
|
|
||||||
bin_PROGRAMS = omshell
|
|
||||||
lib_LIBRARIES = libdhcpctl.a
|
|
||||||
noinst_PROGRAMS = cltest
|
|
||||||
Index: dhcp-4.4.1/server/Makefile.am
|
|
||||||
===================================================================
|
|
||||||
--- dhcp-4.4.1.orig/server/Makefile.am
|
|
||||||
+++ dhcp-4.4.1/server/Makefile.am
|
|
||||||
@@ -4,7 +4,7 @@
|
|
||||||
# production code. Sadly, we are not there yet.
|
|
||||||
SUBDIRS = . tests
|
|
||||||
|
|
||||||
-AM_CPPFLAGS = -I.. -DLOCALSTATEDIR='"@localstatedir@"'
|
|
||||||
+AM_CPPFLAGS = -I$(top_srcdir) -DLOCALSTATEDIR='"@localstatedir@"' -I$(top_srcdir)/includes
|
|
||||||
|
|
||||||
dist_sysconf_DATA = dhcpd.conf.example
|
|
||||||
sbin_PROGRAMS = dhcpd
|
|
||||||
Index: dhcp-4.4.1/client/Makefile.am
|
|
||||||
===================================================================
|
|
||||||
--- dhcp-4.4.1.orig/client/Makefile.am
|
|
||||||
+++ dhcp-4.4.1/client/Makefile.am
|
|
||||||
@@ -5,7 +5,7 @@
|
|
||||||
SUBDIRS = . tests
|
|
||||||
|
|
||||||
AM_CPPFLAGS = -DCLIENT_PATH='"PATH=$(sbindir):/sbin:/bin:/usr/sbin:/usr/bin"'
|
|
||||||
-AM_CPPFLAGS += -DLOCALSTATEDIR='"$(localstatedir)"'
|
|
||||||
+AM_CPPFLAGS += -DLOCALSTATEDIR='"$(localstatedir)"' -I$(top_srcdir)/includes
|
|
||||||
|
|
||||||
dist_sysconf_DATA = dhclient.conf.example
|
|
||||||
sbin_PROGRAMS = dhclient
|
|
||||||
Index: dhcp-4.4.1/omapip/Makefile.am
|
|
||||||
===================================================================
|
|
||||||
--- dhcp-4.4.1.orig/omapip/Makefile.am
|
|
||||||
+++ dhcp-4.4.1/omapip/Makefile.am
|
|
||||||
@@ -2,6 +2,7 @@ BINDLIBIRSDIR=@BINDLIBIRSDIR@
|
|
||||||
BINDLIBDNSDIR=@BINDLIBDNSDIR@
|
|
||||||
BINDLIBISCCFGDIR=@BINDLIBISCCFGDIR@
|
|
||||||
BINDLIBISCDIR=@BINDLIBISCDIR@
|
|
||||||
+AM_CPPFLAGS = -I$(top_srcdir)/includes
|
|
||||||
|
|
||||||
lib_LIBRARIES = libomapi.a
|
|
||||||
noinst_PROGRAMS = svtest
|
|
||||||
Index: dhcp-4.4.1/relay/Makefile.am
|
|
||||||
===================================================================
|
|
||||||
--- dhcp-4.4.1.orig/relay/Makefile.am
|
|
||||||
+++ dhcp-4.4.1/relay/Makefile.am
|
|
||||||
@@ -1,6 +1,6 @@
|
|
||||||
SUBDIRS = . tests
|
|
||||||
|
|
||||||
-AM_CPPFLAGS = -DLOCALSTATEDIR='"@localstatedir@"'
|
|
||||||
+AM_CPPFLAGS = -DLOCALSTATEDIR='"@localstatedir@"' -I$(top_srcdir)/includes
|
|
||||||
|
|
||||||
sbin_PROGRAMS = dhcrelay
|
|
||||||
dhcrelay_SOURCES = dhcrelay.c
|
|
||||||
-36
@@ -1,36 +0,0 @@
|
|||||||
From 2e8ff0e4f6d39e346ea86b8c514ab4ccc78fa359 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Hongxu Jia <hongxu.jia@windriver.com>
|
|
||||||
Date: Tue, 15 Aug 2017 15:24:14 +0800
|
|
||||||
Subject: [PATCH 05/11] dhcp-client: fix invoke dhclient-script failed on
|
|
||||||
Read-only file system
|
|
||||||
|
|
||||||
In read-only file system, '/etc' is on the readonly partition,
|
|
||||||
and '/etc/resolv.conf' is symlinked to a separate writable
|
|
||||||
partition.
|
|
||||||
|
|
||||||
In this situation, we create temp files 'resolv.conf.dhclient-new'
|
|
||||||
in /tmp dir.
|
|
||||||
|
|
||||||
Upstream-Status: Pending
|
|
||||||
|
|
||||||
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
|
|
||||||
---
|
|
||||||
client/scripts/linux | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/client/scripts/linux b/client/scripts/linux
|
|
||||||
index 3d447b6..3122a75 100755
|
|
||||||
--- a/client/scripts/linux
|
|
||||||
+++ b/client/scripts/linux
|
|
||||||
@@ -40,7 +40,7 @@ make_resolv_conf() {
|
|
||||||
# DHCPv4
|
|
||||||
if [ -n "$new_domain_search" ] || [ -n "$new_domain_name" ] ||
|
|
||||||
[ -n "$new_domain_name_servers" ]; then
|
|
||||||
- new_resolv_conf=/etc/resolv.conf.dhclient-new
|
|
||||||
+ new_resolv_conf=/tmp/resolv.conf.dhclient-new
|
|
||||||
rm -f $new_resolv_conf
|
|
||||||
|
|
||||||
if [ -n "$new_domain_name" ]; then
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
||||||
-62
@@ -1,62 +0,0 @@
|
|||||||
From 7107511fd209f08f9a96f8938041ae48f3295895 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Christopher Larson <chris_larson@mentor.com>
|
|
||||||
Date: Tue, 15 Aug 2017 16:17:49 +0800
|
|
||||||
Subject: [PATCH 07/11] Add configure argument to make the libxml2 dependency
|
|
||||||
explicit and determinisitic.
|
|
||||||
|
|
||||||
Upstream-Status: Pending
|
|
||||||
|
|
||||||
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
|
|
||||||
|
|
||||||
Rebase to 4.3.6
|
|
||||||
|
|
||||||
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
|
|
||||||
---
|
|
||||||
configure.ac | 11 +++++++++++
|
|
||||||
1 file changed, 11 insertions(+)
|
|
||||||
|
|
||||||
Index: dhcp-4.4.1/configure.ac
|
|
||||||
===================================================================
|
|
||||||
--- dhcp-4.4.1.orig/configure.ac
|
|
||||||
+++ dhcp-4.4.1/configure.ac
|
|
||||||
@@ -642,6 +642,17 @@ if test "$have_nanosleep" = "rt"; then
|
|
||||||
LIBS="-lrt $LIBS"
|
|
||||||
fi
|
|
||||||
|
|
||||||
+AC_ARG_WITH(libxml2,
|
|
||||||
+ AS_HELP_STRING([--with-libxml2], [link against libxml2. this is needed if bind was built with xml2 support enabled]),
|
|
||||||
+ with_libxml2="$withval", with_libxml2="no")
|
|
||||||
+
|
|
||||||
+if test x$with_libxml2 != xno; then
|
|
||||||
+ AC_SEARCH_LIBS(xmlTextWriterStartElement, [xml2],
|
|
||||||
+ [if test x$with_libxml2 != xauto; then
|
|
||||||
+ AC_MSG_FAILURE([*** Cannot find xmlTextWriterStartElement with -lxml2 and libxml2 was requested])
|
|
||||||
+ fi])
|
|
||||||
+fi
|
|
||||||
+
|
|
||||||
# check for /dev/random (declares HAVE_DEV_RANDOM)
|
|
||||||
AC_MSG_CHECKING(for random device)
|
|
||||||
AC_ARG_WITH(randomdev,
|
|
||||||
Index: dhcp-4.4.1/configure.ac+lt
|
|
||||||
===================================================================
|
|
||||||
--- dhcp-4.4.1.orig/configure.ac+lt
|
|
||||||
+++ dhcp-4.4.1/configure.ac+lt
|
|
||||||
@@ -909,6 +909,18 @@ elif test "$want_libtool" = "yes" -a "$u
|
|
||||||
fi
|
|
||||||
AM_CONDITIONAL(INSTALL_BIND, test "$want_install_bind" = "yes")
|
|
||||||
|
|
||||||
+AC_ARG_WITH(libxml2,
|
|
||||||
+ AS_HELP_STRING([--with-libxml2], [link against libxml2. this is needed if bind was built with xml2 support enabled]),
|
|
||||||
+ with_libxml2="$withval", with_libxml2="no")
|
|
||||||
+
|
|
||||||
+if test x$with_libxml2 != xno; then
|
|
||||||
+ AC_SEARCH_LIBS(xmlTextWriterStartElement, [xml2],,
|
|
||||||
+ [if test x$with_libxml2 != xauto; then
|
|
||||||
+ AC_MSG_FAILURE([*** Cannot find xmlTextWriterStartElement with -lxml2 and libxml2 was requested])
|
|
||||||
+ fi])
|
|
||||||
+fi
|
|
||||||
+
|
|
||||||
+
|
|
||||||
# OpenLDAP support.
|
|
||||||
AC_ARG_WITH(ldap,
|
|
||||||
AS_HELP_STRING([--with-ldap],[enable OpenLDAP support in dhcpd (default is no)]),
|
|
||||||
-28
@@ -1,28 +0,0 @@
|
|||||||
From f3f8b7726e50e24ef3edf5fa5a17e31d39118d7e Mon Sep 17 00:00:00 2001
|
|
||||||
From: Andre McCurdy <armccurdy@gmail.com>
|
|
||||||
Date: Tue, 15 Aug 2017 15:49:31 +0800
|
|
||||||
Subject: [PATCH 09/11] remove dhclient-script bash dependency
|
|
||||||
|
|
||||||
Upstream-Status: Inappropriate [OE specific]
|
|
||||||
|
|
||||||
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
|
|
||||||
|
|
||||||
Rebase to 4.3.6
|
|
||||||
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
|
|
||||||
---
|
|
||||||
client/scripts/linux | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/client/scripts/linux b/client/scripts/linux
|
|
||||||
index 3122a75..1712d7d 100755
|
|
||||||
--- a/client/scripts/linux
|
|
||||||
+++ b/client/scripts/linux
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-#!/bin/bash
|
|
||||||
+#!/bin/sh
|
|
||||||
# dhclient-script for Linux. Dan Halbert, March, 1997.
|
|
||||||
# Updated for Linux 2.[12] by Brian J. Murrell, January 1999.
|
|
||||||
# No guarantees about this. I'm a novice at the details of Linux
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
||||||
-34
@@ -1,34 +0,0 @@
|
|||||||
From 501543b3ef715488a142e3d301ff2733aa33eec7 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Awais Belal <awais_belal@mentor.com>
|
|
||||||
Date: Wed, 25 Oct 2017 21:00:05 +0500
|
|
||||||
Subject: [PATCH] dhcp: correct the intention for xml2 lib search
|
|
||||||
|
|
||||||
A missing case breaks the build when libxml2 is
|
|
||||||
required and found appropriately. The third argument
|
|
||||||
to the function AC_SEARCH_LIB is action-if-found which
|
|
||||||
was mistakenly been used for the case where the library
|
|
||||||
is not found and hence breaks the configure phase
|
|
||||||
where it shoud actually pass.
|
|
||||||
We now pass on silently when action-if-found is
|
|
||||||
executed.
|
|
||||||
|
|
||||||
Upstream-Status: Pending
|
|
||||||
|
|
||||||
Signed-off-by: Awais Belal <awais_belal@mentor.com>
|
|
||||||
---
|
|
||||||
configure.ac | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
Index: dhcp-4.4.1/configure.ac
|
|
||||||
===================================================================
|
|
||||||
--- dhcp-4.4.1.orig/configure.ac
|
|
||||||
+++ dhcp-4.4.1/configure.ac
|
|
||||||
@@ -647,7 +647,7 @@ AC_ARG_WITH(libxml2,
|
|
||||||
with_libxml2="$withval", with_libxml2="no")
|
|
||||||
|
|
||||||
if test x$with_libxml2 != xno; then
|
|
||||||
- AC_SEARCH_LIBS(xmlTextWriterStartElement, [xml2],
|
|
||||||
+ AC_SEARCH_LIBS(xmlTextWriterStartElement, [xml2],,
|
|
||||||
[if test x$with_libxml2 != xauto; then
|
|
||||||
AC_MSG_FAILURE([*** Cannot find xmlTextWriterStartElement with -lxml2 and libxml2 was requested])
|
|
||||||
fi])
|
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
lib and include path is hardcoded for use_libbind
|
|
||||||
|
|
||||||
use libdir and includedir vars
|
|
||||||
|
|
||||||
Upstream-Status: Pending
|
|
||||||
Signed-off-by: Armin Kuster <akuster808@gmail.com>
|
|
||||||
|
|
||||||
Index: dhcp-4.4.1/configure.ac+lt
|
|
||||||
===================================================================
|
|
||||||
--- dhcp-4.4.1.orig/configure.ac+lt
|
|
||||||
+++ dhcp-4.4.1/configure.ac+lt
|
|
||||||
@@ -801,22 +801,22 @@ no)
|
|
||||||
if test ! -d "$use_libbind"; then
|
|
||||||
AC_MSG_ERROR([Cannot find bind directory at $use_libbind])
|
|
||||||
fi
|
|
||||||
- if test ! -d "$use_libbind/include" -o \
|
|
||||||
- ! -f "$use_libbind/include/isc/buffer.h"
|
|
||||||
+ if test ! -d "$use_libbind/$includedir" -o \
|
|
||||||
+ ! -f "$use_libbind/$includedir/isc/buffer.h"
|
|
||||||
then
|
|
||||||
- AC_MSG_ERROR([Cannot find bind includes at $use_libbind/include])
|
|
||||||
+ AC_MSG_ERROR([Cannot find bind includes at $use_libbind/$includedir])
|
|
||||||
fi
|
|
||||||
- if test ! -d "$use_libbind/lib" -o \
|
|
||||||
- \( ! -f "$use_libbind/lib/libisc.a" -a \
|
|
||||||
- ! -f "$use_libbind/lib/libisc.la" \)
|
|
||||||
+ if test ! -d "$use_libbind/$libdir" -o \
|
|
||||||
+ \( ! -f "$use_libbind/$libdir/libisc.a" -a \
|
|
||||||
+ ! -f "$use_libbind/$libdir/libisc.la" \)
|
|
||||||
then
|
|
||||||
- AC_MSG_ERROR([Cannot find bind libraries at $use_libbind/lib])
|
|
||||||
+ AC_MSG_ERROR([Cannot find bind libraries at $use_libbind/$libdir])
|
|
||||||
fi
|
|
||||||
BINDDIR="$use_libbind"
|
|
||||||
- BINDLIBIRSDIR="$BINDDIR/lib"
|
|
||||||
- BINDLIBDNSDIR="$BINDDIR/lib"
|
|
||||||
- BINDLIBISCCFGDIR="$BINDDIR/lib"
|
|
||||||
- BINDLIBISCDIR="$BINDDIR/lib"
|
|
||||||
+ BINDLIBIRSDIR="$BINDDIR/$libdir"
|
|
||||||
+ BINDLIBDNSDIR="$BINDDIR/$libdir"
|
|
||||||
+ BINDLIBISCCFGDIR="$BINDDIR/$libdir"
|
|
||||||
+ BINDLIBISCDIR="$BINDDIR/$libdir"
|
|
||||||
DISTCHECK_LIBBIND_CONFIGURE_FLAG="--with-libbind=$use_libbind"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
@@ -856,14 +856,14 @@ AC_ARG_ENABLE(libtool,
|
|
||||||
|
|
||||||
if test "$use_libbind" != "no"; then
|
|
||||||
if test "$want_libtool" = "yes" -a \
|
|
||||||
- ! -f "$use_libbind/lib/libisc.la"
|
|
||||||
+ ! -f "$use_libbind/$libdir/libisc.la"
|
|
||||||
then
|
|
||||||
- AC_MSG_ERROR([Cannot find dynamic libraries at $use_libbind/lib])
|
|
||||||
+ AC_MSG_ERROR([Cannot find dynamic libraries at $use_libbind/$libdir])
|
|
||||||
fi
|
|
||||||
if test "$want_libtool" = "no" -a \
|
|
||||||
- ! -f "$use_libbind/lib/libisc.a"
|
|
||||||
+ ! -f "$use_libbind/$libdir/libisc.a"
|
|
||||||
then
|
|
||||||
- AC_MSG_ERROR([Cannot find static libraries at $use_libbind/lib])
|
|
||||||
+ AC_MSG_ERROR([Cannot find static libraries at $use_libbind/$libdir])
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
require dhcp.inc
|
|
||||||
|
|
||||||
SRC_URI += "file://0001-define-macro-_PATH_DHCPD_CONF-and-_PATH_DHCLIENT_CON.patch \
|
|
||||||
file://0002-dhclient-dbus.patch \
|
|
||||||
file://0003-link-with-lcrypto.patch \
|
|
||||||
file://0004-Fix-out-of-tree-builds.patch \
|
|
||||||
file://0005-dhcp-client-fix-invoke-dhclient-script-failed-on-Rea.patch \
|
|
||||||
file://0007-Add-configure-argument-to-make-the-libxml2-dependenc.patch \
|
|
||||||
file://0009-remove-dhclient-script-bash-dependency.patch \
|
|
||||||
file://0012-dhcp-correct-the-intention-for-xml2-lib-search.patch \
|
|
||||||
file://0013-fixup_use_libbind.patch \
|
|
||||||
file://0001-workaround-busybox-limitation-in-linux-dhclient-script.patch \
|
|
||||||
"
|
|
||||||
|
|
||||||
SRC_URI[md5sum] = "2afdaf8498dc1edaf3012efdd589b3e1"
|
|
||||||
SRC_URI[sha256sum] = "1a7ccd64a16e5e68f7b5e0f527fd07240a2892ea53fe245620f4f5f607004521"
|
|
||||||
|
|
||||||
LDFLAGS_append = " -pthread"
|
|
||||||
|
|
||||||
PACKAGECONFIG ?= ""
|
|
||||||
PACKAGECONFIG[bind-httpstats] = "--with-libxml2,--without-libxml2,libxml2"
|
|
||||||
|
|
||||||
CFLAGS += "-fcommon"
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user