summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorkato <kato@FreeBSD.org>1998-07-02 12:37:36 +0000
committerkato <kato@FreeBSD.org>1998-07-02 12:37:36 +0000
commitad27e7626b4ef6e81a98bbf0999ac0d520db266e (patch)
tree20cd3d01f6f06d88fcdd41b926377debc825e5e7 /sys
parent00ba99f2f6c945ca28ddfe416a9447bdf664063e (diff)
downloadFreeBSD-src-ad27e7626b4ef6e81a98bbf0999ac0d520db266e.zip
FreeBSD-src-ad27e7626b4ef6e81a98bbf0999ac0d520db266e.tar.gz
Sync with sys/i386/boot/netboot/Makefile, bootmenu.c, main.c and
ns8390.c revisions 1.18, 1.15, 1.22 and 1.13, respectiely.
Diffstat (limited to 'sys')
-rw-r--r--sys/pc98/boot/netboot/Makefile3
-rw-r--r--sys/pc98/boot/netboot/bootmenu.c23
-rw-r--r--sys/pc98/boot/netboot/main.c32
-rw-r--r--sys/pc98/boot/netboot/ns8390.c6
4 files changed, 52 insertions, 12 deletions
diff --git a/sys/pc98/boot/netboot/Makefile b/sys/pc98/boot/netboot/Makefile
index 86ece2d..59694c6 100644
--- a/sys/pc98/boot/netboot/Makefile
+++ b/sys/pc98/boot/netboot/Makefile
@@ -3,6 +3,7 @@
# Makefile for NETBOOT
#
# Basic Options:
+# -DSECURE_BOOT - Disable 'boot>' prompt completely
# -DASK_BOOT - Ask "Boot from Network (Y/N) ?" at startup
# -DROMSIZE - Size of EPROM - Must be set (even for .COM files)
# -DRELOC - Relocation address (usually 0x90000)
@@ -95,6 +96,6 @@ nb3c509.com: start2.o ${SRCS:N*.h:R:S/$/.o/g} 3c509.o
# This force the creation of the "machine" symlink. These objects are
# specially handled in this file, and thus can't be taken care of in
# ../Makefile.inc
-3c509.o makerom ns8390.o start2.ro: beforedepend
+3c509.o makerom ns8390.o start2.ro: machine
.include <bsd.prog.mk>
diff --git a/sys/pc98/boot/netboot/bootmenu.c b/sys/pc98/boot/netboot/bootmenu.c
index 94f8444..74e7e96 100644
--- a/sys/pc98/boot/netboot/bootmenu.c
+++ b/sys/pc98/boot/netboot/bootmenu.c
@@ -32,8 +32,8 @@ struct bootcmds_t {
{"netmask", cmd_netmask, "<addr> set network mask"},
{"hostname", cmd_hostname, "<name> set hostname"},
{"kernel", cmd_kernel, "<file> set boot filename"},
- {"rootfs", cmd_rootfs, "ip:/fs set root filesystem"},
- {"swapfs", cmd_swapfs, "ip:/fs set swap filesystem"},
+ {"rootfs", cmd_rootfs, "[ip:]/fs set root filesystem"},
+ {"swapfs", cmd_swapfs, "[ip:]/fs set swap filesystem"},
{"swapsize", cmd_swapsize, "<nblks> set swap size"},
{"swapopts", cmd_swapopts, "<options> swap mount options"},
{"rootopts", cmd_rootopts, "<options> root mount options"},
@@ -160,17 +160,22 @@ CMD_ROOTFS - Set root filesystem name
cmd_rootfs(p)
char *p;
{
- if (!setip(p, &arptable[ARP_ROOTSERVER].ipaddr)) {
- printf("Root filesystem is %I:%s\n",
+ if (*p == '/') {
+ bcopy(&arptable[ARP_SERVER].ipaddr,
+ &arptable[ARP_ROOTSERVER].ipaddr, 4);
+ } else if (!setip(p, &arptable[ARP_ROOTSERVER].ipaddr)) {
+ printf("Root filesystem is %I:%s\r\n",
nfsdiskless.root_saddr.sin_addr,
nfsdiskless.root_hostnam);
+ return;
} else {
- bcopy(&arptable[ARP_ROOTSERVER].ipaddr,
- &nfsdiskless.root_saddr.sin_addr, 4);
while (*p && (*p != ':')) p++;
if (*p == ':') p++;
- sprintf(&nfsdiskless.root_hostnam, "%s", p);
}
+
+ bcopy(&arptable[ARP_ROOTSERVER].ipaddr,
+ &nfsdiskless.root_saddr.sin_addr, 4);
+ sprintf(&nfsdiskless.root_hostnam, "%s", p);
}
/**************************************************************************
@@ -305,7 +310,8 @@ execute(buf)
while(cmd->name) {
p = buf;
q = cmd->name;
- while (*q && (*(q++) == *(p++))) ;
+ while (*q && *q == *p++)
+ q++;
if ((!(*q)) && ((*p == ' ') || (*p == '\t') || (!(*p)))) {
if (!cmd->func)
return(1);
@@ -349,5 +355,6 @@ bootmenu()
printf("\n");
if (execute(cmd)) break;
}
+#endif
eth_reset();
}
diff --git a/sys/pc98/boot/netboot/main.c b/sys/pc98/boot/netboot/main.c
index 0ef141e..da07cca 100644
--- a/sys/pc98/boot/netboot/main.c
+++ b/sys/pc98/boot/netboot/main.c
@@ -304,7 +304,7 @@ cfg_done:
printf("Bad executable format!\n");
longjmp(jmp_bootmenu, 1);
}
- loadpoint = (char *)0x100000;
+ loadpoint = (char *)(head.a_entry & 0x00FFFFFF);
offset = N_TXTOFF(head);
printf("text=0x%X, ",head.a_text);
#ifdef PC98
@@ -358,7 +358,9 @@ POLLKBD - Check for Interrupt from keyboard
**************************************************************************/
pollkbd()
{
+#ifndef SECURE_BOOT
if (iskey() && (getchar() == ESC)) longjmp(jmp_bootmenu,1);
+#endif
}
/**************************************************************************
@@ -671,6 +673,34 @@ decode_rfc1048(p)
case 131: /* swap mount options */
bootp_string("swapopts", p);
break;
+ case 132: /* any other options */
+ case 133:
+ case 134:
+ case 135:
+ case 136:
+ case 137:
+ case 138:
+ case 139:
+ case 140:
+ case 141:
+ bootp_string("", p);
+ break;
+ case RFC1048_ROOT_PATH: /* XXX check len */
+ bootp_string("rootfs", p);
+ break;
+ case RFC1048_SWAP_PATH:
+ bootp_string("swapfs", p);
+ break;
+ case RFC1048_SWAP_LEN: /* T129 */
+ sprintf(config_buffer+strlen(config_buffer),
+ "swapsize %d\n", ntohl(*(long *)(p+2)) );
+ break;
+ case 130: /* root mount options */
+ bootp_string("rootopts", p);
+ break;
+ case 131: /* swap mount options */
+ bootp_string("swapopts", p);
+ break;
default:
printf("Unknown RFC1048-tag ");
for(q=p;q<p+2+TAG_LEN(p);q++)
diff --git a/sys/pc98/boot/netboot/ns8390.c b/sys/pc98/boot/netboot/ns8390.c
index f1d985f..451d303 100644
--- a/sys/pc98/boot/netboot/ns8390.c
+++ b/sys/pc98/boot/netboot/ns8390.c
@@ -95,8 +95,10 @@ eth_probe()
chksum = 0;
/* Check for WD/SMC card by checking ethernet address */
if (inb(eth_asic_base+8) != 0) continue;
- if (inb(eth_asic_base+9) != 0) continue;
- if (inb(eth_asic_base+10) != 0xC0) continue;
+ if (inb(eth_asic_base+9) != 0xE0) {
+ if (inb(eth_asic_base+9) != 0) continue;
+ if (inb(eth_asic_base+10) != 0xC0) continue;
+ }
for (i=8; i<16; i++)
chksum += inb(i+eth_asic_base);
if ((chksum & 0x00FF) == 0x00FF)
OpenPOWER on IntegriCloud