「カーネルの起動中...」以降、コンソールに出力が表示されなくなります。

「カーネルの起動中...」以降、コンソールに出力が表示されなくなります。

最新のカーネルを使用しようとしています。クリエイターCI20(v1)しかし、Linuxカーネルバージョン4.11.1では、u-bootの後に何の出力も得られません。結果は次のとおりです。

ci20# bootm 0x88000000;
## Booting kernel from Legacy Image at 88000000 ...
   Image Name:   Linux-4.11.1
   Image Type:   MIPS Linux Kernel Image (uncompressed)
   Data Size:    5043676 Bytes = 4.8 MiB
   Load Address: 80010000
   Entry Point:  8035d440
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Starting 

ラップトップステップ:

$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
$ git checkout v4.11.1
$ make ARCH=mips ci20_defconfig
$ make ARCH=mips CROSS_COMPILE=mipsel-linux-gnu- uImage
$ sudo cp arch/mips/boot/uImage.bin /tftpboot/uImage.4.11.1
$ sudo screen /dev/ttyUSB0 115200 

ci20のステップ:

dhcp 0x88000000 192.168.0.14:uImage.4.11.1
bootm 0x88000000;

4.10.1を使用して同じ手順を繰り返すと、すべてが期待どおりに機能し、カーネルが正常に起動することがわかります。

$ git checkout v4.10.1
$ make ARCH=mips ci20_defconfig
$ make ARCH=mips CROSS_COMPILE=mipsel-linux-gnu- uImage
$ sudo cp arch/mips/boot/uImage.bin /tftpboot/uImage.4.10.1

参考までに:

$ grep CONFIG_CMDLINE ./arch/mips/configs/ci20_defconfig
CONFIG_CMDLINE_BOOL=y
CONFIG_CMDLINE="earlycon console=ttyS4,115200 clk_ignore_unused"

tty / uartが何も表示しない問題(git bisect操作を使用せずに)をどのように追跡するのですか?

ベストアンサー1

回答や提案を受け取っていないため、ついにgit bisectv4.10.1(良い)とv4.11.1(悪い)の2つのタグの間で痛みを伴うプロセス(〜13回繰り返し)を行うことにしました。

これにより、次のことが行われます。

% git bisect good
73fbc1eba7ffa3bf0ad12486232a8a1edb4e4411 is the first bad commit
commit 73fbc1eba7ffa3bf0ad12486232a8a1edb4e4411
Author: Marcin Nowakowski <[email protected]>
Date:   Wed Nov 23 14:43:49 2016 +0100

    MIPS: fix mem=X@Y commandline processing

    When a memory offset is specified through the commandline, add the
    memory in range PHYS_OFFSET:Y as reserved memory area.
    Otherwise the bootmem allocator is initialised with low page equal to
    min_low_pfn = PHYS_OFFSET, and in free_all_bootmem will process pages
    starting from min_low_pfn instead of PFN(Y).

    Signed-off-by: Marcin Nowakowski <[email protected]>
    Cc: [email protected]
    Patchwork: https://patchwork.linux-mips.org/patch/14613/
    Signed-off-by: Ralf Baechle <[email protected]>

:040000 040000 fe26fcf6d072cbaedac5a417f9f6424df16d331c b99681a22464164b88c6a3cf77b1b87957cd95d6 M  arch

オンラインでコードを見てここ問題が現在u-boot設定にあることに気づきました。

ci20# printenv 
baudrate=115200 
board_date=20140704 
board_mfr=NP 
bootargs=console=ttyS4,115200 console=tty0 mem=256M@0x0 
mem=768M@0x30000000 rootwait quiet rw root=/dev/mmcblk0p1 
bootcmd=run ethargs; ext4load mmc 0:1 0x88000000 /boot/uImage; bootm 0x88000000 
bootdelay=1 
ethact=dm9000 
ethaddr=d0:31:10:ff:7d:20 
ethargs=env set bootargs ${bootargs} dm9000.mac_addr=${ethaddr} 
loads_echo=1 
serial#=1255 
stderr=eserial0,eserial4 
stdin=eserial0,eserial4 
stdout=eserial0,eserial4 

Environment size: 488/32764 bytes 

私はテストしていませんが、memenv変数は常にfalse値に初期化されているようです。指示する)、しかし最近はこれが問題になり始めました。

次のような可能コピー/貼り付けエラーを示します。

bootargs=console=ttyS4,115200 console=tty0 mem=256M@0x0 
mem=768M@0x30000000 rootwait quiet rw root=/dev/mmcblk0p1 

これが実際に導入された回帰であることが明らかになりました。

おすすめ記事