Well, having spent a few days fussing around with Gentoo USE flags, and still lost in the woods, I decided to try Devuan 2.0 grafted onto the Armbian kernel.
The good news is that once again, I got it to work. The better news is that I figured out why networking was hosed. That same old crap they stuck in along with SystemD where “eth0” (that has been THE standard default first up network card FOREVER) was changed to some long incomprehensible crap of some char in front of your MAC ID for each interface. Yes, that makes sense for major shops with a staff of 20 professional systems programmers running a farm of Virtual Machines on multi-homed $200,000 servers. It makes NO sense for the Home Gamer on a system with ONE, count it, ONE ethernet interface.
So, it turns out, the /etc/network/interfaces file is configured for eth0 (as it has been FOREVER) but they didn’t pass the “ignore it” flag in the boot string (or maybe they do, but it wasn’t in the 1.0 build so my swapping in that kernel had it borked. Whatever, if the foolishness did not exist it would not be biting me.)
I even got (once networking was up) LXDE installed. So now I’ve got a nice, windowing and lots of apps installed, Devuan 2.0 running on the XU4. Not bad for something to do while clearing the mind about Gentoo USE Flags and autounmask files!
Now, the bad thing:
Firefox is either gone, or hiding under a name I’ve not kenned just yet, and, Chromium just flashes a blue panel and dies. Is Chromium busted? Or does it depend on something in the newer kernel (that I can’t get booted…) that isn’t in the Armbian kernel I’m using?
But that’s for another day. I’m happy to boot up Devuan 1.0 for a browser for now (what I’m using to type this). I’ll get into porting browsers next week ;-) As it stands, I’m just happy with the progress to date.
Some Hairy Details
Some folks may remember that I’d gotten Devuan 2.0 on the Odroid XU4 to boot about a year ago. I’ve made hybrid systems before too.But no keyboard and mouse. What’s different this time is I’ve learned to drag along the /lib/modules and /lib/firmware files. I did that on the Funtoo port and on other hybrid systems. Guess I did learn something this year. The other difference is that I remembered having fought with the “numbered interfaces” crap a couple of times and had enough Ah-Ha to realize that might be why networking didn’t work.
OK, what did I do?
Well, first off, instead of making a dozen card images, I just took a 32 GB card and partitioned it more. This left the boot block at the front and the first partition as pristine Odroid Boot Loader and my Armbian/Devuan 1.0 Jessie build. Just like for Funtoo and Gentoo on the same card. Some “leftover space” was accumulated into the end partition. It had been “misc” and just a scratch space. So a good bit of time in “gparted” moving partitions over, shrinking them a bit, and gathering up about 4 GB of space for Yet Another OS Image.
Then I took the tarball download of XU4_Devuan_2.0 and un-tarred it into that partition. Mounted as something like /SD/Devuan IIRC. I then copied the stuff in /lib/modules to /SD/Devuan/usr/lib/modules and /lib/firmware to /SD/Devuan/lib/firmware. At this point, the boot loader in the start of the uSD card will look at partition 1 boot.ini and do what it says AND it will use the kernel if finds there. Buy changing where that boot.ini thinks it will find the / (or root) disk partition, it will change what userland gets run on top of the kernel. This kind of stuff is needed because Odroid uses a signed boot loader and you can’t play with it… well, not easily anyway.
Here’s my /dev/mmcblk0p1/boot/boot.ini file when configured to boot the first partition and Armbian/Devuan/Jessie. The first setenv is the active one and the other three are commented out. To boot Devuan 2.0, I comment out the first setenv (put a # in front) and un-comment the fourth one:
root@odroidxu4:/boot# cat boot.ini ODROIDXU-UBOOT-CONFIG setenv rootdev "UUID=dc9477cd-d43d-4082-82af-1cfadc352727" # Comment out the above and uncomment the below to use Funtoo or Gentoo # or the 3rd one to test Devuan 2.0 on existing kernel (modules & firmware duped) #setenv rootdev "LABEL=SD_Funtoo" #setenv rootdev "LABEL=SD_Gentoo" #setenv rootdev "UUID=cb2dc372-b711-4cf8-9d0d-3846a0edf01c" # U-Boot Parameters setenv initrd_high "0xffffffff" setenv fdt_high "0xffffffff" [...]
So that got me booted and running. But no network. Then the Ah Ha had me fix up /etc/networks/interfaces.
To find out what your ethernet is named you do an “ip a” command (or drink an IPA then do the ip a command ;-)
Here’s what it looks like on a normal system:
root@odroidxu4:/boot# ip a 1: lo: 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 2: eth0: mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 00:1e:06:31:aa:27 brd ff:ff:ff:ff:ff:ff inet 10.10.10.204/24 brd 10.10.10.255 scope global eth0 valid_lft forever preferred_lft forever root@odroidxu4:/boot#
On those that have been abused, the ethernet will not say “eth0” but some other crap. That’s what needs to be in your /etc/network/interfaces file for your network to work. UN_fortunatly, that is based on your MAC ID and since that is different on every board, it can’t be configured by your software provider (unlike the old eth0 …)
Here’s what my Devuan 2.0 file looks like to make it work:
root@odroidxu4:/SD/misc/etc/network# cat interfaces # interfaces(5) file used by ifup(8) and ifdown(8) # Please note that this file is written to be used with dhcpcd # For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf' # Include files from /etc/network/interfaces.d: # source-directory /etc/network/interfaces.d auto lo iface lo inet loopback auto enx001e0d21aa27 iface enx001e0d21aa27 inet dhcp auto eth0 iface eth0 inet dhcp
I left the eth0 lines in so that “whenever” I figure out how to pass the “net.ifnames=0” parameter to this kernel at boot time, I’ll still have networking. I added the lines with “enx001e0d21aa27” in them as that’s the crap my eth0 is presently named…
With that, I got networking working and could proceed with “apt-get install xfce libreoffice gimp htop” etc etc.
So I’ve got a working Devuan 2.0, with networking, with window system, with appications, all on the XU4. Just need a browser that works and I’m “good to go”.
I’ve also got a system that boots into Armbian/Jessie/Devuan 1.0, Gentoo, or Devuan 2.0 (on Armbian kernel). A nice little feature set.
So with this one uSD chip, depending no how I boot it, I can have a working browser, have a Devuan 2.0 working environment to continue tuning and building out, or have a Gentoo that boots to the CLI and where I need to develop more USE flag and masking skill to finish it. Not too bad for a week or so of work.
So that’s where I am now. None of it is what I’d call “polished”, but all of it is useful to some degree. The Devuan 1.0 for the browser and as a source for various configurations I’d done. The Devuan 2.0 as a build that actually works better (modulo the browser), but one where I need to figure out why their kernel / boot wasn’t booting and figure out how to get a working browser built. Then Gentoo as a place to continue expanding my Gentoo Build skills and what will likely (someday…) become my preferred system. The feature Gentoo has is you can control everything in the build to assure it works. The problem it has is you MUST control everything to get it to build… so I CAN make it right… once I know how to make it right…
Yeah, all this to make a $60 SBC work the way I want when I could just buy a board that was more broadly supported and without a PITA boot design and be done. Oh Well. Odroid makes well thought out hardware even if their software choices are, er, “limited” so you get to roll your own a lot…