My goal is to build and maintain headless stable base to deploy various services (web, mail, samba, …). The images are compiled from scratch and sometimes patched if necessary. Images are suitable for any microSD card larger than 1G and can be installed to NAND or SATA. First boot takes longer time (around 2m) than usual (25s). It regenerates SSH keys, sets your MAC address, resizes partition to fit your SD card,
finds out which is your closest and fastest packages mirror and downloads the package lists (apt-get update). It will reboot one time automatically on first boot to take effect for changes.
- Debian Wheezy 7.5 based & Debian testing (Jessie) testing
- Kernel 3.4.101 with broad hardware support, headers included
- Ethernet adapter with DHCP and SSH server ready on default port (22) with regenerated keys @ first boot
- Wireless adapter with DHCP ready but disabled (/etc/network/interfaces, WPA2: normal connect or AP mode)
- Enabled audio devices: analog, HDMI, spdif and I2S
- Advanced IR driver with RAW RX and TX (you need an IR diode)
- Bluetooth ready (working with on-board device)
- Clustering / stacking
- USB redirector - for sharing USB over TCP/IP (disabled by default /etc/init.d/rc.usbsrvd)
- root file-system auto resize
- Graphics desktop environment upgrade ready
- NAND and SATA install script included (/root)
- Disabled LED blinking, logo, boot messages (/etc/init.d/disable_led.sh, kernel.config, kernel parameters in uEnv.txt)
- Total memory is 2000Mb (disabled all memory reservations for GPU)
- Login script shows Cubietruck / Cubieboard 2 auto MOTD with current CPU temp, hard drive temp, ambient temp from Temper if exits & actual free memory
- MAC address from chip ID, manual optional
- root password=1234 and expires at first login
- sunxi-tools included: fex2bin, bin2fex, nand-part
- Performance tweaks:
- /tmp & /log = RAM, ramlog app saves logs to disk daily and on shut-down
- IO scheduler NOOP for SD, CFQ for sda (mechanical hard drive). (change in /etc/sysfs.conf)
- journal data writeback enabled. (/etc/fstab)
- commit=600 to flush data to the disk every 10 minutes (/etc/fstab)
- optimized CPU frequency scaling 480-1010Mhz with interactive governor
and small 20% overclock (/etc/init.d/cpufrequtils)
- eth0 interrupts are using dedicated core
- Allwinner Security System cryptographic accelerator
- Known bugs or limitations
- On board Bluetooth firmware loading sometime fail. Reboot helps.
- NAND install script sometime fails. Dirty but working workaround - installing Lubuntu to NAND with Phoenix tools and run the nand-install again.
- Gigabit ethernet transfer rate is around 50% of its theoretical max rate (hardware or firmware issue)
- Shutdown, reboot and battery troubles regarding poor AXP chip driver (firmware issue, probably solved in development kernel). Partially fixed.
- Due to bad PCB placement, there is some crosstalk between Wifi and VGA in certain videomodes.
Debian stable distribution (recommended)
Debian testing distribution
- Unzipped images can be written with Image Writer on Windows or with DD command in Linux/Mac (dd bs=1M if=filename.raw of=sd card device). Kernel package should be uncompressed under root user to / Change boot parameter if your old kernel has different name.
- Upgrading. Most changes are usually to kernel. Download it to / and uncompress under user root and untar with: tar xvfp sunxi_kernel_x.x.xx_mod_head_fw.tar. Change boot parameter if your old kernel has different name. For other changes please refer to script build history.
- Warning for mainline/next kernel (3.16.x). Kernel is experimental! There is no video driver – no console, no wifi, no bluetooth, … boot manager experimental too. Use on your own risk.
Cross compile environment
If you want to compile your own image or kernel for Cubieboards you will need to set-up development environment. Since there are troubles regarding the proper compiler I suggest you to use proven configuration. This image / kernel was successfully compiled on Ubuntu 12.04 LTS x64 – you are going to need server image and 15-20G of space. Install only basic system and get build script from Github.
- Download Ubuntu 12.04 LTS x64
- Create Virtual machine with 15-20G
- Install minimal system and execute the following code
sudo apt-get -y install git
git clone https://github.com/igorpecovnik/Cubietruck-Debian
chmod +x ./Cubietruck-Debian/build.sh
Edit configuration at the beginning of the script and run it afterwards. The compilation takes 30-60 minutes (on average desktop PC) and you might be asked for some input. Your will find compiled images in the directory defined in variable DEST/output. In case of success you will find zip compressed images for VGA/HDMI and kernel with modules and headers.
keyboard: dpkg-reconfigure keyboard-configuration
system language: dpkg-reconfigure locales
time zone: dpkg-reconfigure tzdata
screen resolution: edit /boot/uEnv.txt and change it/reboot.
If you want to try a semi simple desktop environment:
apt-get -y install xorg
apt-get -y install lightdm
apt-get -y install xfce4 xfce4-goodies tango-icon-theme gnome-icon-theme
Check this site for others.
You can post questions below or in the project topic on the Cubieforums.