summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorWaldemar Brodkorb <mail@waldemar-brodkorb.de>2017-11-22 21:29:15 +0100
committerGogs <gogs@fake.local>2017-11-22 21:29:15 +0100
commit95bb119b6ea3eb7d75cb8759a6f4499fe7417ab7 (patch)
treef7e5a0cf57e2892ff5198ffe53caa5d921bc4627 /scripts
parent23e23bd8162d96cdd35e055d63154accd0e062b1 (diff)
parent3da81751c84c63cd720a083f5156cdf195dd09f9 (diff)
Merge branch 'master' of ableton-dir/openadk into master
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/create-menu11
-rwxr-xr-xscripts/install.sh19
2 files changed, 25 insertions, 5 deletions
diff --git a/scripts/create-menu b/scripts/create-menu
index 3c0d87ca9..f087300b6 100755
--- a/scripts/create-menu
+++ b/scripts/create-menu
@@ -12,11 +12,18 @@ printf "source target/config/Config.in.system.default\n" >> target/config/Config
printf "source target/config/Config.in.system.choice\n" >> target/config/Config.in.system
# update tasks
-if [ -d "$topdir/tasks" ];then
+if [ -d "$topdir/tasks" -o -n "$ADK_CUSTOM_TASKS_DIR" ];then
printf "# autogenerated via scripts/create-menu\n" > $topdir/target/config/Config.in.tasks
printf "menu \"Tasks\"\n" >> $topdir/target/config/Config.in.tasks
printf "\tvisible if ADK_TARGET_OS_LINUX && !ADK_TARGET_CHOOSE_ARCH\n\n" >> $topdir/target/config/Config.in.tasks
- cat $topdir/tasks/* >> $topdir/target/config/Config.in.tasks 2>/dev/null
+
+ if [ -d "$topdir/tasks" ];then
+ cat $topdir/tasks/* >> $topdir/target/config/Config.in.tasks 2>/dev/null
+ fi
+ if [ -n "$ADK_CUSTOM_TASKS_DIR" -a -d "$ADK_CUSTOM_TASKS_DIR" ];then
+ printf "\n# tasks pulled from ADK_CUSTOM_TASKS_DIR='%s'\n" "$ADK_CUSTOM_TASKS_DIR" >> $topdir/target/config/Config.in.tasks
+ cat $ADK_CUSTOM_TASKS_DIR/* >> $topdir/target/config/Config.in.tasks 2>/dev/null
+ fi
printf "\nendmenu\n\n" >> $topdir/target/config/Config.in.tasks
fi
diff --git a/scripts/install.sh b/scripts/install.sh
index b1969ed46..7e3245c31 100755
--- a/scripts/install.sh
+++ b/scripts/install.sh
@@ -64,10 +64,11 @@ panicreboot=10
keep=0
grub=0
paragon_ext=0
+datapartcontent=""
function usage {
cat >&2 <<EOF
-Syntax: $me [-f filesystem] [-c cfgfssize] [-d datafssize] [-k] [-n] [-g]
+Syntax: $me [-f filesystem] [-c cfgfssize] [-d datafssize] [-D datafscontent] [-k] [-n] [-g]
[-p panictime] [±q] [-s serialspeed] [±t] <target> <device> <archive>
Partition sizes are in MiB. Filesystem type is currently ignored (ext4).
To keep filesystem on data partition use -k.
@@ -76,8 +77,7 @@ Defaults: -c 1 -p 10 -s 115200; -t = enable serial console
EOF
exit $1
}
-
-while getopts "c:d:ef:ghknp:qs:t" ch; do
+while getopts "c:d:D:ef:ghknp:qs:tx:" ch; do
case $ch {
(c) if (( (cfgfs = OPTARG) < 0 || cfgfs > 16 )); then
print -u2 "$me: -c $OPTARG out of bounds"
@@ -110,6 +110,11 @@ while getopts "c:d:ef:ghknp:qs:t" ch; do
(n) noformat=1 ;;
(t) serial=1 ;;
(+t) serial=0 ;;
+ (D) if [[ ! -d $OPTARG ]]; then
+ print -u2 "$me: -D $OPTARG must be an existing directory"
+ exit 1
+ fi
+ datapartcontent=$OPTARG;;
(*) usage 1 ;;
}
done
@@ -577,6 +582,14 @@ if (( datafssz )); then
echo "/dev/mmcblk0p2 /data ext4 rw 0 0" >> "$R"/etc/fstab
;;
}
+ if [[ -d $datapartcontent ]]; then
+ mount_fs "$datapart" "$D" ext4
+ # strip trailing slash
+ case $datapartcontent in
+ *[!/]*/) datapartcontent=${datapartcontent%"${x##*[!/]}"};;
+ esac
+ cp -R $datapartcontent/* "$D"
+ fi
fi
(( quiet )) || print Finishing up with bootloader and kernel ...