summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2017-01-31 02:33:57 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2017-01-31 02:34:13 +0100
commit6140a1d632ac8ad592fb8a54fbcb0799a49fa9a3 (patch)
treeea9ca9f4dc99a61b7776465a1c0819f51ec094f9 /package
parentdce2e1ebd79e0047dab4925eda46307748aa37a1 (diff)
add a new device example, this must be reworked, to much hardcoded stuff
Diffstat (limited to 'package')
-rw-r--r--package/adkinstall/Makefile2
-rw-r--r--package/adkinstall/src/adkinstall80
2 files changed, 81 insertions, 1 deletions
diff --git a/package/adkinstall/Makefile b/package/adkinstall/Makefile
index 8129119db..639a74de3 100644
--- a/package/adkinstall/Makefile
+++ b/package/adkinstall/Makefile
@@ -5,7 +5,7 @@ include ${ADK_TOPDIR}/rules.mk
PKG_NAME:= adkinstall
PKG_VERSION:= 2.0
-PKG_RELEASE:= 3
+PKG_RELEASE:= 4
PKG_DESCR:= disk/flash installer
PKG_SECTION:= base/misc
PKG_DEPENDS:= mke2fs parted sfdisk dosfstools mksh
diff --git a/package/adkinstall/src/adkinstall b/package/adkinstall/src/adkinstall
index 9211bed88..8fa1b9b00 100644
--- a/package/adkinstall/src/adkinstall
+++ b/package/adkinstall/src/adkinstall
@@ -45,6 +45,17 @@ EOF
exit 1
}
+function asus-p5bvm-help {
+ cat >&2 <<EOF
+Syntax: adkinstall <archive>
+ -d: create data partition
+ -f: filesystem (default ext4)
+ -h: help text
+EOF
+ exit 1
+}
+
+
function pcengines-apu-help {
cat >&2 <<EOF
Syntax: adkinstall <archive>
@@ -114,6 +125,31 @@ case $target {
archive=$1
fi
;;
+(asus-p5bvm)
+ cfgfssize=32768
+ data=
+ fs=ext4
+ while getopts "f:d:" ch; do
+ case $ch in
+ d)
+ data=$OPTARG
+ ;;
+ f)
+ fs=$OPTARG
+ ;;
+ *)
+ asus-p5bvm-help
+ exit 1
+ ;;
+ esac
+ done
+ shift $((OPTIND - 1))
+ if [ -z $1 ];then
+ ibm-x40-help
+ else
+ archive=$1
+ fi
+ ;;
(pcengines-apu)
cfgfssize=32768
fs=ext4
@@ -377,6 +413,7 @@ case $target {
partprobe /dev/sda
sync
sleep 2
+ umount /mnt
if [ -z $data ];then
create_filesystem /dev/sda $fs 1
else
@@ -395,6 +432,49 @@ case $target {
fix_perm /mnt
umount /mnt
;;
+(asus-p5bvm)
+ get_max_size /dev/sdc
+ create_label /dev/sdc
+ if [ -z $data ];then
+ create_partition /dev/sdc ext2 16385 $rootsize
+ create_partition /dev/sdc ext2 $(($rootsize+1)) $(($maxsize-1))
+ set_boot_flag /dev/sdc 1
+ change_part_type /dev/sdc 2 88
+ else
+ datasize=$(($data*1024*2))
+ echo datasize is: $datasize
+ echo create partition from 16385 to $(($rootsize-$datasize))
+ create_partition /dev/sdc ext2 16385 $(($rootsize-$datasize))
+ echo create partition from $(($rootsize-$datasize+1)) to $(($maxsize-$cfgfssize-1))
+ create_partition /dev/sdc ext2 $(($rootsize-$datasize+1)) $(($maxsize-$cfgfssize-1))
+ echo create partition from $(($maxsize-$cfgfssize)) to $(($maxsize-1))
+ create_partition /dev/sdc ext2 $(($maxsize-$cfgfssize)) $(($maxsize-1))
+ set_boot_flag /dev/sdc 1
+ change_part_type /dev/sdc 3 88
+
+ fi
+ partprobe /dev/sdc
+ sync
+ sleep 2
+ umount /mnt
+ if [ -z $data ];then
+ create_filesystem /dev/sdc $fs 1
+ else
+ create_filesystem /dev/sdc $fs 1
+ create_filesystem /dev/sdc $fs 2
+ fi
+ mdev -s
+ mount_fs /dev/sdc 1 $fs /mnt
+ extract_archive $archive /mnt
+ if [ ! -z $data ]; then
+ echo creating data dir and fstab entry
+ mkdir /mnt/data
+ echo "/dev/sdc2 /data ext4 rw 0 0" >> /mnt/etc/fstab
+ fi
+ #grub_install /dev/sdc
+ fix_perm /mnt
+ umount /mnt
+ ;;
(pcengines-apu|pcengines-alix)
get_max_size /dev/sda
create_label /dev/sda