20160523_jeffrey - silenceuncrio/diary GitHub Wiki

Index

  • 1035 - i.MX 6UltraLite EVK Board Hardware User’s Guide
  • 1325 - 我們 參考 i.MX 6UltraLite EVK CPU board 設計 換 NAND Flash
  • 1535 - bitbake u-boot-imx
  • 1535 - 幫 u-boot-imx 瘦身
  • 1750 - engineering notebook
  • 1835 - 異狀 make menuconfig 取消勾選 存檔 bitbake force compile menuconfig 復原

1035

看一下 i.MX 6UltraLite EVK Board Hardware User’s Guide
至少對手上的 EVK Board 有一定的認識

1325

目前對於 i.MX 6UL 自己被 assign 的事情自己還不是很清楚知道該怎麼做
仍處於多方收集情報和資訊當中

先列一下目前所知的情報

我們會參考 i.MX 6UltraLite EVK CPU board 的設計, 只是會換成 NAND Flash

1350

我還是先熟悉一下散散的知識吧

4.3.3 Partitioning the SD/MMC card

這邊照著做並不難

4.3.4 Copying a bootloader image

This section describes how to load only the boot loader image when the full SD card image is not used.
Execute the following command to copy the U-Boot image to the SD/MMC card.
$ sudo dd if= of=/dev/sdx bs=512 seek=2 conv=fsync

這邊照著做完 把 SD 卡放到 main board 上開機...
console 啥都看不到

文件有寫個 note

Users need to modify configurations for fused parts. For example, the i.MX 6UltraLite
has four parts, G0, G1, G2, and G3.
The fused modules are as follows:
• G0: TSC,ADC2, FLEXCAN1, FLEXCAN2, FREQ_MON, TEMP_MON,
VOLT_MONLCDIF, CSI, ENET2, CAAM, USB_OTG2, SAI23, BEE,
UART5678, PWM5678, ECSPI34, I2C34, GPT2, and EPIT2.
• G1: TSC, ADC2, FLEXCAN2, FREQ_MON, TEMP_MON, VOLT_MON,
LCDIF, CSI, ENET2, and BEE.
• G2: FREQ_MON, TEMP_MON, VOLT_MON, and BEE.
• G3: No fused module.
U-Boot configuration changes:
G0:
      /* #define CONFIG_VIDEO */
      #define CONFIG_FEC_ENET_DEV 0
      /* #define CONFIG_CMD_BEE */
      #define CONFIG_USB_MAX_CONTROLLER_COUNT 1
G1:
      /* #define CONFIG_VIDEO */
      #define CONFIG_FEC_ENET_DEV 0
      /* #define CONFIG_CMD_BEE */
G2:
      /* #define CONFIG_CMD_BEE */
G3: No change.

這裡說到 U-Boot configuration changes
是要改哪個 file 呢

看一下 Freescale Yocto Project User's Guide5.5 U-Boot configuration

說到一個 local.conf
應該是下面這一個

jeffrey@jeffrey-virtual-machine:~/fsl-release-bsp/build_small/conf$ cat local.conf
MACHINE ??= 'imx6ulevk'
DISTRO ?= 'fsl-imx-x11'
PACKAGE_CLASSES ?= "package_rpm"
EXTRA_IMAGE_FEATURES = "debug-tweaks"
USER_CLASSES ?= "buildstats image-mklibs"
PATCHRESOLVE = "noop"
BB_DISKMON_DIRS = "\
    STOPTASKS,${TMPDIR},1G,100K \
    STOPTASKS,${DL_DIR},1G,100K \
    STOPTASKS,${SSTATE_DIR},1G,100K \
    STOPTASKS,/tmp,100M,100K \
    ABORT,${TMPDIR},100M,1K \
    ABORT,${DL_DIR},100M,1K \
    ABORT,${SSTATE_DIR},100M,1K \
    ABORT,/tmp,10M,1K"
PACKAGECONFIG_append_pn-qemu-native = " sdl"
PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"
ASSUME_PROVIDED += "libsdl-native"
CONF_VERSION = "1"

DL_DIR ?= "${BSPDIR}/downloads/"
ACCEPT_FSL_EULA = "1"

不過應該不是改這一個才對

修改 mx6ul_14x14_evk.h


/* according 4.3.4 Copying a bootloader image to change */
#define CONFIG_FEC_ENET_DEV 0

CONFIG_FEC_ENET_DEV 從 1 改成 0

利用 bitbake -f -v -c compile u-boot-imx 重 build u-boot-imx

然後直接在 <build dir>/tmp/work/imx6ulevk-poky-linux-gnueabi/u-boot-imx/2015.04-r0/git/mx6ul_14x14_evk_config 直接使用 4.3.4 Copying a bootloader image
$ sudo dd if=<U-Boot image> of=/dev/sdx bs=512 seek=2 conv=fsync

放到 main board 上
開機

U-Boot 2015.04-imx_v2015.04_4.1.15_1.0.0_ga+gd7d7c43 (May 23 2016 - 15:08:02)

CPU:   Freescale i.MX6UL rev1.0 at 396 MHz
CPU:   Temperature 35 C
Reset cause: POR
Board: MX6UL 14x14 EVK
I2C:   ready
DRAM:  512 MiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
*** Warning - bad CRC, using default environment

Display: TFT43AB (480x272)
Video: 480x272x24
In:    serial
Out:   serial
Err:   serial
switch to partitions #0, OK
mmc1 is current device
Net:   FEC0
Normal Boot
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc1 is current device
switch to partitions #0, OK
mmc1 is current device
** Unrecognized filesystem type **
** Unrecognized filesystem type **
Booting from net ...
FEC0 Waiting for PHY auto negotiation to complete......... TIMEOUT !
BOOTP broadcast 1
BOOTP broadcast 2
...
BOOTP broadcast 17

Retry time exceeded; starting again
FEC0 Waiting for PHY auto negotiation to complete......... TIMEOUT !
BOOTP broadcast 1
BOOTP broadcast 2
...

然後咧

double check 了一下
根本不用改 CONFIG_FEC_ENET_DEV 也是相同的結果

1535

利用 bitbake -c clean u-boot-imx remove 整個 u-boot-imx
再利用 bitbake u-boot-imx 重新 build 之後
確認做完 4.3.3 Partitioning the SD/MMC card 之後
利用 $ sudo dd if=<U-Boot image> of=/dev/sdx bs=512 seek=2 conv=fsync copy bootloader image
放到 main board 上
開機成功

1535

應該趁著這機會來幫 u-boot-imx 瘦身

5.5 U-Boot configuration 說到要 build u-boot-imx for NAND Flash 的話要修改 local.conf

我在 local.conf的最下面加入了這一行 UBOOT_CONFIG = "nand"
然後利用 bitbake -v -c deploy u-boot-imx

跑完之後找不到 build 出來的 image 在哪裡

利用 bitbake -c clean u-boot-imx remove 整個 u-boot-imx
再利用 bitbake u-boot-imx 重新 build

不知道怎麼紀錄了...

1630

先不管 nand 相關的 issue
反正板子也還沒來

1750

寫一下 engineering notebook

參考上禮拜的日記
才剛摸索階段... 很發散...
要稍微整理一下才能放到 engineering notebook

  • download the Freescale Yocto Project
    1. mkdir fsl-release-bsp
    2. cd fsl-release-bsp
    3. repo init -u git://git.freescale.com/imx/fsl-arm-yocto-bsp.git -b imx-4.1.15-1.0.0_ga
    4. repo sync
  • Build configurations
    • MACHINE=imx6ulevk source fsl-setup-release.sh -b build_small
  • Building an image
    • bitbake core-image-minimal
  • Restarting a build environment
    • source setup-environment build_small
  • remove u-boot-imx source code
    • bitbake -c clean u-boot-imx
  • force compile u-boot-imx
    • bitbake -f -c compile u-boot-imx

1835

目前發現異狀

我在 使用 make menuconfig 把能取消勾選的 module 全部取消後存檔

結果利用 bitbake force compile 後發現 u-boot.imx 大小根本沒變
再 make menuconfig 會發現剛剛取消的 module 全復原了

⚠️ **GitHub.com Fallback** ⚠️