[molecules] add Sabayon ARM Base molecule (woot!)
This commit is contained in:
parent
fbe5502b69
commit
f34387c8f1
58
molecules/sabayon-arm-base.spec
Normal file
58
molecules/sabayon-arm-base.spec
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
# Define an alternative execution strategy, in this case, the value must be
|
||||||
|
execution_strategy: chroot_to_mmc
|
||||||
|
|
||||||
|
# Error script command, executed when something went wrong and molecule has
|
||||||
|
# to terminate the execution
|
||||||
|
# error_script: /path/to/some/error_script.sh
|
||||||
|
|
||||||
|
# Pre-image building script. Hook called before image file creation
|
||||||
|
# pre_image_script: /sabayon/scripts/pre_image_script.sh
|
||||||
|
|
||||||
|
# Post-image building script. Hook called after image file creation and move
|
||||||
|
# into destination directory.
|
||||||
|
# Variables exported:
|
||||||
|
# IMAGE_PATH = path pointing to the destination image file
|
||||||
|
# IMAGE_CHECKSUM_PATH = path pointing to the destination image file checksum (md5)
|
||||||
|
post_image_script: /sabayon/scripts/post_mmc_image_script.sh
|
||||||
|
|
||||||
|
# Destination directory for the image path (MANDATORY)
|
||||||
|
destination_image_directory: /sabayon/images
|
||||||
|
|
||||||
|
# Specify image file name (image file name will be automatically
|
||||||
|
# produced otherwise)
|
||||||
|
image_name: Sabayon_Linux_DAILY_armv7a_Base.img
|
||||||
|
|
||||||
|
# External script that will generate the image file.
|
||||||
|
# The same can be copied onto a MMC by using dd
|
||||||
|
image_generator_script: /sabayon/scripts/mkloopcard.txt
|
||||||
|
|
||||||
|
# Specify the image file size in Megabytes. This is mandatory.
|
||||||
|
# To avoid runtime failure, make sure the image is large enough to fit your
|
||||||
|
# chroot data.
|
||||||
|
# Example: 5000 (means: ~5GB)
|
||||||
|
# Example: 15000 (means: ~15GB)
|
||||||
|
image_mb: 2048
|
||||||
|
|
||||||
|
# Directories to remove completely (comma separated)
|
||||||
|
# paths_to_remove:
|
||||||
|
|
||||||
|
# Directories to empty (comma separated)
|
||||||
|
# paths_to_empty:
|
||||||
|
|
||||||
|
# Path to source chroot (mandatory)
|
||||||
|
source_chroot: /sabayon/sources/armv7l_core-2012
|
||||||
|
|
||||||
|
# Path to boot partition data (MLO, u-boot.img etc)
|
||||||
|
source_boot_directory: /sabayon/beaglebone/boot
|
||||||
|
|
||||||
|
# Release file that will be created onto the root filesystem
|
||||||
|
release_file: /etc/sabayon-edition
|
||||||
|
|
||||||
|
# Release string (the actual distro name)
|
||||||
|
release_string: Sabayon Linux
|
||||||
|
|
||||||
|
# Release desc (the actual release description)
|
||||||
|
release_desc: armv7a Base
|
||||||
|
|
||||||
|
# Release Version (used to generate release_file)
|
||||||
|
release_version: 7
|
28
scripts/post_mmc_image_script.sh
Executable file
28
scripts/post_mmc_image_script.sh
Executable file
@ -0,0 +1,28 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Compress the freaking MMC image using xz
|
||||||
|
#
|
||||||
|
# Available env vars:
|
||||||
|
# IMAGE_PATH = path to generated image
|
||||||
|
# IMAGE_CHECKSUM_PATH = path to generated md5 for image
|
||||||
|
#
|
||||||
|
|
||||||
|
/usr/sbin/env-update && source /etc/profile
|
||||||
|
|
||||||
|
COMPRESSED_IMAGE_PATH="${IMAGE_PATH}.xz"
|
||||||
|
COMPRESSED_IMAGE_CHECKSUM_PATH="${IMAGE_CHECKSUM_PATH}.xz"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "Spawning xz --compress --force for:"
|
||||||
|
echo "IMAGE_PATH = ${IMAGE_PATH}"
|
||||||
|
echo "COMPRESSED_IMAGE_PATH = ${COMPRESSED_IMAGE_PATH}"
|
||||||
|
echo "IMAGE_CHECKSUM_PATH = ${IMAGE_CHECKSUM_PATH}"
|
||||||
|
echo
|
||||||
|
|
||||||
|
xz --compress --force "${IMAGE_PATH}" || exit 1
|
||||||
|
[[ ! -f "${COMPRESSED_IMAGE_PATH}" ]] && { echo "${COMPRESSED_IMAGE_PATH} not found"; exit 1; }
|
||||||
|
|
||||||
|
cd "$(dirname "${COMPRESSED_IMAGE_PATH}")" || exit 1
|
||||||
|
img_name=$(basename "${COMPRESSED_IMAGE_PATH}")
|
||||||
|
md5sum "${img_name}" > "${COMPRESSED_IMAGE_CHECKSUM_PATH}"
|
||||||
|
exit ${?}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user