diskimg: new platform aimed at creating disk images for quick installation via dd

This commit is contained in:
Silvan Calarco 2014-12-06 13:37:42 +01:00
parent 09c06fb9d8
commit bde8681be1
5 changed files with 33 additions and 4 deletions

View File

@ -2,13 +2,11 @@
[ -e $TARGETDIR/platforms/$PLATFORM/pre.inc.sh ] && . $TARGETDIR/platforms/$PLATFORM/pre.inc.sh [ -e $TARGETDIR/platforms/$PLATFORM/pre.inc.sh ] && . $TARGETDIR/platforms/$PLATFORM/pre.inc.sh
[ "$PRODUCT_NAME" ] && \ [ "$PRODUCT_NAME" ] && \
MEDIA_NAME=`PLATFORM=$PRODUCT_NAME media_name` || MEDIA_NAME=`PLATFORM=$PRODUCT_NAME VARIANT=$VARIANT medium_name` ||
MEDIA_NAME=`media_name` MEDIA_NAME=`VARIANT=$VARIANT medium_name`
#if [ "$FORCE" = "1" -o ! -e "$LOCALSTATEDIR/$MEDIA_NAME" ]; then #if [ "$FORCE" = "1" -o ! -e "$LOCALSTATEDIR/$MEDIA_NAME" ]; then
[ $MEDIA = "raw" ] && create_raw_filesystem $LOCALSTATEDIR/$MEDIA_NAME $MEDIA_SIZE 1024k $ROOTFS
#create_livecd #create_livecd
initialize_root_dir initialize_root_dir
create_rpm_database create_rpm_database

View File

@ -0,0 +1,3 @@
$(MAKEDIST_TARGET)-diskimg: openmamba-install-scripts
$(MAKEDIST_TARGET)-diskimg-en:
$(MAKEDIST_TARGET)-diskimg-it:

View File

View File

@ -0,0 +1,16 @@
case $VARIANT in
bananapi) ROOTFSINSTALL_ADD="-bpi"; DEVICEARCH=arm ;;
raspberrypi) ROOTFSINSTALL_ADD="-rpi"; DEVICEARCH=arm ;;
cubox) ROOTFSINSTALL_ADD="-cubox"; DEVICEARCH=arm ;;
*) ROOTFSINSTALL_ADD= ; DEVICEARCH=$ARCH ;;
esac
/usr/sbin/rootfsinstall -y $ROOTFSINSTALL_ADD $LOOPDEV \
$LOCALSTATEDIR/openmamba-rootfs-light-$LANGUAGE.$DEVICEARCH.tar.xz || \
{ retcode=$?
echo "$makedist_me: fatal error, aborting installation" >&2
echo "$makedist_me: exit code was: $retcode" >&2
echo "$makedist_me: sleeping 600 seconds"
sleep 600
{ (exit 1); exit 1; }; }

View File

@ -0,0 +1,12 @@
# raw disk image
MEDIA=raw
MEDIA_SIZE=3584
KERNEL_IGNORE=1
DISTROMATIC=off
if [ "$SUBPLATFORM" ]; then
PRODUCT_NAME=light
VARIANT=$SUBPLATFORM
SUBPLATFORM=
fi