[uClinux-dev] uClinux dist changes from 20120401 to 20120620

Luis Alves ljalvs at gmail.com
Sun Aug 5 10:00:39 EDT 2012


Hi,

Yesterday I have downloaded latest uClinux-dist (20120620). I was
using uClinux-dist-20120401.

After applying my 68000 changes, when targeting the kernel to be
placed on ROM the linker is giving me extra headers (.rodata, __param
and __modver):

[...]
linux-3.x/vmlinux:     file format elf32-m68k

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .text         001b4010  00810000  00810000  00002000  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  1 .rodata       00039a48  00001000  009c4010  001b7000  2**4
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  2 __param       00000330  0003aa48  009fda58  001f0a48  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  3 __modver      00000288  0003ad78  009fdd88  001f0d78  2**1
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  4 .data         00014860  0003b000  009fe010  001f1000  2**4
                  CONTENTS, ALLOC, LOAD, DATA
  5 .init.text    0000d8c2  00050000  00a13010  00206000  2**1
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  6 .init.data    0000373c  0005d8c4  00a208d4  002138c4  2**2
                  CONTENTS, ALLOC, LOAD, DATA
  7 .bss          0000caec  00061000  00a24010  00217000  2**4
                  ALLOC
  8 .comment      000026d0  00000000  00000000  00217000  2**0
                  CONTENTS, READONLY
[...]




With the previous vmlinux-nommu.lds I had:


[...]
linux-3.x/linux:     file format elf32-m68k

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .text         001edd8c  00810000  00810000  00028000  2**4
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  1 .data         00015000  00001000  00001000  00001000  2**4
                  CONTENTS, ALLOC, LOAD, DATA
  2 .init.text    0000d8c2  00016000  00016000  00016000  2**1
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  3 .init.data    0000373c  000238c4  000238c4  000238c4  2**2
                  CONTENTS, ALLOC, LOAD, DATA
  4 .bss          0000caec  00027000  00027000  00027000  2**4
                  ALLOC
  5 .comment      000026d0  00000000  00000000  00215d8c  2**0
                  CONTENTS, READONLY
[...]




And my makefile was generating the linux.bin like this:

[...]
	$(CROSS_COMPILE)objcopy -O binary -j .data -j .init.text -j .init.data \
		$(ROOTDIR)/$(LINUXDIR)/linux $(IMAGEDIR)/linux.data
	$(CROSS_COMPILE)objcopy -O binary -j .text \
		$(ROOTDIR)/$(LINUXDIR)/linux \
		$(IMAGEDIR)/linux.text
	cat $(IMAGEDIR)/linux.text $(IMAGEDIR)/linux.data > $(IMAGEDIR)/linuxrom.bin
[...]


I had to replace the new vmlinux-nommu.lds with the previous one to be
able to generate the bin.

How should I modify the objcopy's so that I can use the new vmlinux-nommu.lds ?


Memory layout is like this:
0x0 - 0x7FFFFF: ram (8Mb)
0x800000 - 0xBFFFFF: flash (4Mb)

Kernel being booted at 0x810000 and base ram for linux begining at 0x1000


Thanks,
Luis Alves



More information about the uClinux-dev mailing list