firmware

changeset 537:15af90157a19

Move the kernel image file from the temp dir into the mini-native dir, and teach packaging not to put it in the ext2 image. (Don't keep important files in the temp directory.)
author Rob Landley <rob@landley.net>
date Sun Dec 14 02:03:46 2008 -0600 (15 months ago)
parents 7b166d9f10c6
children 808ba1d186ac
files mini-native.sh package-mini-native.sh
line diff
     1.1 --- a/mini-native.sh	Sun Dec 14 00:37:19 2008 -0600
     1.2 +++ b/mini-native.sh	Sun Dec 14 02:03:46 2008 -0600
     1.3 @@ -43,7 +43,7 @@
     1.4  make ARCH="${KARCH}" KCONFIG_ALLCONFIG="$(getconfig linux)" allnoconfig &&
     1.5  cp .config "${TOOLS}"/src/config-linux &&
     1.6  make -j $CPUS ARCH="${KARCH}" CROSS_COMPILE="${ARCH}-" &&
     1.7 -cp "${KERNEL_PATH}" "${WORK}/zImage-${ARCH}" &&
     1.8 +cp "${KERNEL_PATH}" "${NATIVE}/zImage-${ARCH}" &&
     1.9  cd ..
    1.10  
    1.11  cleanup linux
     2.1 --- a/package-mini-native.sh	Sun Dec 14 00:37:19 2008 -0600
     2.2 +++ b/package-mini-native.sh	Sun Dec 14 02:03:46 2008 -0600
     2.3 @@ -22,9 +22,17 @@
     2.4  /dev d 755 0 0 - - - - -
     2.5  /dev/console c 640 0 0 5 1 0 0 -
     2.6  EOF
     2.7 -genext2fs -z -D "$WORK/devlist" -d "${NATIVE}" -i 1024 -b $[64*1024] "$IMAGE" &&
     2.8 +mv "$NATIVE/zImage-$ARCH" "$SYSIMAGE" || dienow
     2.9 +genext2fs -z -D "$WORK/devlist" -d "${NATIVE}" -i 1024 -b $[64*1024] "$IMAGE"
    2.10 +
    2.11 +# This little dance is because genext2fs hasn't got --exclude so we have to
    2.12 +# move the kernel out of the directory, then hardlink it back.
    2.13 +TEMP=$?
    2.14 +ln "$SYSIMAGE/zImage-$ARCH" "$NATIVE" || dienow
    2.15  rm "$WORK/devlist" || dienow
    2.16  
    2.17 +[ "$TEMP" -ne 0 ] && dienow
    2.18 +
    2.19  # Provide qemu's common command line options between architectures.  The lack
    2.20  # of ending quotes on -append is intentional, callers append more kernel
    2.21  # command line arguments and provide their own ending quote.
    2.22 @@ -42,8 +50,7 @@
    2.23  # to use an emulator other than qemu, but put the default case in qemu_defaults
    2.24  
    2.25  cp "$SOURCES/toys/run-emulator.sh" "$SYSIMAGE/run-emulator.sh" &&
    2.26 -emulator_command image-$ARCH.ext2 zImage-$ARCH >> "$SYSIMAGE/run-emulator.sh" &&
    2.27 -ln "$WORK/zImage-$ARCH" "$SYSIMAGE"
    2.28 +emulator_command image-$ARCH.ext2 zImage-$ARCH >> "$SYSIMAGE/run-emulator.sh"
    2.29  
    2.30  [ $? -ne 0 ] && dienow
    2.31