summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-10-01 21:46:17 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2014-10-01 21:46:17 +0200
commitea41415863c0d1cf7526b176766d6562b6a13a1e (patch)
treefe9e02f4041437b4b39fbc5541e621733fc863bb /package
parentb60e85f065309fa77a6e4c16223d25dd67762917 (diff)
add some basic stuff for ibm-x40
Diffstat (limited to 'package')
-rw-r--r--package/adkinstall/src/adkinstall54
1 files changed, 52 insertions, 2 deletions
diff --git a/package/adkinstall/src/adkinstall b/package/adkinstall/src/adkinstall
index 19179a698..6047ce503 100644
--- a/package/adkinstall/src/adkinstall
+++ b/package/adkinstall/src/adkinstall
@@ -26,6 +26,16 @@ EOF
exit 1
}
+function ibm-x40-help {
+ cat >&2 <<EOF
+Syntax: adkinstall -a <archive>
+ -a: archive
+ -f: filesystem (default ext4)
+ -h: help text
+EOF
+ exit 1
+}
+
function pcengines-apu-help {
cat >&2 <<EOF
Syntax: adkinstall -a <archive>
@@ -38,6 +48,33 @@ EOF
case $target {
+(ibm-x40)
+ cfgfssize=32768
+ fs=ext4
+ while getopts "ha:f:" ch; do
+ case $ch in
+ a)
+ archive=$OPTARG
+ ;;
+ f)
+ fs=$OPTARG
+ ;;
+ h)
+ ibm-x40-help
+ exit 1
+ ;;
+ *)
+ ibm-x40-help
+ exit 1
+ ;;
+ esac
+ done
+ shift $((OPTIND - 1))
+ if [ $OPTIND -eq 1 ];then
+ ibm-x40-help
+ exit 1
+ fi
+ ;;
(pcengines-apu)
cfgfssize=32768
fs=ext4
@@ -108,8 +145,6 @@ case $target {
;;
}
-
-
if [ "$target" = "mikrotik-rb532" ];then
if [ $cf -eq 0 -a $nand -eq 0 ];then
print "You either install on cf (-c) or nand (-n)"
@@ -194,6 +229,21 @@ function fix_perm {
}
case $target {
+(ibm-x40)
+ get_max_size /dev/sda
+ create_label /dev/sda
+ create_partition /dev/sda ext2 16385 $rootsize
+ create_partition /dev/sda ext2 $(($rootsize+1)) $(($maxsize-1))
+ set_boot_flag /dev/sda 1
+ change_part_type /dev/sda 2 88
+ create_filesystem /dev/sda $fs 1
+ mdev -s
+ mount_fs /dev/sda 1 $fs /mnt
+ extract_archive $archive /mnt
+ grub_install /dev/sda
+ fix_perm /mnt
+ umount /mnt
+ ;;
(pcengines-apu)
get_max_size /dev/sda
create_label /dev/sda