| 1 | #!/bin/bash |
| 2 | |
| 3 | # This script creates a directory containing all files required for a installation on a device |
| 4 | # For now, is only for efikamx devices but easily could be adapted for other devices (and/or ABIs) |
| 5 | # To do that, just change the variables you need and remove/add |
| 6 | |
| 7 | VERSION="2.7.1-rc1" |
| 8 | DEVICE="efikamx" |
| 9 | KERNEL_VERSION_STRING="2.6.31.14.27-efikamx_20111026" |
| 10 | DESTDIR="crux-arm-$VERSION-$DEVICE" |
| 11 | |
| 12 | [ -d $DESTDIR ] && rm -r $DESTDIR |
| 13 | mkdir -p $DESTDIR |
| 14 | |
| 15 | # bootloader files |
| 16 | wget -c -O $DESTDIR/boot.scr http://crux-arm.nu/files/devices/$DEVICE/boot-ram.scr |
| 17 | wget -c -O $DESTDIR/uImage http://crux-arm.nu/files/devices/$DEVICE/uImage-$KERNEL_VERSION_STRING |
| 18 | wget -c -O $DESTDIR/uInitrd http://crux-arm.nu/files/devices/$DEVICE/uInitrd-$VERSION |
| 19 | |
| 20 | # kernel files |
| 21 | mkdir -p $DESTDIR/crux/kernel |
| 22 | wget -c -P $DESTDIR/crux/kernel http://crux-arm.nu/files/distfiles/$DEVICE/linux-$KERNEL_VERSION_STRING.tar.bz2 |
| 23 | wget -c -P $DESTDIR/crux/kernel http://crux-arm.nu/files/devices/$DEVICE/modules-$KERNEL_VERSION_STRING.tar.bz2 |
| 24 | wget -c -P $DESTDIR/crux/kernel http://crux-arm.nu/files/devices/$DEVICE/linux-$KERNEL_VERSION_STRING.config |
| 25 | |
| 26 | # download released packages |
| 27 | mkdir -p $DESTDIR/crux/core |
| 28 | PACKAGES="$(curl -s http://crux-arm.nu/pkg/${VERSION%%-*}/core/ | grep '.pkg.tar.' | cut -d'=' -f4 | cut -d'"' -f2)" |
| 29 | for pkg in ${PACKAGES[@]}; do |
| 30 | wget -c -P $DESTDIR/crux/core "http://crux-arm.nu/pkg/${VERSION%%-*}/core/$pkg" |
| 31 | done |
| 32 | |
| 33 | # this stuff is important in order to get the setup working fine |
| 34 | echo "$VERSION-$(date +'%Y%m%d')" > $DESTDIR/crux-media |
| 35 | wget -O $DESTDIR/crux/setup.dependencies "http://crux.nu/gitweb/?p=system/iso.git;a=blob_plain;f=iso/setup.dependencies" |
| 36 | |
| 37 | # optional but is a nice to have per device and can differ between them (due to bootloader, configs, etc.) |
| 38 | mkdir -p $DESTDIR/$DEVICE |
| 39 | wget -c -P $DESTDIR/$DEVICE http://crux-arm.nu/files/devices/$DEVICE/securetty |
| 40 | wget -c -P $DESTDIR/$DEVICE http://crux-arm.nu/files/devices/$DEVICE/inittab |
| 41 | wget -c -P $DESTDIR/$DEVICE http://crux-arm.nu/files/devices/$DEVICE/10-imx.rules |
| 42 | wget -c -P $DESTDIR/$DEVICE http://crux-arm.nu/files/devices/$DEVICE/xorg.conf |
| 43 | wget -c -P $DESTDIR/$DEVICE http://crux-arm.nu/files/devices/$DEVICE/rc.modules |
| 44 | wget -c -P $DESTDIR/$DEVICE http://crux-arm.nu/files/devices/$DEVICE/fstab-sda |
| 45 | wget -c -P $DESTDIR/$DEVICE http://crux-arm.nu/files/devices/$DEVICE/fstab-mmcblk |
| 46 | wget -c -P $DESTDIR/$DEVICE http://crux-arm.nu/files/devices/$DEVICE/boot-ram.scr |
| 47 | wget -c -P $DESTDIR/$DEVICE http://crux-arm.nu/files/devices/$DEVICE/boot-ram.script |
| 48 | wget -c -P $DESTDIR/$DEVICE http://crux-arm.nu/files/devices/$DEVICE/boot-sda.scr |
| 49 | wget -c -P $DESTDIR/$DEVICE http://crux-arm.nu/files/devices/$DEVICE/boot-sda.script |
| 50 | wget -c -P $DESTDIR/$DEVICE http://crux-arm.nu/files/devices/$DEVICE/boot-mmcblk.scr |
| 51 | wget -c -P $DESTDIR/$DEVICE http://crux-arm.nu/files/devices/$DEVICE/boot-mmcblk.script |
| 52 | wget -c -P $DESTDIR/$DEVICE http://crux-arm.nu/files/devices/$DEVICE/prt-get.conf |
| 53 | wget -O $DESTDIR/$DEVICE/$DEVICE.rsync "http://crux-arm.nu/portdb/?getup=$DEVICE&type=rsync" |
| 54 | |
| 55 | # End of file |