[uClinux-dev] eb55/uclinux questions

Abraham van der Merwe abz at frogfoot.net
Mon Mar 31 17:58:44 EST 2003


I've got a couple of questions about the eb55 uclinux port:

If anyone else can answer any of these questions feel free to help out.

Here we go:

 (a) What should the boot loader in order to boot the kernel? Assuming you
     concatenate linux.text and linux.data and the boot loader loads it into
     0x2000000 and branches to it, should it work or does it need to do some
     other initialization first?

 (b) Looking at head-arm-atmel.S there is a few things that confuses me:

     You store DRAM_LIMIT in r13, but never use r13. Is there any code which
     assumes r13 contains DRAM_LIMIT or is this redundant code?

     Where do you get these values from:

LC0:    .long edata
    .long arm_id
    .long end
    .long init_kernel_stack + 4096

     There's no linker script so I have no idea how edata and end gets
     calculated. In addition, there's this piece of code which is supposed
     to initialize arm_id, but 0x41007000 is a completely bogus register

    ldr r2,=0x41007000      /* Hmm...???  What's this? */
    str r2, [r6]

     What should arm_id be set to (it should obviously be initialized
     because it is needed later on by setup_arch())

 (c) The way I see it, life starts for the kernel as follows:


     get_processor_type goes on to select a processor struct depending on
     arm_id (which is uninitialized at this stage and causes the system to
     lock up).

     Also, printk() is used long before the console is initialized. Is this

 (d) The kernel is split into text and data images as follows:

------------< snip <------< snip <------< snip <------------
    $(CROSS_COMPILE)objcopy -O binary --remove-section=.romvec \
            --remove-section=.text --remove-section=.ramvec \
            --remove-section=.init \
            --remove-section=.bss --remove-section=.eram \
            $(ROOTDIR)/$(LINUXDIR)/linux $(IMAGEDIR)/linux.data
    $(CROSS_COMPILE)objcopy -O binary --remove-section=.ramvec \
            --remove-section=.bss --remove-section=.data \
            --remove-section=.eram \
            --set-section-flags=.romvec=CONTENTS,ALLOC,LOAD,READONLY,CODE \
            $(ROOTDIR)/$(LINUXDIR)/linux $(IMAGEDIR)/linux.text
------------< snip <------< snip <------< snip <------------

     However, these commands don't strip out .rodata in the second objcopy,
     so it is duplicated in both images. Why didn't you use a linker script
     to do all of this?

 (e) If I want to boot the kernel from flash, what do I need to setup/modify
     before booting the kernel?



Yesterday upon the stair
I met a man who wasn't there.
He wasn't there again today --
I think he's from the CIA.

 Abraham vd Merwe - Frogfoot Networks CC
 9 Kinnaird Court, 33 Main Street, Newlands, 7700
 Phone: +27 21 686 1674 Cell: +27 82 565 4451

More information about the uClinux-dev mailing list