summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2009-11-03 21:04:43 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2009-11-03 21:04:43 +0100
commit4fcc7439fb4e203f510e133a21e1bf9150b79368 (patch)
tree32eedf8ba00bb4ec35b196205bc9356a8ae5f5a8 /scripts
parent5dd0e62fa8d9366998288e7f384e48dad02949e1 (diff)
update X11, kerberos, samba, bluez
- fix some ipkg issues with ubuntu - use grub2 for alix1c, no grub1 dependency on host - boots up on alix1c - fix some bcm203x problems
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/install.sh64
-rw-r--r--scripts/ipkg6
2 files changed, 29 insertions, 41 deletions
diff --git a/scripts/install.sh b/scripts/install.sh
index 5cb5e01f4..54887b6be 100755
--- a/scripts/install.sh
+++ b/scripts/install.sh
@@ -4,16 +4,6 @@ if [ $(id -u) -ne 0 ];then
exit 1
fi
-printf "Checking if grub is installed"
-grub=$(which grub)
-
-if [ ! -z $grub -a -x $grub ];then
- printf "...okay\n"
-else
- printf "...failed\n"
- exit 1
-fi
-
printf "Checking if sfdisk is installed"
sfdisk=$(which sfdisk)
@@ -79,7 +69,7 @@ if [ -z $1 ];then
exit 1
else
if [ -z $2 ];then
- printf "Please give your install tar as second parameter\n"
+ printf "Please give your install tar archive as second parameter\n"
exit 2
fi
if [ -f $2 ];then
@@ -135,7 +125,7 @@ if [ $($sfdisk -l $1 2>/dev/null|grep Empty|wc -l) -ne 4 ];then
read y
if [ $y = "y" ];then
printf "Wiping existing partitions\n"
- dd if=/dev/zero of=$1 bs=512 count=1
+ dd if=/dev/zero of=$1 bs=512 count=1 >/dev/null 2>&1
else
printf "Exiting.\n"
exit 1
@@ -147,7 +137,7 @@ if [ $rb532 -ne 0 ];then
rootpart=${1}2
$parted -s $1 mklabel msdos
sleep 2
- maxsize=$(parted $1 -s unit cyl print |awk '/^Disk/ { print $3 }'|sed -e 's/cyl//')
+ maxsize=$(env LC_ALL=C $parted $1 -s unit cyl print |awk '/^Disk/ { print $3 }'|sed -e 's/cyl//')
rootsize=$(($maxsize-2))
$parted -s $1 unit cyl mkpart primary ext2 0 1
@@ -174,8 +164,8 @@ EOF
else
$parted -s $1 mklabel msdos
sleep 2
- maxsize=$(parted $1 -s unit cyl print |awk '/^Disk/ { print $3 }'|sed -e 's/cyl//')
- rootsize=$(($maxsize-1))
+ maxsize=$(env LC_ALL=C $parted $1 -s unit cyl print |awk '/^Disk/ { print $3 }'|sed -e 's/cyl//')
+ rootsize=$(($maxsize-2))
$parted -s $1 unit cyl mkpartfs primary ext2 0 $rootsize
$parted -s $1 unit cyl mkpart primary fat32 $rootsize $maxsize
@@ -209,30 +199,28 @@ chmod 1777 $tmp/tmp
chmod 4755 $tmp/bin/busybox
if [ $rb532 -eq 0 ];then
- printf "Copying grub files\n"
- mkdir $tmp/boot/grub
- cp /boot/grub/stage1 $tmp/boot/grub
- cp /boot/grub/stage2 $tmp/boot/grub
- cp /boot/grub/e2fs_stage1_5 $tmp/boot/grub
-
-cat << EOF > $tmp/boot/grub/menu.lst
-serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1
-terminal --timeout=2 serial console
-timeout 2
-default 0
-hiddenmenu
-title linux
-root (hd0,0)
-kernel /boot/kernel root=/dev/sda1 init=/init console=ttyS0,115200 console=tty0 panic=10 rw
-EOF
-
- printf "Installing Grub bootloader\n"
-$grub --batch --no-curses --no-floppy --device-map=/dev/null >/dev/null << EOF
-device (hd0) $1
-root (hd0,0)
-setup (hd0)
-quit
+ mkdir -p $tmp/boot/grub
+ mount -o bind /dev $tmp/dev
+ chroot $tmp mount -t proc /proc /proc
+ chroot $tmp mount -t sysfs /sys /sys
+cat << EOF > $tmp/boot/grub/grub.cfg
+set default=0
+set timeout=5
+insmod terminal
+insmod serial
+serial --unit=0 --speed=115200
+terminal serial
+
+menuentry "GNU/Linux (OpenADK)" {
+ insmod ext2
+ set root=(hd0,1)
+ linux /boot/vmlinuz-adk root=/dev/sda1 ro init=/init console=ttyS0,115200 console=tty0 panic=10
+}
EOF
+ chroot $tmp grub-install $1
+ umount $tmp/proc
+ umount $tmp/sys
+ umount $tmp/dev
fi
printf "Creating device nodes\n"
diff --git a/scripts/ipkg b/scripts/ipkg
index 39520094f..cfa1cfe97 100644
--- a/scripts/ipkg
+++ b/scripts/ipkg
@@ -777,7 +777,7 @@ ipkg_install_file_dest() {
mkdir -p $IPKG_TMP/$pkg/data
mkdir -p $info_dir
- if ! $pkg_extract_stdout $filename ./control.tar.gz | (cd $IPKG_TMP/$pkg/control; tar -xzf - ) ; then
+ if ! $pkg_extract_stdout $filename ./control.tar.gz|gzip -dc|tar -xf - -C $IPKG_TMP/$pkg/control ; then
echo "ipkg_install_file: ERROR unpacking control.tar.gz from $filename"
return 1
fi
@@ -807,7 +807,7 @@ Status: install ok pending" | ipkg_status_update_sd $sd $pkg
set -o noglob
rm -r $IPKG_TMP/$pkg/control
- if ! $pkg_extract_stdout $filename ./data.tar.gz | (cd $IPKG_TMP/$pkg/data; tar -xzf - ) ; then
+ if ! $pkg_extract_stdout $filename ./data.tar.gz|gzip -dc|tar -xf - -C $IPKG_TMP/$pkg/data ; then
echo "ipkg_install_file: ERROR unpacking data.tar.gz from $filename"
return 1
fi
@@ -879,7 +879,7 @@ diff -u $dest/$conffile $IPKG_TMP/$pkg/data/$conffile"
rm -rf $IPKG_TMP/$pkg/data
rmdir $IPKG_TMP/$pkg
rm -f $info_dir/$pkg.list
- $pkg_extract_stdout $filename ./data.tar.gz | tar tzf - | sed -e 's/^\.//' > $info_dir/$pkg.list
+ $pkg_extract_stdout $filename ./data.tar.gz | gzip -dc | tar tf - | sed -e 's/^\.//' > $info_dir/$pkg.list
if [ -x "$info_dir/$pkg.postinst" ]; then
IPKG_INSTROOT="$IPKG_INSTROOT" $info_dir/$pkg.postinst configure