On 8/27/07, Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net wrote:
What about creating directories for each payload so we can differentiate between multiple payloads (in the original sense)?
normal/payload0/segment0 (33192 bytes, lzma compressed to 18088 bytes @0x38 load @0x100000, entry 0x105258) normal/payload0/segment1 (72 bytes, lzma compressed to 47 bytes @0x4718 load @0x1225a0, entry 0x105258)
more like normal/payload/segment0 normal/payload/segment1
sure we can do this, I did not know how to make lar do it yet. I'll see what I can do.
Maybe we should introduce a major/minor version in the LAR header? Or a different magic string for each revision?
Please no. Let's get this right and let's try to avoid versioning structures. It's nothing but a headache.
Do we also need an alignment parameter in the header (like "free placement, but please align to xx")?
I think we should adopt the convention of page alignment and leave it at that.
My eyes!
w.r.t. that comment on the pk( stuff in initram, this code is forcing gcc to make abs jumps for the printk. Someone tell me how to do this and that ugliness can go away. But we need PIC for initram in this case and that's all I have been able to make gcc do.
--- mainboard/emulation/qemu-x86/Makefile (revision 464) +++ mainboard/emulation/qemu-x86/Makefile (working copy) @@ -41,14 +41,17 @@ #
INITRAM_OBJ = $(obj)/mainboard/$(MAINBOARDDIR)/initram.o +$(obj)/mainboard/$(MAINBOARDDIR)/initram.o: $(src)/mainboard/$(MAINBOARDDIR)/initram.c
cc -c $(INITCFLAGS) -fPIE $(src)/mainboard/$(MAINBOARDDIR)/initram.c -o $(obj)/mainboard/$(MAINBOARDDIR)/initram.o
# These are possibly not permanent -INITRAM_OBJ += $(obj)/lib/console.o $(obj)/lib/vtxprintf.o $(obj)/lib/uart8250.o $(obj)/arch/x86/post_code.o +#INITRAM_OBJ += $(obj)/lib/console.o $(obj)/lib/vtxprintf.o $(obj)/lib/uart8250.o $(obj)/arch/x86/post_code.o
$(obj)/linuxbios.initram: $(obj)/stage0.init $(obj)/stage0.o $(INITRAM_OBJ) $(Q)# initram links against stage0 $(Q)printf " LD $(subst $(shell pwd)/,,$(@))\n"
$(Q)$(LD) -Ttext 0x80000 $(INITRAM_OBJ) \
--entry=main -o $(obj)/linuxbios.initram.o
$(Q)$(LD) $(INITRAM_OBJ) \
--entry=main -R $(obj)/stage0.o -o $(obj)/linuxbios.initram.o $(Q)printf " OBJCOPY $(subst $(shell pwd)/,,$(@))\n" $(Q)$(OBJCOPY) -O binary $(obj)/linuxbios.initram.o \ $(obj)/linuxbios.initram
Could you explain that one?
It is linking the initram (which is PIC) against the stage 0 that lives up at the top of flash.
Needs real documentation (LAR README maybe?), not just a code comment.
once we get a commit of the basic idea, it will go in docs.
$(Q)printf " TEST $(subst $(shell pwd)/,,$(@))\n" $(Q)test `wc -c < $(obj)/stage0.init` -gt 16128 && \ printf "Error. Bootblock got too big.\n" || true
Please explain.
this is stefan's stuff, stefan?
old revision, you will have to make sure the merge won't kill the changes since 464.
I remerged in the next patch.
OK, new patch attached with fixes for all comments to date. I did an svn up before this, and have built and tested with it.
ron