Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/distrib/amiga/miniroot Add support for aout to ELF conversio...
details: https://anonhg.NetBSD.org/src/rev/8d2e597fda8a
branches: trunk
changeset: 534361:8d2e597fda8a
user: mhitch <mhitch%NetBSD.org@localhost>
date: Tue Jul 23 03:52:02 2002 +0000
description:
Add support for aout to ELF conversion to install.md, copied from the sparc
miniroot install.md. Add usr/bin/file and usr/share/misc/magic to the
miniroot - used by the install.md changes. Upgrades will now move the
standard a.out shared libraries to /emul/aout.
diffstat:
distrib/amiga/miniroot/install.md | 123 +++++++++++++++++++++++++++++++++++++-
distrib/amiga/miniroot/list | 9 ++-
2 files changed, 130 insertions(+), 2 deletions(-)
diffs (167 lines):
diff -r 22b0cef568de -r 8d2e597fda8a distrib/amiga/miniroot/install.md
--- a/distrib/amiga/miniroot/install.md Tue Jul 23 00:03:36 2002 +0000
+++ b/distrib/amiga/miniroot/install.md Tue Jul 23 03:52:02 2002 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: install.md,v 1.18 2002/04/15 02:48:17 mhitch Exp $
+# $NetBSD: install.md,v 1.19 2002/07/23 03:52:02 mhitch Exp $
#
#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -327,3 +327,124 @@
done
umount -f /mnt2 > /dev/null 2>&1
}
+
+md_lib_is_aout() {
+ local r
+ test -h $1 && return 1
+ test -f $1 || return 1
+
+ r=`file $1 | sed -n -e '/ELF/p'`
+ test -z "$r" || return 1
+ return 0
+}
+
+
+md_mv_usr_lib() {
+ local root
+ root=$1
+ for f in $root/usr/lib/lib*.so.[0-9]*.[0-9]* ; do
+ md_lib_is_aout $f || continue
+ mv -f $f $root/emul/aout/usr/lib || return 1
+ done
+ return 0
+}
+
+md_x_shlib_set_14=" \
+ libICE.so.6.3 \
+ libPEX5.so.6.0 \
+ libSM.so.6.0 \
+ libX11.so.6.1 \
+ libXIE.so.6.0 \
+ libXaw.so.6.1 \
+ libXext.so.6.3 \
+ libXi.so.6.0 \
+ libXmu.so.6.0 \
+ libXp.so.6.2 \
+ libXt.so.6.0 \
+ libXtst.so.6.1 \
+ liboldX.so.6.0"
+
+md_mv_x_lib() {
+ local root xlibdir
+ root=$1
+ xlibdir=$2
+ for f in $md_x_shlib_set_14; do
+ md_lib_is_aout $root/$xlibdir/$f || continue
+ mv -f $root/$xlibdir/$f $root/emul/aout/$xlibdir || return 1
+ done
+ return 0
+}
+
+md_mv_aout_libs()
+{
+ local root xlibdir
+
+ root=/mnt # XXX - should be global
+
+ if [ -d $root/emul/aout/. ]; then
+ echo "Using existing /emul/aout directory"
+ else
+ echo "Creating /emul/aout hierachy"
+ mkdir -p $root/usr/aout || return 1
+
+ if [ ! -d $root/emul ]; then
+ mkdir $root/emul || return 1
+ fi
+
+ if [ -h $root/emul/aout ]; then
+ echo "Preserving existing symbolic link from /emul/aout"
+ mv -f $root/emul/aout $root/emul/aout.old || return 1
+ fi
+
+ ln -s ../usr/aout $root/emul/aout || return 1
+ fi
+
+ # Create /emul/aout/etc and /emul/aout/usr/lib
+ if [ ! -d $root/emul/aout/etc ]; then
+ mkdir $root/emul/aout/etc || return 1
+ fi
+ if [ ! -d $root/emul/aout/usr/lib ]; then
+ mkdir -p $root/emul/aout/usr/lib || return 1
+ fi
+
+ # Move ld.so.conf
+ if [ -f $root/etc/ld.so.conf ]; then
+ mv -f $root/etc/ld.so.conf $root/emul/aout/etc || return 1
+ fi
+
+ # Finally, move the aout shared libraries from /usr/lib
+ md_mv_usr_lib $root || return 1
+
+ # If X11 is installed, move the those libraries as well
+ xlibdir="/usr/X11R6/lib"
+ if [ -d $root/$xlibdir/. ]; then
+ mkdir -p $root/emul/aout/$xlibdir || return 1
+ md_mv_x_lib $root $xlibdir || return 1
+ fi
+
+ echo "a.out emulation environment setup completed."
+}
+
+md_prepare_upgrade()
+{
+cat << 'EOF'
+This release uses the ELF binary object format. Existing (a.out) binaries
+can still be used on your system after it has been upgraded, provided
+that the shared libraries needed by those binaries are made available
+in the filesystem hierarchy rooted at /emul/aout.
+
+This upgrade procedure will now establish this hierarchy by moving all
+shared libraries in a.out format found in /usr/lib to /emul/aout/usr/lib.
+It will also move the X11 shared libraries in a.out format from previous
+NetBSD/sparc X11 installation sets, if they are installed.
+
+EOF
+ md_mv_aout_libs || {
+ echo "Failed to setup a.out emulation environment"
+ return 1
+ }
+ return 0
+}
+
+# Flag to notify upgrade.sh of the existence of md_prepare_upgrade()
+md_upgrade_prep_needed=1
diff -r 22b0cef568de -r 8d2e597fda8a distrib/amiga/miniroot/list
--- a/distrib/amiga/miniroot/list Tue Jul 23 00:03:36 2002 +0000
+++ b/distrib/amiga/miniroot/list Tue Jul 23 03:52:02 2002 +0000
@@ -1,14 +1,18 @@
-# $NetBSD: list,v 1.16 2002/05/29 04:11:02 lukem Exp $
+# $NetBSD: list,v 1.17 2002/07/23 03:52:02 mhitch Exp $
# Amiga extra's
PROG sbin/disklabel
PROG sbin/mount_ados
PROG sbin/mount_kernfs
+PROG usr/bin/file
PROG usr/bin/netstat
PROG usr/bin/printf
PROG usr/bin/vi
PROG usr/sbin/loadkmap
+# usr/bin/file needs libz
+LIBS -lz
+
# crunchgen source directory specials
SPECIAL loadkmap srcdir sys/arch/amiga/stand/loadkmap
SPECIAL vi srcdir usr.bin/vi/build
@@ -26,6 +30,9 @@
# and the termcap file
COPY ${ARCHDIR}/termcap.vt usr/share/misc/termcap
+# and the magic file
+COPY ${DESTDIR}/usr/share/misc/magic usr/share/misc/magic
+
# and the installation scripts
COPY ${ARCHDIR}/install.md install.md
COPY ${ARCHDIR}/dot.profile .profile
Home |
Main Index |
Thread Index |
Old Index