# Linux Kernel Module Cheat

#### 3.5.3. Linux kernel early boot messages

When booting Linux on a slow emulator like gem5, what you observe is that:

- first nothing shows for a while

- then at once, a bunch of message lines show at once followed on aarch64 Linux 5.4.3 by:

      [    0.081311] printk: console [ttyAMA0] enabled

This means of course that all the previous messages had been generated earlier and stored, but were only printed to the terminal once the terminal itself was enabled.

Notably for example the very first message:

    [    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd070]

happens very early in the boot process.

If you get a failure before that, it will be hard to see the print messages.

One possible solution is to parse the dmesg buffer, gem5 actually implements that: gem5 `m5out/system.workload.dmesg` file.