--- /dev/null
+#!/bin/bash
+
+# This script creates a directory containing all files required for a installation on a device
+# For now, is only for efikamx devices but easily could be adapted for other devices (and/or ABIs)
+# To do that, just change the variables you need and remove/add
+
+VERSION="2.7.1-rc1"
+DEVICE="efikamx"
+KERNEL_VERSION_STRING="2.6.31.14.27-efikamx_20111026"
+DESTDIR="crux-arm-$VERSION-$DEVICE"
+COLLECTIONS="core"
+
+[ -d $DESTDIR ] && rm -r $DESTDIR
+mkdir -p $DESTDIR
+
+# bootloader files
+wget -c -O $DESTDIR/boot.scr http://crux-arm.nu/files/devices/$DEVICE/boot-ram.scr
+wget -c -O $DESTDIR/uImage http://crux-arm.nu/files/devices/$DEVICE/uImage-$KERNEL_VERSION_STRING
+wget -c -O $DESTDIR/uInitrd http://crux-arm.nu/files/devices/$DEVICE/uInitrd-$VERSION
+
+# kernel files
+mkdir -p $DESTDIR/crux/kernel
+wget -c -P $DESTDIR/crux/kernel http://crux-arm.nu/files/distfiles/$DEVICE/linux-$KERNEL_VERSION_STRING.tar.bz2
+wget -c -P $DESTDIR/crux/kernel http://crux-arm.nu/files/devices/$DEVICE/modules-$KERNEL_VERSION_STRING.tar.bz2
+wget -c -P $DESTDIR/crux/kernel http://crux-arm.nu/files/devices/$DEVICE/linux-$KERNEL_VERSION_STRING.config
+
+# download released packages
+# TODO: use local packages
+for COL in ${COLLECTIONS[@]}; do
+ mkdir -p $DESTDIR/crux/$COL
+ scp crux-arm.nu:/home/crux-arm/public_html/pkg/${VERSION%%-*}/$COL/* $DESTDIR/crux/$COL
+done
+
+# this stuff is important in order to get the setup working fine
+echo "$VERSION-$(date +'%Y%m%d')" > $DESTDIR/crux-media
+wget -O $DESTDIR/crux/setup.dependencies "http://crux.nu/gitweb/?p=system/iso.git;a=blob_plain;f=iso/setup.dependencies"
+
+# optional but is a nice to have per device and can differ between them (due to bootloader, configs, etc.)
+mkdir -p $DESTDIR/$DEVICE
+wget -c -P $DESTDIR/$DEVICE http://crux-arm.nu/files/devices/$DEVICE/securetty
+wget -c -P $DESTDIR/$DEVICE http://crux-arm.nu/files/devices/$DEVICE/inittab
+wget -c -P $DESTDIR/$DEVICE http://crux-arm.nu/files/devices/$DEVICE/10-imx.rules
+wget -c -P $DESTDIR/$DEVICE http://crux-arm.nu/files/devices/$DEVICE/xorg.conf
+wget -c -P $DESTDIR/$DEVICE http://crux-arm.nu/files/devices/$DEVICE/rc.modules
+wget -c -P $DESTDIR/$DEVICE http://crux-arm.nu/files/devices/$DEVICE/fstab-sda
+wget -c -P $DESTDIR/$DEVICE http://crux-arm.nu/files/devices/$DEVICE/fstab-mmcblk
+wget -c -P $DESTDIR/$DEVICE http://crux-arm.nu/files/devices/$DEVICE/boot-ram.scr
+wget -c -P $DESTDIR/$DEVICE http://crux-arm.nu/files/devices/$DEVICE/boot-ram.script
+wget -c -P $DESTDIR/$DEVICE http://crux-arm.nu/files/devices/$DEVICE/boot-sda.scr
+wget -c -P $DESTDIR/$DEVICE http://crux-arm.nu/files/devices/$DEVICE/boot-sda.script
+wget -c -P $DESTDIR/$DEVICE http://crux-arm.nu/files/devices/$DEVICE/boot-mmcblk.scr
+wget -c -P $DESTDIR/$DEVICE http://crux-arm.nu/files/devices/$DEVICE/boot-mmcblk.script
+wget -c -P $DESTDIR/$DEVICE http://crux-arm.nu/files/devices/$DEVICE/prt-get.conf
+wget -O $DESTDIR/$DEVICE/$DEVICE.rsync "http://crux-arm.nu/portdb/?getup=$DEVICE&type=rsync"
+
+# End of file