summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
Diffstat (limited to 'package')
-rw-r--r--package/Config.in4
-rw-r--r--package/adkinstall/Makefile (renamed from package/cfinstall/Makefile)17
-rw-r--r--package/adkinstall/src/adkinstall (renamed from package/cfinstall/src/cfinstall)0
-rw-r--r--package/adkinstall/src/adkinstall.rb53278
-rw-r--r--package/cfgfs/Makefile4
-rw-r--r--package/parted/Makefile2
6 files changed, 94 insertions, 11 deletions
diff --git a/package/Config.in b/package/Config.in
index 298a36152..31867be26 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -4,18 +4,18 @@
menu "Package selection"
menu "Basesystem"
+source "package/adkinstall/Config.in"
source "package/base-files/Config.in"
source "package/busybox/Config.in.manual"
source "package/cfgfs/Config.in"
-source "package/cfinstall/Config.in"
source "package/cryptinit/Config.in"
source "package/uclibc/Config.in.manual"
source "package/glibc/Config.in.manual"
source "package/eglibc/Config.in.manual"
source "package/libc/Config.in.manual"
-source "package/rpm/Config.in"
source "package/grub/Config.in"
source "package/grub-bin/Config.in"
+source "package/rpm/Config.in"
endmenu
menu "Bluetooth"
diff --git a/package/cfinstall/Makefile b/package/adkinstall/Makefile
index 94b423d83..d250a1e70 100644
--- a/package/cfinstall/Makefile
+++ b/package/adkinstall/Makefile
@@ -3,10 +3,10 @@
include ${TOPDIR}/rules.mk
-PKG_NAME:= cfinstall
+PKG_NAME:= adkinstall
PKG_VERSION:= 1.0
-PKG_RELEASE:= 2
-PKG_DESCR:= compact flash installer
+PKG_RELEASE:= 3
+PKG_DESCR:= installer for compact flash or nand/mtd devices
PKG_SECTION:= base
PKG_DEPENDS:= parted sfdisk
@@ -17,7 +17,7 @@ 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}))
+$(eval $(call PKG_template,ADKINSTALL,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
BUILD_STYLE:= manual
INSTALL_STYLE:= manual
@@ -26,7 +26,12 @@ pre-configure:
mkdir -p ${WRKBUILD}
do-install:
- ${INSTALL_DIR} $(IDIR_CFINSTALL)/sbin
- ${INSTALL_BIN} ./src/cfinstall $(IDIR_CFINSTALL)/sbin
+ ${INSTALL_DIR} $(IDIR_ADKINSTALL)/sbin
+ifeq ($(ADK_LINUX_MIPS_RB532),y)
+ ${INSTALL_BIN} ./src/adkinstall.rb532 \
+ $(IDIR_ADKINSTALL)/sbin/adkinstall
+else
+ ${INSTALL_BIN} ./src/adkinstall $(IDIR_ADKINSTALL)/sbin
+endif
include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/cfinstall/src/cfinstall b/package/adkinstall/src/adkinstall
index 7e9a0d1ad..7e9a0d1ad 100644
--- a/package/cfinstall/src/cfinstall
+++ b/package/adkinstall/src/adkinstall
diff --git a/package/adkinstall/src/adkinstall.rb532 b/package/adkinstall/src/adkinstall.rb532
new file mode 100644
index 000000000..ca2ffde0d
--- /dev/null
+++ b/package/adkinstall/src/adkinstall.rb532
@@ -0,0 +1,78 @@
+#!/bin/sh
+# installs a rootfs tar archive from OpenADK onto
+# a Compact Flash disk or NAND device
+# special script for routerboard rb532
+
+nandinstall=0
+cfinstall=0
+
+if [ -z $1 ];then
+ printf "Please give your target device as first parameter [cf|nand]\n"
+ exit 1
+fi
+if [ -z $2 ];then
+ printf "Please give your root tar archive as second parameter\n"
+ exit 1
+fi
+if [ -z $3 ];then
+ printf "Please give your kernel as third parameter\n"
+ exit 1
+fi
+case $1 in
+ nand)
+ nandinstall=1
+ ;;
+ cf)
+ cfinstall=1
+ ;;
+ *)
+ printf "Target not recognized\n"
+ exit 1
+ ;;
+esac
+
+if [ $cfinstall -eq 1 ];then
+ # create empty partition table
+ printf "Creating partition scheme\n"
+ 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
+ sleep 2
+ sync
+ printf "Installing kernel\n"
+ dd if=$3 of=/dev/sda1 bs=2048 >/dev/null 2>&1
+ sync
+ mount -t ext2 /dev/sda2 /mnt
+fi
+
+if [ $nandinstall -eq 1 ];then
+ printf "Installing kernel\n"
+ mount -t yaffs2 /dev/mtdblock0 /mnt
+ cp $3 /mnt/kernel
+ sync
+ umount /mnt
+ mount -t yaffs2 /dev/mtdblock1 /mnt
+ rm -rf /mnt/* >/dev/null 2>&1
+fi
+
+printf "Extracting install archive\n"
+tar -C /mnt -xzpf $2
+
+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
diff --git a/package/cfgfs/Makefile b/package/cfgfs/Makefile
index 3d89f2072..806da3199 100644
--- a/package/cfgfs/Makefile
+++ b/package/cfgfs/Makefile
@@ -8,12 +8,12 @@ PKG_VERSION:= 1.0.6
PKG_RELEASE:= 5
PKG_DESCR:= compressed config filesystem
PKG_SECTION:= base
-PKG_TARGET_DEPENDS:= alix1c alix2d alix2d13 wrap foxboard ag241 rb532
+PKG_TARGET_DEPENDS:= alix wrap foxboard ag241 rb532
WRKDIST= ${WRKDIR}/${PKG_NAME}-${PKG_VERSION}
NO_DISTFILES:= 1
-CFLINE_CFGFS:= select BUSYBOX_COMM\n\tselect BUSYBOX_MD5SUM\n\tselect BUSYBOX_XARGS\n\tselect BUSYBOX_FEATURE_SORT_BIG\n\tdepends on !ADK_TARGET_ROOTFS_NFSROOT
+CFLINE_CFGFS:= select BUSYBOX_COMM\n\tselect BUSYBOX_MD5SUM\n\tselect BUSYBOX_XARGS\n\tselect BUSYBOX_FEATURE_SORT_BIG\n\tdepends on !ADK_TARGET_ROOTFS_NFSROOT\n\tdepends on !ADK_TARGET_ROOTFS_YAFFS
include ${TOPDIR}/mk/package.mk
diff --git a/package/parted/Makefile b/package/parted/Makefile
index b51fefd90..6323c875c 100644
--- a/package/parted/Makefile
+++ b/package/parted/Makefile
@@ -9,7 +9,7 @@ PKG_RELEASE:= 1
PKG_MD5SUM:= 055305bc7bcf472ce38f9abf69a9d94d
PKG_DESCR:= GNU parted
PKG_SECTION:= admin
-PKG_DEPENDS:= libuuid libreadline device-mapper
+PKG_DEPENDS:= libuuid libreadline device-mapper libpthread
PKG_BUILDDEP+= e2fsprogs lvm readline
PKG_URL:= http://www.gnu.org/software/parted/index.shtml
PKG_SITES:= ${MASTER_SITE_GNU:=parted/}