summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/adkprepare.sh2
-rwxr-xr-xscripts/create-image.sh9
-rwxr-xr-xscripts/create-sys46
-rwxr-xr-xscripts/getsystems14
-rwxr-xr-xscripts/install.sh2
-rw-r--r--scripts/scan-pkgs.sh16
-rw-r--r--scripts/scan-tools.sh6
-rwxr-xr-xscripts/update-pkg6
-rwxr-xr-xscripts/update-sys48
9 files changed, 122 insertions, 27 deletions
diff --git a/scripts/adkprepare.sh b/scripts/adkprepare.sh
index cef8c96d1..96d8f4303 100755
--- a/scripts/adkprepare.sh
+++ b/scripts/adkprepare.sh
@@ -61,6 +61,7 @@ netbsd() {
pkg_add -vu gmake
pkg_add -vu bash
pkg_add -vu wget
+ pkg_add -vu pkg-config
pkg_add -vu unzip
pkg_add -vu gtar
pkg_add -vu gsed
@@ -74,7 +75,6 @@ netbsd_full() {
export PKG_PATH
pkg_add -vu intltool
pkg_add -vu lynx
- pkg_add -vu pkg-config
pkg_add -vu zip
pkg_add -vu bison
pkg_add -vu libIDL
diff --git a/scripts/create-image.sh b/scripts/create-image.sh
index 7536cd814..f3e03eced 100755
--- a/scripts/create-image.sh
+++ b/scripts/create-image.sh
@@ -120,16 +120,7 @@ else
cp $2-initramfs $tmp/boot/initramfs
fi
-#printf "Creating device nodes\n"
-mknod -m 666 $tmp/dev/zero c 1 5
-mknod -m 666 $tmp/dev/null c 1 3
-mknod -m 622 $tmp/dev/console c 5 1
-mknod -m 666 $tmp/dev/tty c 5 0
-mknod -m 666 $tmp/dev/tty0 c 4 0
-mknod -m 666 $tmp/dev/ttyS0 c 4 64
-
umount $tmp
-
printf "Successfully installed.\n"
printf "Be sure $1 is writable for the user which use qemu\n"
exit 0
diff --git a/scripts/create-sys b/scripts/create-sys
new file mode 100755
index 000000000..7af098868
--- /dev/null
+++ b/scripts/create-sys
@@ -0,0 +1,46 @@
+#!/usr/bin/env bash
+topdir=$(readlink -nf $(dirname $0)/.. 2>/dev/null || (cd $(dirname $0)/..; pwd -P))
+systems=$(grep -h config target/*/sys-available/*|cut -d " " -f 2)
+
+while read arch; do
+ count=1
+ cd $topdir/target/$arch/sys-enabled/ &&
+ ln -sf ../sys-available/toolchain 0-toolchain
+ for i in $(ls $topdir/target/$arch/sys-available/|grep -v toolchain);do
+ cd $topdir/target/$arch/sys-enabled/ &&
+ ln -sf ../sys-available/$i $count-$i
+ count=$((count+1))
+ done
+done <${topdir}/target/arch.lst
+
+cat > $topdir/target/config/Config.in.system.default << EOD
+config ADK_qemu
+ boolean
+
+config ADK_toolchain
+ boolean
+
+EOD
+
+for j in $systems;do
+ system=${j#ADK_TARGET_SYSTEM_}
+ systemu=$(echo $system|tr '[:upper:]' '[:lower:]')
+ printf "config ADK_$systemu\n" >> $topdir/target/config/Config.in.system.default
+ printf "\tboolean\n\n" >> $topdir/target/config/Config.in.system.default
+done
+
+cat >> $topdir/target/config/Config.in.system.default << EOD
+
+config ADK_TARGET_SYSTEM
+ string
+ default "toolchain" if ADK_toolchain
+ default "qemu" if ADK_qemu
+EOD
+for i in $systems;do
+ system=${i#ADK_TARGET_SYSTEM_}
+ systemu=$(echo $system|tr '[:upper:]' '[:lower:]')
+ system=$(echo $system|tr '[:upper:]_' '[:lower:]-')
+ system=$(echo $system|sed 's#x86-64#x86_64#')
+ printf "\tdefault \"$system\" if ADK_$systemu\n" >> $topdir/target/config/Config.in.system.default
+done
+exit 0
diff --git a/scripts/getsystems b/scripts/getsystems
new file mode 100755
index 000000000..3ea829e71
--- /dev/null
+++ b/scripts/getsystems
@@ -0,0 +1,14 @@
+#!/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/install.sh b/scripts/install.sh
index 2304a9eb9..8eb6ee062 100755
--- a/scripts/install.sh
+++ b/scripts/install.sh
@@ -366,7 +366,7 @@ mkdir -p boot/grub
print 'menuentry "GNU/Linux (OpenADK)" {'
linuxargs="root=UUID=$partuuid $consargs"
(( panicreboot )) && linuxargs="$linuxargs panic=$panicreboot"
- print "\tlinux /boot/vmlinuz-adk $linuxargs"
+ print "\tlinux /boot/kernel $linuxargs"
print '}'
) >boot/grub/grub.cfg
set -A grubfiles
diff --git a/scripts/scan-pkgs.sh b/scripts/scan-pkgs.sh
index 28a2e31c6..87f111e81 100644
--- a/scripts/scan-pkgs.sh
+++ b/scripts/scan-pkgs.sh
@@ -69,10 +69,6 @@ if [[ -n $ADK_PACKAGE_XKEYBOARD_CONFIG ]]; then
NEED_XKBCOMP="$NEED_XKBCOMP xkeyboard-config"
fi
-if [[ -n $ADK_COMPILE_AVAHI ]]; then
- NEED_PKGCONFIG="$NEED_PKGCONFIG avahi"
-fi
-
if [[ -n $ADK_COMPILE_AUTOCONF ]]; then
NEED_M4="$NEED_M4 autoconf"
fi
@@ -85,10 +81,6 @@ if [[ -n $ADK_PACKAGE_SQUID ]]; then
NEED_GXX="$NEED_GXX squid"
fi
-if [[ -n $ADK_PACKAGE_DANSGUARDIAN ]]; then
- NEED_PKGCONFIG="$NEED_PKGCONFIG dansguardian"
-fi
-
if [[ -n $ADK_PACKAGE_XKEYBOARD_CONFIG ]]; then
NEED_INTL="$NEED_INTL xkeyboard-config"
fi
@@ -96,7 +88,6 @@ fi
if [[ -n $ADK_PACKAGE_GLIB ]]; then
NEED_GLIBZWO="$NEED_GLIBZWO glib"
NEED_GETTEXT="$NEED_GETTEXT glib"
- NEED_PKGCONFIG="$NEED_PKGCONFIG glib"
fi
if [[ -n $ADK_PACKAGE_LIBPCAP ]]; then
@@ -278,13 +269,6 @@ if [[ -n $NEED_XKBCOMP ]]; then
fi
fi
-if [[ -n $NEED_PKGCONFIG ]]; then
- if ! which pkg-config >/dev/null 2>&1; then
- echo >&2 You need pkg-config to build $NEED_PKGCONFIG
- out=1
- fi
-fi
-
if [[ -n $NEED_GLIBZWO ]]; then
if ! which glib-genmarshal >/dev/null 2>&1; then
echo >&2 You need libglib2.0-dev to build $NEED_GLIBZWO
diff --git a/scripts/scan-tools.sh b/scripts/scan-tools.sh
index c86239d39..2ad569de0 100644
--- a/scripts/scan-tools.sh
+++ b/scripts/scan-tools.sh
@@ -220,6 +220,12 @@ if ! which m4 >/dev/null 2>&1; then
out=1
fi
+if ! which pkg-config >/dev/null 2>&1; then
+ echo "You need pkg-config to continue."
+ echo
+ out=1
+fi
+
cd $topdir
rm -rf tmp
diff --git a/scripts/update-pkg b/scripts/update-pkg
new file mode 100755
index 000000000..b2ff3feca
--- /dev/null
+++ b/scripts/update-pkg
@@ -0,0 +1,6 @@
+#!/bin/sh
+topdir=$(readlink -nf $(dirname $0)/.. 2>/dev/null || (cd $(dirname $0)/..; pwd -P))
+if [ -d "$topdir/target/packages/pkg-enabled" ];then
+ cat $topdir/target/packages/pkg-enabled/* > $topdir/target/packages/Config.in 2>/dev/null
+fi
+exit 0
diff --git a/scripts/update-sys b/scripts/update-sys
new file mode 100755
index 000000000..6a40aff36
--- /dev/null
+++ b/scripts/update-sys
@@ -0,0 +1,48 @@
+#!/bin/sh
+topdir=$(readlink -nf $(dirname $0)/.. 2>/dev/null || (cd $(dirname $0)/..; pwd -P))
+
+defaults() {
+ echo 'source "target/config/Config.in.arch.default"' > $topdir/target/config/Config.in.arch
+ echo 'source "target/config/Config.in.arch.choice"' >> $topdir/target/config/Config.in.arch
+ echo 'source "target/config/Config.in.system.default"' > $topdir/target/config/Config.in.system
+ echo 'source "target/config/Config.in.system.choice"' >> $topdir/target/config/Config.in.system
+ exit 0
+}
+
+for i in $(ls $topdir/target/);do
+ if [ -d "$topdir/target/$i/sys-enabled" ];then
+ cat $topdir/target/$i/sys-enabled/* > $topdir/target/$i/Config.in.systems 2>/dev/null
+ fi
+done
+if [ -f $topdir/.config ];then
+arch=$(grep ^ADK_TARGET_ARCH $topdir/.config|cut -f 2 -d = | sed -e 's#"##g')
+systemsym=$(grep ^ADK_TARGET_SYSTEM_ $topdir/.config|cut -f 1 -d =)
+system=$(grep ^ADK_TARGET_SYSTEM= $topdir/.config|cut -f 2 -d = | sed -e 's#"##g')
+systems=$(grep ^ADK_TARGET_SYSTEM= $topdir/.config|cut -f 2 -d = | sed -e 's#"##g'|sed -e 's#-#_#g')
+archsym=$(echo ADK_LINUX_$arch|tr '[:lower:]-' '[:upper:]')
+
+if [ -z "$arch" -o -z "$system" ];then
+ defaults
+fi
+
+cat > $topdir/target/config/Config.in.arch << EOF
+source "target/config/Config.in.arch.default"
+config $archsym
+ bool
+EOF
+
+cat > $topdir/target/config/Config.in.system << EOF
+source "target/config/Config.in.system.default"
+comment "Architecture: $arch"
+comment "System: $system"
+
+config $systemsym
+ boolean
+ select $archsym
+$(grep select $topdir/target/$arch/sys-available/$system)
+ default y
+EOF
+else
+ defaults
+fi
+exit 0