From mboxrd@z Thu Jan 1 00:00:00 1970 From: Detlev Zundel Date: Tue, 14 Jul 2009 13:24:42 +0200 Subject: [U-Boot] [help] how does u-boot passing ``fdt'' to linux kernel & where is cmd_line? In-Reply-To: <3cdfa5bc0907130814l8bc0c22x5bec748fc7180b0b@mail.gmail.com> (Baojun Wang's message of "Mon, 13 Jul 2009 23:14:12 +0800") References: <3cdfa5bc0907130544m7a25231ama0db5e702a45ad1f@mail.gmail.com> <3cdfa5bc0907130739u141be062qeb48cbd9e61b25fb@mail.gmail.com> <81D40C9E-E1DD-4A96-8144-E35B473DBD39@kernel.crashing.org> <3cdfa5bc0907130814l8bc0c22x5bec748fc7180b0b@mail.gmail.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Wang, >>> 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. Booting such a new kernel, you'll need to pass an adress of an fdt too: => help bootm bootm [addr [arg ...]] - boot application image stored in memory passing arguments 'arg ...'; when booting a Linux kernel, 'arg' can be the address of an initrd image When booting a Linux kernel which requires a flat device-tree a third argument is required which is the address of the device-tree blob. To boot that kernel without an initrd image, use a '-' for the second argument. If you do not pass a third a bd_info struct will be passed instead So try "bootm - " Cheers Detlev -- "The number you have dialed is imaginary. Please rotate your phone 90 degrees and try again." -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de