Somewhere back in August or September, I pre-ordered a CuBox-i — A nicely finished, completely hackable, and reasonably powerful ARM system, nicely packaged and meant to be used to hack on. A sweet deal!
There are four models (you can see the different models' specs here) — I went for the top one, and bought a CuBox-i4Pro. That means, I have a US$130 nice little box, with 4 ARM7 cores, 2GB RAM, WiFi, and... well, all of its basic goodies and features. For some more details, look at the CuBox-i block diagram.
I got it delivered by early January, and (with no real ARM experience on my side) I finally got to a point where I can, I believe, contribute something to its adoption/usage: How to get a basic Debian system installed and running in it.
The ARM world is quite different to the x86 one: Compatibility is much harder, the computing platform does not self-describe properly, and a kernel must first understand how a specific subarchitecture is before being able to boot on it. Somewhere in the CuBox forums (or was it the IRC channel?) I learnt that the upstream Linux kernel does not yet boot on the i.MX6 chip (although support is rumored to be merged for the 3.14 release), so I am using both a kernel and an uBoot bootloader not built for (or by) Debian people. Besides that, the result I will describe is a kosher Debian install. Yes, I know that my orthodox friends and family will say that 99% kosher is taref... But remember I'm never ever that dogmatic. (yeah, right!)
[update]: Read on if you want to learn the process. If you just want to get the image and start playing with your box, you can go ahead and download it from my people.debian.org space.
Note that there is a prebuilt image you can run if you are so inclined: In the CuBox-i forums and wiki, you will find links to a pre-installed Debian image you can use... But I cannot advise to do so. First, it is IMO quite bloated (you need a 4GB card for a very basic Debian install? Seriously?) Second, it has a whole desktop environment (LXDE, if I recall correctly) and a whole set of packages I will probably not use in this little box. Third, there is a preinstalled user, and that's a no-no (user: debian, password: debian). But, most importantly, fourth: It is a nightly build of the Testing (Jessie) suite... Built back in December. So no, as a Debian Developer, it's not something we should recommend our users to run!
So, in the end and after quite a bit of frustration due to my lack of knowledge, here goes the list of steps I followed:
- Using the CuBox
- On the i2 and i4 models, you can use it either with a USB keyboard and a HDMI monitor, or by a serial consoles (smaller models do not have a serial console). I don't have a HDMI monitor handy (only a projector), so I prefer to use the serial terminal. Important details to avoid frustration: The USB keyboard has to be connected to the lower USB port, or it will be ignored during the boot process. And make sure your serial terminal is configured not to use hardware flow control. Minicom is configured by default to use hardware flow control, so it was not sending any characters to the CuBox. ^A-O gets you to the Minicom configuration, select Serial port setup, and disable it.
- Set up the SD card
- I created a 2GB partition, but much less can suffice; I'd leave it at least to 1GB to do the base install, although it can be less once the system is set up (more on this later). Partition and format using your usual tools (fdisk+mke2fs, or gparted, or whatever suits your style).
- Install the bootloader
- I followed up the instructions on this CuBox-i forums thread to get the SPL and uBoot bootloader running. In short, from this Google Drive folder, download the SPL-U-Boot.img.xz file, uncompress it (xz --decompress SPL-U-Boot.img.xz), and write it to the SD card just after the partition map: As root,
# dd if=SPL-U-Boot.img of=/dev/mmcblk0 bs=1024 seek=1 skip=1.
Actually, to be honest: As I wanted something basic to be able to debug from, I downloaded (from the same Google Drive) the busybox.img.gz file. That's a bit easier to install from: xz --decompress busybox.img.xz, and just dump it into the SD from the beginning (as it does already include a partition table):
# dd if=busybox.img of=/dev/mmcblk0
This card is already bootable and minimal, and allows to debug some bits from the CuBox-i itself (as we will see shortly).
After this step, I created a second partition, as I said earlier. So, my mmcblk0p1 partition holds Busybox, and the second will hold Debian. We are still working from the x86 system, so we mount the SD card in /media/mmcblk0p2
- Installing the base system
- Without debian-installer to do the heavy lifting, I went for debootstrap. As I ran it from my PC, debootstrap's role will be for this first stage only to download and do a very initial pre-unpacking of the files: Bootstrapping a foreign architecture implies, right, using the --foreign switch:
debootstrap --foreign --arch=armhf wheezy /media/mmcblk0p2 http://http.debian.net/debian
You can add some packages you often use by specifying --include=foo,bar,baz
So, take note notes: This board is capable of running the armhf architecture (HF for Hardware Float). It can also run armel, but I understand it is way slower.
- First boot (with busybox)
- So, once debootstrap finishes, you are good to go to the real hardware! Unmount the SD card, put it in the little guy, plug your favorite console in (I'm using the serial port), and plug the power in! You should immediately see something like:
- U-Boot SPL 2013.10-rc4-gd05c5c7-dirty (Jan 12 2014 - 02:18:28)
- Boot Device: SD1
- reading u-boot.img
- Load image from RAW...
- U-Boot 2013.10-rc4-gd05c5c7-dirty (Jan 12 2014 - 02:18:28)
- CPU: Freescale i.MX6Q rev1.2 at 792 MHz
- Reset cause: POR
- Board: MX6-CuBox-i
- DRAM: 2 GiB
- MMC: FSL_SDHC: 0
- In: serial
- Out: vga
- Err: vga
- Net: phydev = 0x0
- Phy not found
- PHY reset timed out
- (Re)start USB...
- USB0: USB EHCI 1.00
- scanning bus 0 for devices... 1 USB Device(s) found
- scanning usb for storage devices... 0 Storage Device(s) found
- scanning usb for ethernet devices... 0 Ethernet Device(s) found
- Hit any key to stop autoboot: 3
Let it boot (that means, don't stop autoboot), and you will soon see a familiar #, showing you are root in the busybox environment. Great! Now, mount the Debian partition:
# mount /dev/mmcblk0p2 /mnt
- Finishing debootstrap's task
- With everything in place, it's time for debootstrap to work. Chroot into the Debian partition:
# chroot /mnt
And ask Debootstrap to finish what it started:
# /debootstrap/debootstrap --second-stage
Be patient, as this step takes quite a bit to be finished.
- Some extra touches...
- After this is done, your Debian system is almost ready to be booted into. Why almost? Because it still does not have any users, does not know its own name nor knows I want to use it via a serial terminal, and does not know how the filesystems should be mounted and made available. And having a Debian system means having its very extensive software repository collection handy! Five very simple tasks to fix:
- Set a password for root:
- # passwd
- Enter new UNIX password:
- Retype new UNIX password:
- passwd: password updated successfully
- Setting your hostname is trivial:
- # echo cubox-i.gwolf.org > /etc/hostname
So you have now a usable root user, and when you boot with it you can create further users.
- Now, to get the serial console working (you might not need it, if you use the CuBox-i via keyboard+monitor) add a line to /etc/inittab specifying the details of the serial console. You can just do this:
- # echo 'T0:23:respawn:/sbin/getty -L ttymxc0 115200 vt100' >> /etc/inittab
- Create a /etc/fstab specifying how the system will be laid out. Right now, it is quite trivial (and in fact, I used my machine for some time without even thinking about this, just using the parameter provided to the kernel, this setting will just give you an easier and even faster experience):
- # cat > /etc/fstab
- /dev/mmcblk0p2 / ext3 noatime 0 0
- /dev/mmcblk0p1 /boot ext2 ro 0 0
- proc /proc proc defaults 0 0
- tmpfs /tmp tmpfs defaults 0 0
- tmpfs /run tmpfs defaults 0 0
- Tell your computer where to get the Debian packages. I suggest you use the http.debian.net meta-mirror, which will resolve to the mirror closest to you, but you can of course choose from the worldwide list of Debian mirrors.
# echo deb http://http.debian.net/debian wheezy main > /etc/apt/sources.list # echo deb-src http://http.debian.net/debian wheezy main > /etc/apt/sources.list
- Set a password for root:
- Boot into Debian!
- So, ready to boot Debian? Ok, first exit the chroot shell, to go back to the Busybox shell, unmount the Debian partition, and set the root partition read-only:
- # exit
- # umount /mnt
- # mount / -o remount,ro
Disconnect and connect power, and now, do interrupt the boot process when you see the Hit any key to stop automount prompt. To see the configuration of uboot, you can type printenv — We will only modify the parameters given to the kernel:
- CuBox-i U-Boot > setenv root /dev/mmcblk0p2 rootfstype=ext3 ro rootwait
- CuBox-i U-Boot > boot
So, the kernel will load, and a minimal Debian system will be initialized. In my case, I get the following output:
- ** File not found /boot/busyEnv.txt **
- 4703740 bytes read in 390 ms (11.5 MiB/s)
- ## Booting kernel from Legacy Image at 10000000 ...
- Image Name: Linux-3.0.35-8
- Image Type: ARM Linux Kernel Image (uncompressed)
- Data Size: 4703676 Bytes = 4.5 MiB
- Load Address: 10008000
- Entry Point: 10008000
- Verifying Checksum ... OK
- Loading Kernel Image ... OK
- Starting kernel ...
- Unable to get enet.0 clock
- pwm-backlight pwm-backlight.0: unable to request PWM for backlight
- pwm-backlight pwm-backlight.1: unable to request PWM for backlight
- _regulator_get: get() with no identifier
- mxc_sdc_fb mxc_sdc_fb.2: NO mxc display driver found!
- INIT: version 2.88 booting
- [info] Using makefile-style concurrent boot in runlevel S.
- [....] Starting the hotplug events dispatcher: udevd. ok
- [....] Synthesizing the initial hotplug events...done.
- [....] Waiting for /dev to be fully populated...done.
- [....] Activating swap...done.
- [....] Cleaning up temporary files... /tmp. ok
- [....] Activating lvm and md swap...done.
- [....] Checking file systems...fsck from util-linux 2.20.1
- [....] Mounting local filesystems...done.
- [....] Activating swapfile swap...done.
- [....] Cleaning up temporary files.... ok
- [....] Setting kernel variables ...done.
- [....] Configuring network interfaces...done.
- [....] Cleaning up temporary files.... ok
- [....] Setting up X socket directories... /tmp/.X11-unix /tmp/.ICE-unix. ok
- INIT: Entering runlevel: 2
- [info] Using makefile-style concurrent boot in runlevel 2.
- [....] Starting enhanced syslogd: rsyslogd. ok
- [....] Starting periodic command scheduler: cron. ok
- Debian GNU/Linux 7 cubox-i.gwolf.org ttymxc0
- cubox-i login:
And that's it, the system is live and ready for my commands!
So, how big is this minimal Debian installed system? I cheated a bit on this, as I had already added emacs and screen to the system, so yours will be a small bit smaller. But anyway — Lets clear our cache of downloaded packages, and see the disk usage information:
- root@cubox-i:~# apt-get clean
- root@cubox-i:~# df -h
- Filesystem Size Used Avail Use% Mounted on
- rootfs 689M 228M 427M 35% /
- /dev/root 689M 228M 427M 35% /
- devtmpfs 881M 0 881M 0% /dev
- tmpfs 177M 144K 177M 1% /run
- tmpfs 5.0M 0 5.0M 0% /run/lock
- tmpfs 353M 0 353M 0% /run/shm
- tmpfs 881M 0 881M 0% /tmp
So, instead of a 4GB install, we have a 228MB one. Great improvement!
For this first boot, and until you set up a way to automatically (or configure it to be static) determine the network configuration, you can use dhclient eth0 to request an IP address via the wired network port (configuring the wireless network is a bit more involved; I suggest you install the wicd-curses package to help on that regard). With the network working, update the Debian package lists:
# apt-get update Get:1 http://http.debian.net wheezy Release.gpg [1672 B] Get:2 http://http.debian.net wheezy Release [168 kB] Get:3 http://http.debian.net wheezy/main Sources [5956 kB] Get:4 http://http.debian.net wheezy/main armhf Packages [5691 kB] Get:5 http://http.debian.net wheezy/main Translation-en [3849 kB] Fetched 15.7 MB in 1min 27s (180 kB/s) Reading package lists... Done Reading package lists... Done Building dependency tree... Done Calculating upgrade... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Yay, all of Debian is now at your fingertips! Now, lets get it to do something useful, in a most Debianic way!
[note]: I have tried to keep this as true as possible to the real install. I have modified this text every now and then, looking at ways to make it a little bit better. So, excuse me if you find any inconsistencies in the instructions! :)
[update]: I finally followed through the instructions again and produced a downloadable image, where I did all of this work, and you can just download it and play with your CuBox-i! You can download it from my people.debian.org space. You will find there instructions on how to get it installed.
I am not (yet?) reporting this as a bug as this happened with a several days old session open, and just while I was upgrading my Sid system, after a long time without doing so (probably since before the vacations started... In December 2013). But I cannot avoid sharing this interesting screenshot.
(Hey, and FWIW... Why is the online copy of the Debian policy still in iso-8859-1‽ It's not 1995 anymore...)
[update] Of course, it's the default font, not only the Debian policy. Just as an example, the following text:
- <html><body><p>Ufffiii flat different!</p></body></html>
Yields the following output:
[update 2] And, of course, after finishing the update process... I got a new version of Iceweasel. Restarted it, and everything is back to normal :-}
Formally, today is my first day as a student on a formal, scholarized institution — Basically for the first time in almost twenty years!
Yes, those that know me know that I aspire to live the life of academia. I have worked at public universities for almost all of my adult life (between 1997 and 1999 I worked at a local ISP and at a private school), and have had a minor academic position («Técnico Académico») for almost ten years. And not having a proper degree limited me from pursuing anything further.
Then, in early 2010 I presented the written exam. By late 2010, the corresponding oral exam. That allowed me to get my formal diploma in December 2010. By the end of 2011, I requested to be a teacher in the Engineering Faculty of UNAM, and started teaching Operating Systems a year ago, in January 2012.
So, a good advance in the last few years... But I know that if I just sit here, I won't be able to advance my position towards really entering the Sacred Halls of Academia. And there are some rituals I have to comply with. One of those rituals is... Devoting some long time to studying under the formal structures.
Ok, so I'm finally a postgraduate student — I have enrolled in Especialidad en Seguridad Informática y Tecnologías de la Información, a short (one year) postgraduate program in ESIME Culhuacán, of Instituto Politécnico Nacional (a small campus of Mexico's second-largest university).
Some friends have asked me, why am I starting with a Specialization and not a Masters degree. Some simple reasons: Just as when I went to Tijuana in 2010 to do my written exam, once I got and started with the paperwork, I didn't want to let it go — If I postpone it, I will probably lose the push to do it by May-July, when the Masters admission process starts. Also, this specialization can be linked with the masters degree on the same topic given at the same campus. This program is one year long, and the masters two — But having them both takes 2.5 years. So, not such a bad deal after all. And finally, because, after such a long time without being scholarized, I fear not having an easy time getting to grips with the discipline. I can commit to overworking myself for a year — If it's too much for me, I'll just stay with that degree and give up. I expect to like it and continue... But it's also a safe bet :-)
Now, there has to be a downside to picking up this path: Of course, my free time will be harshly reduced. I have reduced my Debian involvement in the last year, as I devoted a huge chunk of my time to teaching and book-writing... This year... We shall see what happens. I can for now only confirm what I have said publicly but inside our team only: I have requested to my peers and to our DPL to step down as a DebConf chair. I love organizing DebConf, but I don't want to be formally committed to a position I just cannot fulfill as I did when I started with it. As for package maintenance, by far most of my packges are team maintained, and those that are not are relatively easy to keep track of. And of course, I'll keep an eye on my keyring-maint duties as well — Will even try to link that work with what I do at school!
Anyway, lets see what comes now!
I'm very happy: I was finally able to present a talk at a Free Software conference in Paraná, Argentina — Regina's hometown. Not only in Paraná, but at the Vieja Usina culture center, half a block away from her parents' house. So, I must doubly thank Laura: First, for letting us know there would be a Free Software conference there, and second, for taking some pictures :-}
What was this conference? Conferencia Regional de Software Libre, organized by Grupo de Usuarios de GNU/Linux de Entre Ríos (GUGLER). Of course, flying to Argentina (and more specifically, to Paraná, which is ~500Km away from the international airport) just for a one day conference was out of the question — So I gave the talk by videoconference. Of course, given we will be travelling for the December vacations to Argentina, I expect to meet in person the GUGLER guys soon.
I gave a single talk, mixing together two different topics: (my very personal take on) the Free Software philosophy and Debian's place in the Free Software universe. I had a very good time giving the talk, and while I was unable to look at my audience, I got reports saying they were happy and interested. I even got some mails from them, which makes me quite happy ;-)
Now, one of the recurring points whenever I talk about Debian: I often tell people that I cannot tell them why they should use Debian instead of other distributions. My years testing every distribution I come across are long gone, and I nowadays am familiar with Debian only. But I also tell them that personally I gain nothing by having more Debian users in the world — What I want to achieve is the next logical step: To have more people contributing to Debian. So, here is a great opportunity for interested people, specifically a group that often has a hard time finding a way to collaborate with Free Software projects.
Today, Paul Tagliamonte published a call for proposals for Debian 8 (Jessie)'s artwork. So, given many people always want to find a way to contribute to Free Software without being a coder, here's a golden opportunity. You can look at the themes sent for Debian 7 as a reference; look also at the technical requirements for your artwork, and... Well, you have until early February to work on it!
Photo CC-BY-SA PetrohsW (https://es.wikinews.org/wiki/Archivo:Dia_Debian_DF_2013_02.jpg)
Photo CC-BY-SA PetrohsW (https://es.wikinews.org/wiki/Archivo:Dia_Debian_DF_2013_07.jpg)
Photo CC-BY-SA PetrohsW (https://es.wikinews.org/wiki/Archivo:Dia_Debian_DF_2013_10.jpg)
As I slowly read my good friends wishing each other a good trip, telling they got home safely, and the IRC channels form thick drops of a bitter-sweet etheral substance, I cannot help feeling DebConf13 is over — For me as well, from the distance. Many friends gave me warm greetings, and without being there, gave me that beautiful feeling of real community that Debian has given me for ten years already, since I met in real-life many of its developers at DebConf3 in Oslo. And –yes, I have stated this far too many times– I have attended every DebConf since (and worked organizing most of them). This year, over 300 people were gathered in Switzerland to enjoy the always most intense weeks of the year.
This year, I was unable to attend due to calendar clashes. Even so, without the stress that organizers have, and thanks to the great work of the always-loved Video Team, I think I was able to be present at more sessions than at in any of the last few years. Oh, and for the readers of this blog who were not there — Do you want to follow what was presented? You can download already the videos for all of the recorded presentations (that were, due to the planned coverage and the manageable size of the Video Team, about ⅔ of the total scheduled sessions). And, as always, I was able to follow many very interesting talks and take part of a couple interesting meetings/BoF sessions. I still have a bit of catchup, partly due to the timezone difference (I was only at one of the sessions during the Swiss morning, at 02:30 local time, the pkg-ruby-extras team BoF).
Anyway... Not being there, I surely was an avid consumer of the photos posted in the DebConf13 gallery, and will surely follow it for some more time as some of you upload your pending material. It was clear from the beginning that, no matter what your definition of consensus is, the chosen venue was beautiful. A beautiful place between the lake and the mountains where our sportiest guys had a very good share of morning runs, cycling sessions, competition sports of different types, outright plain fun for attendees of all sizes and all species...
But, hey, wait! During a chat in the course of DebConf, a friend told me a bit worried that all this beauty and fun might make our dear and very important sponsors they are paying for a geek vacation, is it so? No, not at all. Not by a long stretch. And just looking at those same galleries makes it clear and obvious. After all, it's widely known that Debian is the operating system for the gurus. Simple: It's impossible to have all those geeks without getting amazing work done, in ways that even seem clichés (this last photo had Joey Hess explaining dpkg format version 3.0 (git) ideas, sketched after waking up at 3AM on the first sketching surface available to him). After all, Debian people are famous for their inclination to use any excuse to open their computers and hack away. We can find Debianers hacking in small spaces and also hacking out in the fields. But this time, people were able to hack indoors while enjoying the nature and hack outdoors under a tree. And, yes, one of the things that makes organizing DebConf worth it is, after ≈eleven months having low-bandwidth meetings over IRC, having the opportunity to plan for the next days face to face, in a relaxed but work-full environment.
Anyway, here at home I didn't sit idly just longing over them. How could I? We are just celebrating the Debian Project's 20th anniversary!
http://gwolf.org/content/jonathan-host-and-organizer-rancho-electr-nico">Jonathan, a Debian enthusiast, student at my university, and collaborator for several free software-related collectives in Mexico City, invited me to the celebration at Rancho Electrónico (which I recently mentioned in this same blog). While I was unable to stay for the whole celebration, we had a very good time; I talked about some ways on how to contribute to Debian. Although I didn't have much of a presentation prepared for it, I feel it was successful and interesting for the attendees — I just hope to start seeing some of them get into any of the ways for helping Debian soon. I also stayed as a listener and ocassional commenter for a talk on the Debian Project's history and goals, and to a presentation on a nifty electronic music programming tool called Supercollider (of course, available in Debian).
Now, "regular" life should continue. For some value of "regular".
Paying attention to another presentation at Rancho Electrónico's Debian 20th anniversary celebration
Jonathan came up with a large chunk of the organization for Debian's 20th anniversary celebration at Rancho Electrónico. Thanks!
Starting my talk at Debian's 20th anniversary at Rancho Electrónico
Starting a very improvised talk at Debian 20th anniversary party at Rancho Electrónico
So... Well, contrary to the popular sentiment in Planet Debian, this year I'm very sorry to inform that...
This is the first DebConf I miss in ten years, so... Yes, it's a big bummer for me. I'm not attending because this year, DebC(amp|onf) coincide with the two first weeks of classes at my university — And as a new teacher, I cannot afford to miss it!
Anyway, but that should not stand in the way to attend a nice Debian 20th anniversary party!
Parties will be held around the world. (Didn't find your city? Plan something and add it *now!*). In Mexico City, the nice guys at the very interesting Rancho Electrónico hackerspace took the lead, and organized the following activities:
Don't you yet know the hackerspace? You should go there! It's in a very centric location, just two blocks West from Metro San Antonio Abad (Juan Lucas Lassaga 114, col. Obrera). And the only two times I have been there, it has been good fun. Surely this Saturday we can have a nice party as well!
The planned activities are from 13:30 to 20:30. See you there!
Wouter still does not like the 3.0 (quilt) packaging format. And as he writes on his blog, I shall answer on mine.
And what if one of the blogs becomes unreachable with time? Aha! That's one of the weaknesses, Wouter, on yuor closing comment:
I have all my packages stored in git with a proper Vcs-Git: header; if people really want to look at individual patches, they can just use debcheckout, kthxbye.
I am aware this would not be so much of an argument, or so much of a change. But the way I view a shipped package is that it should, by itself, be as a snapshot with its whole, full description. Say that three years from now Apple has scrubbed your brain and you went to work with them. And you decided to pull all of your non-iOS repositories. They have convinced you working for Debian is bad for mankind. So you erase all of your Git repos, including those in Alioth or whatever.
But Debian Wheezy has some of your packages. And three years from now, I decided to be the maintainer.
So, having fully commented and individually marked patches is a sort-of-way to avoid a situation akin to the tentacles of evil.
Now, it's not that I'm criticizing your workflow. I have sen many ways to manage patches in quite a natural way, and I undestand it might be way easier when dealing with complex packages (FWIW I usually deal with very little complexity). Still, it is an argument.