summaryrefslogtreecommitdiff
path: root/package/cfinstall
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2010-01-30 22:19:01 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2010-01-30 22:19:01 +0100
commit6051971c313ca3558c05631dc7f1c2c4b23a0114 (patch)
treedf4f26cd85a2e71c3acc867452161b8f6d6b7d75 /package/cfinstall
parent185f177980b01d3481df460ccd2feaea16f9734b (diff)
implement installation on nand and fix nand bootup
rb532 nand usage fixed. Rename cfinstall to adkinstall to abstract from backend device used.
Diffstat (limited to 'package/cfinstall')
-rw-r--r--package/cfinstall/Makefile37
-rw-r--r--package/cfinstall/src/cfinstall61
-rw-r--r--package/cfinstall/src/cfinstall.rb53249
3 files changed, 0 insertions, 147 deletions
diff --git a/package/cfinstall/Makefile b/package/cfinstall/Makefile
deleted file mode 100644
index fb64446f3..000000000
--- a/package/cfinstall/Makefile
+++ /dev/null
@@ -1,37 +0,0 @@
-# This file is part of the OpenADK project. OpenADK is copyrighted
-# material, please see the LICENCE file in the top-level directory.
-
-include ${TOPDIR}/rules.mk
-
-PKG_NAME:= cfinstall
-PKG_VERSION:= 1.0
-PKG_RELEASE:= 3
-PKG_DESCR:= compact flash installer
-PKG_SECTION:= base
-PKG_DEPENDS:= parted sfdisk
-
-PKG_TARGET_DEPENDS:= alix wrap rb532
-
-WRKDIST= ${WRKDIR}/${PKG_NAME}-${PKG_VERSION}
-NO_DISTFILES:= 1
-
-include ${TOPDIR}/mk/package.mk
-
-$(eval $(call PKG_template,CFINSTALL,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
-
-BUILD_STYLE:= manual
-INSTALL_STYLE:= manual
-
-pre-configure:
- mkdir -p ${WRKBUILD}
-
-do-install:
- ${INSTALL_DIR} $(IDIR_CFINSTALL)/sbin
-ifeq ($(ADK_LINUX_MIPS_RB532),y)
- ${INSTALL_BIN} ./src/cfinstall.rb532 \
- $(IDIR_CFINSTALL)/sbin/cfinstall
-else
- ${INSTALL_BIN} ./src/cfinstall $(IDIR_CFINSTALL)/sbin
-endif
-
-include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/cfinstall/src/cfinstall b/package/cfinstall/src/cfinstall
deleted file mode 100644
index 7e9a0d1ad..000000000
--- a/package/cfinstall/src/cfinstall
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/bin/sh
-# installs a rootfs tar archive from OpenADK onto a Compact Flash disk
-
-if [ -z $1 ];then
- printf "Please give your root tar archive as parameter\n"
- exit 1
-fi
-# create empty partition table
-parted -s /dev/sda mklabel msdos
-sleep 2
-maxsize=$(env LC_ALL=C parted /dev/sda -s unit cyl print |awk '/^Disk/ { print $3 }'|sed -e 's/cyl//')
-rootsize=$(($maxsize-2))
-parted -s /dev/sda unit cyl mkpartfs primary ext2 0 $rootsize
-parted -s /dev/sda unit cyl mkpart primary fat32 $rootsize $maxsize
-parted -s /dev/sda set 1 boot on
-sfdisk --change-id /dev/sda 2 88 >/dev/null 2>&1
-if [ $? -eq 0 ];then
- printf "Successfully created partition ${rootpart}\n"
-else
- printf "Partition creation failed, Exiting.\n"
- exit 1
-fi
-mount -t ext2 /dev/sda1 /mnt
-printf "Extracting install archive\n"
-tar -C /mnt -xzpf $1
-chmod 1777 /mnt/tmp
-chmod 4755 /mnt/bin/busybox
-
-speed=$(awk -F \, '/console=ttyS0/ { print $2 }' /proc/cmdline|sed -e "s/ .*$//")
-
-printf "Install bootloader\n"
-mkdir -p /mnt/boot/grub
-mount -o bind /dev /mnt/dev
-chroot /mnt mount -t proc /proc /proc
-chroot /mnt mount -t sysfs /sys /sys
-cat << EOF > /mnt/boot/grub/grub.cfg
-set default=0
-set timeout=1
-serial --unit=0 --speed=$speed
-terminal_output serial
-terminal_input serial
-
-menuentry "GNU/Linux (OpenADK)" {
- insmod ext2
- set root=(hd0,1)
- linux /boot/vmlinuz-adk root=/dev/sda1 ro init=/init panic=10
-}
-EOF
-chroot /mnt grub-install /dev/sda >/dev/null 2>&1
-umount /mnt/proc
-umount /mnt/sys
-umount /mnt/dev
-
-printf "Creating device nodes\n"
-mknod -m 666 /mnt/dev/null c 1 3
-mknod -m 622 /mnt/dev/console c 5 1
-mknod -m 666 /mnt/dev/tty c 5 0
-
-umount /mnt
-printf "Successfully installed.\n"
-exit 0
diff --git a/package/cfinstall/src/cfinstall.rb532 b/package/cfinstall/src/cfinstall.rb532
deleted file mode 100644
index 900d6dc18..000000000
--- a/package/cfinstall/src/cfinstall.rb532
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/bin/sh
-# installs a rootfs tar archive from OpenADK onto a Compact Flash disk
-# special script for routerboard rb532
-
-if [ -z $1 ];then
- printf "Please give your root tar archive as first parameter\n"
- exit 1
-fi
-if [ -z $2 ];then
- printf "Please give your kernel as second parameter\n"
- exit 1
-fi
-# create empty partition table
-parted -s /dev/sda mklabel msdos
-sleep 2
-maxsize=$(env LC_ALL=C parted /dev/sda -s unit cyl print |awk '/^Disk/ { print $3 }'|sed -e 's/cyl//')
-rootsize=$(($maxsize-2))
-
-parted -s /dev/sda unit cyl mkpart primary ext2 0 1
-parted -s /dev/sda unit cyl mkpartfs primary ext2 1 $rootsize
-parted -s /dev/sda unit cyl mkpart primary fat32 $rootsize $maxsize
-parted -s /dev/sda set 1 boot on
-sfdisk --change-id /dev/sda 1 27 >/dev/null 2>&1
-sfdisk --change-id /dev/sda 3 88 >/dev/null 2>&1
-if [ $? -eq 0 ];then
- printf "Successfully created partition ${rootpart}\n"
-else
- printf "Partition creation failed, Exiting.\n"
- exit 1
-fi
-sleep 2
-sync
-printf "Installing kernel\n"
-dd if=$2 of=/dev/sda1 bs=2048 >/dev/null 2>&1
-sync
-mount -t ext2 /dev/sda2 /mnt
-printf "Extracting install archive\n"
-tar -C /mnt -xzpf $1
-chmod 1777 /mnt/tmp
-chmod 4755 /mnt/bin/busybox
-
-printf "Creating device nodes\n"
-mknod -m 666 /mnt/dev/null c 1 3
-mknod -m 622 /mnt/dev/console c 5 1
-mknod -m 666 /mnt/dev/tty c 5 0
-
-umount /mnt
-printf "Successfully installed.\n"
-exit 0