1

The background is complex: I did an implementation of a complete FPGA SOC with a MIPS32r1 core, they're all written by VerilogHDL, so technically it's an unique "soft-board". It's running happily without any problem, I promise!

Recently I'm trying to adapt a 5.2 Linux Kernel on it, and here the problem comes: The UART serial written is compatible with 8250/16550 model, and it successfully print "hello world", you know, on the U-Boot, which means the serial driver from U-Boot works really well. But when I was dealing with Linux-Kernel 5.2 later, I enabled early_con with '8250/16550 and compatible serial support' and early_printf with EXPERT set, but unfortunately they both didn't ever "say" something.

Next I tried to define a DT:

  1 /dts-v1/;
  2 
  3 #include "./xilfpga/microAptiv.dtsi"
  4 
  5 / {
  6         compatible = "generic";
  7 
  8         aliases {
  9                 console = &uart_dev;
 10         };
 11 
 12         uart_dev: serial@bfe40000 {
 13                 compatible = "serial8250";
 14                 reg = <0xbfe40000 0x3fff>;
 15                 interrupts = <3 0>;
 16                 reg-shift = <0>;
 17                 clock-frequency = <66000000>;
 18         };
 19 
 20 };

and append it into vmlinux with below after I re-configured the kernel to support it.

mipsel-linux-gnu-objcopy --update-section .appended_dtb=arch/mips/boot/dts/cute.dtb

Although it's successfully compiled and appended, I still can't get any printed message when launching the kernel with cmdline below:

console=ttyS0,115200 initcall_debug=1 loglevel=20

or

earlycon console=ttyS0,115200 initcall_debug=1 loglevel=11

I expect the early message to be printed just like adapting the U-Boot after defined a DT, but it's not working. So I'm wondering if the early_con or early_printk needs an alternative board-level def or something else, or I'm doing bad... Much appreciated if you can provide any help!

  • 1
    Study https://falstaff.agner.ch/2015/10/17/linux-earlyprintkearlycon-support-on-arm/ It's slanted for ARM, but still informative. – sawdust Jul 29 '19 at 21:13

0 Answers0