Re: [U-Boot] [Xen-devel] [For knowledge-sake] Understanding of couple of things under the hood
Thanks a ton Julien, that was mighty useful !! On Tue, May 1, 2018 at 4:44 PM, Julien Grall <julien.gr...@arm.com> wrote: > > > On 01/05/18 11:27, Ajay Garg wrote: >> >> Hi All. > > > Hello, > > >> I have been able to bring up xen on cubieboard2, using the following >> script gathered from google : >> >> ### >> # SUNXI Xen Boot Script >> # Arch Linux ARM adaption of the cmd file which can be found at >> http://openmirage.org/wiki/xen-on-cubieboard2 >> >> # Addresses suitable for 1GB system, adjust as appropriate for a 2GB >> system. >> # Top of RAM: 0x8000 >> # Xen relocate addr 0x7fe0 >> setenv kernel_addr_r 0x7f60 # 10 MB >> setenv fdt_addr 0x7ec0 # 2 MB >> setenv xen_addr_r 0x7ea0 # 2 MB >> >> setenv fdt_high 0x # Load fdt in place instead of relocating >> >> # Load xen/xen to ${xen_addr_r}. >> fatload mmc 0 ${xen_addr_r} /xen >> setenv bootargs "dom0_mem=256M" >> >> # Load appropriate .dtb file to ${fdt_addr} >> fatload mmc 0 ${fdt_addr} /sun7i-a20-cubieboard2.dtb >> fdt addr ${fdt_addr} 0x4 >> fdt resize >> fdt chosen >> fdt set /chosen \#address-cells <1> >> fdt set /chosen \#size-cells <1> >> >> # Load Linux arch/arm/boot/zImage to ${kernel_addr_r} >> fatload mmc 0 ${kernel_addr_r} /zImage >> >> fdt mknod /chosen module@0 >> fdt set /chosen/module@0 compatible "xen,linux-zimage" >> "xen,multiboot-module" >> fdt set /chosen/module@0 reg <${kernel_addr_r} 0x${filesize} > >> fdt set /chosen/module@0 bootargs "console=hvc0 rw root=/dev/mmcblk0p2 >> rootwait clk_ignore_unused" >> >> bootz ${xen_addr_r} - ${fdt_addr} >> ### >> >> >> I have been able to understand most of the workflow, except three things : >> >> a) >> Is the relocation-address of xen, given by >> # Xen relocate addr 0x7fe0 >> hardcoded? Or it is computed someway from ${kernel_addr_r}, >> {fdt_addr}, {xen_addr_r}? >> >> In the bootup logs, xen does relocate to 0x7fe0, so surely there >> is some magic going .. > > > Xen will always relocate towards the end of the memory. See get_xen_paddr() > in xen/arch/arm/setup.c. As the placement of the binaries by U-boot will > have an impact to the relocation address, you need to cleverly choose the > different addresses. > >> >> >> b) >> What does the argument 0x4 signify in the following : >> fdt addr ${fdt_addr} 0x4 >> >> I consulted https://www.denx.de/wiki/DULG/UBootCmdFDT, but did not >> find anything about this third argument. > > > It is explained in section 5.9.7.7. The length is optional and used to tell > the size of the FDT. This is useful in case the original FDT is not big > enough to create more properties/nodes. > >> >> >> c) >> I assume filesize is the size of the kernel-binary, but how is it >> determined in the following : >> fdt set /chosen/module@0 reg <${kernel_addr_r} >> 0x${filesize} > > > > filesize will contain the size of the latest binary load in memory. The > udpate will be done by fatload command. > > Cheers, > > -- > Julien Grall -- Regards, Ajay ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [For knowledge-sake] Understanding of couple of things under the hood
Hi All. I have been able to bring up xen on cubieboard2, using the following script gathered from google : ### # SUNXI Xen Boot Script # Arch Linux ARM adaption of the cmd file which can be found at http://openmirage.org/wiki/xen-on-cubieboard2 # Addresses suitable for 1GB system, adjust as appropriate for a 2GB system. # Top of RAM: 0x8000 # Xen relocate addr 0x7fe0 setenv kernel_addr_r 0x7f60 # 10 MB setenv fdt_addr 0x7ec0 # 2 MB setenv xen_addr_r 0x7ea0 # 2 MB setenv fdt_high 0x # Load fdt in place instead of relocating # Load xen/xen to ${xen_addr_r}. fatload mmc 0 ${xen_addr_r} /xen setenv bootargs "dom0_mem=256M" # Load appropriate .dtb file to ${fdt_addr} fatload mmc 0 ${fdt_addr} /sun7i-a20-cubieboard2.dtb fdt addr ${fdt_addr} 0x4 fdt resize fdt chosen fdt set /chosen \#address-cells <1> fdt set /chosen \#size-cells <1> # Load Linux arch/arm/boot/zImage to ${kernel_addr_r} fatload mmc 0 ${kernel_addr_r} /zImage fdt mknod /chosen module@0 fdt set /chosen/module@0 compatible "xen,linux-zimage" "xen,multiboot-module" fdt set /chosen/module@0 reg <${kernel_addr_r} 0x${filesize} > fdt set /chosen/module@0 bootargs "console=hvc0 rw root=/dev/mmcblk0p2 rootwait clk_ignore_unused" bootz ${xen_addr_r} - ${fdt_addr} ### I have been able to understand most of the workflow, except three things : a) Is the relocation-address of xen, given by # Xen relocate addr 0x7fe0 hardcoded? Or it is computed someway from ${kernel_addr_r}, {fdt_addr}, {xen_addr_r}? In the bootup logs, xen does relocate to 0x7fe0, so surely there is some magic going .. b) What does the argument 0x4 signify in the following : fdt addr ${fdt_addr} 0x4 I consulted https://www.denx.de/wiki/DULG/UBootCmdFDT, but did not find anything about this third argument. c) I assume filesize is the size of the kernel-binary, but how is it determined in the following : fdt set /chosen/module@0 reg <${kernel_addr_r} 0x${filesize} > Will be grateful for some help, as it will gain deeper understanding of the ecosystem. Thanks and Regards, Ajay ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [Cubieboard-2] Booting up stuck at runlevel-2
Hi All. Seems all is fine actually :P I connected a ethernet-cable, and saw that 192.168.1.3 is assigned to cubieboard-2 (but still no login-prompt on the serial-console). However, when I sshed using debian/debian, I got into the board !! Extremely sorry for the noise. Thanks and Regards, Ajay On Sat, Apr 28, 2018 at 9:35 AM, Ajay Garg <ajaygargn...@gmail.com> wrote: > Hi All. > > After a lot of hit-and-trials, I have managed to get some bootup. > Unfortunately, not able to get a login-prompt. > > Following have been done : > > > == u-boot == > > u-boot has been compiled using bleeding-edge mainline > (ec5c4a8fd64a178a4d159917cda0aa176e5a9be5), via : > > * make Cubieboard2_defconfig > * make ARCH=arm > CROSS_COMPILE=/home/ajay/arm-toolchain-6.2/arm-linux-gnueabihf- > > This gives us u-boot-sunxi-with-spl.bin > > > == kernel == > > kernel also has been compiled using bleeding-edge mainline > (6d08b06e67cd117f6992c46611dfb4ce267cd71e) via : > > * make clean > * make ARCH=arm sunxi_defconfig > * make -j$(nproc) ARCH=arm > CROSS_COMPILE=arm-toolchain-6.2/arm-linux-gnueabihf- zImage > * make -j$(nproc) ARCH=arm > CROSS_COMPILE=arm-toolchain-6.2/arm-linux-gnueabihf- > sun7i-a20-cubieboard2.dtb > > This gives us zImage and sun7i-a20-cubieboard2.dtb. > > > == integration, and starting up == > > Followed the steps as per > https://github.com/maronai/cubieboard/wiki/3.1.-Compiling-mainline-kernel-for-CubieBoard2-and-CubieTruck, > but with following differences : > > a) > Used u-boot-sunxi-with-spl.bin, zImage, sun7i-a20-cubieboard2.dtb from > above steps. > > b) > Used (and compiled to boot.scr) the following boot.cmd : > > fatload mmc 0 0x4600 zImage > fatload mmc 0 0x4900 sun7i-a20-cubieboard2.dtb > setenv bootargs console=ttyS0,115200 rw root=/dev/mmcblk0p2 > bootz 0x4600 - 0x4900 > > c) > Extracted debian-wheezy-7.5-armhf.com-20140603.tar to the rootfs > partition on the sd-card. > > d) > Finally, inserted the sdcard in cubieboard2, and upon bootup, > following is seen : > > > U-Boot SPL 2018.05-rc2-00118-gec5c4a8 (Apr 28 2018 - 08:40:48 +0530) > DRAM: 1024 MiB > CPU: 91200Hz, AXI/AHB/APB: 3/2/2 > Trying to boot from MMC1 > > > U-Boot 2018.05-rc2-00118-gec5c4a8 (Apr 28 2018 - 08:40:48 +0530) > Allwinner Technology > > CPU: Allwinner A20 (SUN7I) > Model: Cubietech Cubieboard2 > I2C: ready > DRAM: 1 GiB > MMC: SUNXI SD/MMC: 0 > Loading Environment from FAT... *** Warning - bad CRC, using default > environment > > Failed (-5) > In:serial > Out: serial > Err: serial > SCSI: SATA link 0 timeout. > AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode > flags: ncq stag pm led clo only pmp pio slum part ccc apst > Net: eth0: ethernet@01c5 > starting USB... > USB0: USB EHCI 1.00 > USB1: USB OHCI 1.0 > USB2: USB EHCI 1.00 > USB3: USB OHCI 1.0 > scanning bus 0 for devices... 1 USB Device(s) found > scanning bus 2 for devices... 1 USB Device(s) found >scanning usb for storage devices... 0 Storage Device(s) found > Hit any key to stop autoboot: 0 > switch to partitions #0, OK > mmc0 is current device > Scanning mmc 0:1... > Found U-Boot script /boot.scr > 245 bytes read in 13 ms (17.6 KiB/s) > ## Executing script at 4310 > 3961944 bytes read in 241 ms (15.7 MiB/s) > 26147 bytes read in 23 ms (1.1 MiB/s) > ## Flattened Device Tree blob at 4900 >Booting using the fdt blob at 0x4900 >Loading Device Tree to 49ff6000, end 49fff622 ... OK > > Starting kernel ... > > [0.00] Booting Linux on physical CPU 0x0 > [0.00] Linux version 4.17.0-rc2 (ajay@latitude-3480) (gcc > version 6.2.1 20161016 (Linaro GCC 6.2-2016.11)) #6 SMP Sat Apr 28 > 08:36:46 8 > [0.00] CPU: ARMv7 Processor [410fc074] revision 4 (ARMv7), cr=10c5387d > [0.00] CPU: div instructions available: patching division code > [0.00] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing > instruction cache > [0.00] OF: fdt: Machine model: Cubietech Cubieboard2 > [0.00] Memory policy: Data cache writealloc > [0.00] cma: Reserved 16 MiB at 0x7f00 > [0.00] psci: probing for conduit method from DT. > [0.00] psci: Using PSCI v0.1 Function IDs from DT > [0.00] random: get_random_bytes called from > start_kernel+0xa0/0x3fc with crng_init=0 > [0.00] percpu: Embedded 16 pages/cpu @(ptrval) s33804 r8192 > d23540 u65536 > [0.00] Built 1 zonelists, mobility grouping on. Total pages: 260608 > [0.00] Kernel command lin
Re: [U-Boot] Hang while booting kernel via tftp/nfs on cubieboard2
currently booting from tftp/nfs is on hold, first trying to get a bootup using sdcard. On Fri, Apr 27, 2018 at 8:23 AM, Ajay Garg <ajaygargn...@gmail.com> wrote: > Seems setting bootargs is not legal in bootz command, so segregated the two. > However, the end-result is same as in my original email. > > > tftp 0x4900 sun7i-a20-cubieboard2.dtb > > tftp 0x4600 zImage-Cubieboard2 > > setenv bootargs console=ttyS0,115200 root=/dev/nfs > nfsroot=192.168.0.1:/srv/nfs/cubieboard2,nfsvers=3 > ip=192.168.0.2:192.168.0.1::255.255.255.0:cubieboard2 ignore_loglevel > cma=128M > > bootz 0x4600 - 0x4900 > > On Fri, Apr 27, 2018 at 7:39 AM, Ajay Garg <ajaygargn...@gmail.com> wrote: >> Hi All. >> >> >> a) >> As a pre-requisite, on the host-machine (serverip 192.168.0.1), the >> nfs-export is listed fine : >> >> ajay@latitude-3480:~showmount -e localhost >> Export list for localhost: >> /srv/nfs/cubieboard2 * >> >> >> b) >> The zImage and dtb files have been generated from 4.6 kernel, as per steps at >> https://github.com/maronai/cubieboard/wiki/3.1.-Compiling-mainline-kernel-for-CubieBoard2-and-CubieTruck >> >> >> Now, when trying to boot cubieboard2 via tftp/nfs, I get a hang, all >> details as below : >> >> ### >> U-Boot SPL 2017.01-2 (Jan 18 2017 - 21:30:38) >> DRAM: 1024 MiB >> CPU: 91200Hz, AXI/AHB/APB: 3/2/2 >> Trying to boot from MMC1 >> >> U-Boot 2017.01-2 (Jan 18 2017 - 21:30:38 -0700) Arch Linux ARM >> >> CPU: Allwinner A20 (SUN7I) >> Model: Cubietech Cubieboard2 >> I2C: ready >> DRAM: 1 GiB >> MMC: SUNXI SD/MMC: 0 >> In:serial >> Out: serial >> Err: serial >> SCSI: SATA link 0 timeout. >> AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode >> flags: ncq stag pm led clo only pmp pio slum part ccc apst >> Net: eth0: ethernet@01c5 >> Hit any key to stop autoboot: 0 >> >> => printenv >> autoboot=run loadkernel && run setargs && true && bootm 0x4800 >> baudrate=115200 >> boot_ram=saved_stdout=$stdout;setenv stdout nc;if iminfo 0x4100; >> then true; setenv stdout $saved_stdout; source 0x4100;else setenv >> stdi >> bootcmd=if run loadbootenv; then echo Loaded environment from >> ${bootenv};env import -t ${scriptaddr} ${filesize};fi;if test -n >> "${uenvcmd}"; t; >> bootdelay=3 >> bootenv=uEnv.txt >> bootscr=boot.scr >> console=ttyS0,115200 >> device=mmc >> ethact=ethernet@01c5 >> ethaddr=12:34:56:78:90:ab >> fdtcontroladdr=7af2e820 >> ipaddr=192.168.0.2 >> kernel=uImage >> loadbootenv=fatload $device $partition $scriptaddr ${bootenv} || >> ext2load $device $partition $scriptaddr boot/${bootenv} || ext2load >> $device $} >> loadbootscr=fatload $device $partition $scriptaddr ${bootscr} || >> ext2load $device $partition $scriptaddr boot/${bootscr} ||ext2load >> $device $p} >> loadkernel=if bootpath=/boot/ && ext2load $device $partition >> 0x4300 ${bootpath}script.bin && ext2load $device $partition >> 0x4800 ${booti >> loglevel=8 >> panicarg=panic=10 >> partition=0:1 >> scriptaddr=0x4400 >> serial#=1651660f06c3457c >> serverip=192.168.0.1 >> setargs=if test -z \\"$root\\"; then if test \\"$bootpath\\" = >> "/boot/"; then root="/dev/mmcblk0p1 rootwait"; else >> root="/dev/mmcblk0p2 rootwa} >> stderr=serial >> stdin=serial >> stdout=serial >> >> Environment size: 1979/131068 bytes >> >> => tftp 0x4900 sun7i-a20-cubieboard2.dtb >> Speed: 100, full duplex >> Using ethernet@01c5 device >> TFTP from server 192.168.0.1; our IP address is 192.168.0.2 >> Filename 'sun7i-a20-cubieboard2.dtb'. >> Load address: 0x4900 >> Loading: ### >> 4 MiB/s >> done >> Bytes transferred = 29537 (7361 hex) >> >> => tftp 0x4600 zImage-Cubieboard2 >> Speed: 100, full duplex >> Using ethernet@01c5 device >> TFTP from server 192.168.0.1; our IP address is 192.168.0.2 >> Filename 'zImage-Cubieboard2'. >> Load address: 0x4600 >> Loading: # >> # >> ###
[U-Boot] [Cubieboard-2] Booting up stuck at runlevel-2
Hi All. After a lot of hit-and-trials, I have managed to get some bootup. Unfortunately, not able to get a login-prompt. Following have been done : == u-boot == u-boot has been compiled using bleeding-edge mainline (ec5c4a8fd64a178a4d159917cda0aa176e5a9be5), via : * make Cubieboard2_defconfig * make ARCH=arm CROSS_COMPILE=/home/ajay/arm-toolchain-6.2/arm-linux-gnueabihf- This gives us u-boot-sunxi-with-spl.bin == kernel == kernel also has been compiled using bleeding-edge mainline (6d08b06e67cd117f6992c46611dfb4ce267cd71e) via : * make clean * make ARCH=arm sunxi_defconfig * make -j$(nproc) ARCH=arm CROSS_COMPILE=arm-toolchain-6.2/arm-linux-gnueabihf- zImage * make -j$(nproc) ARCH=arm CROSS_COMPILE=arm-toolchain-6.2/arm-linux-gnueabihf- sun7i-a20-cubieboard2.dtb This gives us zImage and sun7i-a20-cubieboard2.dtb. == integration, and starting up == Followed the steps as per https://github.com/maronai/cubieboard/wiki/3.1.-Compiling-mainline-kernel-for-CubieBoard2-and-CubieTruck, but with following differences : a) Used u-boot-sunxi-with-spl.bin, zImage, sun7i-a20-cubieboard2.dtb from above steps. b) Used (and compiled to boot.scr) the following boot.cmd : fatload mmc 0 0x4600 zImage fatload mmc 0 0x4900 sun7i-a20-cubieboard2.dtb setenv bootargs console=ttyS0,115200 rw root=/dev/mmcblk0p2 bootz 0x4600 - 0x4900 c) Extracted debian-wheezy-7.5-armhf.com-20140603.tar to the rootfs partition on the sd-card. d) Finally, inserted the sdcard in cubieboard2, and upon bootup, following is seen : U-Boot SPL 2018.05-rc2-00118-gec5c4a8 (Apr 28 2018 - 08:40:48 +0530) DRAM: 1024 MiB CPU: 91200Hz, AXI/AHB/APB: 3/2/2 Trying to boot from MMC1 U-Boot 2018.05-rc2-00118-gec5c4a8 (Apr 28 2018 - 08:40:48 +0530) Allwinner Technology CPU: Allwinner A20 (SUN7I) Model: Cubietech Cubieboard2 I2C: ready DRAM: 1 GiB MMC: SUNXI SD/MMC: 0 Loading Environment from FAT... *** Warning - bad CRC, using default environment Failed (-5) In:serial Out: serial Err: serial SCSI: SATA link 0 timeout. AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode flags: ncq stag pm led clo only pmp pio slum part ccc apst Net: eth0: ethernet@01c5 starting USB... USB0: USB EHCI 1.00 USB1: USB OHCI 1.0 USB2: USB EHCI 1.00 USB3: USB OHCI 1.0 scanning bus 0 for devices... 1 USB Device(s) found scanning bus 2 for devices... 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found Hit any key to stop autoboot: 0 switch to partitions #0, OK mmc0 is current device Scanning mmc 0:1... Found U-Boot script /boot.scr 245 bytes read in 13 ms (17.6 KiB/s) ## Executing script at 4310 3961944 bytes read in 241 ms (15.7 MiB/s) 26147 bytes read in 23 ms (1.1 MiB/s) ## Flattened Device Tree blob at 4900 Booting using the fdt blob at 0x4900 Loading Device Tree to 49ff6000, end 49fff622 ... OK Starting kernel ... [0.00] Booting Linux on physical CPU 0x0 [0.00] Linux version 4.17.0-rc2 (ajay@latitude-3480) (gcc version 6.2.1 20161016 (Linaro GCC 6.2-2016.11)) #6 SMP Sat Apr 28 08:36:46 8 [0.00] CPU: ARMv7 Processor [410fc074] revision 4 (ARMv7), cr=10c5387d [0.00] CPU: div instructions available: patching division code [0.00] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache [0.00] OF: fdt: Machine model: Cubietech Cubieboard2 [0.00] Memory policy: Data cache writealloc [0.00] cma: Reserved 16 MiB at 0x7f00 [0.00] psci: probing for conduit method from DT. [0.00] psci: Using PSCI v0.1 Function IDs from DT [0.00] random: get_random_bytes called from start_kernel+0xa0/0x3fc with crng_init=0 [0.00] percpu: Embedded 16 pages/cpu @(ptrval) s33804 r8192 d23540 u65536 [0.00] Built 1 zonelists, mobility grouping on. Total pages: 260608 [0.00] Kernel command line: console=ttyS0,115200 rw root=/dev/mmcblk0p2 [0.00] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes) [0.00] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes) [0.00] Memory: 1013080K/1048576K available (6144K kernel code, 420K rwdata, 1492K rodata, 1024K init, 241K bss, 19112K reserved, 16384) [0.00] Virtual kernel memory layout: [0.00] vector : 0x - 0x1000 ( 4 kB) [0.00] fixmap : 0xffc0 - 0xfff0 (3072 kB) [0.00] vmalloc : 0xf080 - 0xff80 ( 240 MB) [0.00] lowmem : 0xc000 - 0xf000 ( 768 MB) [0.00] pkmap : 0xbfe0 - 0xc000 ( 2 MB) [0.00] modules : 0xbf00 - 0xbfe0 ( 14 MB) [0.00] .text : 0x(ptrval) - 0x(ptrval) (7136 kB) [0.00] .init : 0x(ptrval) - 0x(ptrval) (1024 kB) [0.00] .data : 0x(ptrval) - 0x(ptrval) ( 421 kB) [0.00].bss :
Re: [U-Boot] Hang while booting kernel via tftp/nfs on cubieboard2
Seems setting bootargs is not legal in bootz command, so segregated the two. However, the end-result is same as in my original email. tftp 0x4900 sun7i-a20-cubieboard2.dtb tftp 0x4600 zImage-Cubieboard2 setenv bootargs console=ttyS0,115200 root=/dev/nfs nfsroot=192.168.0.1:/srv/nfs/cubieboard2,nfsvers=3 ip=192.168.0.2:192.168.0.1::255.255.255.0:cubieboard2 ignore_loglevel cma=128M bootz 0x4600 - 0x4900 On Fri, Apr 27, 2018 at 7:39 AM, Ajay Garg <ajaygargn...@gmail.com> wrote: > Hi All. > > > a) > As a pre-requisite, on the host-machine (serverip 192.168.0.1), the > nfs-export is listed fine : > > ajay@latitude-3480:~showmount -e localhost > Export list for localhost: > /srv/nfs/cubieboard2 * > > > b) > The zImage and dtb files have been generated from 4.6 kernel, as per steps at > https://github.com/maronai/cubieboard/wiki/3.1.-Compiling-mainline-kernel-for-CubieBoard2-and-CubieTruck > > > Now, when trying to boot cubieboard2 via tftp/nfs, I get a hang, all > details as below : > > ### > U-Boot SPL 2017.01-2 (Jan 18 2017 - 21:30:38) > DRAM: 1024 MiB > CPU: 91200Hz, AXI/AHB/APB: 3/2/2 > Trying to boot from MMC1 > > U-Boot 2017.01-2 (Jan 18 2017 - 21:30:38 -0700) Arch Linux ARM > > CPU: Allwinner A20 (SUN7I) > Model: Cubietech Cubieboard2 > I2C: ready > DRAM: 1 GiB > MMC: SUNXI SD/MMC: 0 > In:serial > Out: serial > Err: serial > SCSI: SATA link 0 timeout. > AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode > flags: ncq stag pm led clo only pmp pio slum part ccc apst > Net: eth0: ethernet@01c5 > Hit any key to stop autoboot: 0 > > => printenv > autoboot=run loadkernel && run setargs && true && bootm 0x4800 > baudrate=115200 > boot_ram=saved_stdout=$stdout;setenv stdout nc;if iminfo 0x4100; > then true; setenv stdout $saved_stdout; source 0x4100;else setenv > stdi > bootcmd=if run loadbootenv; then echo Loaded environment from > ${bootenv};env import -t ${scriptaddr} ${filesize};fi;if test -n > "${uenvcmd}"; t; > bootdelay=3 > bootenv=uEnv.txt > bootscr=boot.scr > console=ttyS0,115200 > device=mmc > ethact=ethernet@01c5 > ethaddr=12:34:56:78:90:ab > fdtcontroladdr=7af2e820 > ipaddr=192.168.0.2 > kernel=uImage > loadbootenv=fatload $device $partition $scriptaddr ${bootenv} || > ext2load $device $partition $scriptaddr boot/${bootenv} || ext2load > $device $} > loadbootscr=fatload $device $partition $scriptaddr ${bootscr} || > ext2load $device $partition $scriptaddr boot/${bootscr} ||ext2load > $device $p} > loadkernel=if bootpath=/boot/ && ext2load $device $partition > 0x4300 ${bootpath}script.bin && ext2load $device $partition > 0x4800 ${booti > loglevel=8 > panicarg=panic=10 > partition=0:1 > scriptaddr=0x4400 > serial#=1651660f06c3457c > serverip=192.168.0.1 > setargs=if test -z \\"$root\\"; then if test \\"$bootpath\\" = > "/boot/"; then root="/dev/mmcblk0p1 rootwait"; else > root="/dev/mmcblk0p2 rootwa} > stderr=serial > stdin=serial > stdout=serial > > Environment size: 1979/131068 bytes > > => tftp 0x4900 sun7i-a20-cubieboard2.dtb > Speed: 100, full duplex > Using ethernet@01c5 device > TFTP from server 192.168.0.1; our IP address is 192.168.0.2 > Filename 'sun7i-a20-cubieboard2.dtb'. > Load address: 0x4900 > Loading: ### > 4 MiB/s > done > Bytes transferred = 29537 (7361 hex) > > => tftp 0x4600 zImage-Cubieboard2 > Speed: 100, full duplex > Using ethernet@01c5 device > TFTP from server 192.168.0.1; our IP address is 192.168.0.2 > Filename 'zImage-Cubieboard2'. > Load address: 0x4600 > Loading: # > # > # > > 4.6 MiB/s > done > Bytes transferred = 3388416 (33b400 hex) > > => bootz 0x4600 - 0x4900 console=ttyS0,115200 root=/dev/nfs > nfsroot=192.168.0.1:/srv/nfs/cubieboard2,nfsvers=3 > ip=192.168.0.2:192.168.0.1::255.255.255.0:cubieboard2 ignore_loglevel > cma=128M > ## Flattened Device Tree blob at 4900 >Booting using the fdt blob at 0x4900 >Loading Device Tree to 7af23000, end 7af2d360 ... OK > > Starting kernel ... > ### > > > What am I doing wrong? In general, how do I proceed to debug to get > this working? > > Will be grateful for pointers. > > > Thanks and Regards, > Ajay -- Regards, Ajay ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] Hang while booting kernel via tftp/nfs on cubieboard2
Hi All. a) As a pre-requisite, on the host-machine (serverip 192.168.0.1), the nfs-export is listed fine : ajay@latitude-3480:~showmount -e localhost Export list for localhost: /srv/nfs/cubieboard2 * b) The zImage and dtb files have been generated from 4.6 kernel, as per steps at https://github.com/maronai/cubieboard/wiki/3.1.-Compiling-mainline-kernel-for-CubieBoard2-and-CubieTruck Now, when trying to boot cubieboard2 via tftp/nfs, I get a hang, all details as below : ### U-Boot SPL 2017.01-2 (Jan 18 2017 - 21:30:38) DRAM: 1024 MiB CPU: 91200Hz, AXI/AHB/APB: 3/2/2 Trying to boot from MMC1 U-Boot 2017.01-2 (Jan 18 2017 - 21:30:38 -0700) Arch Linux ARM CPU: Allwinner A20 (SUN7I) Model: Cubietech Cubieboard2 I2C: ready DRAM: 1 GiB MMC: SUNXI SD/MMC: 0 In:serial Out: serial Err: serial SCSI: SATA link 0 timeout. AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode flags: ncq stag pm led clo only pmp pio slum part ccc apst Net: eth0: ethernet@01c5 Hit any key to stop autoboot: 0 => printenv autoboot=run loadkernel && run setargs && true && bootm 0x4800 baudrate=115200 boot_ram=saved_stdout=$stdout;setenv stdout nc;if iminfo 0x4100; then true; setenv stdout $saved_stdout; source 0x4100;else setenv stdi bootcmd=if run loadbootenv; then echo Loaded environment from ${bootenv};env import -t ${scriptaddr} ${filesize};fi;if test -n "${uenvcmd}"; t; bootdelay=3 bootenv=uEnv.txt bootscr=boot.scr console=ttyS0,115200 device=mmc ethact=ethernet@01c5 ethaddr=12:34:56:78:90:ab fdtcontroladdr=7af2e820 ipaddr=192.168.0.2 kernel=uImage loadbootenv=fatload $device $partition $scriptaddr ${bootenv} || ext2load $device $partition $scriptaddr boot/${bootenv} || ext2load $device $} loadbootscr=fatload $device $partition $scriptaddr ${bootscr} || ext2load $device $partition $scriptaddr boot/${bootscr} ||ext2load $device $p} loadkernel=if bootpath=/boot/ && ext2load $device $partition 0x4300 ${bootpath}script.bin && ext2load $device $partition 0x4800 ${booti loglevel=8 panicarg=panic=10 partition=0:1 scriptaddr=0x4400 serial#=1651660f06c3457c serverip=192.168.0.1 setargs=if test -z \\"$root\\"; then if test \\"$bootpath\\" = "/boot/"; then root="/dev/mmcblk0p1 rootwait"; else root="/dev/mmcblk0p2 rootwa} stderr=serial stdin=serial stdout=serial Environment size: 1979/131068 bytes => tftp 0x4900 sun7i-a20-cubieboard2.dtb Speed: 100, full duplex Using ethernet@01c5 device TFTP from server 192.168.0.1; our IP address is 192.168.0.2 Filename 'sun7i-a20-cubieboard2.dtb'. Load address: 0x4900 Loading: ### 4 MiB/s done Bytes transferred = 29537 (7361 hex) => tftp 0x4600 zImage-Cubieboard2 Speed: 100, full duplex Using ethernet@01c5 device TFTP from server 192.168.0.1; our IP address is 192.168.0.2 Filename 'zImage-Cubieboard2'. Load address: 0x4600 Loading: # # # 4.6 MiB/s done Bytes transferred = 3388416 (33b400 hex) => bootz 0x4600 - 0x4900 console=ttyS0,115200 root=/dev/nfs nfsroot=192.168.0.1:/srv/nfs/cubieboard2,nfsvers=3 ip=192.168.0.2:192.168.0.1::255.255.255.0:cubieboard2 ignore_loglevel cma=128M ## Flattened Device Tree blob at 4900 Booting using the fdt blob at 0x4900 Loading Device Tree to 7af23000, end 7af2d360 ... OK Starting kernel ... ### What am I doing wrong? In general, how do I proceed to debug to get this working? Will be grateful for pointers. Thanks and Regards, Ajay ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] Weird listing/behaviour of serverip in uboot
Hi All. When we stop auto-booting and printenv, a serverip is listed. However, when trying to ftp a kernel-image, it shows serverip is not set. # => printenv baudrate=115200 bootcmd=run load_img; run load_dtb; booti 0x4808 - 0x4800 bootdelay=3 ethact=ravb ethaddr=2E:09:0A:01:A0:6D fdt_high=0x fileaddr=7a00 filesize=f0d200 initrd_high=0x ipaddr=192.168.0.2 load_dtb=tftpboot 0x4800 hidden load_img=tftpboot 0x4808 Image load_ker=ext4load mmc 0:1 0x4808 /boot/Image loadimg=tdtbftpboot 04800 hidden serverip=192.168.56.1 stderr=serial stdin=serial stdout=serial ver=U-Boot 2015.04 (Mar 28 2018 - 16:00:07) Environment size: 587/131068 bytes => setenv bootargs => tftp 0x7a00 Image ravb:0 is connected to ravb. Reconnecting to ravb ravb Waiting for PHY auto negotiation to complete. done ravb: 1000Base/Full *** ERROR: `serverip' not set # If I then indeed set a serverip, two copies of serverip are listed .. !! # => setenv serverip 192.168.0.1 => saveenv Saving Environment to MMC... Writing to MMC(1)... done => printenv baudrate=115200 bootcmd=run load_img; run load_dtb; booti 0x4808 - 0x4800 bootdelay=3 ethact=ravb ethaddr=2E:09:0A:01:A0:6D fdt_high=0x fileaddr=7a00 filesize=f0d200 initrd_high=0x ipaddr=192.168.0.2 load_dtb=tftpboot 0x4800 hidden load_img=tftpboot 0x4808 Image load_ker=ext4load mmc 0:1 0x4808 /boot/Image loadimg=tdtbftpboot 04800 hidden serverip=192.168.56.1 serverip=192.168.0.1 stderr=serial stdin=serial stdout=serial ver=U-Boot 2015.04 (Mar 28 2018 - 16:00:07) Environment size: 610/131068 bytes # In summary, whatever I do, I am unable to clear the entry serverip=192.168.56.1 (already tried editenv, still did not work). Anybody else faced a similar issue? Or there is no option but to go the build-uboot -> flash -> debug route? (Wanting to avoid it, as currently the uboot has been shipped with the device directly, so don't want to change too many things). Thanks and Regards, Ajay ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot