20160729_jeffrey - silenceuncrio/diary GitHub Wiki
- 0930 - 完整 image 燒錄 - 開起來了
- 1100 - M300 meeting
- 1435 - 整理 日記 寫 index
- 1450 - 什麼是 OOB
- 1505 - SLC Nand Flash driver
- 1615 - recipes used to build a manufacturing tool image
-
1730 - VirtualBox
study_ubuntu_16
只有 16 GB -
1740 - 建 80 GB VirtualBox
ubuntu_16
-
1750 - 安裝 samba - YOCTO - build image -
bitbake linux-mfgtool
試著做完整的 image 燒錄
開起來了... 進了 iCOS 了...
手上這一片 CPU Board 是 14 號
BOOT_CFG1[1:0] - Nand_Row_address_bytes - 該值為 2'b11 - 5 row address bytes
根據 MX30LF1G18AC 的 Table 1. Address Allocation
Row address
應該要設定成兩個才對
目前 BOOT_CFG1[1:0] 雖然設定成 5 row address bytes 卻沒影響到開機
BOOT_CFG1[1] 的修改要動到板子上的電阻, 但我可以利用 dip switch 修改 BOOT_CFG1[0]
讓 BOOT_CFG1[1:0] 為 2'b10 - 4 row address bytes
一樣可以開機... 待查
M300 meeting 剛結束
可能是 NAND Flash 開起來了... 氣氛蠻輕鬆的
花時間整理了一下前幾天的日記
順便寫 index
- cpu board 打件 回來
-
Boot Device
為NAND
- console 沒任何訊息 - MfgTool 燒錄 code
- MfgTool
Jumping to OS image.
停住 - MXS NAND: DMA read error - M300 CPU Board 1 號 - 3 號 和 4 號
- 4 號板
Boot Device
為MicroSD
- 開機 - iCOS 跑起來了 - 早上做的事 換成 公板
- [U-Boot] MXS NAND: DMA read error
- pioneer 分享 openvpn 在 vpn router 上的實作
-
mx6ul_14x14_evk.h
DMA 相關部分拿掉 - build 不過 - M300 console 是公頭 - 兩個公頭之間 杜邦線
- 出錯的點 -
<UBOOT_DIR>/drivers/mtd/nand/mxs_nand.c
- 套用 How-To use NAND boot on i.MX6UL EVK board 的
mx6ul_14x14_evk.h
- PASS - 修改
ucl2.xml
- 大步前進 - M300 的 kernel 和 rootfs 一起燒
- 找出
mx6ul_14x14_evk.h
修改的關鍵點 - 做完整的 MfgTool burn image - 2016-07-21-MfgTool.log - nand 開機 看不到 console 任何訊息
- NAND BOOT fail on iMX6UL
-
i.MX 6UltraLite Applications Processor Reference Manual
-Chapter 8 System Boot
- BOOT_CFG1[1:0] - Nand_Row_address_bytes - Row Address Cycle
- M300 Web UI Proposal meeting
- 反及閘快閃記憶體(NAND Flash Memory)簡介
- MX30LF1G18AC - 2 個
Row address
-BOOT_CFG1[1:0]
=2'b01
- morris 幫忙改 - 開機 console 沒 任何訊息
- 寫 KPI
- M300 meeting - aaron 確定 八月一號 報到
- 繼續 NAND Flash 問題
- 套用 How-To use NAND boot on i.MX6UL EVK board 的
mx6ul_14x14_evk.h
- 將 U-Boot 燒錄到 NAND Flash -
kobs-ng init -x -v --chip_0_device_path=/dev/mtd0 $FILE
- 試 MfgTool -
L3.14.52_1.1.0_ga-mfg-tools.tar.gz
- MXIC FAE Frank 電話
- winston 示範 怎麼看 code 有寫到 NAND Flash 去
-
0x87800000
address - RAM 裡面的 U-Boot -
local.conf
UBOOT_CONFIG = "nand"
- SD Card 開機 - U-Boot 有nand
command 可以使用
- review
- 安裝 Yocto project cross-compilation toolchain
- 整理問題 尋求協助
- 在 論壇 https://community.nxp.com/docs/DOC-236994 發問
- 看 i.MX6UL boot 相關 部分
- BOOT_CFG2[4:3] 的 shipped value 為 2'b00
- morris 3 號板 BOOT_CFG2 改成 0x00 - 開機 挑戰失敗
- U-Boot -
fuse
- AVNET CPU 公板 emmc 開機
- Frank 回信
- 致電 mike
- imximage.cfg u-boot.bin u-boot.imx
-
<UBOOT_SRC>
另存<UBOOT_SRC_NAND>
-
u-boot.imx
SD Card -<UBOOT_SRC>
或<UBOOT_SRC_NAND>
可以 從 SD Card 開機 - 研究 GPIO 點燈
- 觀察
<UBOOT_SRC>/board/freescale/mx6ul_14x14_ddr3_arm2/imximage.cfg
DCD
- review
- 配合 winston 步調 準備環境
- 點燈 參考
26.4.3.2 GPIO Write Mode
- 知道 暫存器 點燈 後 - 寫成 assembly 塞到 uboot 去
- 把
50
,51
和52
通通點亮 - 通通點亮
test.c
-arm-poky-linux-gnueabi-gcc test.c -S
得到test.s
- 寫到
<UBOOT_SRC>/arch/arm/cpu/armv7/start.S
- NAND Flash 開機 - les #50, #51, #53 亮了
- trace 從 U-Boot 的 start.s 出發 經過的路
-
start.S
-crt0.S
-board_f.c
的board_init_f()
- init_sequence_f[] - console_init_f - 我要把陣亡的點找出來
- NAND Falsh 的 U-Boot 直接開起來了
- NAND Flash 開機 4 號 - 6 號 無法從 NAND Flash 開機 - 4 號板子 bad block 消失
- 14 號板子 實驗 -
nand scrub.chip
- erase all factory set bad blocks - NAND Flash 開機 成功 - 復健
在還沒找出問題的癥結點之前
自己真的試了蠻多可能性了
伴隨著一次次的失落
不過如果沒有這些錯誤的嘗試
當 癥結點 出現時, 我也許也無法判斷出那便是問題的癥結點
也多虧了這幾天的嘗試 讓我對 U-Boot 多了一些認識
由於這次的癥結點被發現的關鍵來自 winston 在使用 nand dump 時
看到 OOB field 脫口而出說怎麼都是 bad block
我就來充實一下之試看看什麼是 OOB
Freescale Yocto Project User's Guide
- 6.2 Manufacturing Tool, MFGTool
One way to place an image on a device is to use the MFGTool.
The recipes used to build a manufacturing tool image are linux-imx-mfgtool and u-boot-mfgtool.
為了避免影響到 M300
在 VirtualBox study_ubuntu_16
上做實驗
3.1 Host packages
Essential Yocto Project host packages are:
$ sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat libsdl1.2-dev
i.MX layers host packages for a Ubuntu 12.04 or 14.04 host setup are:
$ sudo apt-get install libsdl1.2-dev xterm sed cvs subversion coreutils texi2html docbook-utils python-pysqlite2 help2man make gcc g++ desktop-file-utils libgl1-mesa-dev libglu1-mesa-dev mercurial autoconf automake groff curl lzop asciidoc
i.MX layers host packages for a Ubuntu 14.04 host setup only are:
$ sudo apt-get install u-boot-tools
先裝吧
別忘了 make menuconfig
需要 sudo apt-get install libncurses5-dev
3.2 Setting up the repo utility
也照著做
4 Yocto Project Setup
也照做
在 fsl-release-bsp
新增一個 file test_build.sh
MACHINE=imx6ulevk source fsl-setup-release.sh -b test_build
利用 source test_build.sh
來執行
然後 build 6.2 Manufacturing Tool, MFGTool
說的 linux-imx-mfgtool
recipe - bitbake linux-imx-mfgtool
jeffrey@jeffrey-VirtualBox:~/fsl-release-bsp/test_build$ bitbake linux-imx-mfgtool
WARNING: Host distribution "Ubuntu-16.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
WARNING: Unable to get checksum for linux-toradex SRC_URI entry defconfig: file could not be found
Parsing recipes: 100% |#########################################| Time: 00:04:43
Parsing of 2259 .bb files complete (0 cached, 2259 parsed). 2825 targets, 183 skipped, 5 masked, 0 errors.
ERROR: Nothing PROVIDES 'linux-imx-mfgtool'. Close matches:
linux-mfgtool
u-boot-imx-mfgtool
Summary: There were 2 WARNING messages shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
jeffrey@jeffrey-VirtualBox:~/fsl-release-bsp/test_build$
改名字了嗎? linux-mfgtool
jeffrey@jeffrey-VirtualBox:~/fsl-release-bsp/test_build$ bitbake linux-mfgtoolWARNING: Host distribution "Ubuntu-16.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Loading cache: 100% |###########################################| ETA: 00:00:00
Loaded 2826 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies
Build Configuration:
BB_VERSION = "1.28.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "Ubuntu-16.04"
TARGET_SYS = "arm-poky-linux-gnueabi"
MACHINE = "imx6ulevk"
DISTRO = "fsl-imx-x11"
DISTRO_VERSION = "4.1.15-1.2.0"
TUNE_FEATURES = "arm armv7a vfp neon callconvention-hard cortexa7"
TARGET_FPU = "vfp-neon"
meta
meta-yocto = "HEAD:dd0ba9ea4a11ab15348d4fe3574e4b28784db82f"
meta-oe
meta-multimedia = "HEAD:ad6133a2e95f4b83b6b3ea413598e2cd5fb3fd90"
meta-fsl-arm = "HEAD:35b8b9bd9863de208ab60e33b55f10ee43e2619b"
meta-fsl-arm-extra = "HEAD:e200df91b70da254461c59082ddd5db0a3c415a2"
meta-fsl-demos = "HEAD:2231e946e7a94d096394f2b2477e8184c9bbde7b"
meta-bsp
meta-sdk = "HEAD:dfbc90ee74624ce3be636c8bd2a47114fa2b71aa"
meta-browser = "HEAD:b6d46d69a261fe6bd7c1e9811dc2a9bbd0b79aeb"
meta-gnome
meta-networking
meta-python
meta-ruby
meta-filesystems
meta-xfce = "HEAD:ad6133a2e95f4b83b6b3ea413598e2cd5fb3fd90"
meta-qt5 = "HEAD:d5536e34ec985c82b621448ab4325e5cbba38560"
NOTE: Preparing RunQueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
Currently 1 running tasks (61 of 408):
...
等吧
...
WARNING: The free space of /home/jeffrey/fsl-release-bsp/test_build/sstate-cache (/dev/sda1) is running low (0.999GB left)
ERROR: No new tasks can be executed since the disk space monitor action is "STOPTASKS"!
WARNING: The free space of /home/jeffrey/fsl-release-bsp/downloads (/dev/sda1) is running low (0.999GB left)
ERROR: No new tasks can be executed since the disk space monitor action is "STOPTASKS"!
WARNING: The free space of /home/jeffrey/fsl-release-bsp/test_build/tmp (/dev/sda1) is running low (0.999GB left)
ERROR: No new tasks can be executed since the disk space monitor action is "STOPTASKS"!
...
忘了當初建立 VirtualBox study_ubuntu_16
時只有配了 16 GB
再建一個 80 GB 的 VirtualBox ubuntu_16
安裝 samba - sudo apt install samba
Samba 設定 - /etc/samba/smb.conf
...
[jeffbuntu]
path = /home/jeffrey
writable = yes
guest account = root
force user = root
public = yes
force group = root
create mask = 0660
browseable = yes
重新啟動 samba - sudo service smbd restart and sudo service nmbd restart
因為使用 VirtualBox 僅限主機介面卡
的關係
jeffrey@jeffbuntu:~$ ifconfig
...
enp0s8 Link encap:Ethernet HWaddr 08:00:27:00:d4:16
inet addr:192.168.56.102 Bcast:192.168.56.255 Mask:255.255.255.0
inet6 addr: fe80::a435:b954:6319:f5a4/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:123 errors:0 dropped:0 overruns:0 frame:0
TX packets:148 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:19875 (19.8 KB) TX bytes:19289 (19.2 KB)
jeffbuntu
的 ip 是 192.168.56.102
網路芳鄰的功能... 正常
連線網路磁碟機 - Y: - 正常
YOCTO 該裝的裝一裝
先新增 mfgtool_study
目錄後在該目錄下新增 fsl-release-bsp
在 fsl-release-bsp
新增 build_dir.sh
MACHINE=imx6ulevk source fsl-setup-release.sh -b build_dir
利用 source build_dir.sh
來執行
build image 吧 - bitbake linux-mfgtool