[molecules] add BeagleBoard xM preliminary image specs

This commit is contained in:
Fabio Erculiani
2012-01-27 23:31:57 +01:00
parent 4d0bf50df3
commit 91d8589ff3
10 changed files with 130 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
#!/bin/sh
# rootfs and bootfs tarball is generated by beaglebone image
export MAKE_TARBALL="0"
exec /sabayon/scripts/mkloopcard.sh /sabayon/scripts/mkloopcard_beagleboard_chroot_hook.sh "$@"

View File

@@ -2,6 +2,9 @@
# (c) Copyright 2012 Fabio Erculiani <lxnay@sabayon.org>
# Licensed under terms of GPLv2
env-update
. /etc/profile
export LC_ALL=C
# Expected env variables:
@@ -13,6 +16,8 @@ export LC_ALL=C
# RELEASE_FILE
# IMAGE_NAME
# DESTINATION_IMAGE_DIR
# PACKAGES_TO_ADD
# PACKAGES_TO_REMOVE
if [ ${#} -ne 5 ]; then
echo "usage: ${0} <path to regular file containing the image> <size in Mb> <source boot files dir> <source chroot>"
@@ -135,6 +140,18 @@ mount "${ext_part}" "${tmp_dir}"
rsync -a -H -A -X --delete-during "${CHROOT_DIR}"/ "${tmp_dir}"/ --exclude "/proc/*" --exclude "/sys/*" \
--exclude "/dev/pts/*" --exclude "/dev/shm/*" || exit 1
# execute PACKAGES_TO_ADD and PACKAGES_TO_REMOVE
export ETP_NONINTERACTIVE=1
if [ -n "${PACKAGES_TO_ADD}" ]; then
add_cmd="equo install ${PACKAGES_TO_ADD}"
chroot "${tmp_dir}" ${add_cmd} || exit 1
fi
if [ -n "${PACKAGES_TO_REMOVE}" ]; then
rem_cmd="equo remove ${PACKAGES_TO_REMOVE}"
chroot "${tmp_dir}" ${rem_cmd} || exit 1
fi
# execute CHROOT_SCRIPT hook inside chroot
chroot_script_name=$(basename "${CHROOT_SCRIPT}")
target_chroot_script="${tmp_dir}"/"${chroot_script_name}"

View File

@@ -0,0 +1,28 @@
#!/bin/sh
# This script is executed inside the image chroot before packing up.
# Architecture/platform specific code goes here, like kernel install
# and configuration
env-update
. /etc/profile
# enable sshd by default
rc-update add sshd default
# TODO: error out here when linux-beaglebone is there
# "equo update" is done by inner_source_chroot_update script
# which directive is appended by iso_build.sh script
equo install sys-kernel/linux-beagle
eselect uimage set 1
# setup root password to... root!
echo root:root | chpasswd
# cleaning up deps
rc-update --update
# setup serial console
sed -i "s;s0:.*;s0:12345:respawn:/sbin/agetty 115200 ttyO2 vt100;" /etc/inittab || exit 1
exit 0