Updating my UP-Board Linux

Options
apemberton
apemberton New Member Posts: 1

Hi Folks, this is the first posting I have made on the UP-board community so perhaps naïve to your ways.

I obtained two 2Gb UP Boards through the Kickstarter program though I had no practical use for them at the time (and I still don't have a real use for them)! However I decided I'd

revive them to see what can be done with them. Too much time on my hands I guess.

The UP-boards were set with UBilinux ver 3 initially (one of the two boards has not been touched yet so that will still be as supplied). I upgraded to ver. 4 but with an ancient 4.4

long term kernel. I like to have a recent kernel and I don't like cross compiling. I also like to use Debian (which I use on ARM and MIPS platforms) but that is not available today on

UP-Board. I have an irrational dislike of Ubuntu after the mess up in GUI's in the ancient past, so I don't want that.

I now have one of my UP-Boards running with Linux kernel 5.11.16 (customised) and Debian Buster. I have a 1TB SSD attached (and boot from) to the USB3.0 OTG port which did cause me

problems due to the cables.

How did I do this? My first step was to attach a Sata drive (formatted ext4) to one of the USB2 ports and download Ubuntu which worked fine. This filled up the eMMC (16GB) when all the

software and build tools were loaded. Once I had set up the ssh daemon to accept sessions (could use the console but I don't), I set up the Sata drive with a dummy /usr/src directory,

downloaded the latest available kernel from kernel.org, unpacked it, copied the V4 config file from the UP-board to the linux-5.11.16 directory and performed a 'make oldconfig' on it.

This was a mistake in practice. After compilation, the size of the kernel would not allow a clean reboot so had kernel panics. This is due to the number of loaded modules into the

allocated DRAM space.

After searching the UP-Community, I found a minimal config file for UP board kernel suitable for kernel 4.9. After performing 'make oldconfig' followed by 'make menuconfig' I reduced

the number of loaded modules or changing some modules from '<*>' to '' and eliminating many uneccessary modules included when 'defconfig' was initially used. For the time being I

have also cut out the IPv6 section as I don't use that at present. After compilation, the kernel booted but there were loading errors which need non-free modules to be downloaded. In

particular the Realtek 8xxx firmware and i915 firmware. Thes modules are available from the 'net.

Having got a clean kernel compile I was able to 'make headers_install', 'make modules_install' 'make install' to boot the system. The 'make install' script takes care of updating GRUB

so I was able to choose between the old 4.4 kernel and my newly compiled 5.11.16 kernel (with some errors I admit). This was still booting (eventually) into Ubuntu in eMMC.

My next step was to update the UP-Board Bios as downloaded from the UP site. This version had a lot more options and I had a bit of a learning curve to understand some of the options.

At this stage, I could not understand the booting options nor the OTG options for the USB3 port. I hadn't realised that there was an expert mode for Bios configuration. I was quite

nervous about the EFI security locking me out. After some research and trial and error I understood the CRB section of options. I ran the update but I admit I was confused by the

procedures on screen, partly because some options were obscured and needed to scroll down the screen, and partly through my lack of understanding the update process. Too used to U-Boot

I guess!

Once I had got to successfuly update the new Bios, I set the Bios to initially boot from USB. I downloaded the Netinstall version of Debian Buster as an ISO and used Balena Etcher to

put the image on a clean microSD. I attached a new clean 1Tb SSD with a USB to Sata adapter to one of the USB2 ports. I also inserted the microSD (in a USB carrier) into a USB2 port.

Booting the UP-board from the MicroSD started the Debian install. I used the GUI intall method which, after a few mistakes or misunderstandings, I was able to get a good Debian buster

image on the SSD. Changing the boot options (Still had the choice of Debian or Ubuntu) in the Bios settings and removing the microSD carrier from the USB slot, I could boot from the

SSD into Debian. I manually updated the /etc/apt/sources.list to my preferences and performed an update/upgrade. I then loaded my desired software including the kernel build tools.

At thus stage I was still unable to use the USB3 port so I modified my kernel config for USB 3.0 OTG and other tweaks I felt necessary, then recompiled my kernel. After installing and

updating firmware modules (as above in '/lib/firmware), I still could not boot from the USB 3 port but USB2 ports worked fine. I was using a Lindy 31612 OTG microb to USB3 type A

female (UP have a similar cable in their shop) and the a USB type Male to Sata cable. I attached a spare SSD drive to the USB 3 port (using the aforementioned cables). The drive

produced a lot of error messages in 'dmesg' and '/var/log/kern.log' as the drive was attaching and detaching wildly. I thought the might have problems with power but that was not so. I

examined the male and female USB3 plug and socket an realised that not all pins mate and probably do not pass the correct signal pairs between each other. After much head scratching I

tried a spare WD Passport drive which has a USB3 MicroB and the drive attached and the error messages stopped. I was able to mount the drive and perform test file loading and deleting.

At this point, I rushed out and bought the cheapest USB external drive (for laptop backup) I could find with a microB connector. I forced the case of the drive open, removed the HDD

and carefully disconnected the MicroB to Sata pcb. I then powered the UP-board down, disconnected the SSD with Debian, etc. on it, attached the MicroB to Sata PCB and reassembled the

drive case as best I could. I attched the drive to the USB3 MicroB port on the UPboard via the Lindy 31612 and the external drive cable. I powered on the UP-board and after much

waiting, the UP-board brought up Debian with Xfce4 (my preferred GUI) using kernel (my variant) 5.11.16-upboard4.

I now have to update the kernel modules to, in particular, insert IPv6 and CIFS support. I am trying to keep as much of the kernel out of the limited 2Gb DRAM.

Have fun, Tony Pemberton