在JZ2440上移植设备树---下:内核和设备树移植

在JZ2440上移植设备树—下:内核和设备树移植

本文参考了http://www.cnblogs.com/pengdonglin137/p/6241895.html及韦老师的内核移植视频

2、内核移植

在www.kernel.org上下载源码,我这里选取的是linux-4.15.10版本。
解压后,文件名重命名为linux-4.15.10-jz2440。 cd进入
既然要使用设备树,我们先看内核中是否已有支持2440的设备树文件。
cd arch/arm/boot/dts
ls
发现并没有支持2440的设备数,最接近的只有2416的设备数;
find -name “*defconfig” 发现在
arch/arm/configs 下有
mini2440_defconfig和s3c2410_defconfig两个接近的配置文件。

2.1 内核编译

2.1.1 添加设备树文件

我的思路是内核配置文件选取s3c2410_defconfig,
设备树复制s3c2416.dtsi为s3c2440.dtsi
复制s3c2416-pinctrl.dtsi为s3c2440-pinctrl.dtsi
复制s3c2416-smdk2416.dts为s3c2440-jz2440.dts
后面遇到问题,具体分析和修改。
介紹一下上面的几个设备树文件:

skeleton.dtsi 存放的是一個設備樹必備的一些基本屬性
s3c24xx.dtsi 中存放的是整個s3c24xx系列SoC公共的一些屬性,如中斷控制器、串口、看門狗、RTC、I2C控制器等等
s3c2440-pinctrl.dtsi 存放的是s3c2440這款SoC中GPIO控制器、外部中斷控制器、引腳複用等信息的配置
s3c2440.dtsi 存放的是s3c2440這個SoC跟其他s3c24xx系列不同的一些硬件信息,如clock控制器、串口等等
s3c2440-jz2440.dts 存放的是jz2440的硬件信息
設備樹這樣一層層包含的好處是: 在同名節點中,後出現的屬性會覆蓋前面出現的同名屬性,不同的屬性將來會合併到所隸屬的同名的節點下面。

先修改设备树的Makefile
vim arch/arm/boot/dts/Makefile
在JZ2440上移植设备树---下:内核和设备树移植_第1张图片
这样make dtbs的时候就会编译s3c2440-jz2440.dtb

2.1.2 添加jz2440的板子信息

修改Makefile和Kconfig,并添加jz2440的板子信息,使内核在启动时能从设备树文件中解析到的信息匹配到jz2440板子

2.1.2.1 修改arch/arm/mach-s3c24xx/Kconfig

添加如下信息:
在JZ2440上移植设备树---下:内核和设备树移植_第2张图片
这样的话,在make menuconfig的時候,选择这个这个配置。选择了这个配置,CONFIG_CLKSRC_OF/CONFIG_USE_OF/CONFIG_PINCTRL/CONFIG_S3C24XX都会被配置上。

2.1.2.1 修改arch/arm/mach-s3c24xx/Makefile

在JZ2440上移植设备树---下:内核和设备树移植_第3张图片
在menuconfig上选择了MACH_JZ2440后, 在make uImage的时候会定义CONFIG_MACH_JZ2440宏,这样就会编译mach-jz2440-dt.c

2.1.2.1 添加arch/arm/mach-s3c24xx/mach-jz2440-dt.c文件
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include "common.h"

static void __init jz2440_dt_map_io(void)
{
    s3c24xx_init_io(NULL, 0);
}

static void __init jz2440_dt_machine_init(void)
{
    s3c_pm_init();
}

static const char *const jz2440_dt_compat[] __initconst = {
    "samsung,s3c2440",
    "samsung,jz2440",
    NULL
};

DT_MACHINE_START(S3C2440_DT, "Samsung S3C2440 (Flattened Device Tree)")
    .dt_compat    = jz2440_dt_compat,
    .map_io        = jz2440_dt_map_io,
    .init_irq    = irqchip_init,
    .init_machine    = jz2440_dt_machine_init,
MACHINE_END

如果内核配置make menuconfig中选择支持设备树

make menuconfig ---> 
              Boot options ---> 
                       Flattened Device Tree support

那么内核在启动时,不会通过u-boot传入的machid来找到单板文件;而是通过上面的dt_compat数组中的信息和设备树中的compatible进行匹配,以此来找到相应单板文件。设备树中的相关设置如下图:
在JZ2440上移植设备树---下:内核和设备树移植_第4张图片

2.1.3 内核配置make menuconfig

在执行make menuconfig之前先要确定默认的配置文件。前面已有描述,选取s3c2410_defconfig作为默认配置文件,在内核代码主目录下先执行
make ARCH=arm exynos_defconfi
再执行
make ARCH=arm menuconfig 进入配置菜单
ps:前面讲过 配置内核支持设备树,配置内核支持JZ2440单板文件,这里不再重复。

2.1.3.1 配置打开内核调试

在啓動kernel的時候最煩人的是,uboot打印出”Starting kernel …”後,整個系統就沒有任何動靜了,此時,就需要打開內核早期的調試log,方法如下:
爲了能夠儘量看到更多內核啓動早期的log,一定要在內核配置文件中把內核早期的log配置打開:

Kernel hacking  --->
    [*] Kernel low-level debugging functions (read help!)
        Kernel low-level debugging port (Use Samsung S3C UART 0 for low-level debug)  --->
    [*] Early printk

除了上面的配置,還必須在bootargs中添加一個earlyprintk字符串,否則這些log還是打印不出來,此外,建議再在bootargs中添加一個ignore_loglevel參數,防止有些模塊的log由於loglevel的問題無法輸出log
具体的bootargs参数会在后面给出。

2.1.3.2 配置内核支持DM9000网卡

已经确定JZ2440上有DM90000,我们在内核配置时,先把相应配置选上。

make ARCH=arm menuconfig
[*] Networking support  --->
    Networking options  --->
        <*> Packet socket
        <*>Unix domain sockets 
        [*] TCP/IP networking
        [*]   IP: kernel level autoconfiguration
Device Drivers  --->
    [*] Network device support  --->
        [*]   Ethernet driver support (NEW)  --->
            <*>   DM9000 support
2.1.3.3 配置内核支持根文件系统类型

如果内核还没有移植好网卡和存储设备驱动,可以先尝试通过内存虚拟文件系统ramdisk先把内核调通,再去支持其他的文件系统类型。关于 ramdisk 的使用可以参考https://blog.csdn.net/u014213012/article/details/51582826
我在这里尝试使用nfs网络文件系统,相应内核配置如下:

File systems  --->
    [*] Network File Systems (NEW)  --->
        <*>   NFS client support
        [*]     NFS client support for NFS version 3
        [*]       NFS client support for the NFSv3 ACL protocol extension
        [*]   Root file system on NFS

bootargs启动参数设置如下:

bootargs=noinitrd root=/dev/nfs nfsroot=192.168.8.3:/nfs/rootfs rw
clk_ignore_unused console=ttySAC0,115200 init=/linuxrc
ip=192.168.8.4:192.168.8.3:192.168.8.1:255.255.255.0::eth0:off
ignore_loglevel earlyprintk

这里我们通过bootargs告知内核根文件系统为nfs网络文件系统,并详细的设置了ip,服务器ip,网关等网络参数信息,方便内核启动时直接通过这些参数去挂载nfs网络文件系统。这里我们直接采用韦老师制作好的文件系统—fs_mini_mdev_new.tar.bz2
将其解压到linux主机/nfs/rootfs目录下。
ps:
关于根文件系统的制作可以参考韦老师视频、华清相关课程和网络相关资料
关于uboot的环境变量及bootargs设置请参考:
https://blog.csdn.net/dzw19911024/article/details/52334254

2.1.4 内核编译

配置好内核.config文件后,在内核主目录下

make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-

编译生成zImage。其中的gcc版本为gcc-4.6.4,其安装和添加PATH方法不再赘述。

make dtbs ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-

编译设备树文件,把前面配置过的arch/arm/boot/dts里的dts文件编译成dtb文件。
cd arch/arm/boot 进入zImage目录,使用mkimage 工具将zImage制作成uImage

mkimage -A arm -O linux -T kernel -C none -a 0x31000000 -e 0x31000040 -n "jz2440" -d zImage uImage

我们先将生成的uImage文件和s3c2440-jz2440.dtb文件放入/tftpboot目录,使用tftp服务,在uboot启动时使用tftp服务将内核和设备树从tftp服务器中加载到内存,然后bootm。具体的bootcmd参数如下:

bootcmd=tftp 31000000 uImage; tftp 32000000 s3c2440-jz2440.dtb; bootm 31000000 - 32000000

先不管根文件系统和bootargs,直接启动板子,看内核启动运行情况。
结果发现,内核和设备树加载到内存后,内核无法正常运行;后续就是设备树的修改工作了;
ps:mkimage 的使用方法参考
https://blog.csdn.net/qq_29350001/article/details/51490415

2.2 修改设备树

因为前面配置了earlyprintk,串口正常情况下一定会有输出,这样我们就可以根据输出的信息,分析和查找原因,对症下药进行修改调整,并最终成功挂接到根文件系统,完成移植。

2.2.1 修改设备树compatible

前面提到过修改s3c2440-jz2440.dts设备树的compatible,同时也要修改s3c2440.dtsi中的compatible,这里不再重复。

2.2.2 修改串口部分

首先,我们发现串口到最后输出乱码:
在JZ2440上移植设备树---下:内核和设备树移植_第5张图片
根据此信息我们大概猜测为串口有两个问题,1、串口初始化较多,可能是多个串口之间产生了干扰;2、由于我们复制了2416的设备树文件,其中的信息还没改成2440。
打开s3c2440-jz2440.dts文件,将串口1至串口3的设备树信息先屏蔽掉;
在JZ2440上移植设备树---下:内核和设备树移植_第6张图片
打开s3c2440.dtsi文件,将串口属性改为2440,如下:
在JZ2440上移植设备树---下:内核和设备树移植_第7张图片

2.2.3 DM9000设备树配置

在s3c2440-jz2440.dts中添加

    srom-cs4@20000000 {
        compatible = "simple-bus";
        #address-cells = <1>;
        #size-cells = <1>;
        reg = <0x20000000 0x8000000>;
        ranges;
        ethernet@18000000 {
            compatible = "davicom,dm9000";
            reg = <0x20000000 0x2 0x20000004 0x2>;
            interrupt-parent = <&gpf>;
            interrupts = <7 4>;
            local-mac-address = [00 00 de ad be ef];
            davicom,no-eeprom;
        };
    };

重新编译设备树,并复制到/tftpboot目录;重启开发板,不出意外的话就会正常启动内核并加载根文件系统了:

U-Boot 2013.01 (May 15 2018 - 22:43:15)

CPUID: 32440001
FCLK:      400 MHz
HCLK:      100 MHz
PCLK:       50 MHz
DRAM:  64 MiB
WARNING: Caches not enabled
Flash: 2 MiB
NAND:  256 MiB
In:    serial
Out:   serial
Err:   serial
Net:   dm9000
Hit any key to stop autoboot:  0 
ERROR: resetting DM9000 -> not responding
dm9000 i/o: 0x20000000, id: 0x90000a46 
DM9000: running in 16 bit mode
MAC: 08:00:3e:26:0a:5b
could not establish link
Using dm9000 device
TFTP from server 192.168.8.3; our IP address is 192.168.8.4
Filename 'uImage'.
Load address: 0x31000000
Loading: #################################################################
         #################################################################
         #################################################################
         #######################################
         816.4 KiB/s
done
Bytes transferred = 3426600 (344928 hex)
dm9000 i/o: 0x20000000, id: 0x90000a46 
DM9000: running in 16 bit mode
MAC: 08:00:3e:26:0a:5b
could not establish link
Using dm9000 device
TFTP from server 192.168.8.3; our IP address is 192.168.8.4
Filename 's3c2440-jz2440.dtb'.
Load address: 0x32000000
Loading: #
         392.6 KiB/s
done
Bytes transferred = 6038 (1796 hex)
## Booting kernel from Legacy Image at 31000000 ...
   Image Name:   jz2440
   Created:      2018-05-19  14:57:09 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3426536 Bytes = 3.3 MiB
   Load Address: 31000000
   Entry Point:  31000040
   Verifying Checksum ... OK
## Flattened Device Tree blob at 32000000
   Booting using the fdt blob at 0x32000000
   XIP Kernel Image ... OK
OK
   Loading Device Tree to 33b23000, end 33b27795 ... OK

Starting kernel ...

Booting Linux on physical CPU 0x0
Linux version 4.15.10 (linux@linux) (gcc version 4.6.4 (crosstool-NG hg+default-2685dfa9de14 - tc0002)) #8 Sat May 19 22:55:44 CST 2018
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=0000717f
CPU: VIVT data cache, VIVT instruction cache
OF: fdt: Machine model: JZ2440
Memory policy: Data cache writeback
CPU S3C2440A (id 0x32440001)
DT missing boot CPU MPIDR[23:0], fall back to default cpu_logical_map
random: fast init done
Built 1 zonelists, mobility grouping on.  Total pages: 16256
Kernel command line: noinitrd root=/dev/nfs nfsroot=192.168.8.3:/nfs/rootfs rw clk_ignore_unused console=ttySAC0,115200 init=/linuxrc ip=192.168.8.4:192.168.8.3:192.168.8.1:255.255.255.0::eth0:off
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 57940K/65536K available (4885K kernel code, 265K rwdata, 1168K rodata, 224K init, 202K bss, 7596K reserved, 0K cma-reserved)
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    vmalloc : 0xc4800000 - 0xff800000   ( 944 MB)
    lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
    modules : 0xbf000000 - 0xc0000000   (  16 MB)
      .text : 0x(ptrval) - 0x(ptrval)   (4887 kB)
      .init : 0x(ptrval) - 0x(ptrval)   ( 224 kB)
      .data : 0x(ptrval) - 0x(ptrval)   ( 266 kB)
       .bss : 0x(ptrval) - 0x(ptrval)   ( 203 kB)
NR_IRQS: 111
irq: clearing pending status 00000002
Division by zero in kernel.
CPU: 0 PID: 0 Comm: swapper Not tainted 4.15.10 #8
Hardware name: Samsung S3C2440 (Flattened Device Tree)
[] (unwind_backtrace) from [] (show_stack+0x10/0x14)
[] (show_stack) from [] (Ldiv0+0x8/0x10)
[] (Ldiv0) from [] (samsung_pll6552_recalc_rate+0x54/0x64)
[] (samsung_pll6552_recalc_rate) from [] (clk_register+0x3bc/0x5e0)
[] (clk_register) from [] (clk_hw_register+0x8/0x14)
[] (clk_hw_register) from [] (samsung_clk_register_pll+0x2e4/0x3bc)
[] (samsung_clk_register_pll) from [] (s3c2443_common_clk_init+0x90/0x268)
[] (s3c2443_common_clk_init) from [] (of_clk_init+0x188/0x1fc)
[] (of_clk_init) from [] (time_init+0x28/0x34)
[] (time_init) from [] (start_kernel+0x220/0x394)
[] (start_kernel) from [<00000000>] (  (null))
Division by zero in kernel.
CPU: 0 PID: 0 Comm: swapper Not tainted 4.15.10 #8
Hardware name: Samsung S3C2440 (Flattened Device Tree)
[] (unwind_backtrace) from [] (show_stack+0x10/0x14)
[] (show_stack) from [] (Ldiv0+0x8/0x10)
[] (Ldiv0) from [] (samsung_pll6553_recalc_rate+0x4c/0x68)
[] (samsung_pll6553_recalc_rate) from [] (clk_register+0x3bc/0x5e0)
[] (clk_register) from [] (clk_hw_register+0x8/0x14)
[] (clk_hw_register) from [] (samsung_clk_register_pll+0x2e4/0x3bc)
[] (samsung_clk_register_pll) from [] (s3c2443_common_clk_init+0x90/0x268)
[] (s3c2443_common_clk_init) from [] (of_clk_init+0x188/0x1fc)
[] (of_clk_init) from [] (time_init+0x28/0x34)
[] (time_init) from [] (start_kernel+0x220/0x394)
[] (start_kernel) from [<00000000>] (  (null))
Division by zero in kernel.
CPU: 0 PID: 0 Comm: swapper Not tainted 4.15.10 #8
Hardware name: Samsung S3C2440 (Flattened Device Tree)
[] (unwind_backtrace) from [] (show_stack+0x10/0x14)
[] (show_stack) from [] (Ldiv0+0x8/0x10)
[] (Ldiv0) from [] (samsung_pll6553_recalc_rate+0x4c/0x68)
[] (samsung_pll6553_recalc_rate) from [] (clk_recalc+0x44/0x58)
[] (clk_recalc) from [] (__clk_recalc_rates+0x24/0x88)
[] (__clk_recalc_rates) from [] (clk_register+0x420/0x5e0)
[] (clk_register) from [] (clk_hw_register+0x8/0x14)
[] (clk_hw_register) from [] (clk_hw_register_mux_table+0xcc/0x1ac)
[] (clk_hw_register_mux_table) from [] (clk_hw_register_mux+0x4c/0x54)
[] (clk_hw_register_mux) from [] (samsung_clk_register_mux+0x60/0xac)
[] (samsung_clk_register_mux) from [] (s3c2443_common_clk_init+0xa0/0x268)
[] (s3c2443_common_clk_init) from [] (of_clk_init+0x188/0x1fc)
[] (of_clk_init) from [] (time_init+0x28/0x34)
[] (time_init) from [] (start_kernel+0x220/0x394)
[] (start_kernel) from [<00000000>] (  (null))
Division by zero in kernel.
CPU: 0 PID: 0 Comm: swapper Not tainted 4.15.10 #8
Hardware name: Samsung S3C2440 (Flattened Device Tree)
[] (unwind_backtrace) from [] (show_stack+0x10/0x14)
[] (show_stack) from [] (Ldiv0+0x8/0x10)
[] (Ldiv0) from [] (samsung_pll6552_recalc_rate+0x54/0x64)
[] (samsung_pll6552_recalc_rate) from [] (clk_recalc+0x44/0x58)
[] (clk_recalc) from [] (__clk_recalc_rates+0x24/0x88)
[] (__clk_recalc_rates) from [] (clk_register+0x420/0x5e0)
[] (clk_register) from [] (clk_hw_register+0x8/0x14)
[] (clk_hw_register) from [] (clk_hw_register_mux_table+0xcc/0x1ac)
[] (clk_hw_register_mux_table) from [] (clk_hw_register_mux+0x4c/0x54)
[] (clk_hw_register_mux) from [] (samsung_clk_register_mux+0x60/0xac)
[] (samsung_clk_register_mux) from [] (s3c2443_common_clk_init+0xa0/0x268)
[] (s3c2443_common_clk_init) from [] (of_clk_init+0x188/0x1fc)
[] (of_clk_init) from [] (time_init+0x28/0x34)
[] (time_init) from [] (start_kernel+0x220/0x394)
[] (start_kernel) from [<00000000>] (  (null))
Division by zero in kernel.
CPU: 0 PID: 0 Comm: swapper Not tainted 4.15.10 #8
Hardware name: Samsung S3C2440 (Flattened Device Tree)
[] (unwind_backtrace) from [] (show_stack+0x10/0x14)
[] (show_stack) from [] (Ldiv0+0x8/0x10)
[] (Ldiv0) from [] (samsung_pll6552_recalc_rate+0x54/0x64)
[] (samsung_pll6552_recalc_rate) from [] (clk_recalc+0x44/0x58)
[] (clk_recalc) from [] (__clk_recalc_rates+0x24/0x88)
[] (__clk_recalc_rates) from [] (__clk_recalc_rates+0x58/0x88)
[] (__clk_recalc_rates) from [] (clk_register+0x420/0x5e0)
[] (clk_register) from [] (clk_hw_register+0x8/0x14)
[] (clk_hw_register) from [] (_register_divider+0xd0/0x114)
[] (_register_divider) from [] (samsung_clk_register_div+0x64/0xdc)
[] (samsung_clk_register_div) from [] (s3c2443_common_clk_init+0xb0/0x268)
[] (s3c2443_common_clk_init) from [] (of_clk_init+0x188/0x1fc)
[] (of_clk_init) from [] (time_init+0x28/0x34)
[] (time_init) from [] (start_kernel+0x220/0x394)
[] (start_kernel) from [<00000000>] (  (null))
Division by zero in kernel.
CPU: 0 PID: 0 Comm: swapper Not tainted 4.15.10 #8
Hardware name: Samsung S3C2440 (Flattened Device Tree)
[] (unwind_backtrace) from [] (show_stack+0x10/0x14)
[] (show_stack) from [] (Ldiv0+0x8/0x10)
[] (Ldiv0) from [] (samsung_pll6552_recalc_rate+0x54/0x64)
[] (samsung_pll6552_recalc_rate) from [] (clk_recalc+0x44/0x58)
[] (clk_recalc) from [] (__clk_recalc_rates+0x24/0x88)
[] (__clk_recalc_rates) from [] (__clk_recalc_rates+0x58/0x88)
Division by zero in kernel.
CPU: 0 PID: 0 Comm: swapper Not tainted 4.15.10 #8
Hardware name: Samsung S3C2440 (Flattened Device Tree)
[] (unwind_backtrace) from [] (show_stack+0x10/0x14)
[] (show_stack) from [] (Ldiv0+0x8/0x10)
[] (Ldiv0) from [] (clockevents_config.part.2+0x18/0x78)
[] (clockevents_config.part.2) from [] (clockevents_config_and_register+0x1c/0x28)
[] (clockevents_config_and_register) from [] (_samsung_pwm_clocksource_init+0x17c/0x298)
[] (_samsung_pwm_clocksource_init) from [] (samsung_pwm_alloc+0x108/0x134)
[] (samsung_pwm_alloc) from [] (timer_probe+0x44/0xa0)
[] (timer_probe) from [] (start_kernel+0x220/0x394)
[] (start_kernel) from [<00000000>] (  (null))
------------[ cut here ]------------
WARNING: CPU: 0 PID: 0 at kernel/time/clockevents.c:44 cev_delta2ns+0x140/0x15c
Modules linked in:
CPU: 0 PID: 0 Comm: swapper Not tainted 4.15.10 #8
Hardware name: Samsung S3C2440 (Flattened Device Tree)
[] (unwind_backtrace) from [] (show_stack+0x10/0x14)
[] (show_stack) from [] (__warn+0xcc/0xf4)
[] (__warn) from [] (warn_slowpath_null+0x3c/0x48)
[] (warn_slowpath_null) from [] (cev_delta2ns+0x140/0x15c)
[] (cev_delta2ns) from [] (clockevents_config.part.2+0x4c/0x78)
[] (clockevents_config.part.2) from [] (clockevents_config_and_register+0x1c/0x28)
[] (clockevents_config_and_register) from [] (_samsung_pwm_clocksource_init+0x17c/0x298)
[] (_samsung_pwm_clocksource_init) from [] (samsung_pwm_alloc+0x108/0x134)
[] (samsung_pwm_alloc) from [] (timer_probe+0x44/0xa0)
[] (timer_probe) from [] (start_kernel+0x220/0x394)
[] (start_kernel) from [<00000000>] (  (null))
---[ end trace d70dfa618af44dc3 ]---
Division by zero in kernel.
CPU: 0 PID: 0 Comm: swapper Tainted: G        W        4.15.10 #8
Hardware name: Samsung S3C2440 (Flattened Device Tree)
[] (unwind_backtrace) from [] (show_stack+0x10/0x14)
[] (show_stack) from [] (Ldiv0_64+0x8/0x18)
[] (Ldiv0_64) from [] (clocks_calc_mult_shift+0x110/0x118)
[] (clocks_calc_mult_shift) from [] (sched_clock_register+0x54/0x234)
[] (sched_clock_register) from [] (_samsung_pwm_clocksource_init+0x244/0x298)
[] (_samsung_pwm_clocksource_init) from [] (samsung_pwm_alloc+0x108/0x134)
[] (samsung_pwm_alloc) from [] (timer_probe+0x44/0xa0)
[] (timer_probe) from [] (start_kernel+0x220/0x394)
[] (start_kernel) from [<00000000>] (  (null))
Division by zero in kernel.
CPU: 0 PID: 0 Comm: swapper Tainted: G        W        4.15.10 #8
Hardware name: Samsung S3C2440 (Flattened Device Tree)
[] (unwind_backtrace) from [] (show_stack+0x10/0x14)
[] (show_stack) from [] (Ldiv0_64+0x8/0x18)
[] (Ldiv0_64) from [] (clocks_calc_max_nsecs+0x28/0x74)
[] (clocks_calc_max_nsecs) from [] (sched_clock_register+0x90/0x234)
[] (sched_clock_register) from [] (_samsung_pwm_clocksource_init+0x244/0x298)
[] (_samsung_pwm_clocksource_init) from [] (samsung_pwm_alloc+0x108/0x134)
[] (samsung_pwm_alloc) from [] (timer_probe+0x44/0xa0)
[] (timer_probe) from [] (start_kernel+0x220/0x394)
[] (start_kernel) from [<00000000>] (  (null))
sched_clock: 16 bits at 0 Hz, resolution 0ns, wraps every 0ns
Division by zero in kernel.
CPU: 0 PID: 0 Comm: swapper Tainted: G        W        4.15.10 #8
Hardware name: Samsung S3C2440 (Flattened Device Tree)
[] (unwind_backtrace) from [] (show_stack+0x10/0x14)
[] (show_stack) from [] (Ldiv0_64+0x8/0x18)
[] (Ldiv0_64) from [] (clocks_calc_max_nsecs+0x28/0x74)
[] (clocks_calc_max_nsecs) from [] (__clocksource_update_freq_scale+0x178/0x2c0)
[] (__clocksource_update_freq_scale) from [] (__clocksource_register_scale+0x10/0xa8)
[] (__clocksource_register_scale) from [] (samsung_pwm_alloc+0x108/0x134)
[] (samsung_pwm_alloc) from [] (timer_probe+0x44/0xa0)
[] (timer_probe) from [] (start_kernel+0x220/0x394)
[] (start_kernel) from [<00000000>] (  (null))
clocksource: samsung_clocksource_timer: mask: 0xffff max_cycles: 0x0, max_idle_ns: 0 ns
Console: colour dummy device 80x30
Calibrating delay loop... 326.86 BogoMIPS (lpj=1634304)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0x30108400 - 0x3010847c
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
futex hash table entries: 256 (order: -1, 3072 bytes)
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
S3C Power Management, Copyright 2004 Simtec Electronics
S3C2440: Initialising architecture
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Advanced Linux Sound Architecture Driver Initialized.
Division by zero in kernel.
CPU: 0 PID: 1 Comm: swapper Tainted: G        W        4.15.10 #8
Hardware name: Samsung S3C2440 (Flattened Device Tree)
[] (unwind_backtrace) from [] (show_stack+0x10/0x14)
[] (show_stack) from [] (Ldiv0+0x8/0x10)
[] (Ldiv0) from [] (tk_setup_internals.constprop.3+0xcc/0x278)
[] (tk_setup_internals.constprop.3) from [] (timekeeping_notify+0x7c/0xe8)
[] (timekeeping_notify) from [] (__clocksource_select+0x98/0xf0)
[] (__clocksource_select) from [] (clocksource_done_booting+0x2c/0x44)
[] (clocksource_done_booting) from [] (do_one_initcall+0x44/0x170)
[] (do_one_initcall) from [] (kernel_init_freeable+0xfc/0x1b8)
[] (kernel_init_freeable) from [] (kernel_init+0x8/0xec)
[] (kernel_init) from [] (ret_from_fork+0x14/0x34)
clocksource: Switched to clocksource samsung_clocksource_timer
NET: Registered protocol family 2
TCP established hash table entries: 1024 (order: 0, 4096 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
Initialise system trusted keyrings
workingset: timestamp_bits=30 max_order=14 bucket_order=0
jffs2: version 2.2. (NAND) (SUMMARY)  漏 2001-2006 Red Hat, Inc.
romfs: ROMFS MTD (C) 2007 Red Hat, Inc.
Key type asymmetric registered
Asymmetric key parser 'x509' registered
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
io scheduler mq-deadline registered
io scheduler kyber registered
Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
50000000.serial: ttySAC0 at MMIO 0x50000000 (irq = 32, base_baud = 0) is a S3C2440
console [ttySAC0] enabled
lp: driver loaded but no devices found
ppdev: user-space parallel port driver
brd: module loaded
loop: module loaded
eth0: dm9000b at abf2171e,6a51261f IRQ 7 MAC: 00:00:de:ad:be:ef (platform data)
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ohci-s3c2410: OHCI S3C2410 driver
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial support registered for generic
usbcore: registered new interface driver ftdi_sio
usbserial: USB Serial support registered for FTDI USB Serial Device
usbcore: registered new interface driver pl2303
usbserial: USB Serial support registered for pl2303
s3c-rtc 57000000.rtc: rtc disabled, re-enabling
rtc rtc0: invalid alarm value: 1900-2-1 0:0:0
s3c-rtc 57000000.rtc: rtc core: registered s3c as rtc0
Division by zero in kernel.
CPU: 0 PID: 1 Comm: swapper Tainted: G        W        4.15.10 #8
Hardware name: Samsung S3C2440 (Flattened Device Tree)
[] (unwind_backtrace) from [] (show_stack+0x10/0x14)
[] (show_stack) from [] (Ldiv0+0x8/0x10)
[] (Ldiv0) from [] (s3c2410wdt_probe+0x134/0x410)
[] (s3c2410wdt_probe) from [] (platform_drv_probe+0x54/0xa4)
[] (platform_drv_probe) from [] (driver_probe_device+0x254/0x314)
[] (driver_probe_device) from [] (__driver_attach+0xa4/0xa8)
[] (__driver_attach) from [] (bus_for_each_dev+0x5c/0x8c)
[] (bus_for_each_dev) from [] (bus_add_driver+0x154/0x1ec)
[] (bus_add_driver) from [] (driver_register+0x78/0xf4)
[] (driver_register) from [] (do_one_initcall+0x44/0x170)
[] (do_one_initcall) from [] (kernel_init_freeable+0xfc/0x1b8)
[] (kernel_init_freeable) from [] (kernel_init+0x8/0xec)
[] (kernel_init) from [] (ret_from_fork+0x14/0x34)
watchdog: Invalid min and max timeout values, resetting to 0!
Division by zero in kernel.
CPU: 0 PID: 1 Comm: swapper Tainted: G        W        4.15.10 #8
Hardware name: Samsung S3C2440 (Flattened Device Tree)
[] (unwind_backtrace) from [] (show_stack+0x10/0x14)
[] (show_stack) from [] (Ldiv0+0x8/0x10)
[] (Ldiv0) from [] (s3c2410wdt_set_heartbeat+0x78/0xcc)
[] (s3c2410wdt_set_heartbeat) from [] (s3c2410wdt_probe+0x15c/0x410)
[] (s3c2410wdt_probe) from [] (platform_drv_probe+0x54/0xa4)
[] (platform_drv_probe) from [] (driver_probe_device+0x254/0x314)
[] (driver_probe_device) from [] (__driver_attach+0xa4/0xa8)
[] (__driver_attach) from [] (bus_for_each_dev+0x5c/0x8c)
[] (bus_for_each_dev) from [] (bus_add_driver+0x154/0x1ec)
[] (bus_add_driver) from [] (driver_register+0x78/0xf4)
[] (driver_register) from [] (do_one_initcall+0x44/0x170)
[] (do_one_initcall) from [] (kernel_init_freeable+0xfc/0x1b8)
[] (kernel_init_freeable) from [] (kernel_init+0x8/0xec)
[] (kernel_init) from [] (ret_from_fork+0x14/0x34)
s3c2410-wdt 53000000.watchdog: watchdog inactive, reset disabled, irq disabled
NET: Registered protocol family 10
Segment Routing with IPv6
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered protocol family 17
Loading compiled-in X.509 certificates
s3c-rtc 57000000.rtc: setting system clock to 2000-01-01 10:13:35 UTC (946721615)
dm9000 20000000.ethernet eth0: link down
IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
dm9000 20000000.ethernet eth0: link down
IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
IP-Config: Complete:
     device=eth0, hwaddr=00:00:de:ad:be:ef, ipaddr=192.168.8.4, mask=255.255.255.0, gw=192.168.8.1
     host=192.168.8.4, domain=, nis-domain=(none)
     bootserver=192.168.8.3, rootserver=192.168.8.3, rootpath=
clk: Not disabling unused clocks
ALSA device list:
  No soundcards found.
VFS: Mounted root (nfs filesystem) on device 0:10.
Freeing unused kernel memory: 224K
This architecture does not have kernel memory protection.
dm9000 20000000.ethernet eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1

Please press Enter to activate this console. 
/ # 

你可能感兴趣的:(linux系统移植)