What I should check if kernel outputs nothing to console

I found a Linux kernel I had rebuilt does not output anything.
What should I check?

What I did:

  1. I rebuilt a Linux kernel with GCOV enabled.
  2. I checked if the flash area is sufficient to store the kernel, by executing cat /proc/mtd on a mangOH Yellow and swicwe on a laptop.
  3. I wrote the kernel module to WP7605 flash on the mangOH Yellow by swiflash, which rebooted the mangOH Yellow after I finished writing the module.

What I observed:

  • The output from CON(a serial console) when executing the rebuilt module was the same as that when extending the original one.
  • The LED on the mangOH Yellow was not yellow but green, which means the kernel boot procedures did not finish properly.
  • An Ethernet over USB connection between the mangOH Yellow and my Ubuntu computer was not established.

Details:
GCOV enabled means the following configuration variables are set to y:

  • CONFIG_GCOV_KERNEL
  • CONFIG_GCOV_PROFILE_ALL

Flash area versus kernel size
cat /proc/mtd

dev:    size   erasesize  name
mtd0: 00280000 00040000 "sbl"
mtd1: 00280000 00040000 "mibib"
mtd2: 00680000 00040000 "backup"
mtd3: 00100000 00040000 "security"
mtd4: 00200000 00040000 "persist"
mtd5: 01180000 00040000 "efs2"
mtd6: 04f40000 00040000 "swifota"
mtd7: 00180000 00040000 "tz"
mtd8: 000c0000 00040000 "devcfg"
mtd9: 000c0000 00040000 "rpm"
mtd10: 02000000 00040000 "modem"
mtd11: 00100000 00040000 "aboot"
mtd12: 00f00000 00040000 "boot"
mtd13: 01e00000 00040000 "system"
mtd14: 008c0000 00040000 "lefwkro"
mtd15: 01900000 00040000 "swirw"
mtd16: 08300000 00040000 "userapp"
mtd17: 03680000 00040000 "reserved"
mtd18: 02180000 00040000 "slot_2"
mtd19: 02180000 00040000 "slot_1"
mtd20: 02180000 00040000 "slot_0"

swicwe -P yocto_wp76xx_with_coverage.4k.cwe

 Type Size(Exclude Header) Product Compress Version
*APPL    39843984                Y921            0               Mon Mar 14 07:04:56 UTC 2022
 SYST    25427968                9X28            0               Mon Mar 14 07:04:56 UTC 2022
 APPS    14415216                9X28            0               3.18.131 20220314070454

Size comparison

  • The size of mtd13 (0x01e00000 = 31,457,280) is bigger than that of SYST (25,427,968).
  • The size of mtd12 (0x00f00000 = 15,728,640) is bigger than that of APPS (14,415,216).

Therefore the flash area is sufficient to store the kernel.