|
@@ -234,7 +234,8 @@ static unsigned short tcpudpchksum(struct iphdr *ip);
|
234
|
234
|
/*
|
235
|
235
|
* Find out what our boot parameters are
|
236
|
236
|
*/
|
237
|
|
-static int nic_load_configuration ( struct nic *nic ) {
|
|
237
|
+static int nic_configure ( struct type_dev *type_dev ) {
|
|
238
|
+ struct nic *nic = ( struct nic * ) type_dev;
|
238
|
239
|
int server_found;
|
239
|
240
|
|
240
|
241
|
if ( ! nic->nic_op->connect ( nic ) ) {
|
|
@@ -262,16 +263,7 @@ static int nic_load_configuration ( struct nic *nic ) {
|
262
|
263
|
printf("No Server found\n");
|
263
|
264
|
return 0;
|
264
|
265
|
}
|
265
|
|
- return 1;
|
266
|
|
-}
|
267
|
266
|
|
268
|
|
-
|
269
|
|
-/**************************************************************************
|
270
|
|
-LOAD - Try to get booted
|
271
|
|
-**************************************************************************/
|
272
|
|
-static int nic_load(struct dev *dev __unused)
|
273
|
|
-{
|
274
|
|
- const char *kernel;
|
275
|
267
|
printf("\nMe: %@", arptable[ARP_CLIENT].ipaddr.s_addr );
|
276
|
268
|
#ifndef NO_DHCP_SUPPORT
|
277
|
269
|
printf(", DHCP: %@", dhcp_server );
|
|
@@ -297,6 +289,19 @@ static int nic_load(struct dev *dev __unused)
|
297
|
289
|
printf("\n=>>"); getchar();
|
298
|
290
|
#endif
|
299
|
291
|
|
|
292
|
+ return 1;
|
|
293
|
+}
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+/**************************************************************************
|
|
297
|
+LOAD - Try to get booted
|
|
298
|
+**************************************************************************/
|
|
299
|
+static int nic_load ( struct type_dev *type_dev,
|
|
300
|
+ int ( * process ) ( unsigned char *data,
|
|
301
|
+ unsigned int blocknum,
|
|
302
|
+ unsigned int size, int eof ) ) {
|
|
303
|
+ const char *kernel;
|
|
304
|
+
|
300
|
305
|
/* Now use TFTP to load file */
|
301
|
306
|
#ifdef DOWNLOAD_PROTO_NFS
|
302
|
307
|
rpc_init();
|
|
@@ -309,7 +314,7 @@ static int nic_load(struct dev *dev __unused)
|
309
|
314
|
#endif
|
310
|
315
|
: KERNEL_BUF;
|
311
|
316
|
if ( kernel ) {
|
312
|
|
- loadkernel(kernel); /* We don't return except on error */
|
|
317
|
+ loadkernel(kernel,process); /* We don't return except on error */
|
313
|
318
|
printf("Unable to load file.\n");
|
314
|
319
|
} else {
|
315
|
320
|
printf("No filename\n");
|
|
@@ -343,6 +348,8 @@ struct type_driver nic_driver = {
|
343
|
348
|
.name = "NIC",
|
344
|
349
|
.type_dev = ( struct type_dev * ) &nic,
|
345
|
350
|
.describe_device = nic_describe_device,
|
|
351
|
+ .configure = nic_configure,
|
|
352
|
+ .load = nic_load,
|
346
|
353
|
};
|
347
|
354
|
|
348
|
355
|
/* Careful. We need an aligned buffer to avoid problems on machines
|