Skill Level (advanced)
Disclaimer
This howto can screw up your system and bring the board in an unusable state. Do it only if you are confident with u-boot stuff and you have a need to attach a second network adapter.
Prerequisites
- Connect a serial console to a PC
- Install a serial client like minicom, picocom, PuTTY, screen
- Compile and use the latest fenix 0.7 (SD/USB) Ubuntu bionic server image
Welcome to Fenix 0.7 Ubuntu 18.04.3 LTS Linux 4.4.167
- Flash image to an SD/USB device using Etcher, dd, diskutil
Problem
After inserting an USB network dongle into the USB3 port I booted the Ubuntu Bionic server and looking into the network configuration I found a weird network name.
...
enx112233445566: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 11:22:33:44:55:66 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
NOTE: MAC address above is an example!
Q: A MAC based name for a network adapter, what happens if I replace this adapter with another one?
A: I’ll get a new MAC based network adapter name every time I insert a different network USB dongle.
Q: Can I use eth1 as an alias?
A: Yes of course, you must tell Ubuntu to use the legacy behavior (eth1, …)
Solution
- Bootup Edge-V board
- Login into console or use a SSH client, like PuTTY or ssh
- Go to /boot directory with
cd /boot
- Make a copy of
boot.scr
as root withsudo cp boot.scr boot.scr.org
- Make a copy of
rk3399_autoscript.cmd
as root withsudo cp rk3399_autoscript.cmd rk3399_autoscript.cmd.org
- Use an editor to open
rk3399_autoscript.cmd
as root withsudo vi rk3399_autoscript.cmd
- Go down to
setenv bootargs ...
- At line end add
net.ifnames=0 biosdevname=0
- Create u-boot script as root with
sudo mkimage -A arm64 -O linux -T script -C none -a 0 -e 0 -n "rk3399 autoscript" -d /boot/rk3399_autoscript.cmd /boot/boot.scr
- Reboot board
- Login into console or use a SSH client, like PuTTY or ssh
- Check kernel boot arguments with
cat /proc/cmdline
sdfwupdate storagemedia=sd androidboot.mode=sd wol_enable=1 earlyprintk console=ttyFIQ0,1500000n8 console=tty0 rw root=UUID=<omitted> rootfstype=ext4 init=/sbin/init rootwait board_type=2 board_type_name=Edge-V fan=auto mac=<omitted> androidboot.mac=<omitted> coherent_pool=2M image_type=SD-USB net.ifnames=0 biosdevname=0
NOTE: Sensitive information was omitted.
- Check result with
ifconfig
...
eth1: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 11:22:33:44:55:66 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0