Skip to content

4.14.19 xu4: kernel does not boot with CONFIG_CGROUP_PIDS set #337

Open
@paralin

Description

@paralin

Boot script:

ODROIDXU-UBOOT-CONFIG

# U-Boot Parameters
setenv initrd_high "0xffffffff"
setenv fdt_high "0xffffffff"
# setenv silent 1
setenv condev "console=ttySAC2,115200n8"

# setenv dtb_addr_r "0x44000000"
#setenv kernel_addr_r "0x40008000"
#setenv dtb_addr_r "0x467BA800"
#setenv initramfs_addr_r "0x46834800"

#setenv dtb_addr_r "0x42000000"
#setenv kernel_addr_r "0x40008000"
#setenv initramfs_addr_r "0x44000000"
#setenv dtb_addr_r "0x42000000"

setenv kernel_addr_r "0x40008000"
setenv initramfs_addr_r "0x46000000"
setenv dtb_addr_r "0x44000000"

# Mac address configuration
# setenv macaddr "00:1e:06:61:7a:39"
# setenv macaddrconfig "smsc95xx.macaddr=${macaddr}"

#---------------------------------
# Boots from memory.
# --------------------------------
setenv bootmem "console=tty1 ${condev} root=/dev/initrd ro ramdisk_size=100000 fsck.repair=yes net.ifnames=0 no_console_suspend"

# --- Screen Configuration for HDMI --- # 
# ---------------------------------------
# Uncomment only ONE line! Leave all commented for automatic selection.
# Uncomment only the setenv line!
# ---------------------------------------
# ODROID-VU forced resolution
# setenv videoconfig "video=HDMI-A-1:1280x800@60"
# -----------------------------------------------
# ODROID-VU forced EDID
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/1280x800.bin"
# -----------------------------------------------
# 1920x1200 60hz without monitor data using generic information
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/1920x1200_60hz.bin"
# -----------------------------------------------
# 1920x1200 30hz without monitor data using generic information
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/1920x1200_30hz.bin"
# -----------------------------------------------
# 1920x1080 (1080P) with monitor provided EDID information. (1080p-edid)
# setenv videoconfig "video=HDMI-A-1:1920x1080@60"
# -----------------------------------------------
# 1920x1080 (1080P) without monitor data using generic information (1080p-noedid)
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/1920x1080.bin"
# -----------------------------------------------
# 1920x1080 50hz (1080P) with monitor provided EDID information. (1080p 50hz-edid)
# setenv videoconfig "video=HDMI-A-1:1920x1080@50"
# -----------------------------------------------
# 1920x1080 50hz (1080P) without monitor data using generic information (1080p 50hz-noedid)
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/1920x1080_50hz.bin"
# -----------------------------------------------
# 1680x1050 without monitor data using generic information 
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/1680x1050.bin"
# -----------------------------------------------
# 1600x1200 without monitor data using generic information 
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/1600x1200.bin"
# -----------------------------------------------
# 1600x900 without monitor data using generic information 
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/1600x900.bin"
# -----------------------------------------------
# 1440x900 with monitor provided EDID information.
# setenv videoconfig "video=HDMI-A-1:1440x900@60"
# -----------------------------------------------
# 1440x900 without monitor data using generic information 
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/1440x900.bin"
# -----------------------------------------------
# 1366x768 without monitor data using generic information 
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/1366x768.bin"
# -----------------------------------------------
# 1360x768 without monitor data using generic information 
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/1360x768.bin"
# -----------------------------------------------
# 1280x1024 without monitor data using generic information
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/1280x1024.bin"
# -----------------------------------------------
# 1280x720 (720P) with monitor provided EDID information. (720p-edid)
# setenv videoconfig "video=HDMI-A-1:1280x720@60"
# -----------------------------------------------
# 1280x720 (720P) without monitor data using generic information (720p-noedid)
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/1280x720.bin"
# -----------------------------------------------
# 1024x768 without monitor data using generic information
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/1024x768.bin"
# -----------------------------------------------
# 1024x600 without monitor data using generic information (ODROID VU7+)
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/1024x600.bin"
# -----------------------------------------------
# 800x600 without monitor data using generic information 
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/800x600.bin"
# -----------------------------------------------
# 800x480 without monitor data using generic information (ODROID 7")
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/800x480.bin"
# -----------------------------------------------
# 720x576 without monitor data using generic information 
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/720x576.bin"
# -----------------------------------------------
# 720x480 without monitor data using generic information 
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/720x480.bin"
# -----------------------------------------------
# 640x480 without monitor data using generic information
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/640x480.bin"
# -----------------------------------------------
# 480x800 without monitor data using generic information
# setenv videoconfig "drm_kms_helper.edid_firmware=edid/480x800.bin"

# --- HDMI / DVI Mode Selection ---
# ------------------------------------------
# - HDMI Mode
# setenv vout "hdmi"
# - DVI Mode (disables sound over HDMI as per DVI compat)
# setenv vout "dvi"

# --- HDMI CEC Configuration ---
# ------------------------------------------
# setenv cecenable "false" # false or true
# set to true to enable HDMI CEC

# Enable/Disable ODROID-VU7 Touchsreen
setenv disable_vu7 "true" # false

# CPU Governor Selection
# Available governos: conservative, userspace, powersave, ondemand, performance, schedutil
setenv governor "performance"

# External watchdog board enable
setenv external_watchdog "false"
# debounce time set to 3 ~ 10 sec, default 3 sec
setenv external_watchdog_debounce "3"


#------------------------------------------------------------------------------
#
# HDMI Hot Plug detection
#
#------------------------------------------------------------------------------
#
# Forces the HDMI subsystem to ignore the check if the cable is connected or 
# not.
# false : disable the detection and force it as connected.
# true : let cable, board and monitor decide the connection status.
# 
# default: true
# 
#------------------------------------------------------------------------------
# setenv HPD "true"

# setenv hdmi_phy_control "HPD=${HPD} vout=${vout}"

# Load kernel, initrd and dtb in that sequence
fatload mmc 0:1 ${kernel_addr_r} zImage
fatload mmc 0:1 ${initramfs_addr_r} rootfs.cpio.uboot
if test "${board_name}" = "xu4"; then fatload mmc 0:1 ${dtb_addr_r} exynos5422-odroidxu4.dtb; setenv fdtloaded "true"; fi
if test "${board_name}" = "xu3"; then fatload mmc 0:1 ${dtb_addr_r} exynos5422-odroidxu3.dtb; setenv fdtloaded "true"; fi
if test "${board_name}" = "xu3l"; then fatload mmc 0:1 ${dtb_addr_r} exynos5422-odroidxu3-lite.dtb; setenv fdtloaded "true"; fi
#failsafe
if test "${fdtloaded}" != "true"; then fatload mmc 0:1 ${dtb_addr_r} exynos5422-odroidxu4.dtb; fi

# 0x42000000 = ${dtb_addr_r}
# fdt addr 0x42000000
fdt addr ${dtb_addr_r}

# if test "${cecenable}" = "false"; then fdt rm /cec@101B0000; fi
if test "${disable_vu7}" = "false"; then setenv hid_quirks "usbhid.quirks=0x0eef:0x0005:0x0004"; fi
if test "${external_watchdog}" = "true"; then setenv external_watchdog "external_watchdog=${external_watchdog} external_watchdog_debounce=${external_watchdog_debounce}"; fi

# final boot args
setenv bootargs "${bootmem} ${videoconfig} ${hdmi_phy_control} ${hud_quirks} ${macaddrconfig} ${external_watchdog} governor=${governor}"

# Boot the board
bootz ${kernel_addr_r} ${initramfs_addr_r} ${dtb_addr_r}

This boot script allows for 67Mb of kernel, while the actual kernel loaded under 4.9:

reading zImage
4948704 bytes read in 334 ms (14.1 MiB/s)

And under 4.14, not much more than 5Mb, I concluded then that overlap cannot be the issue here.

So, I tried building the following kernel versions, making this change:

-BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/hardkernel/linux/archive/1ebaaab89354d604066acb505f6574d0b926b3ea/linux-xu4-4.14.18-r1.tar.gz"
-BR2_LINUX_KERNEL_VERSION="xu4-4.14.18-r1"
-BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_14=y
+BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/hardkernel/linux/archive/ce6a7ef660cca271a04e23315c131b544548029b/linux-xu4-4.9.52-r1.tar.gz"
+BR2_LINUX_KERNEL_VERSION="xu4-4.9.52"
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_9=y

Compiling the kernel then with this change, the kernel boots. However, with kernel 4.14.18 at the latest commit (hash in the previous block of text):

U-Boot 2017.05 (Feb 16 2018 - 02:00:37 -0500) for ODROID-XU4

CPU:   Exynos5422 @ 800 MHz
Model: Odroid XU4 based on EXYNOS5422
Board: Odroid XU4 based on EXYNOS5422
Type:  unknown
DRAM:  2 GiB
MMC:   EXYNOS DWMMC: 0, EXYNOS DWMMC: 1
MMC Device 0 ( SD ): 59.5 GiB
Card did not respond to voltage select!
mmc_init: -95, time 11
Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   No ethernet found.
Press quickly 'Enter' twice to stop autoboot:  0 
reading boot.ini
8293 bytes read in 5 ms (1.6 MiB/s)
cfgload: applying boot.ini...
cfgload: setenv initrd_high "0xffffffff"
cfgload: setenv fdt_high "0xffffffff"
cfgload: setenv condev "console=ttySAC2,115200n8"
cfgload: setenv kernel_addr_r "0x40008000"
cfgload: setenv initramfs_addr_r "0x46000000"
cfgload: setenv dtb_addr_r "0x44000000"
cfgload: setenv bootmem "console=tty1 ${condev} root=/dev/initrd ro ramdisk_size=100000 fsck.repair=yes ne
t.ifnames=0 no_console_suspend"                                                                          
cfgload: setenv disable_vu7 "true" # false
cfgload: setenv governor "performance"
cfgload: setenv external_watchdog "false"
cfgload: setenv external_watchdog_debounce "3"
cfgload: fatload mmc 0:1 ${kernel_addr_r} zImage
reading zImage
5787624 bytes read in 390 ms (14.2 MiB/s)
cfgload: fatload mmc 0:1 ${initramfs_addr_r} rootfs.cpio.uboot
reading rootfs.cpio.uboot
58734570 bytes read in 3886 ms (14.4 MiB/s)
cfgload: if test "${board_name}" = "xu4"; then fatload mmc 0:1 ${dtb_addr_r} exynos5422-odroidxu4.dtb; set
env fdtloaded "true"; fi                                                                                 
reading exynos5422-odroidxu4.dtb
63616 bytes read in 9 ms (6.7 MiB/s)
cfgload: if test "${board_name}" = "xu3"; then fatload mmc 0:1 ${dtb_addr_r} exynos5422-odroidxu3.dtb; set
env fdtloaded "true"; fi                                                                                 
cfgload: if test "${board_name}" = "xu3l"; then fatload mmc 0:1 ${dtb_addr_r} exynos5422-odroidxu3-lite.dt
b; setenv fdtloaded "true"; fi                                                                           
cfgload: if test "${fdtloaded}" != "true"; then fatload mmc 0:1 ${dtb_addr_r} exynos5422-odroidxu4.dtb; fi
cfgload: fdt addr ${dtb_addr_r}
cfgload: if test "${disable_vu7}" = "false"; then setenv hid_quirks "usbhid.quirks=0x0eef:0x0005:0x0004"; 
fi                                                                                                       
cfgload: if test "${external_watchdog}" = "true"; then setenv external_watchdog "external_watchdog=${exter
nal_watchdog} external_watchdog_debounce=${external_watchdog_debounce}"; fi                              
cfgload: setenv bootargs "${bootmem} ${videoconfig} ${hdmi_phy_control} ${hud_quirks} ${macaddrconfig} ${e
xternal_watchdog} governor=${governor}"                                                                  
cfgload: bootz ${kernel_addr_r} ${initramfs_addr_r} ${dtb_addr_r}
Kernel image @ 0x40008000 [ 0x000000 - 0x584fe8 ]
## Loading init Ramdisk from Legacy Image at 46000000 ...
   Image Name:   
   Image Type:   ARM Linux RAMDisk Image (uncompressed)
   Data Size:    58734506 Bytes = 56 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 44000000
   Booting using the fdt blob at 0x44000000
   Using Device Tree in place at 44000000, end 4401287f

Starting kernel ...

[hang]

How should I proceed with debugging this?

Cross-compiling with GCC 7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions