Open main menu

DAVE Developer's Wiki β

Changes

DESK-MX6-L/General/Booting from NFS

16,321 bytes added, 8 January
no edit summary
!colspan="4" style="width:100%; text-align:left"; border-bottom:solid 2px #ededed"|History
|-
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Version
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Issue Date
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Notes
|-
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|1{{oldid|10638|2020/10/09}}|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|New documentation layout|-| style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000" | {{oldid|16984|2022/03/07}}| style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000" |DESK-MX6-L 3.0.0release|-! style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fbededed; padding:5px; color:#000000"|Oct 20202023/04/17|! style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fbededed; padding:5px; color:#000000"|First DESK -MX6-L 4.0.0 release
|}
<section end=History/>
=== net_nfs configuration ===
[[AXEL_Lite_SOM/DESK-MX6-L | DESK-MX6-L]] Virtual Machine is properly configured for the TFTP and NFS debug.
In any case, some variables has to be configured on the target and the VM itself has to be configured for respect to the network environment.
=== Host (Virtual Machine) configuration ===
The [[AXEL_Lite_SOM/DESK-MX6-L | DESK-MX6-L]] Virtual Machine has the '''tftp''' and '''nfs''' services already running. Optionally, their configuration has to be changed according to the network configuration where the target is connected to.
Check and properly configure the items the following chapters: network adapter, nfs server
===== network adapter =====
The network adpater should be configured in '''bridge mode''' in order to allow the target to get the files from the VM
[[File:Network-bridge.png|500px]]
then, modify the network interfaces configuration using the <code>netplan</code> configuration file, for example (sse [https://ubuntu.com/server/docs/network-configuration Ubuntu network configuration]):
<pre class="workstation-terminal">dvdk@vagrant:~$ cat /etc/netplan/01-netcfg.yaml network: version: 2 ethernets: eth0: dhcp4: false addresses: - 192.168.0.125/24 gateway4: 192.168.0.254 nameservers: addresses: [[File:XELK VM Network8.8.8.8, 1.1.1.png|500px]1]dvdk@vagrant:~$ </pre>
and restart it:
then check or re-configure the Host IP address <preclass="workstation-terminal">dvdk@vagrant:~$ ifconfigsudo netplan applyeth0 Link encapdvdk@vagrant:Ethernet HWaddr 08:00:27:26:e3:8c ~$ inet addr:192.168.0.121 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fe80::178:59dd:914d:7e23</64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1481286 errors:0 dropped:10 overruns:0 frame:0 TX packets:486082 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1647604355 (1.6 GB) TX bytes:53874713 (53.8 MB)pre>
lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Check or re-configure the Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:224 errors:0 dropped:0 overruns:0 frame:0 TX packets:224 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1 RX bytes:26014 (26.0 KB) TX bytes:26014 (26.0 KB)IP address
<pre class="workstation-terminal">
dvdk@vagrant:~$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 08:00:27:b1:28:5d brd ff:ff:ff:ff:ff:ff
inet 192.168.0.125/24 brd 192.168.0.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::a00:27ff:feb1:285d/64 scope link
valid_lft forever preferred_lft forever
dvdk@vagrant:~$
</pre>
The NFS server should exports the correct file system directory (in our example)
<preclass="workstation-terminal">
dvdk@vagrant:~$ cat /etc/exports
/home 0.0.0.0/0.0.0.0(rw,sync,no_root_squash,no_subtree_check,crossmnt)
otherwise, change its configuration and then restart the nfs server:
<preclass="workstation-terminal">dvdk@vagrant:~$ sudo /etc/init.d/nfs-kernel-server systemctl restart[ ok ] Restarting nfs-kernel-server (via systemctl): nfs-kernel-server.service.dvdk@vagrant:~$
</pre>
<pre>
=> setenv serverip 192.168.0.121125
=> setenv ipaddr 192.168.0.90
</pre>
<pre>
=> setenv bootfile /tftpboot/desk-mxmx6-l/uImage>=> setenv fdtfile /tftpboot/desk-mxmx6-l/imx6q-xelk-l-2imx6dl-0sbcx-0cb0012.dtb
</pre>
finally, the ''root file system'' directory on the Virtual Machine should be configured for let the kernel to find the '''INIT'''
<pre>=> setenv rootpath /home/dvdk/desk-mx-l/rfs/desk-mxmx6-l</pre> 
To run this configuration just issue the The ''kernel'net_nfs'and '' command which firstly download the kernel and device tree using the tftp protocol'' files and ''root file system'' directory name are already set on U-Boot environment.
To run this configuration just issue the '''net_nfs''' command which firstly download the kernel and device tree using the tftp protocol: click on ''Expand'' to see the complete network bootlog <pre class="workstationmw-terminalcollapsible mw-collapsed">
=> run net_nfs
1152054 bytes read in 58 ms (18.9 MiB/s)
Using FEC device
TFTP from server 192.168.0.121125; our IP address is 192.168.0.90Filename 'desk-mxmx6-l/uImage'.
Load address: 0x12000000
Loading: #################################################################
################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ########## 741 1.2 KiB9 MiB/s
done
Bytes transferred = 7031520 8037400 (6b4ae0 7aa418 hex)
Using FEC device
TFTP from server 192.168.0.121167; our IP address is 192.168.0.90165Filename 'desk-mxmx6-l/imx6qimx6dl-sbcx-cb0012.dtb'.
Load address: 0x18000000
Loading: *�########### 846 1.7 KiBMiB/s
done
Bytes transferred = 53760 52247 (d200 cc17 hex)FDT: override 'som_uniqueid' with 'dbc7977dd57ea478:0b0931d41e1b99d4'FDT: override 'cb_uniqueid' with 'da0000117b000035:0dd2e72dc3bf5b2d'
## Booting kernel from Legacy Image at 12000000 ...
Image Name: Linux-45.1415.9871-desk-mx6-l-14.0.0-r
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 7031456 8037336 Bytes = 67.7 MiB
Load Address: 10008000
Entry Point: 10008000
## Flattened Device Tree blob at 18000000
Booting using the fdt blob at 0x18000000
Loading Kernel Image ... OK reserving fdt memory region: addr=18000000 size=e000 Using Device Tree in place at 18000000, end 18010fff1800ffff
switch to ldo_bypass mode!
Frame buffer: configure splashscreen reserved memory to 0x8e000000 0x4fc00000 (2 MiB)
WARNING: could not find 2nd splashscreen reserved memory path
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 45.1415.9871-desk-mx6-l-14.0.0-rc1 (dvdkjenkins@vagrantfocalbakery) (arm-poky-linux-gnueabi-gcc version 7(GCC) 11.3.0 , GNU ld (GCCGNU Binutils)2.38.20220708) #1 SMP PREEMPT Fri Oct 9 12Mon Apr 3 18:5604:59 15 CEST 20202023[ 0.000000] CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c53c7d10c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt: Machine model: AxelLite Quad DL on SBCX CB0012
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] OF: reserved mem: node linux,cma compatible matching fail[ 0.000000] Reserved memory: created ipuv3_fb memory pool at 0x8e0000000x4fc00000, size 2 MiB
[ 0.000000] OF: reserved mem: initialized node splashscreen, compatible id fsl,ipuv3-fb
[ 0.000000] Zone ranges:[ 0.000000] Normal [mem 0x0000000010000000-0x000000004fffffff][ 0.000000] HighMem empty[ 0.000000] Movable zone start for each node[ 0.000000] Early memory node ranges[ 0.000000] node 0: [mem 0x0000000010000000-0x000000004fbfffff][ 0.000000] node 0: [mem 0x000000004fc00000-0x000000004fdfffff][ 0.000000] node 0: [mem 0x000000004fe00000-0x000000004fffffff][ 0.000000] Initmem setup node 0 [mem 0x0000000010000000-0x000000004fffffff][ 0.000000] percpu: Embedded 16 12 pages/cpu @e578e000 s35596 s17036 r8192 d21748 u65536d23924 u49152[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 520496260096[ 0.000000] Kernel command line: root=/dev/nfs rw nfsroot=192.168.0.121167:/opthome/nfsrootdvdk/desk-mx-l/axelrfs/xelkdesk-mx6-l,v3,tcp ip=192.168.0.90165:192.168.0.121167::255.255.255.0:xelk:eth0:off panic=1 console=ttymxc2,115200 cma=64M vmalloc=400M video=LVDS-1:d mtdparts=gpmi-nand:2M(nand-SPL),6M(nand-uboot),1M(nand-env1),1M(nand-env2),1M(nand-fdt),1M(nand-spare),8M(nand-kernel),4M(nand-splash),-(nand-ubi);spi0.0:64k(spi-SPL),960k(spi-uboot),256k(spi-env1),256k(spi-env2),512k(spi-dtb),8M(spi-kernel),4M(spi-splash),-(spi-free)[ 0.000000] PID Dentry cache hash table entries: 4096 131072 (order: 27, 16384 524288 bytes, linear)[ 0.000000] Dentry Inode-cache hash table entries: 262144 65536 (order: 86, 1048576 262144 bytes, linear)[ 0.000000] Inodemem auto-cache hash table entriesinit: stack: 131072 (orderoff, heap alloc: 7off, 524288 bytes)heap free:off[ 0.000000] Memory: 1734528K1019076K/2095104K 1048576K available (9216K 12288K kernel code, 660K 1358K rwdata, 2540K 2348K rodata, 1024K init, 426K 407K bss, 360576K 29500K reserved, 0K cma-reserved, 88064K 0K highmem)[ 0.000000] Virtual kernel memory layoutSLUB:[ HWalign=64, Order=0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)3, MinObjects=0, CPUs=2, Nodes=1[ 0.000000] fixmap rcu: 0xffc00000 - 0xfff00000 (3072 kB)Preemptible hierarchical RCU implementation.[ 0.000000] vmalloc rcu: 0xe7000000 - 0xff800000 ( 392 MB)[ 0 RCU event tracing is enabled.000000] lowmem : 0x80000000 - 0xe6800000 (1640 MB)[ 0.000000] pkmap rcu: 0x7fe00000 - 0x80000000 ( RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2 MB)[ 0.000000] modules : 0x7f000000 - 0x7fe00000 ( 14 MB)[ 0.000000] .text : 0x80008000 - 0x80a00000 (10208 kB)[ 0.000000] Trampoline variant of Tasks RCU enabled.init : 0x80d00000 - 0x80e00000 (1024 kB)[ 0.000000] .data rcu: 0x80e00000 RCU calculated value of scheduler- 0x80ea5228 ( 661 kB)[ 0enlistment delay is 10 jiffies.000000] .bss : 0x80eae060 - 0x80f18988 ( 427 kB)[ 0.000000] SLUBrcu: HWalignAdjusting geometry for rcu_fanout_leaf=6416, Ordernr_cpu_ids=0-3, MinObjects=0, CPUs=4, Nodes=1[ 0.000000] Preemptible hierarchical RCU implementation.[ 0.000000] Tasks RCU enabled.2
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] L2C-310 errata 752271 erratum 769419 enabled
[ 0.000000] L2C-310 enabling early BRESP for Cortex-A9
[ 0.000000] L2C-310 full line of zeros enabled for Cortex-A9
[ 0.000000] L2C-310 ID prefetch enabled, offset 16 lines
[ 0.000000] L2C-310 dynamic clock gating enabled, standby mode enabled
[ 0.000000] L2C-310 cache controller enabled, 16 ways, 1024 512 kB[ 0.000000] L2C-310: CACHE_ID 0x410000c70x410000c8, AUX_CTRL 0x764700010x76450001
[ 0.000000] Switching to timer-based delay loop, resolution 333ns
[ 0.000008] sched_clock: 32 bits at 3000kHz, resolution 333ns, wraps every 715827882841ns[ 0.000027] clocksource: mxc_timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 637086815595 ns[ 0.001670] Console: colour dummy device 80x30[ 0.001703] Calibrating delay loop (skipped), value calculated using timer frequency.. 6.00 BogoMIPS (lpj=30000)[ 0.001720] pid_max: default: 32768 minimum: 301[ 0.001850] Mount-cache hash table entries: 4096 (order: 2, 16384 bytes)[ 0.001868] Mountpoint-cache hash table entries: 4096 (order: 2, 16384 bytes)[ 0.002399] CPU: Testing write buffer coherency: ok[ 0.002433] CPU0: Spectre v2: using BPIALL workaround[ 0.002787] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000[ 0.039600] Setting up static identity map for 0x10100000 - 0x10100060[ 0.059554] Hierarchical SRCU implementation.[ 0.099556] smp: Bringing up secondary CPUs ...[ 0.169832] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001[ 0.169838] CPU1: Spectre v2: using BPIALL workaround[ 0.239814] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002[ 0.239819] CPU2: Spectre v2: using BPIALL workaround[ 0.309812] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003[ 0.309817] CPU3: Spectre v2: using BPIALL workaround[ 0.309940] smp: Brought up 1 node, 4 CPUs[ 0.309953] SMP: [ 0.000000] sched_clock: 32 bits at 3000kHz, resolution 333ns, wraps every 715827882841ns[ 0.000032] clocksource: mxc_timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 637086815595 ns[ 0.001510] Console: colour dummy device 80x30[ 0.001553] Calibrating delay loop (skipped), value calculated using timer frequency.. 6.00 BogoMIPS (lpj=30000)[ 0.001574] pid_max: default: 32768 minimum: 301[ 0.001739] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)[ 0.001770] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)[ 0.002504] CPU: Testing write buffer coherency: ok[ 0.002566] CPU0: Spectre v2: using BPIALL workaround[ 0.002840] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000[ 0.003926] Setting up static identity map for 0x10100000 - 0x10100060[ 0.004121] rcu: Hierarchical SRCU implementation.[ 0.005441] smp: Bringing up secondary CPUs ...[ 0.006318] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001[ 0.006336] CPU1: Spectre v2: using BPIALL workaround[ 0.006502] smp: Brought up 1 node, 2 CPUs[ 0.006524] SMP: Total of 2 processors activated (12.00 BogoMIPS).[ 0.006539] CPU: All CPU(s) started in SVC mode.[ 0.007054] devtmpfs: initialized[ 0.016881] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4[ 0.017136] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns[ 0.017166] futex hash table entries: 512 (order: 3, 32768 bytes, linear)[ 0.017297] pinctrl core: initialized pinctrl subsystem[ 0.018692] NET: Registered PF_NETLINK/PF_ROUTE protocol family[ 0.020262] DMA: preallocated 256 KiB pool for atomic coherent allocations[ 0.021370] thermal_sys: Registered thermal governor 'step_wise'[ 0.021380] thermal_sys: Registered thermal governor 'user_space'[ 0.021858] cpuidle: using governor menu[ 0.022059] CPU identified as i.MX6DL, silicon rev 1.3[ 0.022184] Use WDOG2 as reset source[ 0.040952] vdd1p1: supplied by regulator-dummy[ 0.041596] vdd3p0: supplied by regulator-dummy[ 0.042182] vdd2p5: supplied by regulator-dummy[ 0.043602] mxs_phy 20c9000.usbphy:
desk-mx6 login: root
root@desk-mx6:~# uname -a
Linux desk-mx6 5.15.71-desk-mx6-l-4.0.0 #1 SMP PREEMPT Mon Apr 3 18:04:15 CEST 2023 armv7l armv7l armv7l GNU/Linux
root@desk-mx6:~#
</pre>
8,226
edits