[Letux-kernel] CI20: how to boot upstream kernel?

H. Nikolaus Schaller hns at goldelico.com
Tue May 7 11:11:55 CEST 2019


Hi Paul,

> Am 06.05.2019 um 22:55 schrieb Paul Burton <paul.burton at mips.com>:
> 
> Hi Nikolaus,
> 
> On Mon, May 06, 2019 at 10:36:43PM +0200, H. Nikolaus Schaller wrote:
>>> And which UART connection
>>> are you using? The dedicated 4 pin UART header or one of the UARTs on
>>> the pi-like header?
>> 
>> I am using the pins on the dual-row 2.54mm header.
> 
> Ah, there we go :)
> 
>>> The kernel by default uses uart4, which is the dedicated 4 pin header
>>> (apart from on some very early prototypes if I recall correctly). U-Boot
>>> can output to both uart0 & uart4 at the same time though, so if you're
>>> looking at uart0 then it's expected that you'll see nothing from the
>>> kernel unless you change the stdout-path property in the DT to use
>>> uart0.
>> 
>> Ah, that could be an explanation. Also for the U-Boot issues that some
>> messages seem to be missing. It might be that U-Boot is emitting everything
>> on uart4 (which I am not looking at) and only parts on uart0. And if
>> kernel is emitting on uart4 only, I can't obviously see anything. This seems
>> to differ from the factory NAND images where all console comes on the pi-like
>> header.
>> 
>> I'll try to prove this theory tomorrow either by rewiring the console uart
>> or changing the DT.
> 
> Yeah, let me know if you still have problems but I think that will
> explain it.

Yes, it does! I can now boot my self-mase µSD with stone old Debian 5.0.4
rootfs I have taken from the Letux400/Mipsbook (jz4730 based) project. Big
progress. With this I now can try to make our own kernel configuration work
and debootstrap a more recent rootfs.

As soon as I have enabled our makesd script [2] for baking recent Debian images
for the CI20 (so far it only supports ca. 15 ARM based boards + Mipsbook)
I will let you know.

BTW: Paul Boddie has donated patches for JZ4730 support in modern kernels but
we had not yet reached a stage where the code could be tested. This will
become easier with working CI20 images and kernel builds to be used as a
reference.

> 
> If you were using the very first Debian image dated 2014-06-25 then it
> did output to uart0 by default. The next one dated 2014-09-12 &
> everything after that should be using uart4 on the 4-pin header [1].
> 
> I'd have thought a v2 board (which I believe were introduced in 2015)
> would have shipped with one of the newer images. So I'm confused by
> that, but hopefully looking at uart4 is an easy fix :)

It appears that the NAND contains a very old image, but it works. Even
incl. SGX which is my main motivation to look at the JZ4780/CI20.

> 
> Thanks,
>    Paul
> 
> [1] https://elinux.org/CI20_Distros_Legacy

BR and thanks which was of great help,
Nikolaus


[2]: http://projects.goldelico.com/p/gta04-makesd/

U-Boot 2013.10-rc3-00096-gef995a1-dirty (Apr 13 2019 - 19:15:18)

Board: ci20 (r2) (Ingenic XBurst JZ4780 SoC)
DRAM:  1 GiB
NAND:  8192 MiB
MMC:   jz_mmc msc1: 0
In:    eserial4
Out:   eserial4
Err:   eserial4
Net:   dm9000
Hit any key to stop autoboot:  0 
3206355 bytes read in 551 ms (5.5 MiB/s)
## Booting kernel from Legacy Image at 88000000 ...
 Image Name:   Linux-5.0.0+
 Image Type:   MIPS Linux Kernel Image (gzip compressed)
 Data Size:    3206291 Bytes = 3.1 MiB
 Load Address: 80010000
 Entry Point:  8048d520
 Verifying Checksum ... OK
 Uncompressing Kernel Image ... OK

Starting kernel ...

[    0.118596] cacheinfo: Failed to find cpu0 device node
INIT: version 2.86 booting
Files under mount point '/dev/shm' will be hidden. (warning).
Setting the system clock.
Cannot access the Hardware Clock via any known method.
Use the --debug option to see the details of our search for an access method.
Unable to set System Clock to: Thu Jan 1 00:07:10 UTC 1970 (warning).
Activating swap...done.
Checking root file system...fsck 1.41.3 (12-Oct-2008)
e2fsck 1.41.3 (12-Oct-2008)
rootfs: clean, 8956/246512 files, 89130/984832 blocks
done.
Setting the system clock.
Cannot access the Hardware Clock via any known method.
Use the --debug option to see the details of our search for an access method.
Unable to set System Clock to: Thu Jan 1 00:07:15 UTC 1970 (warning).
Cleaning up ifupdown....
Checking file systems...fsck 1.41.3 (12-Oct-2008)
done.
Setting kernel variables (/etc/sysctl.conf)...done.
Mounting local filesystems...done.
Activating swapfile swap...done.
Using default TMPTIME 0. (warning).
Setting up networking....
Configuring network interfaces.../etc/network/interfaces:2: misplaced option
ifup: couldn't read interfaces file "/etc/network/interfaces"
failed.
INIT: Entering runlevel: 2
Starting enhanced syslogd: rsyslogd.
Starting periodic command scheduler: crond.

Debian GNU/Linux 5.0 letux console

letux login: root
Linux letux 5.0.0+ #3740 PREEMPT Tue Apr 30 12:35:25 CEST 2019 mips

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
-bash: no job control in this shell
letux:~# 
letux:~# cat /etc/debian_version 
5.0.4
letux:~# 
letux:~# ps -ef
UID        PID  PPID  C STIME TTY          TIME CMD
root         1     0  0 00:07 ?        00:00:00 init [2]  
root         2     0  0 00:07 ?        00:00:00 [kthreadd]
root         3     2  0 00:07 ?        00:00:00 [rcu_gp]
root         4     2  0 00:07 ?        00:00:00 [rcu_par_gp]
root         5     2  0 00:07 ?        00:00:00 [kworker/0:0-eve]
root         6     2  0 00:07 ?        00:00:00 [kworker/0:0H-kb]
root         7     2  0 00:07 ?        00:00:00 [kworker/u2:0-ev]
root         8     2  0 00:07 ?        00:00:00 [mm_percpu_wq]
root         9     2  0 00:07 ?        00:00:00 [ksoftirqd/0]
root        10     2  0 00:07 ?        00:00:00 [rcu_preempt]
root        11     2  0 00:07 ?        00:00:00 [kdevtmpfs]
root        12     2  0 00:07 ?        00:00:00 [netns]
root        13     2  0 00:07 ?        00:00:00 [kworker/u2:1-ev]
root        14     2  0 00:07 ?        00:00:00 [rcu_tasks_kthre]
root        31     2  0 00:07 ?        00:00:00 [kworker/0:1-eve]
root       146     2  0 00:07 ?        00:00:00 [oom_reaper]
root       147     2  0 00:07 ?        00:00:00 [writeback]
root       149     2  0 00:07 ?        00:00:00 [crypto]
root       151     2  0 00:07 ?        00:00:00 [kblockd]
root       217     2  0 00:07 ?        00:00:00 [watchdogd]
root       300     2  0 00:07 ?        00:00:00 [rpciod]
root       301     2  0 00:07 ?        00:00:00 [kworker/u3:0]
root       302     2  0 00:07 ?        00:00:00 [xprtiod]
root       310     2  0 00:07 ?        00:00:00 [kswapd0]
root       311     2  0 00:07 ?        00:00:00 [nfsiod]
root       371     2  0 00:07 ?        00:00:00 [spi0]
root       391     2  0 00:07 ?        00:00:00 [irq/45-13450000]
root       393     2  0 00:07 ?        00:00:00 [irq/73-13450000]
root       395     2  0 00:07 ?        00:00:00 [irq/44-13460000]
root       397     2  0 00:07 ?        00:00:00 [kworker/0:2-eve]
root       404     2  0 00:07 ?        00:00:00 [kworker/0:3]
root       406     2  0 00:07 ?        00:00:00 [mmc_complete]
root       408     2  0 00:07 ?        00:00:00 [kworker/0:1H-mm]
root       410     2  0 00:07 ?        00:00:00 [kworker/u2:2-ev]
root       432     2  0 00:07 ?        00:00:00 [kworker/0:2H]
root       433     2  0 00:07 ?        00:00:00 [jbd2/mmcblk0p1-]
root       434     2  0 00:07 ?        00:00:00 [ext4-rsv-conver]
root       710     1  0 00:07 ?        00:00:00 /usr/sbin/rsyslogd -c3
root       733     1  0 00:07 ?        00:00:00 /usr/sbin/cron
root       751     1  0 00:07 ?        00:00:00 /bin/login --     
root       753   751  0 00:09 ?        00:00:00 -bash
root       757   753  0 00:09 ?        00:00:00 ps -ef
letux:~# 


More information about the Letux-kernel mailing list