Re: [Etherboot-developers] help with 5.1.3 Makefile needed
Brought to you by:
marty_connor,
stefanhajnoczi
|
From: <ebi...@ln...> - 2002-12-17 01:44:16
|
Marty Connor <md...@et...> writes: > I'm starting to get bug reports from rom-o-matic.net users using 5.1.3 that look > [snip] > I've looked at genrules.pl and Makefile in 5.1.3, and it appears that because of > > changes to: > > BUILD_LIBS= $(BLIB32) > BUILD_IMGS= $(IMGS32) > BUILD_ROMS= $(ROMS32) > BUILD_ELFS= $(patsubst %.img, %.elf, $(IMGS32)) $(patsubst %.img, > %.lzelf, $(IMGS32)) > BUILD_PXES= $(patsubst %.img, %.pxe, $(IMGS32)) $(patsubst %.img, > %.lzpxe, $(IMGS32)) > BUILD_COMS= $(patsubst %.img, %.com, $(IMGS32)) > BUILD_LILOS= $(patsubst %.img, %.lilo, $(IMGS32)) $(patsubst %.img, > %.lzlilo, $(IMGS32)) > > The BUILD_ELFS, BUILD_PXES, BUILD_COMS, and BUILD_LILOS variables are not > getting set right. I think in genrules.pl, this part: Those variables simply contain the default targets. The changes was that things were built from .img instead of from .rom... Not included the duplicate targets in the BUILD variables is deliberate. It is work to no purpose to those targets included in "make all" Roughly the correct territory though. The lines I have added should fix your problem, just append them to the end of the loop. > # Generate the assignments to DOBJS and BINS > print "# Driver object files and ROM image files\n"; > print "IMG3S2\t:=\n"; > print "DOBJS\t:=\n"; > foreach my $img (sort keys %buildent) { > print "DOBJS\t+= bin32/$img.o\n"; > print "IMGS32\t+= bin32/$img.img bin32/$img.lzimg > bin32/$img.nrv2bimg\n" > > } > > print "ROMS32\t:=\n"; > foreach my $family (sort keys %pcient) { > my $aref = $pcient{$family}; > foreach my $entry (@$aref) { > my $rom = $entry->[0]; > print "ROMS32\t+= bin32/$rom.rom bin32/$rom.lzrom > bin32/$rom.nrv2brom\n"; ... EOF next if($rom eq $img); print <<EOF; \$(BIN)/$rom.img: \$(BIN)/$img.img cat \$< > \$@ EOF > } > } > foreach my $isa (sort keys %isaent) { > print "ROMS32\t+= bin32/$isa.rom bin32/$isa.lzrom > bin32/$isa.nrv2brom\n"; > } > > Needs to be generalized, so people can say "make bin32/mx98715.com" > Right now, it looks like it is only allowing "make bin32/tulip.com" which works, > but complicates life for the user, since they don't know necessarily what family > to build for. I suppose I could fake it on the rom-o-matic.net site because I do > happen to know what family each ROM is a member of, and could modify the make > appropriately, but this seems like it should be fixed in the Makefile and > genrules. > > Any chance anyone has some cycles to look at this? It may be a while before I > can. I don't have a problem with adding a rule to make these targets when specifically requested, especially since it is fairly simple. I just copy the .img file to the new name... The build is fixed in the current CVS tree, and something similar should work against the 5.1.3 tree. The real changes are not that extensive but I feel like I have rewritten etherboot since 5.1.3 was released. I think was also your problem with .elf format images. In the current CVS I can currently build a .elf image from any target in the tree. There are fun targets like make "allelfs" make "allroms" that make testing this fairly simple. Eric |