Sorry, you need to enable JavaScript to visit this website.

Booting, but not via NFS

Unsolved
6 posts / 0 new
dargaud's picture
dargaud
Junior(0)
Booting, but not via NFS

Hello all,
great, I got my ZedBoard booting, with DHCP.
--------

Now I'd like to boot via NFS. I thought all I had to do was to unpack the uramdisk to an exported NFS directory on the server, edit /etc/dhcpd.conf and change the bootargs in the dts/dtb to:
--------

bootargs = "console=ttyPS0,115200 root=/dev/nfs rw ip=bootp earlyprintk";
--------

But it still boots using the ramdisk although the kernel command line is correct:
--------

U-Boot 2014.01 (Apr 08 2014 - 09:47:28)

I2C: ready
Memory: ECC disabled
DRAM: 512 MiB
MMC: zynq_sdhci: 0
SF: Detected S25FL256S_64K with page size 256 Bytes, erase size 64 KiB, total 32 MiB
*** Warning - bad CRC, using default environment

In: serial
Out: serial
Err: serial
Net: Gem.e000b000
Hit any key to stop autoboot: 0
Device: zynq_sdhci
Manufacturer ID: 82
OEM: 4a54
Name: NCard
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 14.7 GiB
Bus Width: 4-bit
reading uEnv.txt
** Unable to read file uEnv.txt **
Copying Linux from SD to RAM...
reading uImage
3588776 bytes read in 313 ms (10.9 MiB/s)
reading devicetree.dtb
7972 bytes read in 15 ms (518.6 KiB/s)
reading uramdisk.image.gz
5619967 bytes read in 480 ms (11.2 MiB/s)
## Booting kernel from Legacy Image at 03000000 ...
Image Name: Linux-3.13.0-xilinx
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3588712 Bytes = 3.4 MiB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 02000000 ...
Image Name:
Image Type: ARM Linux RAMDisk Image (gzip compressed)
Data Size: 5619903 Bytes = 5.4 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
## Flattened Device Tree blob at 02a00000
Booting using the fdt blob at 0x2a00000
Loading Kernel Image ... OK
Loading Ramdisk to 1f5d2000, end 1fb2e0bf ... OK
Loading Device Tree to 1f5cd000, end 1f5d1f23 ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 3.13.0-xilinx (sorenb@xsjandreislx) (gcc version 4.7.2 (Sourcery CodeBench Lite 2012.09-104) ) #1 SMP PREEMPT T
ue Apr 8 09:47:11 PDT 2014
[ 0.000000] CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] Machine model: Xilinx Zynq
[ 0.000000] bootconsole [earlycon0] enabled
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] PERCPU: Embedded 8 pages/cpu @c1035000 s10688 r8192 d13888 u32768
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048
[ 0.000000] Kernel command line: console=ttyPS0,115200 root=/dev/nfs rw ip=bootp earlyprintk
[ 0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[ 0.000000] Memory: 501696K/524288K available (4857K kernel code, 310K rwdata, 1708K rodata, 198K init, 5345K bss, 22592K reserved, 0K hi
ghmem)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
[ 0.000000] vmalloc : 0xe0800000 - 0xff000000 ( 488 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xe0000000 ( 512 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
[ 0.000000] .text : 0xc0008000 - 0xc0671828 (6567 kB)
[ 0.000000] .init : 0xc0672000 - 0xc06a39c0 ( 199 kB)
[ 0.000000] .data : 0xc06a4000 - 0xc06f1ad0 ( 311 kB)
[ 0.000000] .bss : 0xc06f1adc - 0xc0c2a1b0 (5346 kB)
[ 0.000000] Preemptible hierarchical RCU implementation.
[ 0.000000] RCU lockdep checking is enabled.
[ 0.000000] Dump stacks of tasks blocking RCU-preempt GP.
[ 0.000000] RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[ 0.000000] NR_IRQS:16 nr_irqs:16 16
[ 0.000000] ps7-slcr mapped to e0802000
[ 0.000000] zynq_clock_init: clkc starts at e0802100
[ 0.000000] Zynq clock init
[ 0.000000] sched_clock: 32 bits at 333MHz, resolution 3ns, wraps every 12884901885ns
[ 0.000000] ps7-ttc #0 at e0804000, irq=43
[ 0.000000] Console: colour dummy device 80x30
[ 0.000000] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
[ 0.000000] ... MAX_LOCKDEP_SUBCLASSES: 8
[ 0.000000] ... MAX_LOCK_DEPTH: 48
[ 0.000000] ... MAX_LOCKDEP_KEYS: 8191
[ 0.000000] ... CLASSHASH_SIZE: 4096
[ 0.000000] ... MAX_LOCKDEP_ENTRIES: 16384
[ 0.000000] ... MAX_LOCKDEP_CHAINS: 32768
[ 0.000000] ... CHAINHASH_SIZE: 16384
[ 0.000000] memory used by lock dependency info: 3695 kB
[ 0.000000] per task-struct memory footprint: 1152 bytes
[ 12.877215] Calibrating delay loop... 1325.46 BogoMIPS (lpj=6627328)
[ 12.877222] pid_max: default: 32768 minimum: 301
[ 12.877223] Mount-cache hash table entries: 512
[ 12.877225] CPU: Testing write buffer coherency: ok
[ 12.877226] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 12.877227] Setting up static identity map for 0x49ac68 - 0x49acc0
[ 12.877228] L310 cache controller enabled
[ 12.877228] l2x0: 8 ways, CACHE_ID 0x410000c8, AUX_CTRL 0x72760000, Cache size: 512 kB
[ 12.877243] CPU1: Booted secondary processor
[ 12.877257] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[ 12.877257] Brought up 2 CPUs
[ 12.877259] SMP: Total of 2 processors activated.
[ 12.877260] CPU: All CPU(s) started in SVC mode.
[ 12.877261] devtmpfs: initialized
[ 12.877263] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[ 12.877265] regulator-dummy: no parameters
[ 12.877266] NET: Registered protocol family 16
[ 12.877267] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 12.877269] cpuidle: using governor ladder
[ 12.877270] cpuidle: using governor menu
[ 12.877274] syscon f8000000.ps7-slcr: regmap [mem 0xf8000000-0xf8000fff] registered
[ 12.877276] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
[ 12.877277] hw-breakpoint: maximum watchpoint size is 4 bytes.
[ 12.877278] zynq-ocm f800c000.ps7-ocmc: ZYNQ OCM pool: 256 KiB @ 0xe0880000
[ 12.877288] bio: create slab <bio-0> at 0
[ 12.877289] GPIO IRQ not connected
[ 12.877289] XGpio: /amba@0/gpio@41220000: registered, base is 248
[ 12.877291] GPIO IRQ not connected
[ 12.877291] XGpio: /amba@0/gpio@41200000: registered, base is 240
[ 12.877293] vgaarb: loaded
[ 12.877293] SCSI subsystem initialized
[ 12.877294] usbcore: registered new interface driver usbfs
[ 12.877295] usbcore: registered new interface driver hub
[ 12.877296] usbcore: registered new device driver usb
[ 12.877297] media: Linux media interface: v0.10
[ 12.877298] Linux video capture interface: v2.00
[ 12.877299] pps_core: LinuxPPS API ver. 1 registered
[ 12.877300] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 12.877301] PTP clock support registered
[ 12.877302] EDAC MC: Ver: 3.0.0
[ 12.877304] DMA-API: preallocated 4096 debug entries
[ 12.877305] DMA-API: debugging enabled by kernel config
[ 12.877306] Switched to clocksource arm_global_timer
[ 12.877315] NET: Registered protocol family 2
[ 12.877316] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[ 12.877317] TCP bind hash table entries: 4096 (order: 5, 147456 bytes)
[ 12.877318] TCP: Hash tables configured (established 4096 bind 4096)
[ 12.877319] TCP: reno registered
[ 12.877320] UDP hash table entries: 256 (order: 2, 20480 bytes)
[ 12.877321] UDP-Lite hash table entries: 256 (order: 2, 20480 bytes)
[ 12.877322] NET: Registered protocol family 1
[ 12.877323] RPC: Registered named UNIX socket transport module.
[ 12.877324] RPC: Registered udp transport module.
[ 12.877325] RPC: Registered tcp transport module.
[ 12.877326] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 12.877327] Trying to unpack rootfs image as initramfs...
[ 12.877242] Freeing initrd memory: 5488K (df5d2000 - dfb2e000)
[ 12.877243] hw perfevents: enabled with ARMv7 Cortex-A9 PMU driver, 7 counters available
[ 12.877247] jffs2: version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
[ 12.877248] msgmni has been set to 990
[ 12.877251] io scheduler noop registered
[ 12.877252] io scheduler deadline registered
[ 12.877253] io scheduler cfq registered (default)
[ 12.877256] dma-pl330 f8003000.ps7-dma: unable to set the seg size
[ 12.877257] dma-pl330 f8003000.ps7-dma: Loaded driver for PL330 DMAC-2364208
[ 12.877258] dma-pl330 f8003000.ps7-dma: DBUFF-128x8bytes Num_Chans-8 Num_Peri-4 Num_Events-16
[ 12.877260] e0001000.serial: ttyPS0 at MMIO 0xe0001000 (irq = 82, base_baud = 3124999) is a xuartps
[ 12.877261] console [ttyPS0] enabled
[ 12.877261] console [ttyPS0] enabled
[ 12.877262] bootconsole [earlycon0] disabled
[ 12.877262] bootconsole [earlycon0] disabled
[ 12.877264] xdevcfg f8007000.ps7-dev-cfg: ioremap 0xf8007000 to e085a000
[ 12.877270] brd: module loaded
[ 12.877273] loop: module loaded
[ 12.877275] zynq-qspi e000d000.ps7-qspi: master is unqueued, this is deprecated
[ 12.877276] zynq-qspi e000d000.ps7-qspi: at 0xE000D000 mapped to 0xE085C000, irq=51
[ 12.877279] e1000e: Intel(R) PRO/1000 Network Driver - 2.3.2-k
[ 12.877280] e1000e: Copyright(c) 1999 - 2013 Intel Corporation.
[ 12.877282] libphy: XEMACPS mii bus: probed
[ 12.877284] xemacps e000b000.ps7-ethernet: pdev->id -1, baseaddr 0xe000b000, irq 54
[ 12.877286] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 12.877287] ehci-pci: EHCI PCI platform driver
[ 12.877288] ULPI transceiver vendor/product ID 0x0451/0x1507
[ 12.877288] Found TI TUSB1210 ULPI transceiver.
[ 12.877289] ULPI integrity check: passed.
[ 12.877290] zynq-ehci zynq-ehci.0: Xilinx Zynq USB EHCI Host Controller
[ 12.877291] zynq-ehci zynq-ehci.0: new USB bus registered, assigned bus number 1
[ 12.877297] zynq-ehci zynq-ehci.0: irq 53, io mem 0x00000000
[ 12.877300] zynq-ehci zynq-ehci.0: USB 2.0 started, EHCI 1.00
[ 12.877302] hub 1-0:1.0: USB hub found
[ 12.877303] hub 1-0:1.0: 1 port detected
[ 12.877304] usbcore: registered new interface driver usb-storage
[ 12.877305] mousedev: PS/2 mouse device common for all mice
[ 12.877306] i2c /dev entries driver
[ 12.877308] xadcps f8007100.ps7-xadc: enabled: yes reference: external
[ 12.877310] zynq-edac f8006000.ps7-ddrc: ecc not enabled
[ 12.877311] cpu cpu0: dummy supplies not allowed
[ 12.877311] cpufreq_cpu0: failed to get cpu0 regulator: -19
[ 12.877313] Xilinx Zynq CpuIdle Driver started
[ 12.877314] sdhci: Secure Digital Host Controller Interface driver
[ 12.877315] sdhci: Copyright(c) Pierre Ossman
[ 12.877315] sdhci-pltfm: SDHCI platform and OF driver helper
[ 12.877316] sdhci-arasan e0100000.ps7-sdio: dummy supplies not allowed
[ 12.877317] mmc0: no vqmmc regulator found
[ 12.877318] sdhci-arasan e0100000.ps7-sdio: dummy supplies not allowed
[ 12.877319] mmc0: no vmmc regulator found
[ 12.877326] mmc0: SDHCI controller on e0100000.ps7-sdio [e0100000.ps7-sdio] using ADMA
[ 12.877330] usbcore: registered new interface driver usbhid
[ 12.877331] usbhid: USB HID core driver
[ 12.877332] TCP: cubic registered
[ 12.877333] NET: Registered protocol family 17
[ 12.877334] Registering SWP/SWPB emulation handler
[ 12.877335] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[ 12.877339] mmc0: new high speed SDHC card at address 59b4
[ 12.877341] mmcblk0: mmc0:59b4 NCard 14.7 GiB
[ 12.877343] mmcblk0: p1
[ 12.877344] Sending BOOTP requests ..[ 12.877368] xemacps e000b000.ps7-ethernet: Set clk to 124999998 Hz
[ 12.877369] xemacps e000b000.ps7-ethernet: link up (1000/FULL)
. OK
[ 12.877217] IP-Config: Got BOOTP answer from 192.168.1.185, my address is 192.168.1.235
[ 12.877219] IP-Config: Complete:
[ 12.877219] device=eth0, hwaddr=00:0a:35:00:01:22, ipaddr=192.168.1.235, mask=255.255.255.0, gw=192.168.1.185
[ 12.877221] host=zynq, domain=, nis-domain=(none)
[ 12.877222] bootserver=192.168.1.185, rootserver=192.168.1.185, rootpath=/media/zynq,v3,rsize=1024,wsize=1024,proto=tcp,nolock,intr
[ 12.877224] nameserver0=192.168.1.185
[ 12.877225] Freeing unused kernel memory: 196K (c0672000 - c06a3000)
INIT: version 2.88 booting
Starting Bootlog daemon: bootlogd.
Creating /dev/flash/* device nodes
[ 12.877252] random: dd urandom read with 9 bits of entropy available
Configuring network interfaces... udhcpc (v1.20.2) started
Sending discover...
Sending select for 192.168.1.235...
Lease of 192.168.1.235 obtained, lease time 21600
done.
starting Busybox inet Daemon: inetd... done.
INIT: Entering runlevel: 5
Starting Dropbear SSH server: Will output 1024 bit rsa secret key to '/etc/dropbear/dropbear_rsa_host_key'
Generating key, this may take a while...
Public key portion is:
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgnX1LUQhNOIomXhVyOxV+4/aYo9keUkUmP3gOZUJbEvF2vjbunvpJJ7kkCvquaJoX4+znL/4deCNcYY128qPwymtwqK6bSj2M5zbtSBq
VoZXt9bF7lTEuwZJ/OnF66Vb4zcnQg1VoZzs0Yna+8n2359Y/GyVAaIq8NSIb0kVi5mjUME= root@zynq
Fingerprint: md5 8f:40:c3:67:b9:3b:c9:5d:a3:f0:c7:12:92:ba:b5:92
dropbear.
Stopping Bootlog daemon: bootlogd.
Starting tcf-agent: OK

_____ _ _ _
| ___ \ | | | | (_)
| |_/ / ___ | |_ __ _ | | _ _ __ _ _ __ __
| __/ / _ \| __| / _` || | | || '_ \ | | | |\ \/ /
| | | __/| |_ | (_| || |____| || | | || |_| | > <
\_| \___| \__| \__,_|\_____/|_||_| |_| \__,_|/_/\_\

PetaLinux v2013.10 (Yocto 1.4) zynq ttyPS0

zynq login: root
--------
--------
--------

And if I remove the ramdisk file, it stops during the bootloader, which I don't understand since the ramdisk is not specified in the bif nor the dtb. Where does it get this info from ?
--------

U-Boot 2014.01 (Apr 08 2014 - 09:47:28)

I2C: ready
Memory: ECC disabled
DRAM: 512 MiB
MMC: zynq_sdhci: 0
SF: Detected S25FL256S_64K with page size 256 Bytes, erase size 64 KiB, total 32 MiB
*** Warning - bad CRC, using default environment

In: serial
Out: serial
Err: serial
Net: Gem.e000b000
Hit any key to stop autoboot: 0
Device: zynq_sdhci
Manufacturer ID: 82
OEM: 4a54
Name: NCard
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 14.7 GiB
Bus Width: 4-bit
reading uEnv.txt
** Unable to read file uEnv.txt **
Copying Linux from SD to RAM...
reading uImage
3588776 bytes read in 313 ms (10.9 MiB/s)
reading devicetree.dtb
7972 bytes read in 15 ms (518.6 KiB/s)
reading uramdisk.image.gz
** Unable to read file uramdisk.image.gz **
zynq-uboot>
--------

Thanks.

PS: why don't blank lines work in this board ?

hockeyman1972's picture
hockeyman1972
Junior(11)
Params from U-boot

I think you may be seeing the ramdisk boot because those are the defaults passed to the kernel loader by U-boot, prior to the dtb reference. Have a look at the u-boot source tree, in /include/configs/zynq_common.h. You can override parameters for zed specifically by adding them to the /include/configs/zynq_zed.h file, and editing them to your liking.

Ron

dargaud's picture
dargaud
Junior(0)
Thanks for your answer.

Thanks for your answer.
I'm confused because the kernel DOES receive the right parameters: Kernel command line: console=ttyPS0,115200 root=/dev/nfs rw ip=bootp earlyprintk
I don't understand how it can still decide to use the ramdisk if the parameters tell it to go NFS.

Does that mean I need to recompile u-boot ? I was hoping to save time on this project by reusing the provided bootloader/kernel.

hockeyman1972's picture
hockeyman1972
Junior(11)
PetaLinux RFS Type

OK, after some investigating I found that in the Petalinux kernel configuration, the default RFS selection is for the compressed RAMdisk. I believe the next step is to change that from INITRAMFS to NFS and rebuild your kernel.

dargaud's picture
dargaud
Junior(0)
Thanks, I'll use a script to

Thanks, I'll use a script to set up the board via ssh instead of relying on mounting an nfs root. I don't have time to mess with bootloaders, kernel recompilation and such right now.

MaxPohl's picture
MaxPohl
Junior(0)
DHCP boot

could you please explain me how you get the dhcp boot running?
I dont found any information about that.
I use centos7.