CubieTruck

CubieTruck

by Artie Breakfast

So I have this cubietruck. Obviously, I would own a Cubietruck.

I've done some things with it in the past, mainly "get things to run on it" but as far as being fully usable, I'm not happy with it for making a demo on it. Which is the point.

So basically: I'm just building it from scratch, with a full system of some sort, somehow.

This week was kinda messed up with Tuesday's meeting (about payment) being moved to Thursday/Friday/Monday/Thursday. (Yes it's still being moved.) Other parties have been sick therefore it had to move, but it just causes issues where you get ready for the meeting and... it doesn't happen. Disruptive. Also there was a birthday celebration for LB, so a bit of recovery from that.

Beyond that, the Cubietruck uses das U-boot loader. (it is called das U-boot. So putting 'the das U-boot' is just... like saying 'splitted.' If you're going to do it wrong, make it obvious, like 'splittedededed' or 'an de la le die the das U-boot.') The U-boot loader in the firmware is fairly crap, and replacing it with a more supported one is - an interesting practice. Especially given that much of my expirimenting back in the day was trying to get this to work on the NAND, which eventually I will, but using a TF/microSD (viewed from das U-boot as mmc) is a bit easier. Of course, as the standard cubietruck U-boot images from a while back that you'd find in distros were missing the HDMI output/USB input, making my own version and testing it took a bit. But that was back in the day.

MORE importantly is trying to get the darned thing to boot a kernel / os. Which there are commands to do, but it's more 'scriptable' (bash, unfortunately not forth like a good boot loader) than GRUB, and less "enter some commands to get it to work" like GRUB. Or, maybe it's just that I'm used to GRUB and rescuing things. I don't care for some of GRUB, but it is more easily used than efi shells (which tend to be very crap, thus why other efi bootloaders like grub-efi and refind exist.)

Oh and you'll find stuff on the net about ARM and bootloaders where people SWEAR that it won't ever work because it's not a PC. Because, you know, there was no such thing as a bootloader on a non-intel, non-bios machine. Never on Apple, Amiga, Atari... you know, there are no other computers and all that crap. When you get past that sort of thing, you'll find people who have INSTALLED Das U-boot, but don't know it's internals and so on. There is documentation, but it's a bit... documentation for everything, not "ok here is how you would load this from scsi." Because MOSTLY - it's used in FEL, USB, or netboot mode. And once you have that, you write the script and boot from your device.

I am not setting up netboot because I don't want to really mess with tftp today/this week. I will eventually, because it is useful for the RPI3 which I also need to mess with. But: not this week.

Anyway so some of the stuff I've been doing is trying to get the kernels to load that I have for various things. The Archlinux bit works, but Arch uses systemd and FUCK SYSTEMD. Debian Jessie: systemd. Been using void linux of late, and I like it a lot, and it has a cubieboard2 setup - which should run on the cubietruck.

It does NOT run on the cubietruck. That kernel just... hangs VERY early in the init process. Probably because the cubietruck needs a flattened device tree passed to the kernel so it knows it is a cubietruck, not a cubieboard2. The Arch kernel works fine with the Void userland (I am using BSD terminology because I prefer BSD terminology, despite it not being entirely correct in Linux space.) BUT it does not see the keyboard (usb) and very possibly other devices. It does boot. It just... is not very useful.

FreeBSD also boots, though that was a bit of fun (I tried from usb and from scsi, and then just went back to sd/tf because that works, and I'll determine why IF it ends up working out) BUT - it currently is lacking support for the hdmi and the network card. At least in the default setup. I am building a custom FreeBSD image to test, or, well, that is done. And then if that works perhaps I will use it for the base, and build the demo thing on top of it. I don't need X, I just need a framebuffer (and possibly some stuff with the MALI acceleration if it's useful.)

I'm also building a linux from scratch setup for it, which is interesting since there really isn't an ARM verison for full blown things, just embedded. And it's somewhat... well at one point in the documentation it started saying "do this" and I looked at it and said "no, wait, we're NOT in a directory with that stuff, what happened to the intervening steps" and - well it's a work in progress and I think I'd better just build a full one first. Which is today's project.

So, eventually, this will result in a working ARM setup that I will run on my cubietruck, possibly a RPI zero, probably the RPI 3, and my Pine64 board.

No we are not calling it TruckOS.

So yeah that's ... I sort of feel this isn't the best writeup because this isn't working on a demo or doing creative stuff in the same way that I should be but it IS doing stuff to get me somewhere, and I build machines a lot, and... well here we are I'm building machines.

Oh and don't play Factorio if you're an engineer, it is bad and will cause time gaps in your week.


Artie Breakfast commented

Today's MSX letter 64x64 doodle is a cubic L. I was going to do a cubic Truck, but I have some issues with isometric drawing so started simple. The lines are hand drawn, not done with a line tool, because there isn't one in swankage paint, and you don't really want one ... not REALLY. Better to do lines by hand and copy segments with brushes, it helps dithering later.

on Mon Oct 17 2016 23:40:59 GMT-0400 (EDT)


Artie Breakfast commented

Oh and the cubietruck/arm os will NOT have vim. Or vi. Period. I don't care about the 'but it's the standard unix editor' - first of all, are you using gnu? I'll bet you are and are going to tell me it's GNU/Linux. Well, Gnu's not Unix, so _why are you trying to force a Unix thing when it's not Unix? Shut up and install emacs, the Gnu editor. Secondly: I'll be installing mg. Yes, I know, OpenBSD has 2 editors, mg and vi. I like that. But OpenBSD's stuff for the Cubietruck is also expirimental and I'm not quite so good with OpenBSD yet.

Anyway no vi. Period. mg. Period.

on Mon Oct 17 2016 23:48:41 GMT-0400 (EDT)


Artie Breakfast commented

(and by 'not quite so good with OpenBSD' I mean 'I am a FreeBSD person so some of the OpenBSD stuff is unfamiliar, but I'm ok with learning it.')

That said, the current situation with the build-everything-for-arm has devolved into "ok let's just get the kernel to work on the board first" - and I managed to get a response from the void kernel when passing a parameter to the boot command via env variable - and now I see that das U-boot is refusing to boot the kernel due to a mismatch; and that if it did it would be the wrong voltage or something odd. What is VERY strange is this kernel is supposed to be newer than that, but hmm. Anyway, I'm compiling a kernel (cubietruck kernel sources are in an odd state because Allwinner didn't really provide that much info about the kernel or so on, so a load of reverse stuff has to be done and you know how the Gnu folks are about that - it's so much better to write unoptimized code that fits a license than to write optimized code designed for something.)

on Tue Oct 18 2016 03:16:12 GMT-0400 (EDT)