On Sat, Mar 16, 2002 at 09:19:06PM +0100, Christer Weinigel wrote: > Hi, > > I'm trying to understand how to use LinuxBIOS to load Etherboot and > then use Etherboot to load a Linux Kernel using BOOTP + TFTP, but I > can't get it to boot. > > I have created an elf image using: > > mkelfImage --kernel /export/nano/linux/vmlinux -o kernel > > And put it on my DHCP server as /tftpboot/kernel, but when I try to > load it I get the following: > > natsemi_probe: MAC addr 00:07:90:F0:00:19 at ioaddr 0X1000 > natsemi_probe: Vendor:0X100B Device:0X0020 > DP83815: Transceiver default autoneg. disabled, force 10 full duplex. > DP83815: Transceiver status 0000 advertising 0000 > DP83815: Setting full-duplex based on negotiated link capability. > Searching for server (DHCP)... > > ..Me: 10.128.0.132, Server: 10.128.0.254, Gateway 10.128.0.254 > Loading 10.128.0.254:/tftpboot/kernel ..(ELF)... segment does not fit in any memory >region > Unable to load file. > <sleep> > <abort> >
It's similar to my case, in my case I had to switch to mkelfImage 1.9 to work. Anyway the offending part is this in "osloader.c": 1031- } 1032- phdr=(Elf32_Phdr *)((unsigned int)&info 1033- + (unsigned int)(info.elf32.e_phoff)); 1034- /* Check for Etherboot related limitations. Memory 1035- * below 0x10000 and between RELOC and 0xfffff is not 1036- * allowed. Reasons: the Etherboot code/data area 1037- * and the ROM/IO area. */ 1038- for (segment = 0; segment < info.elf32.e_phnum; 1039- segment++) { 1040- unsigned int start, end; 1041: int fit, i; 1042- if (phdr[segment].p_type != PT_LOAD) 1043- continue; 1044-#ifdef IMAGE_FREEBSD 1045- if (image_type == Elf_FreeBSD) { 1046- phdr[segment].p_paddr += off; 1047- } 1048-#endif 1049- start = phdr[segment].p_paddr; 1050- end = phdr[segment].p_paddr+phdr[segment].p_memsz; 1051- if ((phdr[segment].p_paddr < 0x100000) && 1052- (end > RELOC)) { 1053- printf("segment in reserved area\n"); 1054- return 0; 1055- } 1056: fit = 0; 1057- for(i = 0; i < meminfo.map_count; i++) { 1058- unsigned long long r_start, r_end; 1059- if (meminfo.map[i].type != E820_RAM) 1060- continue; 1061- r_start = meminfo.map[i].addr; 1062- r_end = r_start + meminfo.map[i].size; 1063- if ((start >= r_start) && (end <= r_end)) { 1064: fit = 1; 1065- break; 1066- } 1067- } 1068: if (!fit) { 1069: printf("segment does not fit in any memory region\n"); 1070- return 0; 1071- } You can insert extra information like printf("segment does not fit in any memory region start=%#x\n", start); to check. 1072- } 1073- segment = -1; 1074- loc = 0; 1075- skip = 0; 1076- toread = 0; 1077-#ifdef IMAGE_FREEBSD 1078- /* Make sure we have a null to start with... */ 1079- shdr = 0; Regards, Kei. > What am I doing wrong? Is there a LinuxBIOS + Etherboot HOWTO > somewhere? > > /Christer > > -- > "Just how much can I get away with and still go to heaven?"