Utilite computer 3.10.17 Linux kernel upgrade

Utilitie-introThis is the manual about how to (properly) compile Utilite-developed Linux kernel for the Utilite computer (Utilite Pro) running “Ubuntu 12.04 LTS (Precise Pangolin)”. It’s mostly written for my own reference in case of possible future upgrades, but some might find it useful, as otherwise the information seems to be scattered around the Internet. We will do the start in user-mode and finish it in superuser (root) mode. The commands in bold are those which you need to type on the command line. However, I am not responsible for any damage that you might experience trying out this manual on your Utilite Pro. These are unofficial instructions, if you want official instructions read information on the Utilite Forum and Wiki. So here we go …

1. First we are going to pull the kernel sources with git ( there is an online manual on how to use git ). This is a one-string command, so write all in one line.

$ git clone -b 'utilite/devel'
https://github.com/utilite-computer/linux-kernel --depth 1

2. Lets move inside the kernel tree.

$ cd linux-kernel

3. Let’s make default kernel .config

$ make cm_fx6_defconfig

4. Let’s define other settings with menuconfig. Beside of concatenating kernel image and DTB you need to make sure that the following kernel options are present in your .config :

CONFIG_ARM_APPENDED_DTB=y
CONFIG_ARM_ATAG_DTB_COMPAT=y
CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND=y
CONFIG_CMDLINE_FROM_BOOTLOADER=y

$ make menuconfig

5. Clean before compiling.

$ make clean

6. Let’s compile. Option “-j8” means that we’ll be using 8 jobs on all 4 cores ( x 2 for SMP) on Utilite Pro for compiling ( it’s faster ). Approx. build time is 24 minutes.

$ make -j8 zImage

7. If you enabled DTB settings in the kernel .config, DTB should be made successfully. Approx. build time is 1 minute.

$ make -j8 imx6q-sbc-fx6m.dtb

8. Let’s make the modules. Approx. build time is 4 minutes.

$ make -j8 modules

9. Until this step everything can be done in user-mode. From here on you will need to perform all the additional steps as root or with “sudo” command. Let’s install the modules.

# make modules_install

10. Let’s install the firmware.

# make firmware_install

11. Let’s install the kernel headers.

# make headers_install

12. Now with all things in place and no errors, we are going to mount the boot partition on Utilite Pro ( this is a one-string command, so copy the whole string ).

# boot_partition=`cat /proc/cmdline | awk ‘{ for (i=1;i<=NF;i++) { if($i~/root=/) { print substr($i,6,length($i)-6)”1″ } } }’`

# mount $boot_partition /boot

13. DO NOT FORGET to backup your existing working kernel !

# cp /boot/uImage-cm-fx6 /boot/uImage-cm-fx6.bak

14. Move the newly built Linux kernel image into /boot .

# cat arch/arm/boot/zImage arch/arm/boot/dts/imx6q-sbc-fx6m.dtb > /boot/zImage-cm-fx6

15. Perform the last step to fit everything in place ( this is one-string long command, write everything together ).

# cd /boot; mkimage -A arm -O linux -T kernel -C none -a 0x10008000 -e 0x10008000 -n 3.10.17-cm-fx6-1-beta2-aufs -d zImage-cm-fx6 uImage-cm-fx6; rm -f zImage-cm-fx6

16. The result should be similar to this if all went well …

Image Name: 3.10.17-cm-fx6-1-beta2-aufs
Created: Tue Feb 17 13:53:34 2015
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 5460160 Bytes = 5332.19 kB = 5.21 MB
Load Address: 10008000
Entry Point: 10008000

17. un-mount the /boot partition.

# umount /boot

18. Reboot and pray !

# reboot

 

If all went well, you should have a new workable 3.10.17 kernel on Utilite Pro.

If you are unable to boot to the new kernel or if something was faulty, there are several things you can try for the rescue. Most information can be asked or found on the Utilite support forum. This is the best place to ask questions. You should enable serial console ( I won’t describe how you do this, you can find the information on the forum or wiki ). So after being connected with the serial console, the first thing you see starting is U-boot. There will be a similar output, compared to this one :

U-Boot 2009.08-cm-fx6-0.98+tools (Mar 10 2014 – 16:17:49)

CPU: Freescale i.MX6 family TO6.4 at 792 MHz
Temperature: 34 C, calibration data 0x59d4f769
mx6q pll1: 792MHz
mx6q pll2: 528MHz
mx6q pll3: 480MHz
mx6q pll8: 50MHz
ipg clock : 66000000Hz
ipg per clock : 66000000Hz
uart clock : 80000000Hz
cspi clock : 60000000Hz
ahb clock : 132000000Hz
axi clock : 264000000Hz
emi_slow clock: 29333333Hz
ddr clock : 528000000Hz
usdhc1 clock : 198000000Hz
usdhc2 clock : 198000000Hz
usdhc3 clock : 198000000Hz
usdhc4 clock : 198000000Hz
nfc clock : 11000000Hz
Board: CM-FX6:[ POR ]
Boot Device: SD
I2C: ready
RAM Configuration:
Bank #0: 10000000 1 GB
Bank #1: 80000000 1 GB
NAND: No NAND device found!!!
0 MiB
MMC: FSL_USDHC: 0,FSL_USDHC: 1,FSL_USDHC: 2
JEDEC ID: 0xbf:0x25:0x41
Reading SPI NOR flash 0xc0000 [0x2000 bytes] -> ram 0x17e030c0
SUCCESS

In: serial
Out: serial
Err: serial
Net: got MAC address from IIM: 00:00:00:00:00:00
FEC0
Hit any key to stop autoboot:

Here you have 3 seconds of time to hit any key and enter into the U-boot interface, where you can perform additional steps.

1. First step would be to boot the previous kernel. Define the previous kernel with “setenv”.

$ setenv kernel uImage-cm-fx6.bak

$ run bootcmd

This should at least bring you back to the previous kernel.

2. If you forgot what your previous kernel name was ( if you selected a different name ), you can try these commands :

$ sata init
$ fatls sata 0:1

This should list all available kernels in the /boot partition, so just select another name with “setenv”.

Good luck !

P. S. If you have tried this procedure and found any errors or know about the improvements, you are welcome to comment on the post and I will be glad to fix the article !


Posted

in

, , ,

by

Tags:

Comments

2 responses to “Utilite computer 3.10.17 Linux kernel upgrade”

  1. Weezey Avatar

    I’ve followed these instructions to the letter and when I reboot I see the image load and then I get a blank screen. Reverting to 3.0 works, but I’m told there are benefits like AP mode to the 3.10 kernel.

  2. Jan Prunk Avatar

    Hello Weezey,

    I would suggest that you ask about your error on the utilite forum, I summed up my guide from there.

Leave a Reply

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