Open main menu

DAVE Developer's Wiki β

Changes

XUELK-AN-004: Running OpenWrt distribution

782 bytes added, 10:36, 30 December 2020
no edit summary
{{InfoBoxTop}}
{{AppliesToSBCLynx}}
{{AppliesTo AXEL ULite AN}}
{{AppliesTo SBC Lynx AN}}
{{InfoBoxBottom}}
{{WarningMessage|text=This application note was validated against specific versions of the kit only. It may not work with other versions. Supported versions are listed in the ''History'' section.}}
== History ==
{| class="wikitable" border="1"
</pre>
Once the build process is completed, the root file system is available in the <code>openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl-1.1.16_eabi/root-brcm2708</code>subdirectory.
==Mounting the OpenWrt file system on the target==
sudo cp -aRv build_dir/target-arm_cortex-a7+neon-vfpv4_musl-1.1.16_eabi/root-brcm2708/* /opt/nfsroot/openwrt/root-brcm2708/
</pre>
Boot the target using Yocto root file system as root file system, mounted over NFS(192.168.0.80 is the IP address of the NFS server). Once they target has completed the boot process, mount the directory including OpenWrt root file system, and the <code>ext3</code> partition of the microSD card.
<pre>
...
root@sbc-lynx:~# mkdir /mnt/tmp
root@sbc-lynx:~# mkdir /mnt/tmp2
root@sbc-lynx:~# history | grep mount192.168.0.80:/opt/nfsroot/openwrt/root-brcm2708 /mnt/tmp2</pre> Then mount the <code>ext3</code> partition of the microSD card.<pre>
root@sbc-lynx:~# mount -t auto /dev/mmcblk0p2 /mnt/tmp/
</pre>Erase all of the files it cointains.<pre>root@sbc-lynx:~# mount 192.168.0.80:rm -rf /optmnt/nfsroottmp/openwrt/root-brcm2708 *</mntpre>Copy the files of the OpenWrt file systems into the <code>ext4</tmp2code> partition of the microSD card.<pre>
root@sbc-lynx:~# cp -aRv /mnt/tmp2/* /mnt/tmp
'/mnt/tmp2/bin/uclient-fetch' -> '/mnt/tmp/bin/uclient-fetch'
root@sbc-lynx:~# sync
</pre>
 
==Booting with OpenWrt root file system==
That target can be rebooted with the [[AXEL_ULite_and_SBC_Lynx_Embedded_Linux_Kit_(XUELK)#Target_setup_and_first_boot|default configuration]], in order to mount the root file system from the <code>ext3</code> partition of the microSD card:
<pre>
...
[ 4.678749679170] ALSA device list:[ 4.681760682184] No soundcards found.[ 4.703985702526] kjournald starting. Commit interval 5 seconds[ 5.920798893894] EXT3-fs (mmcblk0p2): using internal journal[ 5.926397900130] EXT3-fs (mmcblk0p2): mounted filesystem with ordered data mode[ 5.933439907149] VFS: Mounted root (ext3 filesystem) on device 179:2.[ 5.944702915814] devtmpfs: mounted[ 5.948500919610] Freeing unused kernel memory: 408K (80b15000 - 80b7b000)[ 6.044422008321] init: Console is alive[ 6.048397012064] init: - watchdog -[ 6.062608026440] init: - preinit -
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[ 9.366671316163] mount_root: mounting /dev/root
Segmentation fault
Segmentation fault
Segmentation fault
Segmentation fault
[ 10.946355933664] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.[ 10.967107953636] procd: - early -[ 10.970194957603] procd: - watchdog -[ 11.757354733672] procd: - ubus -[ 11.821973792741] procd: - init -
Please press Enter to activate this console.
* 2 oz. Cranberry Juice
-----------------------------------------------------
root@OpenWrt:/#free total used free shared buffers cachedMem: 507148 14344 492804 0 396 2432-/+ buffers/cache: 11516 495632Swap: 0 0 0root@OpenWrt:/# du -csh5.1M .5.1M total
</pre>
dave_user, Administrators
5,185
edits