Re: booting Zynq 7000 ...

David Young <[email protected]>
Newsgroups gmane.os.netbsd.ports.arm
Message-ID <[email protected]>
On Thu, Mar 14, 2024 at 01:54:10PM +1300, Lloyd Parkes wrote:
> Kia ora,
> I managed to get NetBSD 10.0_RC5 (the version I happened to have already
> built) booted on a Digilent Zybo. I did this by making a Frankenstein image
> and then using some advice from Brook Milligan about booting a BeagleBone
> Black.
> 
> I took an SD card with a NetBSD arm7.img.gz written to it and then I copied
> over boot.bin and u-boot.img from a FreeBSD image I had found into the
> MS-DOS partition.
> 
> At this point booting the SD card leaves me at the u-boot prompt because I
> haven't configured a uEnv.txt boot script. This suits me fine.
> 
> I can boot NetBSD with the following commands
> 
> 	setenv bootargs "root=ld0a"
> 	fatload mmc 0:1 ${kernel_addr_r} netbsd-GENERIC.ub
> 	fatload mmc 0:1 ${fdt_addr_r} dtb/zynq-zybo.dtb
> 	bootm $kernel_addr_r - $fdt_addr_r

Thanks, Lloyd!  I think this is getting me closer.  I had tried to EFI
boot but that does not seem to be how this board is ordinarily booted.

What do you see on the console after you type `bootm`?  Here is the
typescript of my attempt:

| U-Boot 2016.07 (Apr 28 2022 - 08:48:05 +0000), Build:
| jenkins-redpitaya-master-122-16-15
| 
| Model: Red Pitaya Board
| Board: Xilinx Zynq
| I2C:   ready
| DRAM:  ECC disabled 480 MiB
| I2C:EEPROM selection failed
| MMC:   sdhci@e0100000: 0
| In:    serial@e0000000
| Out:   serial@e0000000
| Err:   serial@e0000000
| Model: Red Pitaya Board
| Board: Xilinx Zynq
| Net:   ZYNQ GEM: e000b000, phyaddr 1, interface rgmii-id
| eth0: ethernet@e000b000
| Hit any key to stop autoboot:  0 
| Running script from SD...
| Device: sdhci@e0100000
| Manufacturer ID: 3
| OEM: 5344
| Name: SC32G 
| Tran Speed: 50000000
| Rd Block Len: 512
| SD version 3.0
| High Capacity: Yes
| Capacity: 29.7 GiB
| Bus Width: 4-bit
| Erase Group Size: 512 Bytes
| reading u-boot.scr
| ** Unable to read file u-boot.scr **
| Zynq> fatload mmc 0 0x04000000 device~1.dtb
| reading device~1.dtb
| 18061 bytes read in 20 ms (881.8 KiB/s)
| Zynq> fatload mmc 0 0x02004000 netbsd.ub
| reading netbsd.ub
| 11854044 bytes read in 700 ms (16.1 MiB/s)
| Zynq> bootm 0x02004000 - 0x04000000      
| ## Booting kernel from Legacy Image at 02004000 ...
|    Image Name:   NetBSD/earmv7hf 10.99.10
|    Image Type:   ARM Linux Kernel Image (no loading done) (uncompressed)
|    Data Size:    11853980 Bytes = 11.3 MiB
|    Load Address: 00000000
|    Entry Point:  00000000
|    Verifying Checksum ... OK
| ## Flattened Device Tree blob at 04000000
|    Booting using the fdt blob at 0x4000000
|    XIP Kernel Image (no loading done) ... OK
|    Loading Device Tree to 1cb3e000, end 1cb4568c ... OK
| 
| Starting kernel ...

It hangs there.

> That DTB file (dtb/zynq-zybo.dtb) is one that NetBSD builds and puts into
> the image. The DTB file that came with the FreeBSD image didn't work for me
> (with NetBSD).

Ok.  Right now I use the .dtb that comes from Red Pitaya.

I wonder what it is that NetBSD needs in the .dtb that the FreeBSD .dtb
does not have....

David

-- 
David Young
[email protected]    Urbana, IL    (217) 721-9981
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.