summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-05-23 21:39:22 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2014-05-23 21:39:22 +0200
commit5a7b33e61779a5debf599aa0e3705b239b369490 (patch)
tree168d0b5f768898cf66e73fcfe38a01def88f39c3 /scripts
parentb08f20692aaa5002fcd1f6a4a8e9f856e445208f (diff)
cleanup scripts dir
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/create-busybox.sh25
-rwxr-xr-xscripts/create-image.sh163
-rw-r--r--scripts/dev.cpiobin1024 -> 0 bytes
-rwxr-xr-xscripts/getsystems14
-rw-r--r--scripts/mbrbin512 -> 0 bytes
-rwxr-xr-xscripts/tsort16
6 files changed, 0 insertions, 218 deletions
diff --git a/scripts/create-busybox.sh b/scripts/create-busybox.sh
deleted file mode 100755
index 7dc1c13bb..000000000
--- a/scripts/create-busybox.sh
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/bash
-
-cd $1
-for i in $(find . -name Config.in);
-do
- cp --parents $i ../package/busybox/config/
-done
-cd ..
-cd package/busybox/config
-for i in $(find . -name Config.in);
-do
- sed -i -e 's/^mainmenu \(.*\)/# mainmenu \1/' $i
- sed -i -e 's/^config \(.*\)/config BUSYBOX_\1/' $i
- sed -i -e 's/^ select \([:upper:]*\)/ select BUSYBOX_\1/' $i
- sed -i -e 's/depends on !\([:upper:]*\)/depends on !BUSYBOX_\1/' $i
- sed -i -e 's/depends on (\([:upper:]*\)/depends on (BUSYBOX_\1/' $i
- sed -i -e 's/depends on \([^!(][:upper:]*\)/depends on BUSYBOX_\1/' $i
- sed -i -e 's/&& (\([:upper:]*\)/\&\& (BUSYBOX_\1/' $i
- sed -i -e 's/&& !\([:upper:]*\)/\&\& !BUSYBOX_\1/g' $i
- sed -i -e 's/&& \([^!(][:upper:]*\)/\&\& BUSYBOX_\1/g' $i
- sed -i -e 's/|| !\([:upper:]*\)/|| !BUSYBOX_\1/g' $i
- sed -i -e 's/|| \([^!(][:upper:]*\)/|| BUSYBOX_\1/g' $i
- sed -i -e 's#^source \(.*\)#source package/busybox/config/\1#' $i
- sed -i -e 's/BUSYBOX_ \([:upper:]*\)/BUSYBOX_\1/' $i
-done
diff --git a/scripts/create-image.sh b/scripts/create-image.sh
deleted file mode 100755
index d7e3c7435..000000000
--- a/scripts/create-image.sh
+++ /dev/null
@@ -1,163 +0,0 @@
-#!/usr/bin/env bash
-#-
-# Copyright © 2010-2012
-# Waldemar Brodkorb <wbx@openadk.org>
-#
-# Provided that these terms and disclaimer and all copyright notices
-# are retained or reproduced in an accompanying document, permission
-# is granted to deal in this work without restriction, including un‐
-# limited rights to use, publicly perform, distribute, sell, modify,
-# merge, give away, or sublicence.
-#
-# This work is provided “AS IS” and WITHOUT WARRANTY of any kind, to
-# the utmost extent permitted by applicable law, neither express nor
-# implied; without malicious intent or gross negligence. In no event
-# may a licensor, author or contributor be held liable for indirect,
-# direct, other damage, loss, or other issues arising in any way out
-# of dealing in the work, even if advised of the possibility of such
-# damage or existence of a defect, except proven that it results out
-# of said person’s immediate fault when using the work as intended.
-#
-# Alternatively, this work may be distributed under the terms of the
-# General Public License, any version, as published by the Free Soft-
-# ware Foundation.
-
-filesystem=ext2
-
-while getopts "f:i" option
-do
- case $option in
- f)
- filesystem=$OPTARG
- ;;
- i)
- initramfs=1
- ;;
- *)
- printf "Option not recognized\n"
- exit 1
- ;;
- esac
-done
-shift $(($OPTIND - 1))
-
-
-tools='qemu-img'
-ostype=$(uname -s)
-
-case $ostype in
-(Darwin)
- tools="$tools genext2fs"
- ;;
-(Linux)
- tools="$tools mke2fs parted"
- if [ $(id -u) -ne 0 ];then
- printf "Installation is only possible as root\n"
- exit 1
- fi
- ;;
-(*)
- printf Sorry, not ported to the OS "'$ostype'" yet.\n
- exit 1
- ;;
-esac
-
-for tool in $tools; do
- printf "Checking if $tool is installed..."
- if which $tool >/dev/null; then
- printf " okay\n"
- else
- printf " failed\n"
- f=1
- fi
-done
-(( f )) && exit 1
-
-if [ -z $1 ];then
- printf "Please give the name of the image file\n"
- exit 1
-fi
-
-if [ -z $initramfs ];then
- if [ -z $2 ];then
- printf "Please give the name of the openadk archive file\n"
- exit 1
- fi
-else
- if [ -z $2 ];then
- printf "Please give the full path prefix to kernel/initramfs\n"
- exit 1
- fi
-fi
-
-
-printf "Create partition and filesystem\n"
-case $ostype in
-(Darwin)
- offset=16384
- ;;
-(Linux)
- printf "Generate qemu image (768 MB)\n"
- qemu-img create -f raw $1 768M >/dev/null
- parted -s $1 mklabel msdos
- parted -s $1 -- mkpart primary ext2 0 -0
- parted -s $1 set 1 boot on
- offset=$(parted $1 unit b print | tail -2 | head -1 | cut -f 1 --delimit="B" | cut -c 9-)
- ;;
-(*)
- printf Sorry, not ported to the OS "'$ostype'" yet.\n
- exit 1
- ;;
-esac
-
-
-
-if [ "$filesystem" = "ext2" -o "$filesystem" = "ext3" -o "$filesystem" = "ext4" ];then
- mkfsopts=-F
-fi
-
-case $ostype in
-(Darwin)
- tmp=$(mktemp -d -t xxx)
- tar -C $tmp -xzpf $2
- printf "Fixing permissions\n"
- chmod 1777 $tmp/tmp
- chmod 4755 $tmp/bin/busybox
- printf "Creating filesystem $filesystem\n"
- genext2fs -q -b 709600 -d $tmp ${1}.new
- cat scripts/mbr ${1}.new > $1
- rm ${1}.new
- ;;
-(Linux)
- dd if=$1 of=mbr bs=$offset count=1 2>/dev/null
- dd if=$1 skip=$offset of=$1.new 2>/dev/null
- printf "Creating filesystem $filesystem\n"
- mkfs.$filesystem $mkfsopts ${1}.new >/dev/null
- cat mbr ${1}.new > $1
- rm ${1}.new
- #rm mbr
- tmp=$(mktemp -d)
- mount -o loop,offset=$offset -t $filesystem $1 $tmp
-if [ -z $initramfs ];then
- printf "Extracting install archive\n"
- tar -C $tmp -xzpf $2
- printf "Fixing permissions\n"
- chmod 1777 $tmp/tmp
- chmod 4755 $tmp/bin/busybox
-else
- printf "Copying kernel/initramfs\n"
- mkdir $tmp/boot $tmp/dev
- cp $2-kernel $tmp/boot/kernel
- cp $2-initramfs $tmp/boot/initramfs
-fi
- umount $tmp
- ;;
-(*)
- printf Sorry, not ported to the OS "'$ostype'" yet.\n
- exit 1
- ;;
-esac
-
-printf "Successfully installed.\n"
-printf "Be sure $1 is writable for the user which use qemu\n"
-exit 0
diff --git a/scripts/dev.cpio b/scripts/dev.cpio
deleted file mode 100644
index de17c7097..000000000
--- a/scripts/dev.cpio
+++ /dev/null
Binary files differ
diff --git a/scripts/getsystems b/scripts/getsystems
deleted file mode 100755
index 3ea829e71..000000000
--- a/scripts/getsystems
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env bash
-
-if [ ! -z "$1" ];then
- systems=$(grep -h config target/$1/sys-available/*|cut -d " " -f 2)
-else
- systems=$(grep -h config target/*/sys-available/*|cut -d " " -f 2)
-fi
-
-for i in $systems;do
- system=${i#ADK_TARGET_SYSTEM_}
- system=$(echo $system|tr '[:upper:]_' '[:lower:]-')
- system=$(echo $system|sed 's#x86-64#x86_64#')
- echo $system
-done
diff --git a/scripts/mbr b/scripts/mbr
deleted file mode 100644
index af9d51626..000000000
--- a/scripts/mbr
+++ /dev/null
Binary files differ
diff --git a/scripts/tsort b/scripts/tsort
deleted file mode 100755
index b6e08b24c..000000000
--- a/scripts/tsort
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/usr/bin/env bash
-# This file is part of the OpenADK project. OpenADK is copyrighted
-# material, please see the LICENCE file in the top-level directory.
-
-os=$(uname)
-case $os in
- MirBSD|OpenBSD)
- /usr/bin/tsort -r
- ;;
- NetBSD|FreeBSD|Darwin)
- /usr/bin/tsort | tail -r
- ;;
- *)
- /usr/bin/tsort | tac
- ;;
-esac