[U-Boot] [Question] Linux Boot with u-boot 2014.04 on Zynq board

Michal Simek monstr at monstr.eu
Wed May 7 07:54:43 CEST 2014


Hi Masahiro,

On 05/07/2014 07:47 AM, Masahiro Yamada wrote:
> Hi Michal,
> Sorry for late reply. (I'm back from my vacations.)

No problem at all.

>>>>
>>>> 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.
> 
> Yes. I can see them.

That's a great start.


>>
>> 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>
> 
> 
> Thanks!
> Now I understand how to boot u-boot and Linux.


You can run Linux directly from SPL. I have tried that but without
FIT it is not so nice.


>>> 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.
> 
> I am not convinced why unsupported CONFIG_OF_SEPARATE is enabled.

Jagan has enabled it - don't know why but it is enabled by default.


> U-boot mainline and u-boot-xlnx diverged with this point.
> Which way are you going in your future development?
> U-Boot control with device tree?  or without device tree?

yes. I have tried OF_SEPARATE and if you copy DTS from the kernel (our repo)
you can use it and should work. At least worked when I have tried it.

u-boot should be configured from device-tree.
We are pushing a lot of drivers to mainline and we are reviewing the whole
binding to ensure that it is correct that's why I haven't pushed
any DTS file to u-boot source code for reference boards.


>>>>>
>>>>> 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?
> 
> Yes.
> I want to run U-boot and Linux on a Zynq board.
> I also want to use new features in the U-Boot mainline such as Kbuild.
> 
> That is my motivation to try to run u-boot-2014.04 on a zynq board.

ok. Just disable OF_CONTROL for now and I haven't pushed that SPL fpga
feature because it needs to be cleanup.


>>
>>>>> 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.
> 
> This sounds reasonable!
> I am looking forward to it.

my too. :-)

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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 263 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140507/b8df0d21/attachment-0001.pgp>


More information about the U-Boot mailing list