[U-Boot] [help] how does u-boot passing ``fdt'' to linux kernel & where is cmd_line?

Baojun Wang wangbj at gmail.com
Mon Jul 13 17:14:12 CEST 2009


On Mon, Jul 13, 2009 at 10:53 PM, Kumar Gala<galak at kernel.crashing.org> wrote:
>
> On Jul 13, 2009, at 9:39 AM, Baojun Wang wrote:
>
>>>
>>> Where is the code you are referencing above?  This is the "old" bd_t
>>> style
>>> of booting.  Only the boot wrapper code or and old kernel would still be
>>> using this.
>>>
>>> - k
>>>
>>
>> the code is from arch/powerpc/boot/cuboot-bamboo.c, and the kernel is
>> 2.6.30.1, the boot image I'm using is something like cuImage.bamboo, I
>> checked zImage.ld.S, and found that when we're running cuImage.bamboo,
>> we actually fall into arch/powerpc/boot/crt0.S:_zimage_start(), which
>> will call platform_init() and then bamboo_init() finally. but sounds
>> like if we passing r3 as fdt, then the code (platform_init, etc.., and
>> even arch/powerpc/kernel/head_xxx.S start() function, only comments,
>> though) is actually wrong, isn't it? Thank you very much for help.
>
> This is the boot wrapper code only used if you are trying to boot a new
> kernel w/an old u-boot.  If you are using a current u-boot you should just
> be using a plain old uImage as produced by the kernel build.

do you mean the default ``uImage'' file? I'm using u-boot-2009.06, and
I can boot successfully with cuImage.mpc8548cds (I'm actually working
on a mpc8548 cds board), but unable to boot ``uImage'', I'm sure the
``vmlinux'' is the same.


tftp 1000000 uImage
bootm 1000000


Bytes transferred = 1619661 (18b6cd hex)
=> bootm 1000000
## Booting kernel from Legacy Image at 01000000 ...
   Image Name:   Linux-2.6.31-rc2
   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
   Data Size:    1619597 Bytes =  1.5 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK

acording the arch/powerpc/boot/Makefile:

# dtbImage% - a dtbImage is a zImage with an embedded device tree blob
$(obj)/dtbImage.initrd.%: vmlinux $(wrapperbits) $(obj)/%.dtb
        $(call if_changed,wrap,$*,,$(obj)/$*.dtb,$(obj)/ramdisk.image.gz)

$(obj)/dtbImage.%: vmlinux $(wrapperbits) $(obj)/%.dtb
        $(call if_changed,wrap,$*,,$(obj)/$*.dtb)

# This cannot be in the root of $(src) as the zImage rule always adds a $(obj)
# prefix
$(obj)/vmlinux.strip: vmlinux
        $(STRIP) -s -R .comment $< -o $@

# The iseries hypervisor won't take an ET_DYN executable, so this
# changes the type (byte 17) in the file to ET_EXEC (2).
$(obj)/zImage.iseries: vmlinux
        $(STRIP) -s -R .comment $< -o $@
        printf "\x02" | dd of=$@ conv=notrunc bs=1 seek=17

$(obj)/uImage: vmlinux $(wrapperbits)
        $(call if_changed,wrap,uboot)


It seems the right image should be dtbImage.XXXX because it embedes
with dtb while uImage does not, however, mpc8548_cds (mpc85xx) doesn't
produce the dtbImage..

I'm sorry I can't quite follow you, get confused again -_-

  Regards & Thanks
Wang

> - k
>


More information about the U-Boot mailing list