Cubietruck

Cubieboard / Cubietruck Debian SD image

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 and downloads the package lists (apt-get update). It will reboot one time automatically on first boot to take effect for changes.

  • Debian Wheezy, Jessie or Ubuntu Trusty based
  • Kernel 3.4.106 with broad hardware support, headers and some firmware included
  • Build ready – possible to compile external modules. Successfully tested with this wireless adapter
  • 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 (disabled by default / you need an IR diode)
  • PWM ready on pin PB2 (Cubietruck)
  • Bluetooth ready (working with on-board device / disabled by default – insserv brcm40183-patch)
  • I2C ready and tested with small 16×2 LCD. Basic i2c tools included.
  • SPI ready and tested with ILI9341 based 2.4″ TFT LCD display.
  • Drivers for small TFT LCD display modules.
  • 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, SATA and USB install script included (/root)
  • Disabled LED blinking, logo, boot messages (/etc/init.d/disable_led.sh, kernel.config, kernel parameters in boot script)
  • Total memory is 2000Mb (disabled all memory reservations for GPU)
  • Serial console enabled
  • Enabled automatic security updating
  • Login script shows Cubietruck / Cubieboard 2 auto MOTD with current PMU 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 (ramlog is only in Wheezy, others have 2nd best solution: busybox-syslogd)
    • 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 (/etc/init.d/cpufrequtils)
    • eth0 interrupts are using dedicated core
  • Known bugs or limitations
    • Some drivers compile successfully some breaks with fatal error.
    • On board Bluetooth firmware loading sometime fail. Reboot helps. Better solution is under development.
    • NAND install script sometime fails. Dirty but working workaround – installing Lubuntu to NAND with Phoenix tools and run the nand-install again. Better solution is under development.
    • Gigabit ethernet transfer rate is around 50% of its theoretical max rate (hardware or firmware issue)
    • Proper shutdown only if powered with power socket.
    • Due to bad PCB placement, there is some crosstalk between Wifi and VGA in certain videomodes.
    • No serial console under Jessie
Cubieboard 2
 

Debian Wheezy is recommended download. It’s rock stable, most tested and supported. Jessie and Ubuntu Trusty is for people who wants to go with the flow. Both should be fully operational but not recommended for beginners and/or services deployment. Your donations keeps this development alive. Thank you!

  • Debian Wheezy, Jessie or Ubuntu Trusty based
  • Kernel 3.19.0 with basic hardware support, headers and some firmware included
  • Build ready – possible to compile external modules. Successfully tested with this wireless adapter
  • Ethernet adapter with DHCP and SSH server ready on default port (22) with regenerated keys @ first boot
  • Wireless adapter with DHCP ready but not configured (/etc/network/interfaces, WPA2: normal connect or AP mode) (Cubietruck only)
  • Bluetooth ready
  • root file-system auto resize
  • SATA and USB install script included (/root)
  • Total memory is 2000Mb
  • Serial console enabled
  • Enabled automatic security updating
  • Login script shows Cubietruck / Cubieboard 2 auto MOTD with 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 (ramlog is only in Wheezy, others have 2nd best solution: busybox-syslogd)
    • 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)
    • eth0 interrupts are using dedicated core
  • Known bugs or limitations
    • Some drivers compile successfully some breaks with fatal error
    • No serial console under Jessie
    • USB install fails
    • AP mode not usable (brcmfmac bug?)
    • No NAND driver
Cubieboard 2
 

Debian Wheezy is recommended download. It’s rock stable, most tested and supported. Jessie and Ubuntu Trusty is for people who wants to go with the flow. Both should be fully operational but not recommended for beginners and/or services deployment. Your donations keeps this development alive. Thank you!

Unzipped images can be written with supplied imagewriter.exe on Windows XP/2003/Win7 or with DD command in Linux/Mac (dd bs=1M if=filename.raw of=sd card device). Kernel can be updated only manual way and if you run newer version of image (kernel is packed as vmlinuz). Download a tar pack below, unpack and install all .deb files. If the numbers / name of kernel is different than your current one, you only need to alter boot script (boot.cmd / boot-next.cmd). When you match the name and numbers with the new kernel you need to convert that .cmd file to boot.scr with: mkimage -C none -A arm -T script -d boot.cmd boot.scr and reboot.
Developers:

Kernel 3.4.106 .deb – compiled 28.2.2015 Kernel 3.19.0 .deb – compiled 16.3.2015 Build script Report issue

Mainline kernel is possible to unpack over or use side by side with old kernel. You only need to adjust boot scripts and reboot.


v3.3 / 28.2.2015
v3.2 / 24.1.2015
v3.1 / 16.1.2015
v3.0 / 29.12.2014
v2.9 / 3.12.2014
v2.8 / 17.10.2014
v2.7 / 1.10.2014
v2.6 / 22.8.2014
v2.5 / 2.8.2014
v2.4 / 11.7.2014
v2.3 / 2.7.2014
v2.2 / 26.6.2014
v2.1 / 13.6.2014
v2.0 / 2.6.2014
v1.9 / 27.4.2014
v1.8 / 27.3.2014
v1.7 / 26.2.2014
v1.6 / 9.2.2014
v1.52 / 7.2.2014
v1.5 / 22.1.2014
v1.4 / 12.1.2014
v1.3 / 3.1.2014
v1.23 / 1.1.2014
v1.2 / 26.12.2013
v1.0 / 24.12.2013

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 14.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.

  1. Download Ubuntu 14.04 LTS x64
  2. Create Virtual machine with 15-20G
  3. Install minimal system and execute the following code
sudo apt-get -y install git
cd ~
git clone https://github.com/igorpecovnik/Cubietruck-Debian
chmod +x ./Cubietruck-Debian/build.sh
cd ./Cubietruck-Debian

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.

Optional customization

keyboard: apt-get install console-setup console-data && dpkg-reconfigure keyboard-configuration
system language: dpkg-reconfigure locales
time zone: dpkg-reconfigure tzdata
screen resolution: edit /boot/uEnv.txt and change it/reboot.

Desktop

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
reboot

Check this site for others.

Support

You can post questions below or in the project topic on the Cubieforums.

989 thoughts on “Cubieboard / Cubietruck Debian SD image

  1. Hey Igor,
    first let me thank you for your great work on the image. After having some issues with “alarm” I switched to your Debian image.

    Unfortunately, I’m missing “cedar_dev” under “/dev” with the latest “3.4.106-cubieboard ” to make use of hardware-accelerated video playback. Any chance you’ll integrate it someday or do I miss something?

    1. You need to enable video memory reservation in kernel boot configuration files (edit /boot/boot.cmd and convert to boot.scr – check kernel upgrade manual above) and than cedar will become available.

  2. Igor, did you have any clues concerning the problem with booting Linux from sdcard makes the nand inoperative and erases the Android that is there?
    _____________
    (previous post)
    3.3 k3.19
    – linux boots ok, android boots ok
    3.3 k3.4.106
    – linux boots ok, shutdown, take off sdcard. boot and nothing only one red light on board, no android any more.
    (in linux blkid only shows the sdcard partition)
    I’m not the only one with this problem…
    https://groups.google.com/forum/#!topic/cubieboard/sWi0lN6c_MU
    Any idea?

    1. No idea, but it should not erase Android on NAND if you boot Linux from SD card! If you run my nand-install script and if you choose install to NAND than of course it nukes NAND. What about if you power off the board completely? Maybe NAND just hangs and it doesn’t reset properly?

  3. The kernel-only downloads only include cubieboard kernels, could you also add the cubietruck kernels as separate downloads? Thanks! :-)

    1. All cubieboards share the same kernel, difference is in boot loader and board configuration files / device tree blobs.

    2. I have Cubieboard2 with 3.2 Wheezy 3.19.0 image.
      Everything works fine until I install KDE/KDM. When KDM starts there is no keyboard or mouse. If I ssh to cubie there is no ‘/dev/input/event*’ files. When I plug keyboard an entry appears to ‘/proc/bus/input/devices’ file though.

      ‘lsusb’ also gives me keyboard and mouse, but when running ‘usbhid-dump’ nothing happens when I move mouse.

      I installed KDE with ‘aptitude install ~t^desktop$ ~t^kde-desktop$’
      If I remove KDM with ‘update-rc.d -f kdm remove’ and reboot, keyboard is working again..

      I have also cubieboard1 (a10 based) with ‘cubian-desktop-r1-a10.img’ and it works.
      Difference between those two boards is that a10 creates ‘/dev/input/event*’ files when pluggin in keyboard or mouse. When I plug keyboard or mouse to a20, it creates entry to ‘/proc/bus/input/devices’ file, but no ‘/dev/input’ is created::?

      What could be the problem? I’m stuck with this…

      1. Try with latest 3.19.2 kernel, use the one from Olimex, see details for kernel change procedure. Note that 3.19.x is development and many things are not working yet. BTW, few days ago I installed full featured Gnome desktop to Olimex Lime with kernel 3.4.109 + wheezy and it was working fine.

          1. Yes, it can be used. This might not be true for other / official kernels. With mine you only need to adjust kernel boot script. Use general instructions above in the text. All boards use same procedure.

  4. Hello Igor,

    i tried to install your Wheezy with Kernel 3.4.106 on a CB2.
    Boots stucks with a progress bar shown on HDMI. Bar shows no progress at approx. 25%
    Green LED is flashing.
    Wheezy with Kernel 3.19.0 works fine.
    Found a post that suggests resetting some registers in PMU, but no hint how to do it.

    Greetings from Crete

        1. Yes, gpio modules are build, I am using them. What error do you get? Since I am not using exact build I need to double check but I can’t do that before next week. Try to use kernel for Olimex Lime, it’s the same.

          1. root@cubietruck:/# echo 8 > /sys/class/gpio/export
            bash: echo: write error: Invalid argument
            root@cubietruck:/# ls /sys/class/gpio
            export gpiochip1 unexport
            root@cubietruck:/# ls -l /sys/class/gpio
            total 0
            –w——- 1 root root 4096 Mar 23 21:25 export
            lrwxrwxrwx 1 root root 0 Jan 1 2010 gpiochip1 -> ../../devices/platform/gpio-sunxi/gpio/gpiochip1
            –w——- 1 root root 4096 Jan 1 2010 unexport
            root@cubietruck:/# lsmod | grep gpio_sunxi
            root@cubietruck:/# insmod gpio_sunxi
            insmod: ERROR: could not load module gpio_sunxi: No such file or directory
            root@cubietruck:/# find / -name gpio_sunxi*

  5. I think i am running into similar problems as JotaMG posted on 17. March, 2015 at 15:26.
    Try to install your Wheezy for Cubieboard 2 with Kernel 3.4.106.
    Boot stucks with green bar on screen. Green LED flashing. No progress on bar.
    Yuri replied on above post “….need to reset it with i2c-tool according with doc”. What doc?
    Link would be helpful.

  6. Dear Igor,
    thank yu very much for your awesome work!

    I am trying to get Debian running with LUKS on my cubietruck. I didn’t manage to install/create the necessary initramfs for this. Now I try to run the regular Debian installer to start from scratch.

    1) Any plans to include an initramfs in the future? I would *love* to stick to your image, with all those helpful tweaks.

    2) Initially, did you start creating your image with the regular Debian installer? I can’t get it to work, as the Sunxi boot-SD-image uses a different kernel than what is available on the Debian repos, so the Debian installer can’t load kernel modules.

    Thank you for all you do for the DIY and Debian community!

    1. Thanks ;) 1. Yes, initrd is in the plan. I already try but failed & need to research more. 2. No, I don’t use official Debian installer. I would need some rework to add such installation approach. I see no urgency in that.

    2. ..sometimes suddenly all pieces magically fall into place! I found (my) solution, to have the regular Debian installer do its thing on a Cubietruck:

      ####################

      For now the easiest way to install on the Cubietruck is using the
      USB-based “hd-media style” installer as described in
      https://wiki.debian.org/InstallingDebianOn/Allwinner#Installing_from_a_USB_stick:

      a) create an SD card with u-boot from
      http://d-i.debian.org/daily-images/armhf/20150322-00:30/u-boot/Cubietruck/Cubietruck.sdcard.img.gz
      as described at
      https://wiki.debian.org/InstallingDebianOn/Allwinner#Creating_a_bootable_SD-Card_with_u-boot

      b) Unpack the tarball at
      http://d-i.debian.org/daily-images/armhf/daily/hd-media/hd-media.tar.gz
      onto a FAT16/FAT32/ext2/ext3/ext4-formatted USB stick and copy the
      CD ISO image from
      http://cdimage.debian.org/cdimage/weekly-builds/armhf/iso-cd/debian-testing-armhf-CD-1.iso
      onto the USB stick as well.

      c) Plug both the SD card and the USB stick into your Cubietruck and
      power the system on. This will load u-boot from the SD card, which
      will then check for a boot script on the USB stick and load the
      installer from the stick.

      Please note that you need a serial console cable for this; the u-boot
      version in Debian does not have support for a graphical console on
      HDMI.

      ####################

      Thank you again, Karsten, from the Debian-arm mailinglist!

  7. Hello, i`m trying to put your images on the usd card to boot them on a cubietruck but it seems that none of them are working for the moment , i`m getting an error related to the environment and then for Kernel 3.19.0 it stays just like that blocked but for Kernel 3.4.106 it gives the same error and than it restarts in a loop, i`m using wheezy as flavour, any other ideas ? thanks.

  8. Hello,

    I installed the 3.2 Wheezy Edition. Run into troubles when I activate WiFi. So I’d like to update to 3.3 (Bugfixes: CT wireless works in all kernels). How can I do that? Do I have to reinstall the whole System?
    Sorry, I’m new on this (Linux)

    thx+regards
    Miro

    1. The problem is firmware path. Go to /lib/firmware You will see some sub directory callled 3.4.106-cubitruck or similar. Go inside that dir and copy directory ap6210 to /lib/firmware with those commands: cp -R ap6210 /lib/firmware and reboot. I think that’s all.

  9. Hi!
    I’ve installed to SD card and it works ok on my CT, but then when I remove the card the Android (android-ct-nand-hdmi&vga-v3.0.img) that was on the nand does not boot anymore, it only shows something like a progress bar.
    What did I do wrong?
    I want to have debian on sdcard and android on nand, is it possible??
    Thanks!

    1. Of course it’s possible. Just don’t install my Debian to/over the NAND and your Android or whatever is on the NAND should be fine. Maybe you need to power off / power on system change?

      1. No I did not install your image on the nand.
        Just write it to the sdcard and reboot the CT with the sdcard on, debian works ok.
        Then, shutdown CT remove sdcard, power on, and no more Android anymore, just a progress bar!

        I don’t know if it has something to do, but apparently it all happens after a install of your image 2.6 to nand, some months ago.
        After that re-flashed Android to the nand, but the problem begins, every time I insert a sdcard and boot a linux image (others images too) after that CT can not boot anymore the android on the nand when the sdcard is not present.

        1. Oh, that’s odd. If you have time check if this also happen with new kernel (3.19.0) based images. Even if there was something on the NAND and you re-flash it with Phoenix suite it should be completely overwritten.

            1. Kernel 3.19 changes defaults of registers 32-34 in pmu , while other kernels not.
              so need to reset it with i2c-tool according with doc. Please try.

  10. Nice thing to compile, but some things would be fine.

    Propably an error: SDSIZE, in /lib/configuration.sh is a fixed value which overwrites the value of build.sh

    I miss an option to select additional packages without changing /lib/common.sh.
    And an option to use a personal .config for the kernel without using the selection menu just via value in build.sh. Both personal setting will be killed if I make a new build after a while because of new files the repository.

    Another idea would be an installer for crypted root with unlocking via ssh and including virtualisation in the kernel (>3.9). But maybe that is to much wishes.

    The rest is nearly perfect running, a big thank to you Igor.

  11. I am still interested in a version of the excellent images for the cubieboard 1! Is there a chance for that? Am I the only one how uses the CB1, who is interested in the Version for CB1?

  12. Hello Igor,

    do you test 4.0-rcX?
    Aren’t there many improvments from sunxi inside?
    Whats your rating about this?

    Regards,
    godac

  13. I get an tempfs error (denied because of files are in use) at boot when I plug in the battery. Can anyone confirm this?

  14. Hi Igor,

    do your kernel update instructions also apply for systems installed to NAND?

    On my SD-Card all the files you mention are indeed present in the /boot-Directory the kernel seems to be packed as vmlinuz.

    However, on my NAND-Memory (installed from the SD-Card mentioned above) the /boot-Directory contains the following files/folders:
    -rwxr-xr-x 1 root root 117K Nov 18 13:03 boot.axf
    -rwxr-xr-x 1 root root 106 Nov 18 13:03 boot.ini
    drwxr-xr-x 2 root root 2.0K Nov 18 13:09 linux
    -rwxr-xr-x 1 root root 512 Jan 1 1980 magic.bin
    -rwxr-xr-x 1 root root 46K Mar 2 00:43 script.bin
    -rwxr-xr-x 1 root root 282 Nov 18 12:53 uEnv.txt
    -rwxr-xr-x 1 root root 5.3M Mar 2 00:43 uImage

    Somehow I have the feeling that future updates to newer kernels based on vmlinuz will not work flawlessly on my NAND-System.

    1. Hi Marcel,

      I had the same content in my /boot-directory on my NAND-memory and the problem how to update the kernel with Igor’s new kernel package. The boot.axf is the NAND-bootloader of the cubietruck which loads u-boot.bin as a general bootloader that is contained in /boot/linux. u-boot.bin finally loads the kernel-image uImage.

      Igor gives us a new vmlinuz image in his kernel package which has to be converted in an uImage image in our case. I’ve outlined the conversion process that worked for me in my post of March 3.

  15. Hello Igor,
    I’m trying to use your Wheezy image with kernel 3.19.0. There is one thing which I need to be completely satisfied and it is kernel module for DVB-T card with RTL2832. It should be in kernel since 3.10. Can you give me hint how to compile it?

    Thanks for your help,
    Jirka

  16. Hi, before I’ll try Thomas’ procedure ((3. March, 2015 at 23:18) I’m very nervous, would it be safe?)) I want to ask for an other way:

    Could it be possible to
    perform a clean installation with v 3.3.-image,
    install the software (postfix, dovecot, amavis, apache etc) via apt-get,
    replace all the files in /etc with the ones from v 3.2
    and reboot?

    1. Yes, but never start doing such operations without a full backup :) I have done similar procedure many times. Successfully. Remember to transfer server and user data too which is scattered around. SQL tables, mails, WEBs, … If you are running ISPconfig than you need to backup certificates which are somewhere in /usr/local/ispconfig/ … You are running 3.2 which you already transfer to NAND. Yes, Thomas procedure looks o.k. Why do you want to upgrade to 3.3? There is no much diff.

  17. Hello Igor,

    First of all i want to thank you for your work. Awesome image.
    I wanted to ask how to run the IR transmitter and whether there are any and if there is any manuals for starting to transmit IR signal.

    Thanks for your support

  18. Hi Igor, I’ve been reviewing ur scripts as to the sources used. Seems u suggest pulling Linux from dan-and, which is forked from patrickhwood, which is forked from sunxi. Why is that? Isn’t sunxi closer to Torvalds mainline?

    1. I think this repository is actually closer to mainline. It’s updated quicker / more frequently. We are using separate branch because it’s easier to update if it’s used by a small number of people. I would say our branch – I am also pushing patches time to time – has some extended functionality compared to sunxi. It’s also better that few people and not just one is working on this.

      1. Understood. So what are key patches from mainline arm7hf? Presumably drivers, firmware and bug fixes, right? Anything making it back from any of the forks? Surely the Chinese won’t and will mostly generate bugs and chaos. Thanks for hard work

  19. Hi Igor, Thank you for this image it is really great to see working mainline kernel on A20. I tried it on my new pcDuino 3 nano (it has hw simillar to cubietruck but without bluetooth and wifi) and it is working but there is some major problem with network interface (1Gb/s lan) it is correctly recognized an i was also able get dhcp ip and install xfce4 thanks for it ;-) but when i want to access it from outside through ssh i cant – after while of waiting i get write failed: broken pipe. I was also able to install webmin but i cannot connect to its webinterface – timeout. What is really strange is that from pcduino itself it can do ping to IPs on my network can download things from internet with apt-get and wget without a problem. I also disabled iptables but it didnt help. What else can be the problem – maybe the LAN driver is not Ok?

    1. I think you need to use Banana PI image and / or perhaps the dedicated FEX file. The symptoms are the same if you use Cubieboard image on Banana without patching the LAN driver. Check comments – there was debate on this. Here or under Banana.

  20. Hi Igor,
    I’d like to donate but I don’t use Paypal. Is there any other way to support your excellent work?
    Regards, Tilmann

      1. Thanks – this is my a Bitcoin address: 17vT6hV83EQ6rizbWeasfy1tWEzFpzYqEE but I guess this is even more odd than PayPal :)

  21. Hello Igor Pecovnik, my name is Cleiton I’m from Brazil and first I want to thanks to share with community your great work, your cubieboard customizations are great, thanks a lot for that.

    I would like to report a bit bug: Your last image based on Kernel 3.4.106 Wheezy to CubieBoard 2 is missing disable_led.sh script.

  22. Dear Igor,
    I’ve downloaded the tar-File of the new Kernel 3.4.106 and see, there are four deb-Packages in it. (Firmware, Kernel-Headers, Kernel-Image and libc-dev) But now I’m faced with the problem, how to update the Kernel with these deb-Packages. I assume, to install them with dpkg -i * is not enough.

    The directory /boot is located in the nand-memory of my Cubietruck-board and the root-Filesystem is located on a connected SATA-disk.

    Thanks in advance for your support.

    1. Please let me add a remark: Surely I’ve read your instruction of Feb. 19, 20:21, and the post of Tilmann from today, 15:48, but there is neither a file boot.cmd nor the file boot.src in my /boot directory.

      Thomas

        1. I installed your version 3.2 of Debian Wheezy with kernel 3.4.105 at the end of January. In my /boot directory there are among other files uImage, uEnv.txt, magic.bin and script.bin.

          1. The same in my case. How can i update without erasing everything? My v3.2/24.1.2015-system works fine as mail- and file server and i won’t start at the scratch.

            1. Here is how I succeeded with the installation of the 3.4.106 kernel:
              First step: Installation of the firmware-, headers-, image- and libc-dev-file with dpkg -i.
              Second step: Copy the vmlinuz-file to /tmp.
              Third step: mkimage -l /boot/uImage to read data from 3.4.105 kernel.
              Fourth step (in /tmp): od -A d -t x1 vmlinuz-… | grep ‘1f 8b 08 00′ — 17408+4->17412.
              Fifth step: dd if=vmlinuz-… bs=1 skip=17412 | zcat > vmlinux.
              Sixth step: gzip -v9 vmlinux -> vmlinux.gz
              Seventh step: mkimage -A arm -O linux -T kernel -C gzip -a 0x40008000 -e 0x40008000 -n ‘Linux kernel’ -d vmlinux.gz uImage.
              Eighth step: Copy new generated uImage back from /tmp to /boot.
              Nineth step: Reboot, hope and pray …

  23. Hi Igor,

    I would like to use your 3.19 image and install it on NAND. Is it possible for me to tweak the firstboot script and directly call the NAND installation script right after its first time boot?

    Thank you for your great image!

  24. Is it possibe to download 3.4.106-cubieboard-default.tar, untar it and install the deb-files using dpkg -i within v3.2/24.1.2015?
    Or is there an oher way to update without erasing the previous installation?

    1. Hi,
      I installed the new v3.3 packages like this:
      1. Purge 2 of the old packages (conflicting files due to new package names): linux-firmware-image-3.4.105-cubieboard, linux-headers-3.4.105-cubieboard
      2. Install the 4 new packages: linux-firmware-image-3.4.106-cubieboard_3.3_armhf.deb linux-headers-3.4.106-cubieboard_3.3_armhf.deb linux-image-3.4.106-cubieboard_3.3_armhf.deb linux-libc-dev_3.3_armhf.deb
      3. Edit /boot/boot.cmd (new kernel image) and create new /boot/boot.scr
      4. Reboot.
      5. No problems so far.
      6. (optional): Purge package linux-image-3.4.105-cubieboard
      Regards, Tilmann

      1. Hi, thanks for your reply.
        > 1. Purge 2 of the old packages (conflicting files due to new
        > package names): linux-firmware-image-3.4.105-cubieboard,
        > linux-headers-3.4.105-cubieboard
        apt-get purge linux-firmware-image-3.4.105-cubieboard and
        apt-get purge linux-headers-3.4.105-cubieboard?

        > 2. Install the 4 new packages:
        dpkg -i linux-firmware-image-3.4.106-cubieboard_3.3_armhf.deb and so on?
        > Edit /boot/boot.cmd (new kernel image) and create new
        > /boot/boot.scr
        These files are not in my folder /boot

        1. Hi,
          “apt-get purge” or “dpkg -P” are both ok for purging. But you need not purge these 2 packages from v3.2 because all the files are in directories named sth. like “3.4.105-cubieboard” (only in the new package linux-firmware-image-3.4.106-cubieboard_3.3_armhf.deb the files are in “lib/firmware/” (without the kernel version in the name) – I was in error there). “dpkg -i” is ok for installation. “/boot/boot.cmd” is not in one of the packages, I found it in my v3.2 installation. Here are its original contents:

          setenv bootargs console=tty1 root=/dev/mmcblk0p1 rootwait sunxi_ve_mem_reserve=0 sunxi_g2d_mem_reserve=0 sunxi_no_mali_mem_reserve sunxi_fb_mem_reserve=16 hdmi.audio=EDID:0 disp.screen0_output_mode=EDID:1280x720p60 panic=10 consoleblank=0
          ext4load mmc 0 0x43000000 /boot/cubietruck.bin
          ext4load mmc 0 0x48000000 /boot/vmlinuz-3.4.105-cubieboard
          bootz 0x48000000

          Create “boot.scr”: https://github.com/linux-sunxi/u-boot-sunxi/wiki#bootscr-support

          1. Hi Tilmann, thanks for your reply. There is no boot.cmd in my folder:
            root@zeus:/boot# la -a
            . .. boot.axf boot.ini linux magic.bin script.bin uEnv.txt uImage

            Strange …

  25. Hi
    When I enable csi1 in debian Wheezy for cubietruck (3.4.105) the following errors occur

    [CSI]Welcome to CSI driver
    [CSI]csi_init
    [CSI]registered sub device,input_num = 0
    [CSI]V4L2 device registered as video1
    [ccu-err] clk_enable: invalid handle
    [CSI]sensor initial success when csi open!
    [ccu-err] clk_disable: invalid handle

    how can i fix it?

    thanks in advance

  26. Dear Igor,

    is it possible to add ftdi drivers for usb2serial support? If yes, how to do this?
    i was not able to add the right drivers until now.

    Thanks in advance.

      1. Dear Igor,
        thanks, for your prompt reply.
        I just try to compile an image.

        Could you please add it also to the Ubuntu images with one of your next releases.

  27. Hi,

    i used the 2nd image and can’t get cifs working
    “mount error: cifs filesystem not supported by the system”

    Is their any chance to fix it?

  28. Help!
    I loaded the debian wheezy to the SD card, run the nand-sata-Script. Run it after reboot again.
    But as it could be, it doesnt boot from nand after removing SD card.
    Even if the two Partitions were created and some files are in there.
    Did I forgot something so far?

    The next Problem is that none of my PCs (Xubuntu,Win7,Win8) can flash with Phoenix tools.
    Win8 & Win7 ignore the truck, xubuntu cant bring up the suit.

    Any idea what i can do to get anything to run. Can I somehow check if the files in nand are correct? What does the phoenix tools do, so that after flashing it will (hopefully) work?

    1. Steven recently found a solution for fixing NAND boot without a need for Phoenix tools but I haven’t tested yet. This is also the answer what those tools do :) + partitioning and installing the system. Why PT don’t see your CT – I assume you read the manual? – hard to say.

  29. Hi, Igor
    i ‘m using trusty & kernel 105 & have a problem . sd card not resize(expand) on first boot and when i try to resize it , it ‘s not work ! my cmd is : resize2fs /dev/mmcblk0p1
    another question is can i remove old kernel & boot files after add new kernel (dpkg -i *.deb) ? how ?

    thanks for answer,

  30. Hi Igor.

    Here in Brazil, working with IP telephony platform Asterisk.

    Today I work with Raspberry PI, use the image available in http://www.raspberry-asterisk.org project site.

    I’m auditioning cubiboard 3, I downloaded the version of your img.

    I’m installing Asterisk 11 + Freepbx, I wonder if the possibility of generating a ja img with “Debian, Asterisk and Freepbx”?

    Leomar Soares

    1. I’m just about to try one of these great images on my to new Cubietruck to run FreeSwitch and FusionPBX in high availability mode using postgres multimaster replication. Keep your eye on the forums on that site, there’e nothing there yet but I will post how I get along.

  31. I built the kernel with necessary options. Now I have
    linux-firmware-image-3.4.106-cubietruck_3.2_armhf.deb
    linux-headers-3.4.106-cubietruck_3.2_armhf.deb
    linux-image-3.4.106-cubietruck_3.2_armhf.deb
    linux-libc-dev_3.2_armhf.deb

    How can I make uImage file from it?

    1. I don’t use uImage kernel type anymore – it’s possible to convert it but probably that’s not the case here? If you use my image you only need to install all those .deb files with: dpkg -i *.deb as root user. Than you need to alter boot.scr (change the version number or a name of kernel file) by editing boot.cmd and converting it to .scr with: mkimage -C none -A arm -T script -d boot.cmd boot.scr (they are located in /boot). Sorry because this part is not automated yet.

      1. I’m sorry, forgot to mention. I’m running on nand.
        I guess I should use debootstrap and chroot, install those deb packages and create uImage with mkimage.
        Any simpler way?

        1. Install deb packages (you can download my build above) on your live system than you need to convert /boot/vmlinuz* to uImage & copy this file to the first nand partition. I think this is all and reboot. Backup previous kernel before that you will be able to restore if this fails.

  32. I would like to add a RTL8192DU wireless driver when compile the image. What is the best way to do it? Thank you for your help.

    1. You mean that it will become a permanent part of kernel tree? Does this driver works well if you compile the usual way?

        1. Yes and no. First try compiling the driver with supplied headers which are in /usr/src/ … it’s better to avoid kernel compilation if not absolutely necessary.

  33. installed wheezy with your 109.rc5 image. then i followed your suggestion on installing a desktop (xfce4). it starts for login, but the usb connected terminal and mouse does not work (no effect). rdp works, so it may be just a driver for the keyboard not installed in the kernel, given that your image is for headless.
    any hints what i should install?
    thank you!

    1. I have no info that desktop already works on mainline kernel. Currently it’s useful only for server deployments.

  34. thank you for the swift answer. i checked the bash file and saw that the sda1 is hard wired several places. unfortunately, i am not an experienced bash writer and i dare not improve your code. it would be useful if i could have more than one partition working with different installations (i.e. different sd cards).
    thank you !
    andrew

    (ps. i tried to donate to you, but having no paypal account and paypal insists that i open one and does not just accept my credit card, i did not succeed. do you have an euro account with a bank which you could inform me of by email?)

    1. Yes, I will add this feature once but not right away since it’s not a high priority issue. Thanks, I will send you the data.

  35. i tried to use the nand-sata-install.sh script to move the data to a partition other than sda1. i saw that the script fixes the target as sda1. i changed this, but after the move (which seemed to work), the system was not bootable. what went wrong? why did you not use the list of available devices to select from, as the text suggests?
    thank you for your help and for the good debian!
    andrew

    1. The script alters boot script (boot.cmd – alter + convert to boot.scr) on SD card. Check that. Probably it’s pointing to sda1. I know script is limited – once I will add / fix it but for now it’s the best we have.

  36. Hi Igor.
    Thanks for your great work.
    I am testing the Kernel 3.19.0 RC5 (3.2) on a Cubietruck.
    I have several questions:
    1. The Wheezy and Trusty can boot on Cubietruck while Jessie can’t. I changed the /etc/apt/source.list to point to Jessie in Wheezy install and do `apt-get upgrade && apt-get dist-upgrade` to upgrade to Jessie from Wheezy then failed to boot. Anything wrong with Jessie?
    2. I am trying `Docker` which requires kernel version greater than 3.8 on Trusty. Then I found the `iptable_nat` module is missing. Are you planning to build images with needed kernel modules (currently I know `iptable_nat` is missing) for `Docker`?
    3. I tried to build image with `iptable_nat` based on your script. I made two changes:
    1) In `Cubietruck-Debian/build.sh`, change BRANCH=”mainline”
    2) In `lib/configuration.sh`, add `iptable_nat` to `MODULES` in `cubietruck)`
    The result is I have an image with kernel 3.4.105 built. And I don’t know if `iptable_nat` is added or not.
    What should I change to build an image with kernel 3.19 and the `iptable_nat` module?

    1. Thanks. Jessie should work, but it’s possible that I made some error in last build. It’s also possible that kernel must be updated. My primary focus is stable Wheezy image the rest is usually tested quickly. I am planning to rebuild images soon and will check if there is any unknown issue with Jessie. It happened before. Upgrade should be possible but also sometimes fails. That’s the reason I made a special image. If you need certain modules, kernel must be recompiled. You made some mistake inside configuration – you need to add – enable desired functionality inside kernel configuration file (lib/config/linux-sunxi-next.config) and BRANCH name is “next”, not “mainline”. Try again. BTW. Adding to board configuration means only which modules should be loaded at boot time. If you don’t have that module in kernel, this is useless.

  37. Thanks a lot for this project.

    I need to make tc (Traffic Control) work on my cubietruck.
    Is it worth trying to build with these options? Should I even try? Is there a chance that it could work?

    #
    # QoS and/or fair queueing
    #
    CONFIG_NET_SCHED=y
    CONFIG_NET_SCH_CBQ=m
    CONFIG_NET_SCH_HTB=m
    CONFIG_NET_SCH_CSZ=m
    CONFIG_NET_SCH_PRIO=m
    CONFIG_NET_SCH_RED=m
    CONFIG_NET_SCH_SFQ=m
    CONFIG_NET_SCH_TEQL=m
    CONFIG_NET_SCH_TBF=m
    CONFIG_NET_SCH_GRED=m
    CONFIG_NET_SCH_DSMARK=m
    CONFIG_NET_SCH_INGRESS=m
    CONFIG_NET_QOS=y
    CONFIG_NET_ESTIMATOR=y
    CONFIG_NET_CLS=y
    CONFIG_NET_CLS_TCINDEX=m
    CONFIG_NET_CLS_ROUTE4=m
    CONFIG_NET_CLS_ROUTE=y
    CONFIG_NET_CLS_FW=m
    CONFIG_NET_CLS_U32=m
    CONFIG_NET_CLS_RSVP=m
    CONFIG_NET_CLS_RSVP6=m
    CONFIG_NET_CLS_POLICE=y

      1. Which branch/version should I use? The latest version of next branch seems to have bugs. I get many errors like “chroot: ‘/bin/bash’ not found” and “no such file/dir”.

  38. Hey,

    i compiled my newest Crunchbang release on your github sources with kernel 3.4.106. Automatic boot off the sd card fails, because u-boot fails with “Unknown command part – try help”. Manually booting via commands of boot.scr works.

    I digged a bit deeper and found out that u-boot fails when running the env “scan_dev_for_boot_part” in first line at command part.

    Do you have any idea how to fix it?

    Current workaround is to “setenv devtype mmc” and “run_dev_for_boot”.

    Thanks for your help!

  39. Hi you write
    Total memory is 2000Mb (disabled all memory reservations for GPU)

    what is when i will install a desktop. what must i do for the memory reservations for the GPU?

    1. For a simple desktop upgrade nothing. You need extra memory for video decoding and 3D acceleration / advanced graphics mode. Both functions are in development stage and you won’t need this in normal usage.

  40. Hi,

    has anyone succeeded to use “rtcwake -m mem” with CubieTruck 2? Is there a known workaround to hibernate CT and wake it up after some time again?

    Thanks, Timo

  41. Thank you for the update i use my cubietruck with your image. works great .
    i downloaded the latest 2 times and i installed it 3 times each on sd card what i need works exept one the blinking leds . I had to add the script manualy the script was not on the sd card . Was it a error in the installation . Or was it a error that is was not added to the image that i downloaded. i use the wheezy. Sorry for my english . thanks again for your great work.

    1. It was not added since I solve this within board definitions (fex/bin). It’s possible that I made some bug. I’ll take a look. You can get find a script @Github.

      1. I can report I still have blinking leds using wheezy ‘old kernel’ 3.3 image. Thank you very much if this could be incorporated again in the standard image.

        1. This is not done in kernel but in board configuration files. Convert cubietruck.bin to fex by using bin2fex utility. Than edit fex file and search for section [leds_para] which adjust according to this manual. Than convert fex file, with fex2bin, back to bin and reboot.

  42. Hi!
    First: Thanks for the great work!

    Then: I’ve been running your image on a cubietruck since v2.8. I have installed it to hdd and boot from sd, updated the kernel to v2.9 (3.4.105) once (figuring out that I needed to mount /dev/mmcblk0p1 it was the hardest part). I am currently using the cubietruck as smb-server, have mpd running with audio output over spdif and think about setting up a wiki. All in my own network of course, I don’t intend to make it accessible from the internet.

    As I’m not so familiar with the linux stuff, I still have some questions:
    * From reading the comments, I have guessed that the 3.4.105 kernel is the old kernel and the 3.19 is called “mainline”. Is that correct?
    * If I understand it correctly, the box titled “Developers:” suggests that it is possible to install and use both kernels. Do I understand that correctly? What are the adjustments to the boot scripts that are mentioned there?
    * What are the benefits from using the newer kernel? Are there reasons to use the new one or are there reasons to keep using the old kernel?

    1. Mainline kernel is official linux kernel but it’s lack of most drivers for our boards. Currently it’s usable only for some headless server. Samba, web, NFS,… yes, GPIO, multimedia, … no. It’s possible to boot both kernels on latest image but it’s not yet user friendly changing. Boot script is slightly different. Check boot-next.cmd and boot.cmd at Github / lib / config.

      1. Hello Igor,
        thanks a lot for your work. Do you see a possiblty to enabel the GPIO-PIN with your Kernel and Debian.
        thanks,
        Chris

        1. GPIOs should work normally in all kernels. You need to define the pins in board definitions file (fex).

          1. Hello,
            thank you for your answer. I use the 3.4.106-cubieboard Kernel, the 3.19 don’t boot. I try to take the Kernel http://mirror.igorpecovnik.com/kernel/3.19.0-bananapi-next.tar but it didn’t work also.
            For working GPIO Pin I think I need the Kernel Module gpio_sunxi.
            Modprobe -v gpio_sunxi works without a failure, but after this command i don’t find the Module under lsmod. The Kommand: modinfo gpio_sunxi gife me follow failture back:
            modinfo: ERROR: Module gpio_sunxi not found.
            What can I do?
            Best regards
            Chris

  43. Hi Igor,
    first of all thank you for your great work!
    I have some problems with booting your image from SD-Card. It always gives me:
    MMC: SUNXI SD/MMC: 0
    *** Warning – bad CRC, using default environment
    With another Image like Cubian it boots fine. I tried both Kernel Versions and none of them is working.

    Greetings, Tobias

  44. Hi Igor,
    thx for this distro. Sorry, maybe my question is a little bit Installed it to nand, works fine via eth0. I want the cubietruck to connect to my wifi automatically, but i can not connect. Is it correct to change the wlan0 entry in /etc/network/interfaces or is there any other network manager? You wrote “Wireless adapter with DHCP ready but disabled (/etc/network/interfaces, WPA2: normal connect or AP mode)”. What do you mean by this? In other distros, i wrote just “allow-hotplug wlan0, iface wlan0 inet static, address ….” and so on, and the ct had no trouble to connect. Here, i cannot connect manually via “ifup wlan0″ etc. Thank you for your help!
    Best regards!

      1. There were major changes in building process in last few builds. The result should be the same. What did you need to alter?

          1. Is there some error in the kernel log? This way the issue might be solved quickly. Note that there is no wireless in mainline kernel, only in 3.4.x

            1. No, if wireless is not working I must made some bug in latest release(s), because I changed the way kernel is build. I suspect that firmware is not loading properly. Can you provide some log? Wifi was working well since v1.2 or something. My Cubietruck is currently in production environment so I can’t do much testing. I test builds on other boards (Banana, Orange, Lime) which are almost identical, except small differences. Wifi is among them.

            2. Feb 11 00:55:02 localhost kernel: [ 282.384667] dhd_bus_devreset: == WLAN ON ==
              Feb 11 00:55:02 localhost kernel: [ 282.388835] F1 signature read @0x18000000=0x1591a962
              Feb 11 00:55:02 localhost kernel: [ 282.392188] bcmsdh_config_hw_oob_intr: Enter
              Feb 11 00:55:02 localhost kernel: [ 282.399514] DHD: dongle ram size is set to 245760(orig 245760)
              Feb 11 00:55:02 localhost kernel: [ 282.408230] dhd_bus_select_firmware_name_by_chip: firmware_path=/lib/firmware/ap6210/fw_bcm40181a2.bin
              Feb 11 00:55:02 localhost kernel: [ 282.413254] Final fw_path=/lib/firmware/ap6210/fw_bcm40181a2.bin
              Feb 11 00:55:02 localhost kernel: [ 282.417906] Final nv_path=/lib/firmware/ap6210/nvram_ap6210.txt
              Feb 11 00:55:02 localhost kernel: [ 282.423989] _dhdsdio_download_firmware: dongle image file download failed
              Feb 11 00:55:02 localhost kernel: [ 282.427384] dhd_dev_reset: dhd_bus_devreset: -35
              Feb 11 00:55:02 localhost kernel: [ 282.432048] dhd_prot_ioctl : bus is down. we have nothing to do
              Feb 11 00:55:02 localhost kernel: [ 282.435391] dhd_dev_reset: dhd_bus_devreset: -35
              Feb 11 00:55:02 localhost kernel: [ 282.442325] dhd_customer_gpio_wlan_ctrl: call customer specific GPIO to insert WLAN RESET
              Feb 11 00:55:02 localhost kernel: [ 282.527985] sdio wifi power state: off
              Feb 11 00:55:02 localhost kernel: [ 282.624842] =========== WLAN placed in RESET ========
              Feb 11 00:55:02 localhost kernel: [ 282.627312] wl_android_wifi_on: Failed
              Feb 11 00:55:02 localhost kernel: [ 282.630120] dhd_open: failed with code -35
              Feb 11 00:55:02 localhost kernel: [ 282.632224] wl_android_wifi_off in

            3. Firmware location was changed in latest build. Quick fix is to create a link, execute as root: ln -s /lib/firmware/$(uname -r)/ap6210 /lib/firmware/ap6210

            4. This is now happening:

              Feb 11 15:38:16 localhost kernel: [ 14.837583] dhd_wlfc_init(): successfully enabled bdcv2 tlv signaling, 79
              Feb 11 15:38:16 localhost kernel: [ 14.840144] wl_android_wifi_on: Success
              Feb 11 15:38:16 localhost kernel: [ 14.845760] CFG80211-ERROR) wl_cfg80211_attach_post : p2p0: p2p_dev_addr=02:22:f4:f8:be:19
              Feb 11 15:38:16 localhost kernel: [ 15.383715] PHY: sunxi_gmac-0:00 – Link is Up – 100/Full
              Feb 11 15:38:16 localhost kernel: [ 23.830092] eth0: no IPv6 routers present
              Feb 11 15:38:16 localhost kernel: [ 25.030183] wlan0: no IPv6 routers present
              Feb 11 15:38:17 localhost kernel: [ 79.732533] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
              Feb 11 15:38:17 localhost kernel: [ 79.751020] Bluetooth: BNEP filters: protocol multicast
              Feb 11 15:39:30 localhost kernel: [ 152.614246] bcmsdh_sdmmc mmc1:0001:2: wlan0: (WE) : Wireless Event too big (65305)
              Feb 11 15:39:30 localhost kernel: [ 152.628319] CFG80211-ERROR) wl_notify_scan_status : scan is not ready

            5. Some errors are o.k. This is due to bad driver but I guess it should work now. Does it? If not you will need to wait until I or someone else found a time to take a closer look. Thanks for donation!

  45. Dear Igor,

    thank you again for your great Work!
    Today I downloaded and installed the actual wheezy image with the mainline kernel. It installed smooth, but I have one problem in my setup. CT is used as a nfs fileserver with an installed 3TB SATA 3.5 HDD. I have proper reading rates over GBit network (~40MB/s) but only about 5MB/s writing rate. The raw writing rate (measured with dd) is about 40MB/s.
    Do you have any clue why the nfs writing rate is such bad? With your old image (2.7 with 3.4.104 Kernel) it was twice as much. I installed the new image in the hope of getting better data rates :-(. Network performance is about 540GBit/s.
    So there must be something with the nfs configuration.

    Thanks in Advance!

    Buggi

      1. Hi Tilman,

        thank you for the Tip. Unfortunately this did not do the trick. Caching is better now, but for large files the writing rate is still way below 10kB/s.
        There mus be an issue with the HD-Drive or the driver. Are there any SATA tweaks known? The drive should be capable of >100Kb/s so this seems to be an driver issue?

        Regards,
        Buggi

        1. Hi Buggi,
          my CT still runs Igor’s v2.9 kernel 3.4.105 (2014-12-03), I’ve not tried the mainline kernel yet. Hopefully I’ll switch to v3.2 this weekend. My actual NFS performance is ~35MB/s write and 40 MB/s read. Maybe it helps to adjust the mount (I use “rsize=32768,wsize=32768″) and the export (“async,no_subtree_check”) options?
          Tilmann

          1. Hi Tilman,

            performance always gets worde. Actual writing performance: 2,6MB/s :-(. Reading performance: 27MB/s.
            The harddisk sounds as if it would write the data twice as the read/write head always moves the whole process. I still think there must be something with the driver. But thanks anyway for your help!

            Regards,
            Buggi

            1. Hi Buggi,
              yesterday I switched to v3.2, kernel 3.4.105-cubieboard. NFS performance is still good (same as before). Did you check the output of “hdparm -I /dev/sda”? E.g. DMA should be “udma6″. What kind of on-disk-filesystem do you use (mine is ext4). Are the partitions properly aligned (1-MiB boundaries)?
              Tilmann

          2. Hi Tilman,

            sorry, my last comment was misguiding. DMA-mode is correct (udma6). If I write directly to the disk (i.e. via dd command) the disk is fast. It is only slow if data is written over the nfs network. This leads to the conclusion that the HD-driver should be okay, but there is something wrong with nfs…

            Thanks again!
            Buggi

  46. @Igor Pečovnik:
    the “Allwinner Security System cryptographic accelerator” module is outdated and buggy.

    19:54 sunxi-ss is not supported anymore on 3.4 anyway
    19:54 oO
    19:55 the patch for 3.4 is old and have bug

    you can found sunxi-ss on http://sunxi.montjoie.ovh/ or within the mailing list

    http://article.gmane.org/gmane.comp.hardware.netbook.arm.sunxi/13460
    http://article.gmane.org/gmane.comp.hardware.netbook.arm.sunxi/13459
    http://article.gmane.org/gmane.comp.hardware.netbook.arm.sunxi/13461
    http://article.gmane.org/gmane.comp.hardware.netbook.arm.sunxi/13462

  47. Hi Igor,
    I just installed your current image with 3.19RC5 on the Cubieboard2. Thanks for your great distribution btw.
    But I realized that there is no usbserial-driver included under /lib/modules/3.19.0-rc5-cubieboard/kernel/drivers/usb/ . I’m only seeing storage but no serial module.
    Would it be possible for you to provide the kernel module in the future and possibly mail it to me now?
    I do need this module pretty badly for an lcd-module.

    Thank you very much for your support.
    Best Regards,
    Karsten

  48. Hi Igor,

    you write that “Mainline kernel have only basic functionality”.
    Could you quickly explain? What is include by “basic” and what is missing? (Nand ok :) other?)

    Thanks for your great work

    1. In mainline kernel a lot of things needs to be fixed, developed / rewritten. Usually you can’t just drag / drop stuff from old kernels and expect that it will work. Some things might crash the kernel or prevent compilation. Kernel is way too huge to be a work of one person – it’s a community project per se and I am doing the best I can to bring this modern kernel to our tiny devices. Since I fixed headers it’s easier to add drivers on your own. Theoretical ground is set but in reality not many drivers can be compiled without a problem. Your feedback is very important here – drivers which are working can be added or enabled if exists to/in main kernel tree quicker and those who are not working maybe someone else already fixed. Thank you for your feedback. Without it I would already stop doing this :)

  49. Hello Igor,

    at first thank you for this great work!
    With actual image (v3.2) I run into a little error message on boot sequenze:
    [FAIL] setting sysfs variables (…) unknown attribute block/mmcblk0/queue/scheduler failed!
    Can I ignore this message or do I have to worry?
    My way: SD->NAND->SSD

    1. Thanks. Not critical, ignore or fix … I set some settings for SD card in /etc/sysfs.conf and now since you don’t have it this error shows up. Comment the line where you find block/mmcblk0/queue/scheduler. It’s in the end of file.

  50. Hi Igor,
    something has changed since version 2.8. (I’m using wheezy 3.1)
    I can’t find uEnv.txt and also scirpt to disable led blinking.
    is boot.cmd replacement for uEnv.txt?.

    Thanks

    Regards

    1. Yes. Boot procedure has been changed – unified over all boards and kernels. There are some exceptions – Cubox and new Cubieboard … Kernel is now gzip packed and I am using mainline/latest u-boot source. Boot.cmd must be compiled to boot.scr after editing.

      1. Dear Igor,

        I have a problem using Cubietruck with my TV, because missing some lanes (OS screen size is bigger than TV). Is there definitive manual how to correct this issue? Thanks for help

        1. You can set a screen resolution in kernel command line /boot/boot.cmd Which one is best for your TV, you will have to experiment. My default settings is: disp.screen0_output_mode=EDID:1280x720p60 Change it, convert boot.cmd to boot.scr and reboot.

  51. Hey!

    Is there a way to update the things you change in git in an automatical way?
    For example the small fix in the .bashrc ..?

    Thanks,
    Nils

    1. After you have flashed lubuntu on nand, you should boot Igor’s image from SD card and run the script for nand installation. Flashing lubuntu on nand just fixes something (I don’t know what) on nand…
      Good luck.

      1. Thankyou Orcrist ..

        I did that, but still fail.
        Kindly please tell me which Lubuntu image and which Igor’s image that you use ?

          1. just reporting …

            the flashing process done.
            Just that my experience, the script looks like didn’t reach ‘whiptail –title “Reboot required” –msgbox “Press OK to reboot!” 7 60′

            I just blindly reboot the board, re login … and the board self reboot.

            But basically … it works !

            Thankyou for your great work Igor.

  52. Thanks for the new version – tried it first on CB2 with success!

    The next try for CB1: – the binary downloaded and flashed to a SD (version from 19.1.15) — *not* successful:
    –> the green led is stable but *no* start to login prompt, no output to screen (HDMI)
    Anybody who has a hint for me how to start with CB1?

        1. I add CB1 image blindly. No Cubieboard 1 around so I will need some more information to fix this. What kind of error do you get – you will probably need to hook up a serial console.

  53. I am totaly new to Debian/Linux and want to start a desktop environment.
    I installed your lightdm, xorg and xfce4 and try to startx.
    There are some output but i get no grafix.
    What i have to do?

    1. Huh. I changed a lot of things in latest release and it’s possible that this is a bug. Try a bit older version or wait a week for a bug-fixed release. I am working hard to release fixes ASAP. I tested Banana desktop upgrade yesterday and it was working without a problem. Board is similar but image / kernel is already fixed for reported & noticed bugs.

  54. Hello Igor,

    first of all i want to thank you for your work. You did a great job.

    But i have a question: is there any reason why you walk the loop way via SD cards if the result is booting from nand?
    or better: Would it be possible to offer nand images in addition?

    Regards/Quapla
    Jens :)

    1. Thanks. This way is easier and method can be extended for many boards, there is no support for NAND in mainline kernel, you need proprietary flash program, …

  55. Worked great! I went with the latest Debian Jessie pushed it to sata (1tb) and then put a Mate Desktop on it. No real challenges or issues. You did good, thank you!!

    Al

  56. Hi Igor,

    Thanks for the great image!

    Just one question: is there any reason for the new nand-sata-install script to not rsync permissions, owner, and group of files (ie not using rsync options -pgo respectively the -a) when copying the content from the SD card to NAND/HDD? I don’t know how the old version worked, I just recently got my cubietruck…

    I ran into a lot of problems (ie sudo not working, man paged could not be updated by apt-get etc) after NAND install. After I changed the script to

    RSYNCAR=”-avc –delete –stats –human-readable”

    and reinstalled all went smooth..

    1. Thanks. Before it was O.K. … but since I was playing around with parameters to establish some progress bar … Of course I try only if booting was successful, nothing else. I will add note on this. There is another bug, rsync gives out different output with different versions and scripts break again. I am pushing fixes to Github.

        1. You should, because it’s better than previous version – just use a file provided under “Bugs & limitation”.

          1. I’m using wheesy 3.1 kernel 3.4.105. on CT. It works great on SD but I can’t get it to boot from ssd after I run sata-install.sh . The script writes to the ssd ok but on reboot CT just flashes blue led and system hangs. I did set up as per your instructions on your github/faq. Any advice would be great thanks.
            Tonyek

            1. Instructions on Github are deprecated since v3.0 due to kernel packing change. Use new script (/root/nand-sata-install.sh). Problems might also occur if you made some upgrading. Certain combinations of u-boot and kernel doesn’t boot.

        1. I add CB1 and CB2 images without testing them. I don’t have the board. Sorry. Thanks, I’ll check what’s the problem.

  57. Some months ago, i wrote about my problem with certain dvb drivers and the coherent pool of only 256 kB. I tried to enlarge the coherent pool to 1 MB by a kernel option but this only resulted in a non-bootable system.
    I’m happy it’s working with the latest changes of your great image! For anyone needing to change this setting, this is how it works:
    1.) open “/boot/boot.cmd” in an editor
    2.) add “coherent_pool=1M” without the quotation marks
    3.) execute “mkimage -A arm -T script -C none -n boot -d /boot/boot.cmd /boot/boot.scr” to generate a new “boot.scr” file

  58. Hi Igor ,
    Sorry ,but my schooltime is a Long Time away :-( So my english is Not so Good !
    I try the Cubietruck with your Image from SD Card . Works Fine ,is Booting .
    When i will get it on the NAND , it Looks Fine until ,the step with the First boot ( with sd Card ).
    I get this error:
    cp: cannot stat `/boot/uEnv.txt': No such file or directory
    cp: cannot stat `/boot/lime*': No such file or directory
    cp: cannot stat `/boot/uImage': No such file or directory
    You have a idea ?

    1. This is somehow strange. Are you using latest image? Boot from clean image (wait for auto restart), when booted second time, conduct nand-sata-install.sh (the name changed in latest release – one script for all), choose NAND install and follow instructions. First it needs to partition your NAND, than you need to reboot and start the script again and follow instructions. At the end, CT will shutdown. Remove SD and than you boot from NAND.

    2. Thanks ,for you help !
      Now i am Not shure i used the newest Image ;-( i try it directly After my work ! The new image is the 3.1 right ?
      So i will get a Perfect Night for trying this ;-) thank you !!!

          1. So first i want to say Thank You :-)
            I start the procedure complete new … first Lubuntu for the NAND , after this with the new Image (new script-2inOne)
            ========= i thought 100% is ready =====but it come up to 132% *smile
            But it is working !!!! THX

            1. You are welcome :) When I fix the script in functionality I was too lazy to fix this “130% bug”. Next time :) – I found other bug and both are now fixed @Github – manual update is necessary.

  59. Hi Igor,

    Thanks for making a modern kernel version available for the cubietruck!

    My cubietruck came pre-installed with a cubian install, running kernel 3.4.79, which I set up to boot from NAND with root on a SATA drive.

    I decided I wanted to try your latest version instead, so I copied the image onto an SD card, then updated boot.scr so that it boots of the SATA, rather than the SD, and copied the kernel modules into /lib/modules. It all appears to work fine, apart from missing the hfsplus (mac) file system support which I use for my external drives, so I shall try to compile the module myself.

    Booting off the SD card with the root filesystem on the SATA seems a bit silly, but you have said above that the mainline kernel needs a new bootloader – are there any instructions for upgrading uBoot, and getting the new kernel onto the NAND?

    Thanks
    Iain

      1. I’ve tried rebuilding the whole mainline image, and it all appears to build with no issues, but when I try an boot the image it goes so far through the U-Boot, prints out “Starting kernel …” and then just stops, so I think it doesn’t like the kernel for some reason.

        I tried copying the kernel modules for HFS into your 3.1 build and it refused to load them due to the kernel name being different (mine built as cubietruck, 3.1 is built as cubieboard).

        Finally, I changed the BOARDNAME to cubieboard, rebuilt, and now I can use the kernel modules I’ve built with your 3.1 mainline image, which is not the best solution, but it works.

        1. Each board has different u-boot but kernel is the same. Using proper configuration is important. Mainline kernel is currently useful for server usage and this is covered good enough.

          1. Turns out the problem was the card! It fails to boot from a standard 2Gb SD card, but with the 8Gb SDHC card it’s fine.

  60. Hi,
    first of all, thank you for your tireless effort to offer this excellent debian image.
    I first tested release 2.8 and had some issues with it, but it worked fine. Now I wanted to try your new release 3.1 and i could still grab it from your server before you posted other mirrors.
    Although the checksums appear to be ok, the cubie does not want to boot properly. The blue LED is on for about 5 secs, then nothing else happens. There is no VGA or HDMI output. I’ve tested it with different sd cards, same issue. Other images still work (your release 2.8 still works, even flashed on the same sd cards; android boots from sd, cubian x as well).
    I thought maybe something went wrong with the download…. well now i have to use those dev-host mirrors, but the webpage always wants me to use a weird downloader (apparently infected, as far my antivirus tells me)… can you upload it somewhere else please or do you know a workaround?

    1. Image has been build with wrong boot loader. It’s fixed & working now. I am using dev-host as a second best temporary options – more & better download options will be available soon. On Dev-host is possible to download without their download manager but you need to un-check it – default is on.

      1. Hi Igor,

        thank you for your quick response. I see, ok then I have to try the new version… Yeah, I figured that the 2 download buttons should stand for different download methods. Somehow, even if I uncheck the downloader check box it offers me the downloader again. Sometimes the box simply doesn’t show up at all… I disabled the script blocker in FF, no change. Tried it with Opera now, it’s working, but the download takes 3 hours xD

        Thanks anyway :)

        1. I had many troubles for last few days and currently I can’t provide better / faster download option. As I already mentioned, I am working on a better long term solution with your help.

          1. Hi Igor,

            I’ve downloaded and tried the latest image as you suggested, as you told me that the boot loader might be broken. Well, even with the apparently working build my CT doesn’t want to boot… Do you have any suggestions? I’m using a slow 4 gig SD class 4 (wanted to push the system to sata) and I’ve tried both suse image writer and win32 image writer…

            L3V

            1. Using different SD card. HDMI must be attached at first boot if you want to use it, otherwise VGA out is the primary video output. Try different versions (3.4 and 3.19). Both are tested and works.

  61. Hi

    Thanks for your images. Maybe you could provide, at least sha256sum of each .zip (or .raw) on your website, and ideally a gpg signature?

    Thanks :)

    1. Yes, I agree, that this would be nice to have. The zips contain md5sums AFAIR, but that is not really that what you thought of at all in two ways I guess ;)

  62. As it seemed, my try to post magnet links here last night was not in the favor of this blog’s comment checker. ;) So to give it a second try, I post a GoogleDrive Share with 4 Torrents for downloading:

    Cubietruck_Debian_3.1_jessie_3.19.0-rc3.zip.torrent
    Cubietruck_Debian_3.1_jessie_3.4.105.zip.torrent
    Cubietruck_Debian_3.1_wheezy_3.4.105.zip.torrent
    Cubietruck_Ubuntu_3.1_trusty_3.4.105.zip.torrent

    https://drive.google.com/folderview?id=0B0qoGnSyhz1YZFdCdzhlMFdJOUE&usp=sharing

    Reason for this was, because i was accidently downloading the wrong image first, then accidently quit my browser twice downloading the right image and so on. This got all annoying because the DL speed seemed to be quite a bit slow for spoiled Broadband users like me. But instead of complaining … I just decided to seed them as Torrents on my fresh installed Cubietruck_Debian_3.1_jessie_3.4.105

    For now and some undefined time comming, I will stay seeding them, so feel free to download them, and of course seed as well.

    BTW: Thank you so much Igor, for taking the time and effort to create those great Cubietruck images!

  63. magnet:?xt=urn:btih:fbb83f098514fb5d0e22b8ce90e4844b3147f2d0&dn=Cubietruck%5FDebian%5F3.1%5Fwheezy%5F3.4.105.zip&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Ftracker.publicbt.com%3A80&tr=udp%3A%2F%2Ftracker.istole.it%3A80&tr=udp%3A%2F%2Fopen.demonii.com%3A1337%2Fannounce

    magnet:?xt=urn:btih:a811f66f5b0696c14b23350e52a0a7afddbf1a78&dn=Cubietruck%5FDebian%5F3.1%5Fjessie%5F3.19.0-rc3.zip&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Ftracker.publicbt.com%3A80&tr=udp%3A%2F%2Ftracker.istole.it%3A80&tr=udp%3A%2F%2Fopen.demonii.com%3A1337%2Fannounce

  64. Ijust accidently downloaded unwanted the wrong image, and that made me realize that the download is actually kind of slow.
    In stead of complaining I would like to ask why you don’t use Bittorrent as a cheaper and with high demand also faster solution?

    Regards

    cas

    1. My download server is going to be fixed within this week. Currently running on a backup which is … slow, yes :(

      1. Hi. Ah ok. I was just a bit annoyed by the pace (patience isn’t exactly my leisure, could be improved), but instead of being annoyed I prefer to try to make the world a tiny little easier for others sometimes ;)

        But a different topic:
        I just stumbled opon your https://github.com/igorpecovnik/lib/blob/next/scripts/disable_led.sh script. I’m not the complete crack at all, but wouldn’t it be more convenient to use sysfsutils for this purpose?
        In sysfs.conf this does the job pretty well here:
        # darken LED’s
        class/leds/blue:ph21:led1/brightness = 0
        class/leds/green:ph07:led4/brightness = 0
        class/leds/orange:ph20:led2/brightness = 0
        class/leds/white:ph11:led3/brightness = 0

        So I don’t know if I’m missing on some disadvantage there, but I use sysfsutils anyway to set other things (eg. cpufreq_governor asf.).

        1. It’s an old script which will be kicked out someday :) There is another option – you can disable leds in board configuration too (.bin files).

  65. I have some issues with the following Image: Cubietruck_Debian_3.1_wheezy_3.4.105 and Nand install. If I run the installation everything running well with SD. After nand-install.sh (2x) and I remove the SD card, the cubietruck begins with boot procedure, but after some seconds it’s stop and the green as well the white led, lights permanently, and nothing go more.

    I did the same with one older image (2.6) and here everything running well, boot from nand and also with SSD and Nandboot.

    Thanks for your support.

    1. I broke NAND & SATA install during last update. Booting process changed and I need to update those scripts too. I am working on it.

      1. Great job Igor, this image is amazing
        But I have tha same problem and I can’t use my cubieboard.
        it seems that the /boot does not have the necessary files
        There are way to download the previous release, or fix this issue?
        until the launch of the next version

        English isn’t my first language, excuse me any mistakes.

        1. Yes, true. I tested the image – it boots but no video output. I guess mainline uboot is not ready to cover old Cubietruck kernel. This combination is working fine on Olimex and Banana boards. Rolling back and reup images. Sorry.

  66. I really, really like the image. It’s just that there are some displays which simply produce artifacts if I start the board directly (putting the power source in). I almost always get strange artifacts, starting with a green line on the left side of the screen during boot. On The other hand I can reboot the dive as often as I like using the command line and it always works. The logs do not show anything differently from my working sreens. I don’t have this problem with cubieez, cubian or archlinux. I have the problem on all three Images here (Wheezy, Jessie, Trusty).

    1. Hmm? I guess this might be related with screen resolution? Try using different disp.screen0_output_mode= parameter, the same as it is on Cubian or others. Maybe just delete it. BTW. Thanks!

  67. Hi Igor,
    I installed your wheezy image on my cubietruck, and used the script to boot first from sd and then from ssd.
    1, my /boot is empty, no uEnv.txt or other files. Is this ok?
    2, I wanted to install a driver for the touchcreen faytech with 7″. But the installation fails, because there was no /etc/X11/xorg.conf.
    So I tried with Xorg -configure to generate one, but this fails also. The last lines from logging:
    [ 1144.779] compiled for 1.12.1, module version = 2.3.1
    [ 1144.779] Module class: X.Org Video Driver
    [ 1144.779] ABI class: X.Org Video Driver, version 12.0
    [ 1144.779] (WW) Falling back to old probe method for fbdev
    [ 1144.779] (WW) Falling back to old probe method for vesa
    [ 1144.784] No devices to configure. Configuration failed.
    [ 1144.788] Server terminated with error (2). Closing log file.

    But startx works, I’ve the desktop. So what I’ve to do to generate the xorg.conf file?
    Thanks very much for any hints.

  68. Thanks for your hard work.

    I have one Question about the mainline image.
    Why isn’t there a NAND Driver inside? Any Kernel background or something?
    Can i build with your build.sh script an image with NAND Driver and mainline kernel for cubietruck?

    Thanks a lot.

    Regards
    MrMK

  69. Does this image work with the original cubieboard (e.g. 1)? I have installed cubian on the NAND but seem to have stability issues with the network. I just lose it after a while and have no way to troubleshoot because I only have SSH access. All I can do is a reboot.

  70. What is your recommended method of updating from one release to a new one?
    Is there a way to update without writing a new image, thus completely start from the beginning every time?

    1. From / with next release it will be possible to update via .DEB packages – currently under testing. You can try it by yourself – note: you need to fix boot scripts to make it work. Don’t be confused by the name of the kernel – many boards share the same one.

    1. Hi Igor,
      Just to say : Job perfectly done!
      Keep on going with this project, especially the part with the hadoop and clustering.
      Ones again Thank you : it was of great help to me.
      Greetings from Bulgaria

  71. Hi Igor,
    I’m using the CTDebian_1.9_vga image with the kernel upgraded up to 3.4.104. It’s impossible for me to have a hdmi output signal.

    uEnv.txt:
    console=ttyS0,115200
    nand_root=/dev/nand2 rootwait
    extraargs=rootfstype=ext4 sunxi_ve_mem_reserve=128 sunxi_g2d_mem_reserve=0 sunxi_no_mali_mem_reserve sunxi_fb_mem_reserve=16 hdmi.audio=EDID:0 disp.screen0_output_mode=EDID panic=10 consoleblank=0
    script=cubietruck.bin
    kernel=uImage

    cubietruck.fex:
    [disp_init]
    disp_init_enable = 1
    disp_mode = 0
    screen0_output_type = 3
    screen0_output_mode = 4
    screen1_output_type = 3
    screen1_output_mode = 4
    fb0_framebuffer_num = 3
    fb0_format = 10
    fb0_pixel_sequence = 0
    fb0_scaler_mode_enable = 0

    Is it something missing in the vga image which prevent me from having a hdmi display?

    Thanks for your support

    1. You are booting the image from NAND which means you need to edit script.bin (convert to fex + edit + convert back to bin) file which is on the first NAND partition /dev/nand1 … BTW: In latest images /dev/nand1 is mounted under /boot, so this procedure is less confusing.

Leave a Reply

Your email address will not be published. Required fields are marked *