|
@@ -19,10 +19,14 @@ int test_tftp ( struct net_device *netdev, struct sockaddr_tcpip *target,
|
19
|
19
|
uint16_t fbms;
|
20
|
20
|
int rc;
|
21
|
21
|
|
|
22
|
+
|
|
23
|
+ ebuffer_alloc ( &buffer, 0 );
|
|
24
|
+#if 0
|
22
|
25
|
memset ( &buffer, 0, sizeof ( buffer ) );
|
23
|
26
|
buffer.addr = real_to_user ( 0, 0x7c00 );
|
24
|
27
|
get_real ( fbms, BDA_SEG, BDA_FBMS );
|
25
|
28
|
buffer.len = ( fbms * 1024 - 0x7c00 );
|
|
29
|
+#endif
|
26
|
30
|
|
27
|
31
|
memset ( &tftp, 0, sizeof ( tftp ) );
|
28
|
32
|
udp_connect ( &tftp.udp, target );
|
|
@@ -33,11 +37,15 @@ int test_tftp ( struct net_device *netdev, struct sockaddr_tcpip *target,
|
33
|
37
|
if ( ( rc = async_wait ( tftp_get ( &tftp ) ) ) != 0 )
|
34
|
38
|
return rc;
|
35
|
39
|
|
|
40
|
+ memset ( &image, 0, sizeof ( image ) );
|
36
|
41
|
image.data = buffer.addr;
|
37
|
42
|
image.len = buffer.len;
|
38
|
|
- if ( ( rc = elf_load ( &image ) ) == 0 ) {
|
39
|
|
- printf ( "Got valid ELF image: execaddr at %lx\n",
|
|
43
|
+ if ( ( rc = multiboot_load ( &image ) ) == 0 ) {
|
|
44
|
+ printf ( "Got valid multiboot image: execaddr at %lx\n",
|
40
|
45
|
image.entry );
|
|
46
|
+
|
|
47
|
+ image_exec ( &image );
|
|
48
|
+
|
41
|
49
|
return 0;
|
42
|
50
|
}
|
43
|
51
|
|