You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.1 KiB

9 years ago
#!/bin/bash
set -e
TARGET_DIR=$1
BOARD_DIR="$BR2_EXTERNAL/board/coreboot"
error_exit() {
if [ $1 -gt 0 ]; then
echo "Error occured !"
exit $1
fi
}
9 years ago
# Copy the rootfs additions
if [ -d "$BOARD_DIR/rootfs-additions" ]; then
echo "Copying rootfs additions ..."
9 years ago
rsync -va $BOARD_DIR/rootfs-additions/* $TARGET_DIR/
error_exit $?
9 years ago
else
echo "No rootfs additions found !"
9 years ago
fi
# Disable dropbear server
9 years ago
if [ -e $TARGET_DIR/etc/init.d/S50dropbear ]; then
echo "Disabling dropbear server ..."
chmod a-x $TARGET_DIR/etc/init.d/S50dropbear
error_exit $?
9 years ago
fi
# Enable virtual terminals in inittab
9 years ago
echo "Enabling virtual terminal 2..12 ..."
for ii in {12..2}; do
sed -E -i 's/GENERIC_SERIAL/GENERIC_SERIAL\ntty'$ii'::askfirst:-\/bin\/login/' "$TARGET_DIR/etc/inittab"
error_exit $?
9 years ago
done
# Set pax flax (tentative)
echo "Setting paxflag on libcrypto ..."
/sbin/paxctl -c $TARGET_DIR/usr/lib/libcrypto.so.1.0.0
error_exit $?
/sbin/paxctl -m $TARGET_DIR/usr/lib/libcrypto.so.1.0.0
error_exit $?
# Add symlink to gpg2 for convenience
if [ ! -e "$TARGET_DIR/usr/bin/gpg" ]; then
echo "Symlinking gpg2 ..."
ln -s /usr/bin/gpg2 $TARGET_DIR/usr/bin/gpg
fi