Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: is it possible to boot aarch64 kernels on Raspberry Pi 3B+ using u-boot WITHOUT using bootaa64?



Hi!

>I've been building a kernel for my Raspberry Pi 3B+.  And I'm loading it =
>via u-boot, which uses bootaa64 to actually load and run it (along with =
>a RAM disk).
>
>But I'm running into weird problems (see below), so I was hoping to =
>eliminate the bootaa64 variable if it's possible.
>
>If it IS possible, can someone tell me which kernel binary I need to =
>load (I've got netbsd, netbsd.bin, netbsd.img), and what the u-boot =
>commands should be? (fatload mmc 0:1 ADDR? FILE?)
>
>But maybe it isn't possible...

I'm using a bit older version u-boot and using 'tftpboot' command instead of 'fatload',
but we can launch 'netbsd.img' directly from u-boot with the following command.
netbsd.img is http://nycdn.netbsd.org/pub/NetBSD-daily/HEAD/latest/evbarm-aarch64/binary/kernel/netbsd-GENERIC64.img.gz

	U-Boot 2020.07-rc4-00022-gbe79009f3b-dirty (Jun 12 2020 - 17:49:10 +0900)
	
	DRAM:  948 MiB
	RPI 3 Model B (0xa02082)
	MMC:   mmc@7e202000: 0, sdhci@7e300000: 1
	Loading Environment from FAT... OK
	In:    serial
	Out:   vidconsole
	Err:   vidconsole
	Net:   No ethernet found.
	starting USB...
	Bus usb@7e980000: USB DWC2
	scanning bus usb@7e980000 for devices... 4 USB Device(s) found
	       scanning usb for storage devices... 1 Storage Device(s) found
	U-Boot> ver
	U-Boot 2020.07-rc4-00022-gbe79009f3b-dirty (Jun 12 2020 - 17:49:10 +0900)
	
	aarch64-linux-gnu-gcc (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) 7.5.0
	GNU ld (GNU Binutils for Ubuntu) 2.30
	U-Boot> print loadaddr fdt_addr
	loadaddr=0x00200000
	fdt_addr=0x2eff9000
	U-Boot> tftp $loadaddr netbsd.img; tftp $fdt_addr bcm2837-rpi-3-b.dtb; booti $loadaddr - $fdt_addr
	Waiting for Ethernet connection... done.
	Using smsc95xx_eth device
	TFTP from server 172.31.185.60; our IP address is 172.31.185.36
	Filename 'netbsd.img'.
	Load address: 0x200000
	Loading: ##################################################  17.7 MiB
	         1.3 MiB/s
	done
	Bytes transferred = 18512112 (11a78f0 hex)
	Waiting for Ethernet connection... done.
	Using smsc95xx_eth device
	TFTP from server 172.31.185.60; our IP address is 172.31.185.36
	Filename 'bcm2837-rpi-3-b.dtb'.
	Load address: 0x2eff9000
	Loading: ##################################################  20.3 KiB
	         3.9 KiB/s
	done
	Bytes transferred = 20769 (5121 hex)
	## Flattened Device Tree blob at 2eff9000
	   Booting using the fdt blob at 0x2eff9000
	   Using Device Tree in place at 000000002eff9000, end 000000002f001120
	
	Starting kernel ...
	
	[   1.0000000] NetBSD/evbarm (fdt) booting ...
	[   1.0000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
	[   1.0000000]     2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017,
	[   1.0000000]     2018, 2019, 2020 The NetBSD Foundation, Inc.  All rights reserved.
	[   1.0000000] Copyright (c) 1982, 1986, 1989, 1991, 1993
	[   1.0000000]     The Regents of the University of California.  All rights reserved.
	
	[   1.0000000] NetBSD 9.99.74 (GENERIC64) #0: Sun Oct 18 14:09:39 UTC 2020
	[   1.0000000]  mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/evbarm/compile/GENERIC64
	[   1.0000000] total memory = 928 MB
	[   1.0000000] avail memory = 899 MB
		:

In the past, if I changed the version of u-boot, I had to change $fdt_addr to
a suitable free address. I don't know why :-P
However, I think using the default values for u-boot will work.

hope this helps. good luck!
-- 
ryo shimizu


Home | Main Index | Thread Index | Old Index