From: Thomas Veerman Date: Mon, 7 May 2012 11:38:39 +0000 (+0200) Subject: Cross-compilation fixes X-Git-Tag: v3.2.1~515 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/style.css?a=commitdiff_plain;h=acac1f2fdae812a1e623ce52014197c9303fae89;p=minix.git Cross-compilation fixes . Some Makefile fixes to automatically differentiate between a normal compilation and cross-compilation. Also, build compressed images. . Harmonize ramdisk rc scripts for normal use case and ext2 ramdisk. . ext2_ramdisk filesystem prototype fixes. --- diff --git a/drivers/ext2_ramdisk/device_table.txt b/drivers/ext2_ramdisk/device_table.txt index 831fde5d7..2270d6469 100644 --- a/drivers/ext2_ramdisk/device_table.txt +++ b/drivers/ext2_ramdisk/device_table.txt @@ -1,10 +1,18 @@ -/dev d 755 0 0 - - - - - -/dev/null c 666 0 0 1 3 0 0 - -/dev/log c 666 0 0 4 0 0 0 - -/dev/console c 666 0 0 4 0 0 0 - -/dev/ttyc c 666 0 0 4 1 1 1 4 -/dev/tty c 666 0 0 5 0 0 0 - -/dev/tty0 c 666 0 0 4 0 0 1 4 -/dev/imgrd b 666 0 0 1 6 0 0 - -#/dev/ttyp c 666 0 0 4 128 128 1 16 +/dev d 755 0 0 - - - - - +/dev/null c 666 0 0 1 3 0 0 - +/dev/log c 666 0 0 4 0 0 0 - +/dev/console c 666 0 0 4 0 0 0 - +/dev/ttyc c 666 0 0 4 1 1 1 4 +/dev/tty c 666 0 0 5 0 0 0 - +/dev/tty0 c 666 0 0 4 0 0 1 4 +/dev/imgrd b 666 0 0 1 6 0 0 - +/dev/c0d0 b 600 0 0 3 0 0 0 - +/dev/c0d0p0s0 b 600 0 0 3 128 0 0 - +/dev/c0d0p0s1 b 600 0 0 3 129 0 0 - +/dev/c0d0p0s2 b 600 0 0 3 130 0 0 - +/dev/c0d0p0s3 b 600 0 0 3 131 0 0 - +/dev/c0d1 b 600 0 0 3 5 0 0 - +/dev/c1d0 b 600 0 0 8 0 0 0 - +/dev/fd0 b 666 0 0 2 0 0 0 - +#/dev/ttyp c 666 0 0 4 128 128 1 16 diff --git a/drivers/ext2_ramdisk/rc b/drivers/ext2_ramdisk/rc index 81fff4bc6..67d177159 100644 --- a/drivers/ext2_ramdisk/rc +++ b/drivers/ext2_ramdisk/rc @@ -21,7 +21,6 @@ else /bin/service -c up /sbin/at_wini -dev /dev/c0d0 -label at_wini_0 /bin/service -cr up /sbin/at_wini -dev /dev/c1d0 -label at_wini_1 -args instance=1 fi -/bin/service -c edit /sbin/mfs -label fs_imgrd /bin/service up /sbin/procfs || echo "WARNING: couldn't start procfs" if /bin/sysenv rootdevname >/dev/null @@ -44,10 +43,10 @@ then echo 'Looking for boot CD. This may take a minute.' echo 'Please ignore any error messages.' echo - cddev=`/usr/bin/cdprobe` || { echo 'No CD found'; exit 1; } + cddev=`cdprobe` || { echo 'No CD found'; exit 1; } export cddev echo "Loading ramdisk from ${cddev}p1" - /usr/bin/loadramdisk "$cddev"p1 + loadramdisk "$cddev"p1 elif [ "$rootdevname" = "/dev/ram" ] then if /bin/sysenv rootdevname >/dev/null @@ -61,7 +60,7 @@ then fi echo "Loading ramdisk from $ramimagename" - /usr/bin/loadramdisk "$ramimagename" || echo "WARNING: loadramdisk failed" + loadramdisk "$ramimagename" || echo "WARNING: loadramdisk failed" fi echo "Root device name is $rootdevname" if [ -e $FSCK ] diff --git a/drivers/ramdisk/proto b/drivers/ramdisk/proto index d134caaa5..09d3f4954 100644 --- a/drivers/ramdisk/proto +++ b/drivers/ramdisk/proto @@ -4,23 +4,29 @@ d--755 0 0 bin d--755 0 0 cdprobe ---755 0 0 cdprobe dev2name ---755 0 0 dev2name - loadramdisk ---755 0 0 loadramdisk + fsck.mfs ---755 0 0 fsck.mfs mount ---755 0 0 mount sh ---755 0 0 sh service ---755 0 0 service sysenv ---755 0 0 sysenv - fsck.mfs ---755 0 0 fsck.mfs $ sbin d--755 0 0 - @ACPI@ + floppy ---755 0 0 floppy ahci ---755 0 0 ahci at_wini ---755 0 0 at_wini ext2 ---755 0 0 ext2 - floppy ---755 0 0 floppy - pci ---755 0 0 pci mfs ---755 0 0 mfs procfs ---755 0 0 procfs $ + usr d--755 0 0 + bin d--755 0 0 + loadramdisk ---755 0 0 loadramdisk + $ + sbin d--755 0 0 + @ACPI@ + pci ---755 0 0 pci + $ + $ dev d--755 0 0 @DEV@ $ diff --git a/drivers/ramdisk/rc b/drivers/ramdisk/rc index 7be8797b6..67d177159 100644 --- a/drivers/ramdisk/rc +++ b/drivers/ramdisk/rc @@ -6,12 +6,12 @@ exec 2>/dev/log exec /dev/null diff --git a/tools/Makefile b/tools/Makefile index 808b0a32f..043d83da1 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -75,20 +75,20 @@ bootable: exec su root mkboot bootable hdboot: - rm -rf /boot/minix/.temp/ - mkdir -p /boot/minix/.temp + rm -rf ${DESTDIR}/boot/minix/.temp/ + mkdir -p ${DESTDIR}/boot/minix/.temp # mod_0 is used to make alphabetical order equal to the boot order for i in ${PROGRAMS}; \ do \ let n=n+1 >/dev/null; \ [ "$$n" -ge 10 ] && prefix="mod" || prefix="mod0"; \ - newname="/boot/minix/.temp/$${prefix}$${n}_`basename $$i`"; \ + newname="${DESTDIR}/boot/minix/.temp/$${prefix}$${n}_`basename $$i`"; \ cp $$i $$newname; \ strip -s $$newname; \ gzip $$newname; \ done - cp ../kernel/kernel /boot/minix/.temp/ - strip -s /boot/minix/.temp/kernel + cp ../kernel/kernel ${DESTDIR}/boot/minix/.temp/ + strip -s ${DESTDIR}/boot/minix/.temp/kernel sh mkboot $@ sh ../commands/update_bootcfg/update_bootcfg.sh @@ -96,7 +96,11 @@ fdboot: exec su root mkboot $@ @sync -install: includes services hdboot +install: + if [ ${DESTDIR}X != X ]; \ + then ${MAKE} cross_install; \ + else ${MAKE} includes services hdboot; \ + fi cross_install: if [ ! -d ${DESTDIR}/multiboot ] ; \ @@ -104,12 +108,17 @@ cross_install: mkdir ${DESTDIR}/multiboot;\ fi #ext2 might be needed - for i in ${PROGRAMS} ../kernel/kernel ../servers/ext2/ext2;\ - do\ - newname="${DESTDIR}/multiboot/`basename $$i`"; \ - cp $$i $$newname;\ - strip -s $$newname;\ + for i in ${PROGRAMS} ../servers/ext2/ext2; \ + do \ + let n=n+1 >/dev/null; \ + [ "$$n" -ge 10 ] && prefix="mod" || prefix="mod0"; \ + newname="${DESTDIR}/multiboot/$${prefix}$${n}_`basename $$i`"; \ + cp $$i $$newname; \ + strip -s $$newname; \ + gzip -f $$newname; \ done + cp ../kernel/kernel ${DESTDIR}/multiboot/ + strip -s ${DESTDIR}/multiboot/kernel # download and update NetBSD reference sources. nbsd_fetch: