EDA365电子论坛网

标题: 请问内核,uboot源代码有改动,Yocto如何修改? [打印本页]

作者: uerriup    时间: 2019-8-22 16:56
标题: 请问内核,uboot源代码有改动,Yocto如何修改?
请问内核,uboot源代码有改动,Yocto如何修改?# [9 b/ M0 _. c/ l
: }. S0 `. f; ^% K; Z0 z: s

作者: yxlk    时间: 2019-8-22 18:28
当对内核或uboot进行修改了, 再在Yocto中构建时, 需要在Yocto 中修改内核或uboot的coMMIt ID。 " b% o* J$ z& ~% Z8 b) _0 v, O

" y1 `8 H8 }  p& o& g& ~$ ~9 f得到内核或uboot的commit ID:
, J$ m- P7 G9 ]; b" k0 \0 [: p- x$ T$ V' a! r
在内核或uboot目录下:4 ]- k* Y$ e9 E; M0 `4 y% {5 L7 j: E( {
- d6 Y  X0 H4 O) ?9 _6 x
git add .(提交所有的改变)& w1 b8 x7 [( }

* [( X) l- j) ?7 {( qgit config - -gobal user.email “your Email address”(提交修改者邮件), x2 O8 D0 x5 |; m+ l' y1 s

) A& @( K$ e" `) ~git config - - global user.name “your name” (提交修改者名字)
0 |0 J, w$ ]# V) I2 o' N9 c. M" M8 i2 g
git commit -m “comment”添加注释0 k7 r4 A# w6 a5 M: ]

4 [& a2 ^# `( Y, ~+ e$ Z& ^% C$ `/ Ngit log (得到commit ID)8 H$ U) X% Y- ~! a3 W- r3 N+ J
2 C$ I( f- H( W1 l$ m

% W. b- K4 y2 M( U2 n8 t
0 d( w, ]% ]' Z  n3 S% }Yocto 中内核修改地址:
7 L8 a" h. b. ]* j& s2 l* o9 @/ D
4 c/ h- M# p( Q1 ?& g( \7 g1 b/home/roy/MYD-Y6ULX-devel/04-Source/fsl-release-Yocto/sources/META-myir-imx6ulx/recipes-kernel/linux/linux-mys6ulx_4.1.15.bb 中的“SRCREV”2 w8 p/ c: s, Y% v: G8 x0 @
, S$ ?7 W+ U, J) [
代码示例如下:
& `' t7 }4 ]/ B. y+ t( o7 L$ f
" J0 v( Y; p8 N+ l# Copyright (C) 2013-2016 Freescale SeMIConductor: {: {' y" C- I; Z+ O1 M# V
, v" u' n0 E( F' J+ M$ x
# Released under the MIT license (see COPYING.MIT for the terms)
1 B$ [& _2 Q2 W' B3 g; r
2 @: S) U! }1 b3 b. ]. \0 WSUMMARY = "Linux Kernel for MYiR MYS6ULx board"
; _' s2 K% s# k; \6 Q/ F
; y3 X9 \8 P  G) |, Y/ {DESCRIPTION = "Linux Kernel provided and supported by Freescale with focus on \4 ^) T2 K9 ?7 X3 y, y

/ k1 O! A: W, g# B* M) O7 qi.MX Family Reference Boards. It includes support for many IPs such as GPU, VPU and IPU."
; V0 t' A6 M7 c: q) t4 M7 `5 `2 c0 P* z: v
require recipes-kernel/linux/linux-imx.inc' v" b8 ]2 \2 @+ d2 e! n* a' u

6 u% `' N  c- E3 Qrequire recipes-kernel/linux/linux-dtb.inc
- J3 f0 \& }9 H+ r1 X2 o+ {' c- p9 a
DEPENDS += "lzop-native bc-native"
6 {* Z0 m; D4 f6 r' v$ w( G1 Y* F6 C( Z2 O" e, E% q1 f" E! a# {9 `
9 f; F' t! D$ i
, j( I  e3 R' S4 u
LOCALversion = "-1.2.0"
3 e1 N: }1 c! [! [9 ^7 m: |. |" @& n
, R' T; g$ {1 a( }- VSRCREV = "d87b5be6bfc5a78cd45d8efa044fddcd7f4b2ac1": o: v" D$ K* E; @" N

6 E8 x$ t! H7 z* C7 v: r+ xSRCBRANCH = "mys-6ulx"
; \6 f4 D) `( `5 D% [
4 Z4 y7 E6 r/ ~' }, B* e, m! K( Y! P; hSRC_URI = "git:///${HOME}/MYiR-iMX-Linux;protocol=file;branch=${SRCBRANCH} \
) y  X3 g0 y! ]# ]0 Z! d3 j' d3 S+ w
&nBSP;          file://defconfig \
+ O+ }4 I8 [. s/ s
) k5 M0 G  s' F& d0 A        "
! `5 x3 v( R3 @* S. p
4 o  Q- ^' x- s: W9 }DEFAULT_PREFERENCE = "1"
/ `/ }4 `! _, t( N" y
  ?  j, S7 z$ v+ W) c( HCOMPATIBLE_MACHINE = "(mx6ull|mx6ul)"
. I( k/ g% }" X" D: t; S8 z8 v  }6 W+ I) r6 j
9 @0 k! B9 x& O0 M6 g- C7 k+ R
Yocto 中uboot 修改ID位置:
# R- X6 U3 i% a0 G/ k
' L3 W( x9 l- T- O/home/roy/MYD-Y6ULX-devel/04-Source/fsl-release-Yocto/sources/meta-myir-imx6ulx/recipes-bsp/u-boot/u-boot-mys6ulx_2016.03.bb: v: L' J& ]1 E( v8 E: I! @

, t7 W$ \- S6 a# x6 c, n; V# x8 d




欢迎光临 EDA365电子论坛网 (https://bbs.eda365.com/) Powered by Discuz! X3.2