From: Masahiro Yamada Date: Wed, 30 Apr 2014 20:31:53 +0900 Subject: [U-Boot] [Question] Linux Boot with u-boot 2014.04 on Zynq board In-Reply-To: <5360CC7F.8020003@monstr.eu> References: <20140430185406.7693.AA925319@jp.panasonic.com> <5360CC7F.8020003@monstr.eu> Message-ID: <20140430203153.769B.AA925319@jp.panasonic.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Michal. Thanks for your reply. > > Before you build u-boot you have to copy ps7_init.c/h from your > hw design to the u-boot if you want to use SPL. Oops, I forgot to mention this. I did that. > > [1] Build u-boot > > [2] Convert spl/u-boot-spl.bin into boot.bin > > with BootGen tool > > yes - or if you look at xilinx git u-boot repo we have one > simple python script which does this automatically without bootgen. I found tools/zynq-boot-bin.py Is this the one you mentioned? > > [3] Copy "boot.bin" to FAT-fomatted SD card. > > yes. > > I personally use SD boot mode it means boot.bin has just u-boot SPL > and u-boot.img on SD stores full u-boot. On u-boot 2014.04 release, I don't know how to use full u-boot either. Full u-boot image of zynq enables CONFIG_OF_SEPARATE, right? I think u-boot.img does not include device tree. Should I combine u-boot.img and device tree by myself? Like this? cat u-boot.img u-boot.dtb > u-boot.img.tmp mv u-boot.img.tmp u-boot.img Or should I disable CONFIG_OF_SEPARATE? > Keep in your mind that using U-BOOT SPL is not fully supported flow. > Supported flow is fsbl->u-boot->linux. OK. Maybe I should stick to the old flow. > > > > My question is, how to pass an init ramdisk? > > I am using cpio compiled in directly in the kernel. > > > In which file-name should I copy init ramdisk > > into SD card? > > Xilinx OSL versions are using initramdisk > which you can download here. > http://www.wiki.xilinx.com/Zynq+2014.1+Release Yes. I am using this. > > How should I load the init ramdisk from the SD card? > > And this is the command which OSL version are using. > > "sdboot=if mmcinfo; then " \ > "run uenvboot; " \ > "echo Copying Linux from SD to RAM... && " \ > "fatload mmc 0 0x3000000 ${kernel_image} && " \ > "fatload mmc 0 0x2A00000 ${devicetree_image} && " \ > "fatload mmc 0 0x2000000 ${ramdisk_image} && " \ > "bootm 0x3000000 0x2000000 0x2A00000; " \ > "fi\0" \ > Yes. I know this works. But in my understanding, SPL cannot use this command. My question is how SPL can load the init ramdisk. It looks like spl_load_image_fat_os() function loads "system.dtb" and "uImage". But I could not find which code loads ramdisk. Not supported yet? Best Regards Masahiro Yamada