NFS boot of a beagleboard-xm (CONFIG_USB_NET_SMSC95XX=m)

This forum is for topics dealing with problems with software specifically in the ARMv7h repo.

NFS boot of a beagleboard-xm (CONFIG_USB_NET_SMSC95XX=m)

Postby gdamjan » Sun Oct 25, 2015 2:45 pm

The BeagleBoard-xM uses the generic linux-armv7 kernel, which unfortunately, doesn't have the smsc95xx ethernet driver built-in but as a module. This precludes me from having the root mounted from NFS, and I need to do this since my sd cards are failing.

My questions are:
* would it be unrealistic to add CONFIG_USB_NET_SMSC95XX=y in the armv7 kernel?
* any ideas how to make an initramfs from my x86 host?
* other ideas?
gdamjan
 
Posts: 10
Joined: Mon Jan 16, 2012 7:06 pm

Re: NFS boot of a beagleboard-xm (CONFIG_USB_NET_SMSC95XX=m)

Postby moonman » Sun Oct 25, 2015 5:11 pm

initramfs is easy to make. Just install mkinitcpio and run mkinitcpio -g /boot/initramfs-linux.img on the device.
You have to do it every kernel update. Also check your uboot configuration to see what name it expects for the initramfs image, if at all.
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3388
Joined: Sat Jan 15, 2011 3:36 am

Re: NFS boot of a beagleboard-xm (CONFIG_USB_NET_SMSC95XX=m)

Postby gdamjan » Tue Oct 27, 2015 11:57 pm

u-boot does try to load an initramfs (initramfs-linux.img - also evidenced by the alarm patch to u-boot).

I know that initramfs is just a cpio archive, it's still not trivial to create with all the binaries, libraries and scripts.

In the end, this was my approach:
  • Installed qemu-user-static from aur on the x86 nfs server
  • setup /etc/binfmt.d/qemu-arm.conf
  • systemctl restart systemd-binfmt
  • cp /usr/bin/qemu-arm-static $ARMROOT/usr/bin/qemu-arm
  • systemd-nspawn -D $ARMROOT
from this point I could run pacman and mkinitcpio (btw, ARMROOT is /home/nfs/bbxm here)

I also had to follow the instructions in the wiki to hack on the initcpio for NFS4.

my /boot/uEnv.txt is:
$this->bbcode_second_pass_code('', 'optargs=smsc95xx.macaddr=9b:01:cc:7e:5c:23 nfsroot=192.168.117.2:/home/nfs/bbxm,vers=4.2 ip=:::::eth0:dhcp
dvimode=800x600MR-16@60
root=/dev/nfs')
gdamjan
 
Posts: 10
Joined: Mon Jan 16, 2012 7:06 pm

Re: NFS boot of a beagleboard-xm (CONFIG_USB_NET_SMSC95XX=m)

Postby gdamjan » Thu Oct 29, 2015 9:37 pm

Actually a better way than copying the qemu-arm binary is to bind it wit nspan:
$this->bbcode_second_pass_code('', '
sudo systemd-nspawn -D $ARMROOT \
--bind-ro=/usr/bin/qemu-arm-static:/usr/bin/qemu-arm \
--bind-ro=/etc/resolv.conf:/run/systemd/resolve/resolv.conf
')
gdamjan
 
Posts: 10
Joined: Mon Jan 16, 2012 7:06 pm


Return to ARMv7h

Who is online

Users browsing this forum: No registered users and 14 guests