Current location

narf Source control manager Git

aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetter Reinholdtsen <pere@hungry.com>2013-10-28 15:46:22 +0100
committerPetter Reinholdtsen <pere@hungry.com>2013-10-28 15:46:22 +0100
commit29e1eeff7537bbb9926d3dce2c1e3dd570347256 (patch)
tree39ae9f538fab1feebef88ee2e807fc9dad352602 /bin/freedombox-customize
parentbacedd592328eb7b6ed966fc06f218d22ea15bfa (diff)
Remove hardware specific code. Moved to freedombox-setup.
Diffstat (limited to 'bin/freedombox-customize')
-rwxr-xr-xbin/freedombox-customize79
1 files changed, 0 insertions, 79 deletions
diff --git a/bin/freedombox-customize b/bin/freedombox-customize
index 90bdba1..7da6fd8 100755
--- a/bin/freedombox-customize
+++ b/bin/freedombox-customize
@@ -59,83 +59,4 @@ chroot $rootdir apt-get install -y freedombox-setup
rm $rootdir/usr/sbin/policy-rc.d
-# Install non-free binary blob needed to boot Raspberry Pi. This pull
-# in a kernel too.
-if [ "$MACHINE" = raspberry ] ; then
- # Packages used by rpi-update to make Raspberry Pi bootable
- chroot $rootdir \
- apt-get install -y git-core binutils ca-certificates wget kmod
-
- cat <<EOF > $rootdir/usr/lib/freedombox/setup.d/95_raspberry-pi
-#!/bin/sh
-wget https://raw.github.com/Hexxeh/rpi-update/master/rpi-update \
- -O /usr/bin/rpi-update
-chmod a+x /usr/bin/rpi-update
-mkdir -p /lib/modules
-touch /boot/start.elf
-rpi-update > /root/rpi-update.log
-EOF
- chmod a+rx $rootdir/usr/lib/freedombox/setup.d/95_raspberry-pi
-fi
-
-if [ "$MACHINE" = dreamplug ] ; then
-
- # allow flash-kernel to work without valid /proc contents
- # ** this doesn't *really* work, since there are too many checks
- # that fail in an emulated environment! We'll have to do it by
- # hand below anyway...
- export FK_MACHINE="Globalscale Technologies Dreamplug"
-
- # Installing flash-kernel here, as installing it using debootstrap
- # causes all kernel related postinst scripts to stop working when
- # installed in a chroot.
- chroot $rootdir apt-get install -y flash-kernel
-
-cat <<'EOF' > $rootdir/usr/lib/freedombox/setup.d/95_dreamplug-kernel
-#!/bin/sh
-# process installed kernel to create uImage, uInitrd, dtb
-# using flash-kernel would be a good approach, except it fails in the
-# cross build environment due to too many environment checks...
-#FK_MACHINE="Globalscale Technologies Dreamplug" flash-kernel
-# so, let's do it manually...
-
-# flash-kernel's hook-functions provided to mkinitramfs have the
-# unfortunate side-effect of creating /conf/param.conf in the initrd
-# when run from our emulated chroot environment, which means our root=
-# on the kernel command line is completely ignored! repack the initrd
-# to remove this evil...
-
-kernelVersion=$(ls /usr/lib/*/kirkwood-dreamplug.dtb | cut -d/ -f4)
-version=$(echo $kernelVersion | sed 's/linux-image-\(.*\)/\1/')
-initRd=initrd.img-$version
-vmlinuz=vmlinuz-$version
-
-mkdir /tmp/initrd-repack
-
-(cd /tmp/initrd-repack ; \
- zcat /boot/$initRd | cpio -i ; \
- rm -f conf/param.conf ; \
- find . | cpio --quiet -o -H newc | \
- gzip -9 > /boot/$initRd )
-
-rm -rf /tmp/initrd-repack
-
-(cd /boot ; \
- cp /usr/lib/$kernelVersion/kirkwood-dreamplug.dtb dtb ; \
- cat $vmlinuz dtb >> temp-kernel ; \
- mkimage -A arm -O linux -T kernel -n "Debian kernel ${version}" \
- -C none -a 0x8000 -e 0x8000 -d temp-kernel uImage ; \
- rm -f temp-kernel ; \
- mkimage -A arm -O linux -T ramdisk -C gzip -a 0x0 -e 0x0 \
- -n "Debian ramdisk ${version}" \
- -d $initRd uInitrd )
-
-# By default, spawn a console on the serial port
-echo "Adding a getty on the serial port"
-echo "T0:12345:respawn:/sbin/getty -L ttyS0 115200 vt100" >> /etc/inittab
-
-EOF
- chmod a+rx $rootdir/usr/lib/freedombox/setup.d/95_dreamplug-kernel
-fi
-
chroot $rootdir /usr/lib/freedombox/setup