20170524_jeffrey - silenceuncrio/diary GitHub Wiki

0910

昨天 恆濕恆溫機 裡面所謂的 使用 旺宏 NAND Flash 的 M300

Morris 說搞錯了

其實那一台使用的是 SD 卡

0925

幫忙準備昨天 build 好的 image 給 morris 作測試

這兩片都是使用 NAND Flash

一片是 旺宏

一片是 華邦

為了實驗方便

先把 bootdelay 改成 3

0930

發現昨天所謂的對 17 個 暫存器寫值的動作

mw 020e0404 000010b0 1
mw 020e0408 000010b0 1
mw 020e040c 000010b0 1
mw 020e0410 000010b0 1
mw 020e0414 000010b0 1
mw 020e0418 000010b0 1
mw 020e041c 000010b0 1
mw 020e0420 000010b0 1

mw 020e0424 000010b0 1
mw 020e0428 000010b0 1
mw 020e042c 000010b0 1
mw 020e0430 000010b0 1
mw 020e0434 000010b0 1
mw 020e0438 000010b0 1
mw 020e043c 000010b0 1
mw 020e0440 000010b0 1
mw 020e0444 000010b0 1

因為值都相同

可以用 mw 020e0404 000010b0 11 取代

讀值也可以使用 md 020e0404 11

這邊的 11 是 16 進位 - 也就是 10 進位的 17

1015

找到 U-Boot 裡針對 DSE 設定的相關 source code

board\freescale\mx6ul_14x14_evk\mx6ul_14x14_evk.c

#ifdef CONFIG_SYS_USE_NAND
static iomux_v3_cfg_t const nand_pads[] = {
	MX6_PAD_NAND_DATA00__RAWNAND_DATA00 | MUX_PAD_CTRL(GPMI_PAD_CTRL2),
	MX6_PAD_NAND_DATA01__RAWNAND_DATA01 | MUX_PAD_CTRL(GPMI_PAD_CTRL2),
	MX6_PAD_NAND_DATA02__RAWNAND_DATA02 | MUX_PAD_CTRL(GPMI_PAD_CTRL2),
	MX6_PAD_NAND_DATA03__RAWNAND_DATA03 | MUX_PAD_CTRL(GPMI_PAD_CTRL2),
	MX6_PAD_NAND_DATA04__RAWNAND_DATA04 | MUX_PAD_CTRL(GPMI_PAD_CTRL2),
	MX6_PAD_NAND_DATA05__RAWNAND_DATA05 | MUX_PAD_CTRL(GPMI_PAD_CTRL2),
	MX6_PAD_NAND_DATA06__RAWNAND_DATA06 | MUX_PAD_CTRL(GPMI_PAD_CTRL2),
	MX6_PAD_NAND_DATA07__RAWNAND_DATA07 | MUX_PAD_CTRL(GPMI_PAD_CTRL2),
	MX6_PAD_NAND_CLE__RAWNAND_CLE | MUX_PAD_CTRL(GPMI_PAD_CTRL2),
	MX6_PAD_NAND_ALE__RAWNAND_ALE | MUX_PAD_CTRL(GPMI_PAD_CTRL2),
	MX6_PAD_NAND_CE0_B__RAWNAND_CE0_B | MUX_PAD_CTRL(GPMI_PAD_CTRL2),
	MX6_PAD_NAND_CE1_B__RAWNAND_CE1_B | MUX_PAD_CTRL(GPMI_PAD_CTRL2),
	MX6_PAD_NAND_RE_B__RAWNAND_RE_B | MUX_PAD_CTRL(GPMI_PAD_CTRL2),
	MX6_PAD_NAND_WE_B__RAWNAND_WE_B | MUX_PAD_CTRL(GPMI_PAD_CTRL2),
	MX6_PAD_NAND_WP_B__RAWNAND_WP_B | MUX_PAD_CTRL(GPMI_PAD_CTRL2),
	MX6_PAD_NAND_READY_B__RAWNAND_READY_B | MUX_PAD_CTRL(GPMI_PAD_CTRL2),
	MX6_PAD_NAND_DQS__RAWNAND_DQS | MUX_PAD_CTRL(GPMI_PAD_CTRL2),
};

static void setup_gpmi_nand(void)
{
	struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR;

	/* config gpmi nand iomux */
	imx_iomux_v3_setup_multiple_pads(nand_pads, ARRAY_SIZE(nand_pads));

	clrbits_le32(&mxc_ccm->CCGR4,
		     MXC_CCM_CCGR4_RAWNAND_U_BCH_INPUT_APB_MASK |
		     MXC_CCM_CCGR4_RAWNAND_U_GPMI_BCH_INPUT_BCH_MASK |
		     MXC_CCM_CCGR4_RAWNAND_U_GPMI_BCH_INPUT_GPMI_IO_MASK |
		     MXC_CCM_CCGR4_RAWNAND_U_GPMI_INPUT_APB_MASK |
		     MXC_CCM_CCGR4_PL301_MX6QPER1_BCH_MASK);

	/*
	 * config gpmi and bch clock to 100 MHz
	 * bch/gpmi select PLL2 PFD2 400M
	 * 100M = 400M / 4
	 */
	clrbits_le32(&mxc_ccm->cscmr1,
		     MXC_CCM_CSCMR1_BCH_CLK_SEL |
		     MXC_CCM_CSCMR1_GPMI_CLK_SEL);
	clrsetbits_le32(&mxc_ccm->cscdr1,
			MXC_CCM_CSCDR1_BCH_PODF_MASK |
			MXC_CCM_CSCDR1_GPMI_PODF_MASK,
			(3 << MXC_CCM_CSCDR1_BCH_PODF_OFFSET) |
			(3 << MXC_CCM_CSCDR1_GPMI_PODF_OFFSET));

	/* enable gpmi and bch clock gating */
	setbits_le32(&mxc_ccm->CCGR4,
		     MXC_CCM_CCGR4_RAWNAND_U_BCH_INPUT_APB_MASK |
		     MXC_CCM_CCGR4_RAWNAND_U_GPMI_BCH_INPUT_BCH_MASK |
		     MXC_CCM_CCGR4_RAWNAND_U_GPMI_BCH_INPUT_GPMI_IO_MASK |
		     MXC_CCM_CCGR4_RAWNAND_U_GPMI_INPUT_APB_MASK |
		     MXC_CCM_CCGR4_PL301_MX6QPER1_BCH_MASK);

	/* enable apbh clock gating */
	setbits_le32(&mxc_ccm->CCGR0, MXC_CCM_CCGR0_APBHDMA_MASK);
}
#endif
...
int board_init(void)
{
	...
#ifdef CONFIG_SYS_USE_NAND
	setup_gpmi_nand();
#endif
	...
	return 0;
}

這邊的 setup_gpmi_nand() 其實就已經把定義在 nand_pads[] 裡的 17 個跟 NAND 相關的暫存器都設定好了

實在不太明白為何同一組值我利用 U-Boot 的 mw 再去寫一次就讓 NAND Flash 動作變正常了

這個線索就先放著吧

先看昨天的 image 在今天的低溫表現得如何

1325

零下40度的狀態下開機失敗

出現下述訊息

U-Boot 2015.04imx_v2015.04_4.1.15_1.2.0_ga+gede7538 (May 19 2017 - 07:59:20)

CPU:   Freescale i.MX6UL rev1.1 at 396 MHz
CPU:   Temperature -140462640 C
Reset cause: POR
Board: MX6UL 14x14 EVK
I2C:   ready
DRAM:  512 MiB
force_idle_bus: sda=0 scl=0 sda.gp=0x1d scl.gp=0x1c
NAND:  256 MiB
MMC:   FSL_SDHC: 0
cannot support the NAND, missing necessary info
MXS NAND: DMA read error
NAND read from offset 300000 failed -110
*** Warning - readenv() failed, using default environment

Display: TFT43AB (480x272)
Video: 480x272x24
In:    serial
Out:   serial
Err:   serial
Net:   FEC1
Error: FEC1 address not set.

Normal Boot
Hit any key to stop autoboot:  0
run primary app
run bootargs_a
bootargs for room a

NAND read: device 0 offset 0x400000, size 0x800000
MXS NAND: DMA read error
NAND read from offset 400000 failed -110
 0 bytes read: ERROR

NAND read: device 0 offset 0xe00000, size 0x100000
MXS NAND: DMA read error
NAND read from offset e00000 failed -110
 0 bytes read: ERROR
Saving Environment to NAND...
Erasing NAND...
Erasing at 0x3e0000 -- 100% complete.
Writing to NAND... OK
Kernel image @ 0x80800000 [ 0x000000 - 0x4c1f38 ]
## Flattened Device Tree blob at 83000000
   Booting using the fdt blob at 0x83000000
   Using Device Tree in place at 83000000, end 8300a23c
fdt_find_or_add_subnode: memory: FDT_ERR_BADSTRUCTURE
ERROR: arch-specific fdt fixup failed
 - must RESET the board to recover.

FDT creation failed! hanging...### ERROR ### Please RESET the board ###

一開始就出現 cannot support the NAND, missing necessary info

U-Boot Image Layout for NAND Flash v2.1

image

那我連 boot_env 這塊 MTD 都讀不到的話

根本連使用 mw 去寫暫存器的機會都沒有

看來還是要去修改 U-Boot 才行

先放棄昨天的修改

➜  build_small git:(develop) git reset HEAD^
Unstaged changes after reset:
M       proscend/base_fs/default/rootfs/etc/rc.local
M       proscend/prosrc/icos/script/uboot_env.sh
➜  build_small git:(develop) ✗ git status
On branch develop
Your branch is up-to-date with 'origin/develop'.
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   ../proscend/base_fs/default/rootfs/etc/rc.local
        modified:   ../proscend/prosrc/icos/script/uboot_env.sh

no changes added to commit (use "git add" and/or "git commit -a")
➜  build_small git:(develop) ✗ git checkout ../proscend/base_fs/default/rootfs/etc/rc.local
➜  build_small git:(develop) ✗ git checkout ../proscend/prosrc/icos/script/uboot_env.sh
➜  build_small git:(develop) git status
On branch develop
Your branch is up-to-date with 'origin/develop'.
nothing to commit, working directory clean
➜  build_small git:(develop) git log

1345

來修改 <u-boot-imx>\include\configs\mx6ul_14x14_evk.h

  • bitbake u-boot-imx -c devshell
  • quilt new remove_fsl_usdhc_and_vedio.patch
  • quilt add include/configs/mx6ul_14x14_evk.h
  • 刪除 CONFIG_FSL_USDHCCONFIG_VIDEO 這兩個 define
  • quilt refresh
  • cp patches/remove_fsl_usdhc_and_vedio.patch to meta-proscend/recipes-bsp/u-boot/files/
  • modify meta-proscend\recipes-bsp\u-boot\u-boot-imx_2015.04.bbappend
    FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
    
    SRC_URI_append = " \
        file://000_enable_ENET_CLK_when_booting.patch \
        file://add_mx6ul_14x14_evk_nand_config.patch \
        file://set_do_default_low.patch \
        file://nandflash.patch \
        file://uboot_env_v1.0.patch \
        file://modify_bootup_temperature_limit.patch \
        file://remove_fsl_usdhc_and_vedio.patch \
    "
    
  • bitbake u-boot-imx -c clean
  • bitbake u-boot-imx
    • 確認新的 patch compile 沒有問題

直接產生一個新的 image 來做實驗

1450

目前已經成功的在 零下40度的狀態下 做完了 firmware upgrade

兩台都 upgrade 成功

先關機個十分鐘

待會再看看開機成不成功

1455

先看 華邦 的

上電開機

U-Boot 2015.04imx_v2015.04_4.1.15_1.2.0_ga+gede7538 (May 24 2017 - 06:03:10)

CPU:   Freescale i.MX6UL rev1.1 at 396 MHz
CPU:   Temperature -140462639 C
Reset cause: POR
Board: MX6UL 14x14 EVK
I2C:   ready
DRAM:  512 MiB
force_idle_bus: sda=0 scl=0 sda.gp=0x1d scl.gp=0x1c
NAND:  0 MiB
*** Warning - readenv() failed, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   FEC1
Error: FEC1 address not set.

Normal Boot
Hit any key to stop autoboot:  0
run primary app
run bootargs_a
bootargs for room a

no devices available

no devices available
Saving Environment to NAND...
Erasing NAND...
Attempt to erase non block-aligned data
Bad Linux ARM zImage magic!

這時候就卡住了

確認一下暫存器的值

=> md 020e0404 11
020e0404: 0000b0b1 0000b0b1 0000b0b1 0000b0b1    ................
020e0414: 0000b0b1 0000b0b1 0000b0b1 0000b0b1    ................
020e0424: 0000b0b1 0000b0b1 0000b0b1 0000b0b1    ................
020e0434: 0000b0b1 0000b0b1 0000b0b1 0000b0b1    ................
020e0444: 0000b0b1                               ....
=>

都是 0000b0b1

拔電再上電

U-Boot 2015.04imx_v2015.04_4.1.15_1.2.0_ga+gede7538 (May 24 2017 - 06:03:10)

CPU:   Freescale i.MX6UL rev1.1 at 396 MHz
CPU:   Temperature -140462633 C
Reset cause: POR
Board: MX6UL 14x14 EVK
I2C:   ready
DRAM:  512 MiB
force_idle_bus: sda=0 scl=0 sda.gp=0x1d scl.gp=0x1c
NAND:  256 MiB
In:    serial
Out:   serial
Err:   serial
Net:   FEC1
Error: FEC1 address not set.

Normal Boot
Hit any key to stop autoboot:  0
run primary app
run bootargs_b
bootargs for room b

NAND read: device 0 offset 0x8400000, size 0x800000
 8388608 bytes read: OK

NAND read: device 0 offset 0x8e00000, size 0x100000
 1048576 bytes read: OK
Saving Environment to NAND...
Erasing NAND...
Erasing at 0x3e0000 -- 100% complete.
Writing to NAND... OK
Kernel image @ 0x80800000 [ 0x000000 - 0x4c1f38 ]
## Flattened Device Tree blob at 83000000
   Booting using the fdt blob at 0x83000000
   Using Device Tree in place at 83000000, end 8300a23c

Starting kernel ...

Booting Linux on physical CPU 0x0
...
### module <system> init
### module <syslog> init
### module <switch> init
### module <wanst> init
/etc/rc.local: line 169:   317 Bus error               /usr/sbin/icosconfig bootinit
error
INIT: cannot execute "/sbin/getty"
INIT: cannot execute "/sbin/getty"
INIT: cannot execute "/sbin/getty"
INIT: cannot execute "/sbin/getty"
INIT: cannot execute "/sbin/getty"
INIT: cannot execute "/sbin/getty"
INIT: cannot execute "/sbin/getty"
INIT: cannot execute "/sbin/getty"
INIT: cannot execute "/sbin/getty"
INIT: cannot execute "/sbin/getty"
INIT: cannot execute "/sbin/getty"
INIT: cannot execute "/sbin/getty"
INIT: cannot execute "/sbin/getty"
INIT: cannot execute "/sbin/getty"
INIT: cannot execute "/sbin/getty"
INIT: cannot execute "/sbin/getty"
INIT: cannot execute "/sbin/getty"
INIT: cannot execute "/sbin/getty"
INIT: cannot execute "/sbin/getty"
INIT: Id "mxc0" respawning too fast: disabled for 5 minutes
INIT: cannot execute "/sbin/getty"
INIT: Id "1" respawning too fast: disabled for 5 minutes
INIT: no more processes left in this runlevel

這邊又卡住了

不過 拔電再上電 後就都好了

1520

換來試 旺宏 的

U-Boot 2015.04imx_v2015.04_4.1.15_1.2.0_ga+gede7538 (May 24 2017 - 06:03:10)

CPU:   Freescale i.MX6UL rev1.1 at 396 MHz
CPU:   Temperature -140462639 C
Reset cause: POR
Board: MX6UL 14x14 EVK
I2C:   ready
DRAM:  512 MiB
force_idle_bus: sda=0 scl=0 sda.gp=0x1d scl.gp=0x1c
NAND:  256 MiB
cannot support the NAND, missing necessary info
MXS NAND: DMA read error
NAND read from offset 300000 failed -110
*** Warning - readenv() failed, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   FEC1
Error: FEC1 address not set.

Normal Boot
Hit any key to stop autoboot:  0
run primary app
run bootargs_a
bootargs for room a

NAND read: device 0 offset 0x400000, size 0x800000
 8388608 bytes read: OK

NAND read: device 0 offset 0xe00000, size 0x100000
 1048576 bytes read: OK
Saving Environment to NAND...
Erasing NAND...
Erasing at 0x3e0000 -- 100% complete.
Writing to NAND... OK
Kernel image @ 0x80800000 [ 0x000000 - 0x4c1f38 ]
## Flattened Device Tree blob at 83000000
   Booting using the fdt blob at 0x83000000
   Using Device Tree in place at 83000000, end 8300a23c
fdt_find_or_add_subnode: memory: FDT_ERR_BADSTRUCTURE
ERROR: arch-specific fdt fixup failed
 - must RESET the board to recover.

FDT creation failed! hanging...### ERROR ### Please RESET the board ###

這邊卡住

拔電再上電

U-Boot 2015.04imx_v2015.04_4.1.15_1.2.0_ga+gede7538 (May 24 2017 - 06:03:10)

CPU:   Freescale i.MX6UL rev1.1 at 396 MHz
CPU:   Temperature -140462635 C
Reset cause: POR
Board: MX6UL 14x14 EVK
I2C:   ready
DRAM:  512 MiB
force_idle_bus: sda=0 scl=0 sda.gp=0x1d scl.gp=0x1c
NAND:  256 MiB
NAND read from offset 300000 failed -74
*** Warning - readenv() failed, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   FEC1
Error: FEC1 address not set.

Normal Boot
Hit any key to stop autoboot:  0
run primary app
run bootargs_a
bootargs for room a

NAND read: device 0 offset 0x400000, size 0x800000
 8388608 bytes read: OK

NAND read: device 0 offset 0xe00000, size 0x100000
 1048576 bytes read: OK
Saving Environment to NAND...
Erasing NAND...
Erasing at 0x3e0000 -- 100% complete.
Writing to NAND... OK
Kernel image @ 0x80800000 [ 0x000000 - 0x4c1f38 ]
## Flattened Device Tree blob at 83000000
   Booting using the fdt blob at 0x83000000
   Using Device Tree in place at 83000000, end 8300a23c

Starting kernel ...
...
### module <system> init
...
Mobile Router login:

開機成功

注意到這時候還是有出現 *** Warning - readenv() failed, using default environment

目前並沒有透過任何 mw 去複寫任何 DSE 相關的值

這表示 刪除 CONFIG_FSL_USDHCCONFIG_VIDEO 這兩個 define 已經成功了

1535

參考 SD 卡 DSE 的設定

#define USDHC_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_PUE |		\
	PAD_CTL_PUS_22K_UP  | PAD_CTL_SPEED_LOW |		\
	PAD_CTL_DSE_80ohm   | PAD_CTL_SRE_FAST  | PAD_CTL_HYS)

目前 NAND 用的是 GPMI_PAD_CTRL2

#define GPMI_PAD_CTRL0 (PAD_CTL_PKE | PAD_CTL_PUE | PAD_CTL_PUS_100K_UP)
#define GPMI_PAD_CTRL1 (PAD_CTL_DSE_40ohm | PAD_CTL_SPEED_MED | \
			PAD_CTL_SRE_FAST)
#define GPMI_PAD_CTRL2 (GPMI_PAD_CTRL0 | GPMI_PAD_CTRL1)

試著用跟 SD 相同的設定

繼續 patch

  • bitbake u-boot-imx -c devshell
  • quilt new use_usdhc_pad_ctrl_in_gpmi_pad_ctrl.patch
  • quilt add board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
  • 用跟 SD 相同的設定
  • quilt refresh
  • cp patches/use_usdhc_pad_ctrl_in_gpmi_pad_ctrl.patch to meta-proscend/recipes-bsp/u-boot/files/
  • modify meta-proscend\recipes-bsp\u-boot\u-boot-imx_2015.04.bbappend
    FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
    
    SRC_URI_append = " \
        file://000_enable_ENET_CLK_when_booting.patch \
        file://add_mx6ul_14x14_evk_nand_config.patch \
        file://set_do_default_low.patch \
        file://nandflash.patch \
        file://uboot_env_v1.0.patch \
        file://modify_bootup_temperature_limit.patch \
        file://remove_fsl_usdhc_and_vedio.patch \
        file://use_usdhc_pad_ctrl_in_gpmi_pad_ctrl.patch \
    "
    
  • bitbake u-boot-imx -c clean
  • bitbake u-boot-imx
    • 確認新的 patch compile 沒有問題

直接產生一個新的 image 來做實驗

1640

旺宏 一次就開起來了

在冰了半小時之後

華邦的雖然開起來了

不過


U-Boot 2015.04imx_v2015.04_4.1.15_1.2.0_ga+gede7538 (May 24 2017 - 08:04:15)

CPU:   Freescale i.MX6UL rev1.1 at 396 MHz
CPU:   Temperature -140462639 C
Reset cause: POR
Board: MX6UL 14x14 EVK
I2C:   ready
DRAM:  512 MiB
force_idle_bus: sda=0 scl=0 sda.gp=0x1d scl.gp=0x1c
NAND:  256 MiB
In:    serial
Out:   serial
Err:   serial
Net:   FEC1
Error: FEC1 address not set.

Normal Boot
Hit any key to stop autoboot:  0
run primary app
run bootargs_a
bootargs for room a

NAND read: device 0 offset 0x400000, size 0x800000
 8388608 bytes read: OK

NAND read: device 0 offset 0xe00000, size 0x100000
 1048576 bytes read: OK
Saving Environment to NAND...
Erasing NAND...
Erasing at 0x3e0000 -- 100% complete.
Writing to NAND... OK
Kernel image @ 0x80800000 [ 0x000000 - 0x4c1f38 ]
## Flattened Device Tree blob at 83000000
   Booting using the fdt blob at 0x83000000
   Using Device Tree in place at 83000000, end 8300a23c

Starting kernel ...

Booting Linux on physical CPU 0x0
Linux version 4.1.15-1.2.0+g77f6154 (build@76209d129a5e) (gcc version 5.2.0 (GCC) ) #1 SMP PREEMPT M
on Apr 10 02:21:03 UTC 2017
CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c53c7d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine model: Freescale i.MX6 UltraLite 14x14 EVK Board
cma: Reserved 320 MiB at 0x8c000000
Memory policy: Data cache writealloc
PERCPU: Embedded 12 pages/cpu @8bb36000 s17216 r8192 d23744 u49152
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
Kernel command line: console=ttymxc0,115200 ubi.mtd=4 root=ubi0:rootfs_a rootfstype=ubifs mtdparts=g
pmi-nand:3m(boot),1m(boot_env),10m(kernel_a),2m(dtb_a),96m(rootfs_a),16m(config_a),4m(misc),10m(kern
el_b),2m(dtb_b),96m(rootfs_b),-(config_b)
PID hash table entries: 2048 (order: 1, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 181736K/524288K available (6140K kernel code, 333K rwdata, 2208K rodata, 384K init, 453K bss
, 14872K reserved, 327680K cma-reserved, 0K highmem)
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    vmalloc : 0xa0800000 - 0xff000000   (1512 MB)
    lowmem  : 0x80000000 - 0xa0000000   ( 512 MB)
    pkmap   : 0x7fe00000 - 0x80000000   (   2 MB)
    modules : 0x7f000000 - 0x7fe00000   (  14 MB)
      .text : 0x80008000 - 0x8082f474   (8350 kB)
      .init : 0x80830000 - 0x80890000   ( 384 kB)
      .data : 0x80890000 - 0x808e3760   ( 334 kB)
       .bss : 0x808e6000 - 0x80957744   ( 454 kB)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Preemptible hierarchical RCU implementation.
        RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1.
RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
NR_IRQS:16 nr_irqs:16 16
mxc_clocksource_init 24000000
Switching to timer-based delay loop, resolution 41ns
sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
clocksource mxc_timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
Console: colour dummy device 80x30
Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=24000
0)
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
/cpus/cpu@0 missing clock-frequency property
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0x80008280 - 0x800082d8
Brought up 1 CPUs
SMP: Total of 1 processors activated (48.00 BogoMIPS).
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
clocksource jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
cpuidle: using governor ladder
cpuidle: using governor menu
hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 8 bytes.
imx6ul-pinctrl 20e0000.iomuxc: initialized IMX pinctrl driver
mxs-dma 1804000.dma-apbh: initialized
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
i2c i2c-0: IMX I2C adapter registered
i2c i2c-0: can't use DMA
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <[email protected]>
PTP clock support registered
Switched to clocksource mxc_timer1
NET: Registered protocol family 2
TCP established hash table entries: 4096 (order: 2, 16384 bytes)
TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
UDP hash table entries: 256 (order: 1, 8192 bytes)
UDP-Lite hash table entries: 256 (order: 1, 8192 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.
imx rpmsg driver is registered.
Bus freq driver module loaded
futex hash table entries: 256 (order: 2, 16384 bytes)
VFS: Disk quotas dquot_6.6.0
VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
NFS: Registering the id_resolver key type
Key type id_resolver registered
Key type id_legacy registered
jffs2: version 2.2. (NAND) 穢 2001-2006 Red Hat, Inc.
fuse init (API version 7.23)
NET: Registered protocol family 38
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
imx-weim 21b8000.weim: Driver registered.
imx-sdma 20ec000.sdma: no event needs to be remapped
imx-sdma 20ec000.sdma: loaded firmware 3.3
imx-sdma 20ec000.sdma: initialized
2020000.serial: ttymxc0 at MMIO 0x2020000 (irq = 20, base_baud = 5000000) is a IMX
console [ttymxc0] enabled
21e8000.serial: ttymxc1 at MMIO 0x21e8000 (irq = 225, base_baud = 5000000) is a IMX
21ec000.serial: ttymxc2 at MMIO 0x21ec000 (irq = 226, base_baud = 5000000) is a IMX
21f0000.serial: ttymxc3 at MMIO 0x21f0000 (irq = 227, base_baud = 5000000) is a IMX
21f4000.serial: ttymxc4 at MMIO 0x21f4000 (irq = 228, base_baud = 5000000) is a IMX
imx sema4 driver is registered.
brd: module loaded
loop: module loaded
nand: second ID read did not match ef,da against ef,ff
nand: No NAND device found
ksz8795 spi32766.0: failed to read device ID(0xffff)
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky <[email protected]>
CAN device driver interface
2090000.can supply xceiver not found, using dummy regulator
flexcan 2090000.can: device registered (reg_base=a09e0000, irq=26)
20b4000.ethernet supply phy not found, using dummy regulator
pps pps0: new PPS source ptp0
fec 20b4000.ethernet (unnamed net_device) (uninitialized): Invalid MAC address: 00:00:00:00:00:00
fec 20b4000.ethernet (unnamed net_device) (uninitialized): Using random MAC address: 8a:34:51:72:71:
b3
libphy: fec_enet_mii_bus: probed
fec 20b4000.ethernet eth0: registered PHC device 0
2188000.ethernet supply phy not found, using dummy regulator
pps pps1: new PPS source ptp1
fec 2188000.ethernet (unnamed net_device) (uninitialized): Invalid MAC address: 00:00:00:00:00:00
fec 2188000.ethernet (unnamed net_device) (uninitialized): Using random MAC address: ea:48:35:00:b3:
93
fec 2188000.ethernet eth1: registered PHC device 1
PPP generic driver version 2.4.2
PPP BSD Compression module registered
PPP Deflate Compression module registered
PPP MPPE Compression module registered
NET: Registered protocol family 24
usbcore: registered new interface driver qmi_wwan
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-mxc: Freescale On-Chip EHCI Host driver
usbcore: registered new interface driver cdc_wdm
usbcore: registered new interface driver usb-storage
usbcore: registered new interface driver usbserial
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial support registered for generic
usbcore: registered new interface driver option
usbserial: USB Serial support registered for GSM modem (1-port)
usbcore: registered new interface driver usb_ehset_test
2184800.usbmisc supply vbus-wakeup not found, using dummy regulator
2184000.usb supply vbus not found, using dummy regulator
ci_hdrc ci_hdrc.0: EHCI Host Controller
ci_hdrc ci_hdrc.0: new USB bus registered, assigned bus number 1
ci_hdrc ci_hdrc.0: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
2184200.usb supply vbus not found, using dummy regulator
ci_hdrc ci_hdrc.1: EHCI Host Controller
ci_hdrc ci_hdrc.1: new USB bus registered, assigned bus number 2
ci_hdrc ci_hdrc.1: USB 2.0 started, EHCI 1.00
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
snvs_rtc 20cc000.snvs:snvs-rtc-lp: rtc core: registered 20cc000.snvs:snvs-r as rtc0
i2c /dev entries driver
imx2-wdt 20bc000.wdog: timeout 60 sec (nowayout=0)
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
NET: Registered protocol family 26
nf_conntrack version 0.5.0 (7959 buckets, 31836 max)
xt_time: kernel timezone is -0000
ip_tables: (C) 2000-2006 Netfilter Core Team
Initializing XFRM netlink socket
NET: Registered protocol family 10
ip6_tables: (C) 2000-2006 Netfilter Core Team
sit: IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
NET: Registered protocol family 15
bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br
_netfilter if you need this.
Bridge firewalling registered
can: controller area network core (rev 20120528 abi 9)
NET: Registered protocol family 29
can: raw protocol (rev 20120528)
can: broadcast manager protocol (rev 20120528 t)
can: netlink gateway (rev 20130117) max_hops=1
8021q: 802.1Q VLAN Support v1.8
Key type dns_resolver registered
UBI error: cannot open mtd 4, error -19
snvs_rtc 20cc000.snvs:snvs-rtc-lp: setting system clock to 2017-05-24 08:19:44 UTC (1495613984)
gpio_dvfs: disabling
UBIFS error (pid: 1): cannot open "ubi0:rootfs_a", error -19VFS: Cannot open root device "ubi0:rootf
s_a" or unknown-block(0,0): error -19
Please append a correct "root=" boot option; here are the available partitions:
0100           65536 ram0  (driver?)
0101           65536 ram1  (driver?)
0102           65536 ram2  (driver?)
0103           65536 ram3  (driver?)
0104           65536 ram4  (driver?)
0105           65536 ram5  (driver?)
0106           65536 ram6  (driver?)
0107           65536 ram7  (driver?)
0108           65536 ram8  (driver?)
0109           65536 ram9  (driver?)
010a           65536 ram10  (driver?)
010b           65536 ram11  (driver?)
010c           65536 ram12  (driver?)
010d           65536 ram13  (driver?)
010e           65536 ram14  (driver?)
010f           65536 ram15  (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
random: nonblocking pool is initialized

1710

拿 華邦 來分析問題

雖然 uboot 有成功的把 linux kernel 載入到 DDR 作執行了

但更大的 rootfs 的讀取還是會出錯

應該可以利用華邦這一台來調整一下 暫存器 適合的值

1745

試了幾個值都沒有效

  • 0000 b031h
    • HYS[16], PUS[15:14], PUE[13], PKE[12], ODE[11], SPEED[7:6], DSE[5:3], SRE[0]
    • 0, 10, 1, 1, 0, 00, 110, 1
  • 0001 f039h
    • HYS[16], PUS[15:14], PUE[13], PKE[12], ODE[11], SPEED[7:6], DSE[5:3], SRE[0]
    • 1, 11, 1, 1, 0, 00, 111, 1
  • 0001 f038h
    • HYS[16], PUS[15:14], PUE[13], PKE[12], ODE[11], SPEED[7:6], DSE[5:3], SRE[0]
    • 1, 11, 1, 1, 0, 00, 111, 0
  • 0001 f008h
    • HYS[16], PUS[15:14], PUE[13], PKE[12], ODE[11], SPEED[7:6], DSE[5:3], SRE[0]
    • 1, 11, 1, 1, 0, 00, 001, 0
  • 0000 b0b9h
    • HYS[16], PUS[15:14], PUE[13], PKE[12], ODE[11], SPEED[7:6], DSE[5:3], SRE[0]
    • 0, 10, 1, 1, 0, 10, 111, 1
⚠️ **GitHub.com Fallback** ⚠️