Tag Archives: odroid

Compiling ODROID 3.12.3 kernel, attempt 3

Previously and previously. Will it be third time lucky?

I’m going to document the steps from the start. Note I’m building this on the hardware, not cross-compiling, since the ODROID-XU (Exynos 5410) with an external hard drive is fast (for ARM). Also note you’ll need to make your own serial port or buy one.

Clone this git repository which is based on upstream 3.12.3. Build it:

make odroidxu_defconfig
LOADADDR=40008000 make uImage dtbs
make modules

Install the kernel, device tree, and modules:

sudo cp arch/arm/boot/uImage /boot/uboot/uImage-3.12.3
sudo cp arch/arm/boot/dts/exynos5410-odroidxu.dtb /boot/uboot/
sudo make modules_install

Build an initramfs:

# First print the kernel version: make kernelrelease
sudo mkinitrd ./initrd-3.12.3 3.12.3-78393-g3886709
mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n uInitrd -d initrd-3.12.3 uInitrd-3.12.3
sudo cp uInitrd-3.12.3 /boot/uboot/

Reboot, and be ready to interrupt u-boot by hitting a key on the serial console at the right moment.

sync
sudo reboot

At the u-boot prompt type:

set bootargs console=ttySAC2,115200n8 loglevel=9 earlyprintk root=UUID=ad455a75-609c-4b3c-956b-bcef3ebc4603 ro
fatload mmc 0 43000000 uimage-3.12.3
fatload mmc 0 46000000 uinitrd-3.12.3
fatload mmc 0 49000000 exynos5410-odroidxu.dtb
bootm 43000000 46000000 49000000

Unfortunately (1):

[    0.390000] CPU: All CPU(s) started in SVC mode.

and unfortunately (2):

[    5.780000] systemd[1]: Running in initial RAM disk.

Welcome to Fedora 20 (Heisenbug) dracut-034-19.git20131021.fc20 (Initramfs)!

[    5.810000] Unhandled fault: imprecise external abort (0x1406) at 0x00000000
[    5.810000] systemd[1]: Caught , dumped core as pid 1220.
[    5.820000] systemd[1]: Freezing execution.
[    5.890000] usb 1-2: new high-speed USB device number 2 using s5p-ehci
[    6.040000] usb 1-2: New USB device found, idVendor=0424, idProduct=9730
[    6.040000] usb 1-2: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    6.050000] usb 1-2: no of_node; not parsing pinctrl DT
[    6.180000] usb 1-3: new high-speed USB device number 3 using s5p-ehci
[    6.420000] usb 1-3: New USB device found, idVendor=0424, idProduct=3503
[    6.420000] usb 1-3: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    6.430000] usb 1-3: no of_node; not parsing pinctrl DT
[    6.430000] hub 1-3:1.0: no of_node; not parsing pinctrl DT
[    6.440000] hub 1-3:1.0: USB hub found
[    6.440000] hub 1-3:1.0: 3 ports detected
[    6.730000] usb 1-3.2: new high-speed USB device number 4 using s5p-ehci
[    6.860000] usb 1-3.2: New USB device found, idVendor=04e8, idProduct=61b6
[    6.860000] usb 1-3.2: New USB device strings: Mfr=1, Product=11, SerialNumber=3
[    6.870000] usb 1-3.2: Product: Samsung M3 Portable
[    6.870000] usb 1-3.2: Manufacturer: JMicron
[    6.880000] usb 1-3.2: SerialNumber: 00000000011E4C02
[    6.880000] usb 1-3.2: no of_node; not parsing pinctrl DT
Advertisements

8 Comments

Filed under Uncategorized

Compiling ODROID-XU 3.11-rc7 kernel, attempt 2

Previously …

Now that I have made my own serial port for the ODROID-XU, creating something omitted from this development board, I’m ready to try to compile my own kernel again. At least I should be able to debug any error messages this time.

I did everything in the previous posting, but this time built a uImage properly:

LOADADDR=40008000 make uImage dtbs
sudo cp arch/arm/boot/uImage /boot/uboot/uImage-3.11-rc7
sudo cp uInitrd /boot/uboot/uInitrd-3.11-rc7
sudo cp arch/arm/boot/dts/exynos5410-odroidxu.dtb /boot/uboot/

We end up with (where the bold files are the ones I have built):

$ ll /boot/uboot/
total 33047
-rwxr-xr-x 1 root root    5510 Sep 27 08:14 boot.ini
-rwxr-xr-x 1 root root   28603 Dec  7 16:34 exynos5410-odroidxu.dtb
-rwxr-xr-x 1 root root  293168 Sep 27 08:14 u-boot.bin
-rwxr-xr-x 1 root root 2113488 Dec  7 16:33 uImage-3.11-rc7
-rwxr-xr-x 1 root root 6518598 Sep 27 08:14 uInitrd
-rwxr-xr-x 1 root root 8104359 Dec  7 16:36 uInitrd-3.11-rc7
-rwxr-xr-x 1 root root 6518598 Nov  8 17:36 uInitrd-official3.4.5
-rwxr-xr-x 1 root root 5127832 Sep 27 08:13 zImage
-rwxr-xr-x 1 root root 5127832 Nov  8 17:36 zImage-official3.4.5

I boot this by interrupting u-boot and typing the load commands by hand. (Note that /boot/uboot is a FAT partition).

set bootargs console=ttySAC2,115200n8 loglevel=9 earlyprintk root=UUID=ad455a75-609c-4b3c-956b-bcef3ebc4603 ro
fatload mmc 0 43000000 uimage-3.11-rc7
fatload mmc 0 46000000 uinitrd-3.11-rc7
fatload mmc 0 49000000 exynos5410-odroidxu.dtb
bootm 43000000 46000000 49000000

This boots the kernel, but fails trying to find the root filesystem:

[    9.680000] mmc1: error -110 whilst initialising SD card
[    9.700000] mmc_host mmc1: Bus speed (slot 0) = 100000000Hz (slot req 300000Hz, actual 299401HZ div = 167)
[   11.730000] mmc1: error -110 whilst initialising SD card
[   11.750000] mmc_host mmc1: Bus speed (slot 0) = 100000000Hz (slot req 200000Hz, actual 200000HZ div = 250)
[   13.790000] mmc1: error -110 whilst initialising SD card
[   13.810000] mmc_host mmc1: Bus speed (slot 0) = 100000000Hz (slot req 196079Hz, actual 196078HZ div = 255)
[   15.850000] mmc1: error -110 whilst initialising SD card
[   17.680000] systemd[1]: No control group support available, not creating root group.
[   17.710000] systemd[1]: Expecting device dev-disk-by\x2duuid-ad455a75\x2d609c\x2d4b3c\x2d956b\x2dbcef3ebc4603.device...
[   17.720000] systemd[1]: Starting -.slice.
         Expecting device dev-disk-by\x2du[   17.730000] systemd[1]: Caught , dumped core as pid 1144.
[   17.730000] systemd[1]: Freezing execution.
uid-ad455a75\x2d609...c4603.device...

Update #2: See the comments section.

Update: It’s because the 3.11 kernel doesn’t support the MMC card. I’ll try later using an external USB drive.

4 Comments

Filed under Uncategorized

ODROID-XU boot messages

Now that I’ve made a serial cable I can now show you the full boot messages starting from U-Boot.

Continue reading

Leave a comment

Filed under Uncategorized

Making a serial cable for the ODROID XU

image

As I’ve said before, developer boards should come with all the bits, and a UART is essential for development on ARM.

I built my own using the jump leads from an unused CP2102, and this 1.8v FTDI serial to USB cable purchased previously.

The ODROID-XU board has a four pin Molex-type UART connector. The pin-out is: 1 = Power (do not connect), 2 = RX, 3 = TX, 4 = Ground. Pin 1 has the triangular notch on the outside of the connector. In the photo above, black is connected to pin 4 (ground), blue is connected to pin 3 (TX), and purple is connected to pin 2 (RX).

The FTDI cable has: Black = ground, Yellow = RX, Orange = TX.

Normally I would swap RX & TX in the cable, but that didn’t work here, so as you can see I’ve connected RX-RX, TX-TX straight through.

The photograph shows the connection before I wrapped the whole lot in many layers of black electrical tape.

3 Comments

Filed under Uncategorized

More ODROID-XU annoyance

penny

The UART to USB cable didn’t work out. It’s not possible for humans to connect those wires to the Molex header, and the only option to make it work is to buy a Molex 5268 connector from somewhere (nowhere in the UK sells them, so I guess abroad for lots of money).

Repeated note to all potential sellers of ARM “development” boards: Put a fscking serial port on it.

8 Comments

Filed under Uncategorized

UART to USB cable

image

2 Comments

November 11, 2013 · 10:29 am

ODROID-XU: Compiling a kernel

This documents how I compiled a more recent kernel for the ODROID-XU. The good news is the hardware is pretty fast, and it doesn’t take long to compile a kernel. The bad news is it doesn’t boot with the new kernel, and because of the complete lack of debuggability, it’s impossible to find out why.

I first checked out the hardkernel git repository’s 3.11-rc7 branch. Some explanation: The upstream Linux kernel doesn’t have support for the Exynos 5410 SoC, nor for many of the peripherals on this system, and so hardkernel (the makers of ODROID) maintain a set of patches on top of the upstream kernel which they rebase periodically. In this case there are approximately 60 extra patches on top of the upstream 3.11-rc7 kernel, starting with this patch to add basic support for the 5410 and continuing by adding more and more peripheral support.

(Note that this 3.11-rc7 branch is still missing support for important features like USB 3.0 and the GPU. Also this kernel is still using the ARM big.LITTLE switcher hack so still no KVM for you. YMMV)

After checking this out (on the ODROID) I did:

make odroidxu_defconfig
make menuconfig

You can then build the kernel in the usual way:

make -j5

Then install the modules (in this case to /lib/modules/3.11.0-rc7-66032-g4521a9d/):

sudo make modules_install
sync

And make an initramfs:

mkinitrd ./initrd-3.11.0-rc7 3.11.0-rc7-66032-g4521a9d
mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n uInitrd -d initrd-3.11.0-rc7 uInitrd

Finally we can install the kernel and initrd into /boot/uboot (the u-boot directory). But save a backup of the old kernel and initrd first. The following commands are run as root:

mv /boot/uboot/zImage /boot/uboot/zImage-official3.4.5
mv /boot/uboot/uInitrd /boot/uboot/uInitrd-official3.4.5
cp arch/arm/boot/zImage /boot/uboot/
cp uInitrd /boot/uboot/
sync

This is what the /boot/uboot directory ends up looking like for me:

-rwxr-xr-x 1 root root    5510 Sep 27 03:14 boot.ini
-rwxr-xr-x 1 root root  293168 Sep 27 03:14 u-boot.bin
-rwxr-xr-x 1 root root 8104359 Nov  8 07:29 uInitrd
-rwxr-xr-x 1 root root 6518598 Sep 27 03:14 uInitrd-official3.4.5
-rwxr-xr-x 1 root root 2113424 Nov  8 07:29 zImage
-rwxr-xr-x 1 root root 5127832 Sep 27 03:13 zImage-official3.4.5

Note that the u-boot configuration shouldn’t need to be modified, and in any case the configuration is signed by hardkernel so it cannot be modified (GRRRRRR, another reason to hate this hardware).

And now reboot and hope for the best. If it doesn’t come up, then you have to pull the SD card, plug it into a real computer, and switch back to the *-official* files that you backed up above. As discussed before there is no serial port or monitor, so these failures are not debuggable.

9 Comments

Filed under Uncategorized