Kernel 4.x build?

Started by Chris, August 19, 2015, 09:17:34 AM

Previous topic - Next topic

Chris

I built many 3.x kernels for olinuxino, but have no success with 4.x.
I followed these instructions:
https://github.com/koliqi/imx23-olinuxino
and took this rootfs:
https://www.olimex.com/wiki/images/4/49/Imx233_kernel_2.6_ARCH_FS_WIFI_release_4.torrent
but olinuxino fails booting:
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.1.4 (root@ArchLinux) (gcc version 4.9.2 20141224 (prerelease) (Arch Repository) ) #1 Mon Aug 17 22:54:00 CEST 2015
[    0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00093177
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine model: i.MX23 Olinuxino Low Cost Board
[    0.000000] Memory policy: Data cache writeback
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: console=ttyAMA0,115200 root=/dev/mmcblk0 init=/usr/lib/systemd/systemd rw rootwait
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Memory: 48800K/65536K available (5340K kernel code, 435K rwdata, 1852K rodata, 244K init, 8170K bss, 16736K reserved, 0K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xc4800000 - 0xff000000   ( 936 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc070e5f4   (7194 kB)
[    0.000000]       .init : 0xc070f000 - 0xc074c000   ( 244 kB)
[    0.000000]       .data : 0xc074c000 - 0xc07b8d40   ( 436 kB)
[    0.000000]        .bss : 0xc07b8d40 - 0xc0fb37d8   (8171 kB)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Running RCU self tests
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] stmp_reset_block(c4800020): module reset timeout
[    0.000000] clocksource mxs_timer: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 911346093 ns
[    0.000000] clocksource mxs_timer_hres: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 9721025 ns
[    0.000000] sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 21474836475000000ns
[    0.000000] Console: colour dummy device 80x30
[    0.000000] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
[    0.000000] ... MAX_LOCKDEP_SUBCLASSES:  8
[    0.000000] ... MAX_LOCK_DEPTH:          48
[    0.000000] ... MAX_LOCKDEP_KEYS:        8191
[    0.000000] ... CLASSHASH_SIZE:          4096
[    0.000000] ... MAX_LOCKDEP_ENTRIES:     32768
[    0.000000] ... MAX_LOCKDEP_CHAINS:      65536
[    0.000000] ... CHAINHASH_SIZE:          32768
[    0.000000]  memory used by lock dependency info: 5167 kB
[    0.000000]  per task-struct memory footprint: 1152 bytes
[    0.170000] Calibrating delay loop... 620.54 BogoMIPS (lpj=3102720)
[    0.170000] pid_max: default: 32768 minimum: 301
[    0.180000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.180000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.190000] CPU: Testing write buffer coherency: ok
[    0.200000] Setting up static identity map for 0x8400 - 0x8458
[    0.230000] devtmpfs: initialized
[    0.260000] device-tree: Duplicate name in lcdif@80030000, renamed to "display#1"
[    0.260000] clocksource jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.270000] pinctrl core: initialized pinctrl subsystem
[    0.290000] NET: Registered protocol family 16
[    0.290000] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.370000] Serial: AMBA PL011 UART driver
[    0.380000] 80070000.serial: ttyAMA0 at MMIO 0x80070000 (irq = 17, base_baud = 0) is a PL011 rev3
[    0.390000] console [ttyAMA0] enabled
[    0.470000] mxs-dma 80004000.dma-apbh: initialized
[    0.480000] mxs-dma 80024000.dma-apbx: initialized
[    0.490000] SCSI subsystem initialized
[    0.490000] usbcore: registered new interface driver usbfs
[    0.490000] usbcore: registered new interface driver hub
[    0.490000] usbcore: registered new device driver usb
[    0.500000] pps_core: LinuxPPS API ver. 1 registered
[    0.500000] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.500000] PTP clock support registered
[    0.500000] Advanced Linux Sound Architecture Driver Initialized.
[    0.510000] Switched to clocksource mxs_timer
[    1.050000] NET: Registered protocol family 2
[    1.060000] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    1.060000] TCP bind hash table entries: 1024 (order: 3, 36864 bytes)
[    1.060000] TCP: Hash tables configured (established 1024 bind 1024)
[    1.060000] UDP hash table entries: 256 (order: 2, 20480 bytes)
[    1.070000] UDP-Lite hash table entries: 256 (order: 2, 20480 bytes)
[    1.070000] NET: Registered protocol family 1
[    1.080000] RPC: Registered named UNIX socket transport module.
[    1.080000] RPC: Registered udp transport module.
[    1.080000] RPC: Registered tcp transport module.
[    1.080000] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    1.090000] futex hash table entries: 256 (order: 1, 11264 bytes)
[    1.220000] NFS: Registering the id_resolver key type
[    1.220000] Key type id_resolver registered
[    1.220000] Key type id_legacy registered
[    1.220000] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[    1.250000] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    1.250000] io scheduler noop registered (default)
[    1.260000] 80030000.lcdif supply lcd not found, using dummy regulator
[    1.280000] Console: switching to colour frame buffer device 45x16
[    1.280000] mxsfb 80030000.lcdif: initialized
mxs_uart_write 0008 80000000(4)
mxs_uart_read 0000 (4) = 40030000
mxs_uart_write 0008 40000000(4)
[    1.290000] 8006c000.serial: ttyAPP0 at MMIO 0x8006c000 (irq = 146, base_baud = 1500000) is a 8006c000.serial
mxs_uart_read 0020 (4) = 00220180
mxs_uart_write 0020 00220180(4)
mxs_uart_read 0090 (4) = 03000000
[    1.290000] mxs-auart 8006c000.serial: Found APPUART 3.0.0
[    1.310000] usbcore: registered new interface driver asix
[    1.310000] usbcore: registered new interface driver ax88179_178a
[    1.320000] usbcore: registered new interface driver cdc_ether
[    1.320000] usbcore: registered new interface driver smsc95xx
[    1.320000] usbcore: registered new interface driver net1080
[    1.320000] usbcore: registered new interface driver cdc_subset
[    1.320000] usbcore: registered new interface driver zaurus
[    1.320000] usbcore: registered new interface driver cdc_ncm
[    1.320000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.320000] usbcore: registered new interface driver usb-storage
[    1.340000] ci_hdrc ci_hdrc.0: EHCI Host Controller
[    1.340000] ci_hdrc ci_hdrc.0: new USB bus registered, assigned bus number 1
[    1.360000] ci_hdrc ci_hdrc.0: USB 2.0 started, EHCI 1.00
[    1.380000] hub 1-0:1.0: USB hub found
[    1.380000] hub 1-0:1.0: config failed, hub doesn't have any ports! (err -19)
[    1.390000] mousedev: PS/2 mouse device common for all mice
[    1.400000] stmp3xxx-rtc 8005c000.rtc: rtc core: registered 8005c000.rtc as rtc0
[    1.400000] i2c /dev entries driver
[    1.410000] stmp3xxx_rtc_wdt stmp3xxx_rtc_wdt: initialized watchdog with heartbeat 19s
[    1.410000] 80010000.ssp supply vmmc not found, using dummy regulator
[    1.450000] mxs-mmc 80010000.ssp: initialized
[    1.450000] stmp_reset_block(c48f0000): module reset timeout
[    1.460000] mxs-mmc 80010000.ssp: card claims to support voltages below defined range
[    1.460000] mxs-mmc 80010000.ssp: no support for card's volts
[    1.460000] mmc0: error -22 whilst initialising SDIO card
[    1.480000] mxs-dcp: probe of 80028000.dcp failed with error -110
[    1.480000] usbcore: registered new interface driver usbhid
[    1.480000] usbhid: USB HID core driver
[    1.490000] mmc0: host does not support reading read-only switch, assuming write-enable
[    1.490000] mmc0: new SDHC card at address 4567
[    1.500000] stmp_reset_block(c48f4000): module reset timeout
[    1.510000] mxs-lradc: probe of 80050000.lradc failed with error -110
[    1.520000] mmcblk0: mmc0:4567 QEMU! 1.46 GiB
[    1.560000] NET: Registered protocol family 17
[    1.570000] Key type dns_resolver registered
[    1.580000] registered taskstats version 1
[    1.600000] stmp3xxx-rtc 8005c000.rtc: setting system clock to 2015-08-17 20:56:58 UTC (1439845018)
[    1.630000] usb0_vbus: disabling
[    1.630000] ALSA device list:
[    1.630000]   No soundcards found.
[    1.640000] uart-pl011 80070000.serial: no DMA platform data
[    1.650000] EXT3-fs (mmcblk0): error: couldn't mount because of unsupported optional features (240)
[    1.660000] EXT2-fs (mmcblk0): error: couldn't mount because of unsupported optional features (244)
[    1.840000] EXT4-fs (mmcblk0): recovery complete
[    1.840000] EXT4-fs (mmcblk0): mounted filesystem with ordered data mode. Opts: (null)
[    1.840000] VFS: Mounted root (ext4 filesystem) on device 179:0.
[    2.000000] devtmpfs: mounted
[    2.020000] Freeing unused kernel memory: 244K (c070f000 - c074c000)
[    2.320000] Kernel panic - not syncing: Requested init /usr/lib/systemd/systemd failed (error -2).
[    2.320000] CPU: 0 PID: 1 Comm: swapper Not tainted 4.1.4 #1
[    2.320000] Hardware name: Freescale MXS (Device Tree)
[    2.320000] [<c000f0ac>] (unwind_backtrace) from [<c000d1fc>] (show_stack+0x10/0x14)
[    2.320000] [<c000d1fc>] (show_stack) from [<c050cec0>] (panic+0x98/0x200)
[    2.320000] [<c050cec0>] (panic) from [<c050bebc>] (kernel_init+0x80/0xec)
[    2.320000] [<c050bebc>] (kernel_init) from [<c000a2f0>] (ret_from_fork+0x14/0x24)
[    2.320000] ---[ end Kernel panic - not syncing: Requested init /usr/lib/systemd/systemd failed (error -2).


Did anybody already successfully build a 4.x kernel and could provide a working .config?

JohnS

Did you rebuild every binary, including of course systemd?

I don't see how you can use that rootfs as-is...

John

Chris

Quote from: JohnS on August 19, 2015, 10:23:11 AM
Did you rebuild every binary, including of course systemd?
No, because the used rootfs is officially provided by olimex especially for olinuxino and Arch Linux release 4:
https://www.olimex.com/wiki/IMX233#Kernels
So I can could expect to work with kernel 4, or?

progmetalbg

Your kernel command line is wrong:
Quote[0.000000] Kernel command line: console=ttyAMA0,115200 root=/dev/mmcblk0 init=/usr/lib/systemd/systemd rw rootwait
The Olimex arch linux image is using the old init, not systemd

Chris

Thanks for the hint - works perfectly now!