Installing debian on the 96boards poplar board

OK, I’ve received my 96Boards Poplar board. It comes with Android 5 pre-installed, and that’s not what I plan to use. I’d like to use Debian Linux instead to tinker a bit more with it.

The documentation is a bit hairy, and I was unable to directly install the Debian files on it so here are my notes to avoid other poplar beginners waste time.

  • Build Debian from sources as described in the documentation, steps 1..6
  • If you’re using Archlinux, then configure the TFTP server “tftp-hpa” and not “atftp” as this one has a limitation in the BLKSIZE and it simply serves truncated image files! And if you’ve disabled IPv6 on your Archlinux box, then add the -4 option to it’s options in the file /etc/conf.d/tftpd file

    TFTPD_ARGS=”–secure /srv/tftp/ -4″

  • Step 7 now becomes:

    cd ${TOP}/recovery
    sudo rm -rf /srv/tftp/recovery_files
    sudo cp -a recovery_files /srv/tftp
    sudo chown -R root:root /srv/tftp/recovery_files

  • The next steps about flashing the image won’t work. Or at least I was unable to make the board stop to the poplar# prompt as described there. Instead, use the USB stick method, but please use the prebuilt fastboot.bin and not the one you just built.Follow the Building recovery media instructions, only at “step 3: copy fastboot.bin” just copy the one downloaded from here
  • Now insert the stick in one of those 2 stacked USB ports, press the “usb_boot” switch and turn-on the board. Be vigilant to press a key when prompted in the `screen` terminal you’ve already started. If the board was already on, them press the “usb_boot” and while holding it depressed, press the “reset” button and keep the “usb_boot” depressed another second or two. Keep an eye on the screen terminal and press the key to interrupt the boot when prompted.
  • Now follow their instructions to flash Debian via TFTP and… have fun!

KMail, Akonadi and MariaDB on ArchLinux

ArchLinux recently switched to MariaDB. After the complete system update, followed by the usual full recompile of Qt4 and KDE4, my KMail2 setup became unstable. While reading mails was still possible, I experienced lags when switching from one folder to another (“please wait while retrieving message contents”) and, more problematic, sending mails worked very¬†randomly.¬† I used the akonadi server configuration tool and it’s “test” feature to check my setup and then, surprise, I got errors with my database. OK, I thought, it’s time now to restart with a fresh home directory, as mine has several years, and configuration from previous setups was left, along my switch to ArchLinux then to custom compiled KDE4.

But with the new, fresh home directory, the “test” function still showed errors:

130605 0:10:50 InnoDB: The InnoDB memory heap is disabled
130605 0:10:50 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130605 0:10:50 InnoDB: Compressed tables use zlib 1.2.7
130605 0:10:50 InnoDB: Initializing buffer pool, size = 80.0M
130605 0:10:50 InnoDB: Completed initialization of buffer pool
130605 0:10:50 InnoDB: highest supported file format is Barracuda.
130605 0:10:50 InnoDB: Waiting for the background threads to start
130605 0:10:51 Percona XtraDB (http://www.percona.com) 5.5.30-MariaDB-30.1 started; log sequence number 2612486
130605 0:10:51 [Warning] Can't open and lock time zone table: Table 'mysql.time_zone_leap_second' doesn't exist trying to live without them
130605 0:10:51 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
130605 0:10:51 [ERROR] Native table 'performance_schema'.'events_waits_current' has the wrong structure
130605 0:10:51 [ERROR] Native table 'performance_schema'.'events_waits_history' has the wrong structure
130605 0:10:51 [ERROR] Native table 'performance_schema'.'events_waits_history_long' has the wrong structure
130605 0:10:51 [ERROR] Native table 'performance_schema'.'setup_consumers' has the wrong structure
130605 0:10:51 [ERROR] Native table 'performance_schema'.'setup_instruments' has the wrong structure
130605 0:10:51 [ERROR] Native table 'performance_schema'.'setup_timers' has the wrong structure
130605 0:10:51 [ERROR] Native table 'performance_schema'.'performance_timers' has the wrong structure
130605 0:10:51 [ERROR] Native table 'performance_schema'.'threads' has the wrong structure
130605 0:10:51 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_thread_by_event_name' has the wrong structure
130605 0:10:51 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_instance' has the wrong structure
130605 0:10:51 [ERROR] Native table 'performance_schema'.'events_waits_summary_global_by_event_name' has the wrong structure
130605 0:10:51 [ERROR] Native table 'performance_schema'.'file_summary_by_event_name' has the wrong structure
130605 0:10:51 [ERROR] Native table 'performance_schema'.'file_summary_by_instance' has the wrong structure
130605 0:10:51 [ERROR] Native table 'performance_schema'.'mutex_instances' has the wrong structure
130605 0:10:51 [ERROR] Native table 'performance_schema'.'rwlock_instances' has the wrong structure
130605 0:10:51 [ERROR] Native table 'performance_schema'.'cond_instances' has the wrong structure
130605 0:10:51 [ERROR] Native table 'performance_schema'.'file_instances' has the wrong structure
130605 0:10:51 [Note] /usr/bin/mysqld: ready for connections.
Version: '5.5.30-MariaDB' socket: '/home/valentin/.local/share/akonadi/socket-zx.rusu.info/mysql.socket' port: 0 Source distribution

The problem was solved by switching to the external MySQL (more precisely, it’s MariaDB) server I happen to run on the same system. I created a new “akonadi” database, granted full rights to a dedicated “akonadi” user. I also cleared the “options” field, that for an obscure reason specifies a socket connection and now I’m back to a stable configuration after starting the akonadi server.

Oh, I also needed to do the following adjustments:

  • Remove then recreate the local folders, as my previous configuration stored mails in a KMail folder
    • In fact, KMail forced me to do that, as it crashed after the switch to the new database with these errors
kontact(17733)/libakonadi Akonadi::SpecialCollectionsRequestJob::slotResult: Failed SpecialCollectionsRequestJob::slotResult "Failed to fetch the resource collection." 
kontact(17733) MailCommon::Kernel::emergencyExit: "The Email program encountered a fatal error and will terminate now.
The error was:
Failed to fetch the resource collection."
  • Remove then recreate the “mail dispatcher agent” in akonadi console
  • Reconfigure the folders
    • Now, all my old messages are shown as unread, but that’s not really a problem
  • Reconfigure mail filters
    • That’s because removing the local folders left the rules without target folders
  • Reconfigure folder expiration rules

A final word about the performance of KMail. It seems to me that it’s now a lot more responsive. The application is now really fast displaying my mails, be it on my IMAP server or into the local folders. Congrats to the PIM team!