I was wondering if anyone could help me with a couple problems I'm having building Coreboot at the moment. Foremost, since I upgraded to SVN revision 4426, I've been unable to generate the stripped form of my BIOS in this or a previously working very old edition (circa revision 2539 when things were still LinuxBIOS). What happens is the build is dying at the objcopy step which is meant to strip the coreboot binary before appending the boot loader binary. Specifically, here is what I see from the generation of the CRT0 file to the end:
-------- gcc -m32 -nostdlib -nostartfiles -static -o linuxbios -T ldscript.ld crt0.o /usr/bin/ld: warning: dot moved backwards before `.text' /usr/bin/ld: warning: dot moved backwards before `.id' /usr/bin/ld: warning: dot moved backwards before `.text' /usr/bin/ld: warning: dot moved backwards before `.id' /usr/bin/ld: warning: dot moved backwards before `.text' /usr/bin/ld: warning: dot moved backwards before `.id' nm -n linuxbios | sort > linuxbios.map objcopy --gap-fill 0xff -R .note.gnu.build-id -O binary linuxbios linuxbios.strip objcopy: linuxbios.strip: Bad value objcopy: linuxbios.strip: Bad value make[1]: *** [linuxbios.strip] Error 1 make[1]: Leaving directory `/home/jacobs/LinuxBIOS-v2-GRUB-PTR/targets/arcom/apollo/apollo/image' make: *** [image/linuxbios.rom] Error 1 --------
Clearly, the objcopy is failing with some generic error of "Bad Value". So, I ran a strace on this command which I've edited for space and appended to this message below.
Secondly, I'm having a problem with the latest romcc. First of all, I cannot pass simple_test26 (I'll spare you the verbose error message here except to say that the final error is "too few registers". I changed the first line in romcc/tests/simple_test26.c from defining COUNT as 23 to 15 and that seems to work; I take it my platform only has 15 free registers; any more than that and I get the same error. Secondly, I can't seem to build simple_test87. There is no romcc/tests/simple_test87.c file and so when I try to compile romcc, I get the following message:
make: *** No rule to make target `tests/simple_test87.c', needed by `tests/simple_test87.S-O2-mmmx'. Stop.
Anyway, so those are the issues I'm seeing with the latest Coreboot. Am I alone in this? Can anyone help me here? I'm ignoring the problems with the romcc tests since I'm guessing that's okay as long as the register count is no more than 15. But the problem with objcopy is very mysterious so any and all help would be greatly appreciated. Thanks in advance.
Jeffrey.
----Transcript of strace performed on `objcopy ... coreboot.strip`---- execve("/usr/bin/objcopy", ["objcopy", "--gap-fill", "0xff", "-O", "binary", "coreboot", "coreboot.strip"], [/* 187 vars */]) = 0 brk(0) = 0x9999000 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=53996, ...}) = 0 mmap2(NULL, 53996, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7fde000 close(3) = 0 open("/usr/lib/libbfd-2.17.50.0.6-9.el5.so", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\240\3760\0004\0\0\0"..., 512) = 512 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fdd000 fstat64(3, {st_mode=S_IFREG|0755, st_size=597048, ...}) = 0 mmap2(0x2fc000, 615280, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2fc000 mmap2(0x388000, 28672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x8b) = 0x388000 mmap2(0x38f000, 13168, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x38f000 close(3) = 0 open("/lib/libc.so.6", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320\277\34\0004\0\0\0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=1606808, ...}) = 0 mmap2(0x1b6000, 1324452, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x1b6000 mmap2(0x2f4000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13e) = 0x2f4000 mmap2(0x2f7000, 9636, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2f7000 close(3) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fdc000 set_thread_area({entry_number:-1 -> 6, base_addr:0xb7fdc6c0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0 mprotect(0x2f4000, 8192, PROT_READ) = 0 mprotect(0x1b2000, 4096, PROT_READ) = 0 munmap(0xb7fde000, 53996) = 0 brk(0) = 0x9999000 brk(0x99ba000) = 0x99ba000 stat64("coreboot", {st_mode=S_IFREG|0755, st_size=94174, ...}) = 0 open("coreboot", O_RDONLY|O_LARGEFILE) = 3 fstat64(3, {st_mode=S_IFREG|0755, st_size=94174, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7feb000 _llseek(3, 0, [0], SEEK_SET) = 0 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\2\0\3\0\1\0\0\0\260&\0\0004\0\0\0"..., 4096) = 4096 _llseek(3, 4096, [4096], SEEK_SET) = 0 _llseek(3, 4096, [4096], SEEK_SET) = 0 _llseek(3, 4096, [4096], SEEK_SET) = 0 _llseek(3, 4096, [4096], SEEK_SET) = 0 _llseek(3, 4096, [4096], SEEK_SET) = 0 _llseek(3, 4096, [4096], SEEK_SET) = 0 _llseek(3, 4096, [4096], SEEK_SET) = 0 _llseek(3, 4096, [4096], SEEK_SET) = 0 _llseek(3, 4096, [4096], SEEK_SET) = 0 _llseek(3, 69632, [69632], SEEK_SET) = 0 read(3, "\0.symtab\0.strtab\0.shstrtab\0.ram\0"..., 4096) = 4096 _llseek(3, 73728, [73728], SEEK_SET) = 0 _llseek(3, 73728, [73728], SEEK_SET) = 0 _llseek(3, 0, [0], SEEK_SET) = 0 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\2\0\3\0\1\0\0\0\260&\0\0004\0\0\0"..., 4096) = 4096 _llseek(3, 69632, [69632], SEEK_SET) = 0 read(3, "\0.symtab\0.strtab\0.shstrtab\0.ram\0"..., 4096) = 4096 stat64("coreboot.strip", 0xbfc24900) = -1 ENOENT (No such file or directory) open("coreboot.strip", O_RDWR|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 4 _llseek(3, 73728, [73728], SEEK_SET) = 0 read(3, "]\5\0\0\250\6\0\0\0\0\0\0\0\0\2\0c\5\0\0\257\6\0\0\0\0\0\0\0\0\2\0"..., 8192) = 8192 read(3, "]\21\0\0\265 \0\0\0\0\0\0\0\0\2\0c\21\0\0\304 \0\0\0\0\0\0\0\0\2\0"..., 4096) = 4096 read(3, "36\0L1038\0L1766\0L1039\0L1767\0L1044"..., 4096) = 4096 read(3, "1712\0L1717\0L1713\0L1714\0L1715\0L17"..., 4096) = 4062 brk(0x99e4000) = 0x99e4000 _llseek(3, 8192, [8192], SEEK_SET) = 0 read(3, "\30\371\1\0\177\373\366\377\372.\17\1\0257A\0\0\352\20@\4\20\0\270\30\5\0\216\330\216\300\216"..., 45056) = 45056 read(3, "(B|\304c\273u:Q\216\2621\0211 2Xl\305\"S\326i\207^\304\370\260ZFi"..., 4096) = 4096 fstat64(4, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fea000 _llseek(4, 4294905856, [4294905856], SEEK_SET) = 0 read(4, "", 2384) = 0 _llseek(4, 2384, [4294908240], SEEK_CUR) = 0 write(4, "\30\371\1\0\177\373\366\377\372.\17\1\0257A\0\0\352\20@\4\20\0\270\30\5\0\216\330\216\300\216"..., 45056) = 45056 brk(0x99d9000) = 0x99d9000 read(3, "\275\302$\0\0\353'f\272\375\3\354\17\266\370\203\347 \205\377t\361f\272\370\3\211\350\356f\272\375"..., 8192) = 8192 read(3, "\17n\307\203\3779~\17\203\307'f\17n\307f\17\333\5\200#\0\0f\272\375\3\354\17\266\370\203"..., 4096) = 4096 write(2, "objcopy: coreboot.strip: Bad val"..., 35) = 35 write(4, "(B|\304c\273u:Q\216\2621\0211 2Xl\305\"S\326i\207^\304\370\260ZFi"..., 2917) = 2917 _llseek(4, 0, [0], SEEK_SET) = 0 read(4, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096) = 4096 _llseek(4, -1298, [2798], SEEK_CUR) = 0 write(4, "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"..., 8192) = 8192 write(4, "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"..., 4096) = 4096 ----Repeat 1,048,558 times (including the one above)---- write(2, "objcopy: coreboot.strip: Bad val"..., 35) = 35 write(4, "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"..., 3682) = 3682 close(4) = 0 munmap(0xb7fea000, 4096) = 0 stat64("coreboot.strip", {st_mode=S_IFREG|0644, st_size=4294956213, ...}) = 0 umask(0) = 022 umask(022) = 0 chmod("coreboot.strip", 0755) = 0 close(3) = 0 munmap(0xb7feb000, 4096) = 0 brk(0x99ca000) = 0x99ca000 lstat64("coreboot.strip", {st_mode=S_IFREG|0755, st_size=4294956213, ...}) = 0 unlink("coreboot.strip") = 0 exit_group(1) = ? --------