20160525_jeffrey - silenceuncrio/diary GitHub Wiki

Index

  • 0820 - study yocto
  • 0900 - Python
  • 0910 - BitBake User Manual
  • 1540 - 修改 u-boot-imx_2015.04.bb my_changes.patch quilt

0820

先 study 一下 yocto

0900

慢慢地有感覺 yocto 所構築的世界了
不過啥 config file 啦, bb files, bbappend files 啦
內容的 syntax 看得一頭霧水

據說是 Python
找一本 Python 的書 study 一下

0910

發現 bb files 裡向下面這樣的敘述並不是 python 語法

     do_install() {
	     # Install file only if it has contents
             install -d ${D}${sysconfdir}/formfactor/
             install -m 0644 ${S}/config ${D}${sysconfdir}/formfactor/
	     if [ -s "${S}/machconfig" ]; then
	             install -m 0644 ${S}/machconfig ${D}${sysconfdir}/formfactor/
	     fi
     }

其實要參考的是 BitBake User Manual

我的天ㄚ... 東西真多ㄚ

1540

其實今天有不錯的進展

修改了 u-boot-imx_2015.04.bb

# Copyright (C) 2013-2016 Freescale Semiconductor

DESCRIPTION = "U-Boot provided by Freescale with focus on  i.MX reference boards."
require recipes-bsp/u-boot/u-boot.inc

PROVIDES += "u-boot"

LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263"

SRCBRANCH = "imx_v2015.04_4.1.15_1.0.0_ga"
UBOOT_SRC ?= "git://git.freescale.com/imx/uboot-imx.git;protocol=git"
#SRC_URI = "${UBOOT_SRC};branch=${SRCBRANCH}"
SRC_URI = "${UBOOT_SRC};branch=${SRCBRANCH} \
           file://my_changes.patch"
SRCREV = "d7d7c4312b71dd3879fa8640b23f6a5bac30e303"

S = "${WORKDIR}/git"

inherit fsl-u-boot-localversion

LOCALVERSION ?= "-${SRCBRANCH}"

PACKAGE_ARCH = "${MACHINE_ARCH}"
COMPATIBLE_MACHINE = "(mx6|mx6ul|mx7)"

修改的部分如下

SRC_URI = "${UBOOT_SRC};branch=${SRCBRANCH} \
           file://my_changes.patch"

這樣一來, bitbake u-boot-imx -c clean 後再 bitbake u-boot-imx -c compile -f 也會自動套用我們所做的修改了

參考的文件如下

my_changes.patch 我放在 u-boot-imx_2015.04.bb 所在目錄的 /files 目錄下

Index: git/include/configs/mx6ul_14x14_evk.h
===================================================================
--- git.orig/include/configs/mx6ul_14x14_evk.h
+++ git/include/configs/mx6ul_14x14_evk.h
@@ -146,7 +146,6 @@
 #endif
 
 
-#define CONFIG_VIDEO
 
 /* Command definition */
 #include <config_cmd_default.h>

patch file 由 quilt 產生, quilt 的工作目錄要經由 bitbake u-boot-imx -c devshell 進入