This is my first post, so I'll shortly introduce myself. I'm using Odroid as server machine providing various services: www with php, mail, databases, svn repositories wifi accesspoint and so on running Gentoo linux and it works perfect so far I like it so much. It offers very good performance with very low power consumption and it's extremely silent - of course no mechanical parts at all. I want to help somehow with Odroid linux kernel development.
I've merged existing 18.104.22.168 kernel with grsecurity to improve system security, however I want to have stable kernel e.g. 3.10.y with long term upstream support (for bug-fixes, security issues fixes and driver updates).
I'm not familiar with linux kernel too much, but i think it is a very good opportunity to delve into linux kernel development just for fun.
My goal is to port Odroid to latest stable Linux Kernel with support of all peripherals and merge it with grsecurity.
OK, let's start.
Odroid-U2, 8GB MMC class 10, fused with u-boot, bl1 and bl2 from http://dev.odroid.com/projects/4412boot ... oot.tar.gz. Complete system is present on MMC. Everything works perfect with kernel 22.214.171.124 from HK git repository and custom kernel .config file (removing unneeded drivers and functionalities). System is able to boot, prints kernel diagnostic messages via USB-UART and blinks with blue LED indicating system heartbeat.
And now the adventure begins
I've started with vanilla 3.8, 3.10 and 3.12 kernels - none of them is able to boot, it is not able even to print anything to UART. Configuration based on previously used .config.
To figure what is missing I've compared latest changes made in HK kernel repository to ubuntu 126.96.36.199. Differences are very huge, so i decided to look into arch/arm/mach-exynos and arch/arm/plat-samsung. After excluding changes made to drivers, firmware and so on I've started merging those simple changes to 3.10.
Here is the patch I've made:
http://obeny.obeny.net/odroid/linux-3.1 ... 4x_1.patch
Kernel compiles cleanly, but still it is not able to boot or print anything via UART.
Here is the boot log:
Code: Select all
OK U-Boot 2010.12-00000-g29d4c3b (Oct 17 2013 - 02:46:38) for Exynox4412 CPU: S5PC220 [Samsung SOC on SMP Platform Base on ARM CortexA9] APLL = 1000MHz, MPLL = 880MHz DRAM: 2 GiB PMIC VERSION : 0x00, CHIP REV : 2 TrustZone Enabled BSP BL1 version: 20121128 Checking Boot Mode ... SDMMC MMC Device 0: 7547 MB MMC Device 1 not found *** Warning - using default environment In: serial Out: serial Err: serial ModeKey Check... run normal_boot No ethernet found. Hit any key to stop autoboot: 0 >>> Load Boot Script from mmc 0:1 <<< reading boot.scr 355 bytes read in 22 ms (15.6 KiB/s) ## Executing script at 40008000 reading zImage 1608600 bytes read in 40 ms (38.4 MiB/s) reading uInitrd.gz 2201395 bytes read in 34 ms (61.7 MiB/s) Boot with zImage ## Loading init Ramdisk from Legacy Image at 42000000 ... Image Name: initramfs Image Type: ARM Linux RAMDisk Image (uncompressed) Data Size: 2201331 Bytes = 2.1 MiB Load Address: 00000000 Entry Point: 00000000 Starting kernel ...
What changes are included in the patch above:
1. irq definitions
2. usb-phy definitions (no implementation)
3. added exynos_firmware_init
4. initialization of L2 cache
5. ported mach-hkdk4412.c (based on 188.8.131.52 from HK repo)
6. added setup-dwmci-gpio.c
7. added CPU revision definitions plat/cpu.h
8. added drivers gpio, hardkernel, mmc driver, applied changes made to i2c, regulator, thermal
9. switched gpio functions in tty/serial/samsung.c
10. adapted to api changes
Finally I've got few questions:
1. What is the main reason that kernel is not able to start? What is missing in vanilla kernel and what is required to achieve bootable kernel that is able to print anything to UART? It is not possible to do anything while kernel cannot even complain what is the problem
2. I've searched the forum for any possibility to attach JTAG debugger to Odroid-U2. It's not possible, so please tell me how do you debug the kernel?
3. Is USB phy required to be setup to get UART working? USB phy is not set correctly at the moment.
I hope anyone have reached this point and have an idea how to start with making vanilla kernel bootable.
With Best Regards,