Anup Patel <anup.pa...@wdc.com> writes: > From: Atish Patra <atish.pa...@wdc.com> > > The readme guide describes the procedure to build, flash and boot Linux > using U-Boot on HiFive Unleashed. It also explains the current state of > U-boot support and future action items. > > Signed-off-by: Atish Patra <atish.pa...@wdc.com> > Signed-off-by: Anup Patel <anup.pa...@wdc.com> > Reviewed-by: Lukas Auer <lukas.a...@aisec.fraunhofer.de>
I'm testing this with the mainline kernel (v5.0-rc6) and running into some problems getting kernel output on the serial console. [...] > +=> setenv ethaddr 70:B3:D5:92:F0:C2 > +=> setenv ipaddr 10.196.157.189 > +=> setenv serverip 10.11.143.218 > +=> setenv gatewayip 10.196.156.1 > +=> setenv netmask 255.255.252.0 > +=> bdinfo > +boot_params = 0x0000000000000000 > +DRAM bank = 0x0000000000000000 > +-> start = 0x0000000080000000 > +-> size = 0x0000000200000000 > +relocaddr = 0x00000000fff90000 > +reloc off = 0x000000007fd90000 > +ethaddr = 70:B3:D5:92:F0:C2 > +IP addr = 10.196.157.189 > +baudrate = 115200 bps > +=> tftpboot uImage > +ethernet@10090000: PHY present at 0 > +ethernet@10090000: Starting autonegotiation... > +ethernet@10090000: Autonegotiation complete > +ethernet@10090000: link up, 1000Mbps full-duplex (lpa: 0x3800) > +Using ethernet@10090000 device > +TFTP from server 10.11.143.218; our IP address is 10.196.157.189; sending > through gateway 10.196.156.1 > +Filename 'uImage'. > +Load address: 0x80200000 > +Loading: ################################################################# > + ################################################################# > + ################################################################# > + ################################################################# > + ################################################################# > + ################################################################# > + ################################################################# > + ################################################################# > + ################################################################# > + ################################################################# > + ################################################################# > + ################################################################# > + ################################################################# > + ################################################################# > + ################################################################# > + ################################################################# > + ################################################################# > + ################################################################# > + ################################################################# > + ################################################################# > + ################################################################# > + ################################################################# > + ################################################################# > + ################################################################# > + ################################################################# > + ################################################################# > + ################################################################# > + ################################################################# > + ################################################################# > + ################################################################# > + ################################################################# > + ################################################################# > + ################################################################# > + ################################################################# > + ################################################################# > + ################################################################# > + ################################################################# > + ################################################################# > + ################################################################# > + ################################################################# > + ################################################################# > + ################################################################# > + ################################################################# > + ################################################################# > + ########################################################## > + 2.5 MiB/s > +done > +Bytes transferred = 14939132 (e3f3fc hex) > +=> bootm 0x80200000 - 0x82200000 First question: this doc doesn't explain how there is a DT at 0x82200000, and what it contains. Trying this with a freshly build u-boot payload with OpenSBI, bootm seems to detect a DT there, but I don't understand how it got there, or what it is in it. Looking a little closer, it appears that this DT (and the address) is hard-coded in the OpenSBI code. This should proably be documented here for clarity sake. > +## Booting kernel from Legacy Image at 80200000 ... > + Image Name: Linux > + Image Type: RISC-V Linux Kernel Image (uncompressed) > + Data Size: 14939068 Bytes = 14.2 MiB > + Load Address: 80200000 > + Entry Point: 80200000 > + Verifying Checksum ... OK > +## Flattened Device Tree blob at 82200000 > + Booting using the fdt blob at 0x82200000 > + Loading Kernel Image ... OK > + Using Device Tree in place at 0000000082200000, end 0000000082205c69 > + > +Starting kernel ... Next, I'm able to DHCP and TFTP my uImage just like above, but I don't see any output on the console after the "Starting kernel". That suggests that whatever DT is present there doesn't have the right settings for the serial console. I tried setting the u-boot bootargs to "console=ttySIF0 earlyprintk", but I'm still seeing nothing on the console. Dumping the hard-coded OpenSBI DT from u-boot[1], it seem that the chosen node has the right value (as documented in this patch): Hmm, maybe I'm missing the obvious... is there even an upstream serial driver for this UART in v5.0-rc6... (/me goes searching for the compatible)... hmm, doesn't look like it. > +[ 0.000000] OF: fdt: Ignoring memory range 0x80000000 - 0x80200000 > +[ 0.000000] Linux version 5.0.0-rc1-00020-g4b51f736 (atish@jedi-01) (gcc > version 7.2.0 (GCC)) #262 SMP Mon Jan 21 17:39:27 PST 2019 Looks like you're testing with a handful of out-of-tree kernel patches. Can you give a pointer to where you're building your kernel from? I'm guessing at a minimum I at least need the serial driver. Thanks, Kevin [1] => fdt addr 0x82200000 => fdt list / { #address-cells = <0x00000002>; #size-cells = <0x00000002>; compatible = "sifive,fu540g", "sifive,fu500"; model = "sifive,hifive-unleashed-a00"; aliases { }; chosen { }; firmware { }; cpus { }; memory@80000000 { }; soc { }; }; => fdt list /chosen chosen { stdout-path = "/soc/serial@10010000:115200"; }; _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot