Hi, On 04/30/2014 01:31 PM, Masahiro Yamada wrote: > 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.
ok. Then I expect you are able to see at least u-boot SPL messages. >>> [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? yes that's the script - if you directly use that repo it is also wired in Makefile that boot.bin is automatically created. I have this on 2014.04 but I didn't validate this yet. >>> [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. This is what I am getting - u-boot.img has full u-boot. U-Boot SPL 2014.01-00816-ge0c1813-dirty (Jan 22 2014 - 17:56:37) mmc boot reading download.bit design filename = "system.ncd;HW_TIMEOUT=FALSE;UserID=0xFFFFFFFF" part number = "7z020clg484" date = "2013/07/22" time = "17:18:11" bytes in bitstream = 4045564 zynq_load: Align buffer at 100006c to 1000000(swap 1) reading system.dtb spl: error reading image system.dtb, err - -1 reading u-boot.img reading u-boot.img U-Boot 2014.01 (Mar 19 2014 - 08:12:51) Memory: ECC disabled DRAM: 1 GiB MMC: zynq_sdhci: 0 SF: Detected N25Q128A with page size 256 Bytes, erase size 64 KiB, total 16 MiB *** Warning - bad CRC, using default environment In: serial Out: serial Err: serial Net: Gem.e000b000 U-BOOT for zynq-zc702 Gem.e000b000 Waiting for PHY auto negotiation to complete.... done BOOTP broadcast 1 BOOTP broadcast 2 Abort Hit any key to stop autoboot: 0 U-Boot-PetaLinux> > Full u-boot image of zynq enables CONFIG_OF_SEPARATE, right? > I think u-boot.img does not include device tree. In mainline yes but I am not using it. It is nice for playing but it is fine just to disable it and you don't need to use dts at all. Just disable it in zynq config file. > 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 I am not sure if this will work because img is legacy u-boot format with entry point and load address. That's why this will not work. But OF also support to add DTB to hardcoded address but SPL has to be fixed for that. > Or should I disable CONFIG_OF_SEPARATE? That's what I am doing and that's what you can see in our xilinx git repo. > >> 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. It depends what you want to do. If you want to get just linux run then just use images from wiki and change the kernel. >>> >>> 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. ok. Then what are you trying to do? Just use latest u-boot? >>> 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? yes, I think it is not supported. I haven't had a time but Simon mentioned that they have enabled ITS format in SPL and it should be straight forward to do so. Then you can just use full ITS instead of DTB, kernel, ramdisk in separate images. Thanks, Michal -- Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/ Maintainer of Linux kernel - Xilinx Zynq ARM architecture Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform
signature.asc
Description: OpenPGP digital signature
_______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot