From ab7890233d09ad4e9a1991241b92f04954e61328 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Tue, 31 Jul 2012 09:49:16 +0200 Subject: remove obsolete stuff --- scripts/create-image-with-grub.sh | 45 ++++++--------------------------------- 1 file changed, 6 insertions(+), 39 deletions(-) diff --git a/scripts/create-image-with-grub.sh b/scripts/create-image-with-grub.sh index dbf073b07..47f37e6da 100755 --- a/scripts/create-image-with-grub.sh +++ b/scripts/create-image-with-grub.sh @@ -67,7 +67,7 @@ type=qemu function usage { cat >&2 </dev/null 2>&1; then @@ -189,6 +160,7 @@ if ! T=$(mktemp -d /tmp/openadk.XXXXXXXXXX); then print -u2 Error creating temporary directory. exit 1 fi + tar -xOzf "$src" usr/share/grub-bin/core.img >"$T/core.img" integer coreimgsz=$($statcmd "$T/core.img") if (( coreimgsz < 1024 )); then @@ -201,16 +173,11 @@ if (( coreimgsz > 65024 )); then rm -rf "$T" exit 1 fi + (( coreendsec = (coreimgsz + 511) / 512 )) -if [[ $basedev = /dev/svnd+([0-9]) ]]; then - # BSD svnd0 mode: protect sector #1 - corestartsec=2 - (( ++coreendsec )) - corepatchofs=$((0x614)) -else - corestartsec=1 - corepatchofs=$((0x414)) -fi +corestartsec=1 +corepatchofs=$((0x414)) + # partition offset: at least coreendsec+1 but aligned on a multiple of secs (( partofs = ((coreendsec / secs) + 1) * secs )) -- cgit v1.2.3