Browse Source
Merge pull request #119 from drewmoseley/v2
BBB EMMC and multiple config command line support
2.0.x
Mirza Krak
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with
43 additions and
10 deletions
-
.gitignore
-
configs/beaglebone_black_debian_emmc_config
-
configs/beaglebone_black_debian_sdcard_config
-
mender-convert-extract
-
mender-convert-modify
-
mender-convert-package
-
modules/config.sh
|
|
@ -3,3 +3,4 @@ input |
|
|
|
work |
|
|
|
rootfs_overlay_demo/* |
|
|
|
tests |
|
|
|
mender_local_config |
|
|
|
|
|
@ -0,0 +1,9 @@ |
|
|
|
# Binaries generated with the following script: |
|
|
|
# |
|
|
|
# https://github.com/drewmoseley/mender-convert-integration-scripts/blob/master/build-uboot-bbb.sh |
|
|
|
# |
|
|
|
BEAGLEBONE_BLACK_BINARIES="beaglebone-black-integration-debian-emmc-2018.07.004.tar" |
|
|
|
source configs/beaglebone_black_base_config |
|
|
|
MENDER_STORAGE_TOTAL_SIZE_MB="3648" |
|
|
|
MENDER_DEVICE_TYPE="beaglebone-emmc" |
|
|
|
MENDER_STORAGE_DEVICE="/dev/mmcblk1p" |
|
|
@ -2,5 +2,7 @@ |
|
|
|
# |
|
|
|
# https://github.com/drewmoseley/mender-convert-integration-scripts/blob/master/build-uboot-bbb.sh |
|
|
|
# |
|
|
|
BEAGLEBONE_BLACK_BINARIES="beaglebone-black-integration-debian-2018.07.002.tar" |
|
|
|
BEAGLEBONE_BLACK_BINARIES="beaglebone-black-integration-debian-sdcard-2018.07.004.tar" |
|
|
|
source configs/beaglebone_black_base_config |
|
|
|
MENDER_DEVICE_TYPE="beaglebone-sdcard" |
|
|
|
MENDER_STORAGE_DEVICE="/dev/mmcblk0p" |
|
|
|
|
|
@ -19,6 +19,8 @@ echo "Running $(basename $0): $@" |
|
|
|
source modules/bootstrap.sh |
|
|
|
source modules/disk.sh |
|
|
|
|
|
|
|
declare -a configs |
|
|
|
|
|
|
|
disk_image="" |
|
|
|
while (( "$#" )); do |
|
|
|
case "$1" in |
|
|
@ -27,7 +29,7 @@ while (( "$#" )); do |
|
|
|
shift 2 |
|
|
|
;; |
|
|
|
-c | --config) |
|
|
|
configs+="${2}" |
|
|
|
configs+=("${2}") |
|
|
|
shift 2 |
|
|
|
;; |
|
|
|
-d | --disk-image) |
|
|
@ -50,7 +52,11 @@ if [ ! -e ${disk_image} ]; then |
|
|
|
log_fatal "File not found: ${disk_image}" |
|
|
|
fi |
|
|
|
|
|
|
|
source modules/config.sh "${configs[@]}" |
|
|
|
# Note the use of %q formatting here. This is a bash feature to add |
|
|
|
# proper quoting to the strings so that spaces and special characters |
|
|
|
# will be treated properly. Primarily for supporting spaces in |
|
|
|
# pathnames and avoid splitting those into multiple parameters. |
|
|
|
source modules/config.sh $(printf "%q " "${configs[@]}") |
|
|
|
|
|
|
|
MKFS_VFAT="/usr/bin/mkfs.vfat" |
|
|
|
if [ ! -f ${MKFS_VFAT} ]; then |
|
|
|
|
|
@ -39,6 +39,8 @@ source modules/bootstrap.sh |
|
|
|
source modules/disk.sh |
|
|
|
source modules/probe.sh |
|
|
|
|
|
|
|
declare -a configs |
|
|
|
|
|
|
|
while (( "$#" )); do |
|
|
|
case "$1" in |
|
|
|
-o | --overlay) |
|
|
@ -46,7 +48,7 @@ while (( "$#" )); do |
|
|
|
shift 2 |
|
|
|
;; |
|
|
|
-c | --config) |
|
|
|
configs+="${2}" |
|
|
|
configs+=("${2}") |
|
|
|
shift 2 |
|
|
|
;; |
|
|
|
-d | --disk-image) |
|
|
@ -59,7 +61,11 @@ while (( "$#" )); do |
|
|
|
esac |
|
|
|
done |
|
|
|
|
|
|
|
source modules/config.sh "${configs[@]}" |
|
|
|
# Note the use of %q formatting here. This is a bash feature to add |
|
|
|
# proper quoting to the strings so that spaces and special characters |
|
|
|
# will be treated properly. Primarily for supporting spaces in |
|
|
|
# pathnames and avoid splitting those into multiple parameters. |
|
|
|
source modules/config.sh $(printf "%q " "${configs[@]}") |
|
|
|
|
|
|
|
boot_part=$(disk_boot_part) |
|
|
|
root_part=$(disk_root_part) |
|
|
|
|
|
@ -38,6 +38,8 @@ echo "Running $(basename $0): $@" |
|
|
|
source modules/bootstrap.sh |
|
|
|
source modules/disk.sh |
|
|
|
|
|
|
|
declare -a configs |
|
|
|
|
|
|
|
while (( "$#" )); do |
|
|
|
case "$1" in |
|
|
|
-o | --overlay) |
|
|
@ -45,7 +47,7 @@ while (( "$#" )); do |
|
|
|
shift 2 |
|
|
|
;; |
|
|
|
-c | --config) |
|
|
|
configs+="${2}" |
|
|
|
configs+=("${2}") |
|
|
|
shift 2 |
|
|
|
;; |
|
|
|
-d | --disk-image) |
|
|
@ -58,7 +60,11 @@ while (( "$#" )); do |
|
|
|
esac |
|
|
|
done |
|
|
|
|
|
|
|
source modules/config.sh "${configs[@]}" |
|
|
|
# Note the use of %q formatting here. This is a bash feature to add |
|
|
|
# proper quoting to the strings so that spaces and special characters |
|
|
|
# will be treated properly. Primarily for supporting spaces in |
|
|
|
# pathnames and avoid splitting those into multiple parameters. |
|
|
|
source modules/config.sh $(printf "%q " "${configs[@]}") |
|
|
|
|
|
|
|
PARTED="/usr/bin/parted" |
|
|
|
if [ ! -f ${PARTED} ]; then |
|
|
|
|
|
@ -14,7 +14,10 @@ |
|
|
|
# See the License for the specific language governing permissions and |
|
|
|
# limitations under the License. |
|
|
|
|
|
|
|
for config in configs/mender_convert_config "$@"; do |
|
|
|
log_info "Using configuration file: ${config}" |
|
|
|
source ${config} |
|
|
|
# Read in the array of config files to process |
|
|
|
read -a configs <<< "${@}" |
|
|
|
configs=( "configs/mender_convert_config" "${configs[@]}" ) |
|
|
|
for config in "${configs[@]}"; do |
|
|
|
log_info "Using configuration file: ${config}" |
|
|
|
source "${config}" |
|
|
|
done |
|
|
|