20170609_jeffrey - silenceuncrio/diary GitHub Wiki
0905
昨天下午針對 feature branch feature/vrrp
做了所謂的 clean build
- git clean -fdx - proscend 目錄下
- make distclean - proscend 目錄下
- make menuconfig - proscend 目錄下
- rm -rf build_small
早上看到 compile 出現 error
還是跟 keepalived 有關
完整的 log 在 Gist - 2017-06-09-source-bimage.sh-error-keepalived
順便 keep 一下 log.do_configure
和 log.do_compile
目前的 keepalived recipe 如下
➜ keepalived git:(feature/vrrp) ✗ cat keepalived_1.3.5.bb
xLICENSE = "GPL-2.0"
LIC_FILES_CHKSUM = "file://${WORKDIR}/git/COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
SRC_URI = "git://github.com/acassen/keepalived.git;protocl=https;tag=v1.3.5"
S = "${WORKDIR}/git"
do_configure() {
export ac_cv_func_realloc_0_nonnull=yes
export ac_cv_func_malloc_0_nonnull=yes
${S}/configure --host=arm
}
do_compile() {
oe_runmake
}
do_install() {
install -d ${D}${sbindir}
install -m 755 ${S}/bin/keepalived ${D}${sbindir}
}
0950
參考完整的 log - 2017-06-09-source-bimage.sh-error-keepalived
build@2f192722794e:/var/m300/build_small$ source bimage.sh
Loading cache: 100% |###########################################################################| ETA: 00:00:00
Loaded 2758 entries from dependency cache.
ERROR: This recipe does not have the LICENSE field set (keepalived) | ETA: --:--:--
ERROR: Failed to parse recipe: /var/m300/meta-proscend/recipes-extended/keepalived/keepalived_1.3.5.bb
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
這邊的出現兩個 ERROR
- ERROR: This recipe does not have the LICENSE field set (keepalived) | ETA: --:--:--
- ERROR: Failed to parse recipe: /var/m300/meta-proscend/recipes-extended/keepalived/keepalived_1.3.5.bb
剛好呼應到我的 keepalived recipe 的 xLICENSE
xLICENSE = "GPL-2.0"
怎麼 LICENSE
變成了 xLICENSE
先修正 keepalived_1.3.5.bb
LICENSE = "GPL-2.0"
LIC_FILES_CHKSUM = "file://${WORKDIR}/git/COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
SRC_URI = "git://github.com/acassen/keepalived.git;protocl=https;tag=v1.3.5"
S = "${WORKDIR}/git"
do_configure() {
export ac_cv_func_realloc_0_nonnull=yes
export ac_cv_func_malloc_0_nonnull=yes
${S}/configure --host=arm
}
do_compile() {
oe_runmake
}
do_install() {
install -d ${D}${sbindir}
install -m 755 ${S}/bin/keepalived ${D}${sbindir}
}
再利用 source bimage
來做 compile 的動作
還是失敗了
完整的 log - 2017-06-09-source-bimage.sh-error-keepalived-fix-01
錯誤的訊息如下
| make[2]: Entering directory `/var/m300/build_small/tmp/work/cortexa7hf-vfp-neon-poky-linux-gnueabi/keepalived/
1.3.5-r0/git/keepalived'
| CCLD keepalived
| vrrp/libvrrp.a(vrrp_iproute.o): In function `alloc_route':
| /var/m300/build_small/tmp/work/cortexa7hf-vfp-neon-poky-linux-gnueabi/keepalived/1.3.5-r0/git/keepalived/vrrp/
vrrp_iproute.c:1568: undefined reference to `rpl_malloc'
| ../lib/liblib.a(memory.o): In function `xalloc':
| /var/m300/build_small/tmp/work/cortexa7hf-vfp-neon-poky-linux-gnueabi/keepalived/1.3.5-r0/git/lib/memory.c:56:
undefined reference to `rpl_malloc'
| ../lib/liblib.a(vector.o): In function `vector_alloc_slot':
| /var/m300/build_small/tmp/work/cortexa7hf-vfp-neon-poky-linux-gnueabi/keepalived/1.3.5-r0/git/lib/vector.c:96:
undefined reference to `rpl_realloc'
| collect2: error: ld returned 1 exit status
| make[2]: *** [keepalived] Error 1
看來 keepalived_1.3.5.bb
的 do_configure()
對於 ac_cv_func_realloc_0_nonnull
和 ac_cv_func_malloc_0_nonnull
的 export 並沒有發揮效果
...
do_configure() {
export ac_cv_func_realloc_0_nonnull=yes
export ac_cv_func_malloc_0_nonnull=yes
${S}/configure --host=arm
}
...
修正 keepalived_1.3.5.bb
LICENSE = "GPL-2.0"
LIC_FILES_CHKSUM = "file://${WORKDIR}/git/COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
SRC_URI = "git://github.com/acassen/keepalived.git;protocl=https;tag=v1.3.5"
S = "${WORKDIR}/git"
do_configure() {
${S}/configure --host=arm ac_cv_func_realloc_0_nonnull=yes ac_cv_func_malloc_0_nonnull=yes
}
do_compile() {
oe_runmake
}
do_install() {
install -d ${D}${sbindir}
install -m 755 ${S}/bin/keepalived ${D}${sbindir}
}
再試一次
1010
完整的 log - 2017-06-09-source-bimage.sh-error-keepalived-fix-02
可以算是回到昨天的進度了
ERROR: QA Issue: File '/usr/sbin/keepalived' from keepalived was already stripped, this will prevent future debugging! [already-stripped]
先試著解決 ERROR 的問題吧
1140
為了下禮拜的低溫實驗
先切回 develop branch
先把早上的修改做 commit
commit 30d98fdd49da430506d4048f1fe2202a75ae3319
Author: jeffrey <[email protected]>
Date: Fri Jun 9 11:42:55 2017 +0800
Correct the way to use the variables while 'do_configure()' the keepalived recipe
diff --git a/meta-proscend/recipes-extended/keepalived/keepalived_1.3.5.bb b/meta-proscend/recipes-extended/keepalived/keepalived_1.3.5.bb
index 86c2abe..3984a22 100644
--- a/meta-proscend/recipes-extended/keepalived/keepalived_1.3.5.bb
+++ b/meta-proscend/recipes-extended/keepalived/keepalived_1.3.5.bb
@@ -5,9 +5,7 @@ SRC_URI = "git://github.com/acassen/keepalived.git;protocl=https;tag=v1.3.5"
S = "${WORKDIR}/git"
do_configure() {
- export ac_cv_func_realloc_0_nonnull=yes
- export ac_cv_func_malloc_0_nonnull=yes
- ${S}/configure --host=arm
+ ${S}/configure --host=arm ac_cv_func_realloc_0_nonnull=yes ac_cv_func_malloc_0_nonnull=yes
}
do_compile() {
@@ -19,4 +17,3 @@ do_install() {
install -m 755 ${S}/bin/keepalived ${D}${sbindir}
}
-
切回 develop
git log
看看自己為了 低溫開機上的 local commit
commit a78619584521254f7262dc756d1de16049b50745
Author: jeffrey <[email protected]>
Date: Tue Jun 6 16:24:44 2017 +0800
- restore the original CPUFreq governor after our application initialization complete
- original CPUFreq governor - interactive
commit cf3c295673f9d506fbe596d8972a9254c5bc950d
Author: jeffrey <[email protected]>
Date: Tue Jun 6 09:55:17 2017 +0800
Rollback the modification of 'CONFIG_MICREL_SWITCH'
commit 1414518ecfa2a5b9bec549b164695664adf0b0a0
Author: jeffrey <[email protected]>
Date: Mon Jun 5 13:08:06 2017 +0800
Change 'CONFIG_CPU_FREQ_DEFAULT_GOV' from 'interactive' to 'powersave'
- because power on fail under -25C when linux kernel try to mount the rootfs on NAND Flash
- for testing on power on at -40C when linux kernel try to mount the rootfs on DAND Flash
- lower CPU frequency
commit 3ba7eb31b14aba6647b914034b122d8d90689487
Author: ariel <[email protected]>
Date: Thu Jun 8 19:14:08 2017 +0800
add pdu function code but not enable them yet
...
以這個 branch 為底先開一條 低溫開機 用的 feature branch
➜ M300 git:(develop) git flow feature start low-temperature-boot-up
Branches 'develop' and 'origin/develop' have diverged.
And local branch 'develop' is ahead of 'origin/develop'.
Switched to a new branch 'feature/low-temperature-boot-up'
Summary of actions:
- A new branch 'feature/low-temperature-boot-up' was created, based on 'develop'
- You are now on branch 'feature/low-temperature-boot-up'
Now, start committing on your feature. When done, use:
git flow feature finish low-temperature-boot-up
再切回 branch develop 把自己三個 local commit 刪掉
➜ M300 git:(feature/low-temperature-boot-up) git checkout develop
Switched to branch 'develop'
Your branch is ahead of 'origin/develop' by 3 commits.
(use "git push" to publish your local commits)
➜ M300 git:(develop) git log
➜ M300 git:(develop) git reset --hard HEAD^
HEAD is now at cf3c295 Rollback the modification of 'CONFIG_MICREL_SWITCH'
➜ M300 git:(develop) git log
➜ M300 git:(develop) git reset --hard HEAD^
HEAD is now at 1414518 Change 'CONFIG_CPU_FREQ_DEFAULT_GOV' from 'interactive' to 'powersave'
➜ M300 git:(develop) git reset --hard HEAD^
HEAD is now at 3ba7eb3 add pdu function code but not enable them yet
➜ M300 git:(develop) git log
➜ M300 git:(develop) git pull
Current branch develop is up to date.
再切回 feature branch low-temperature-boot-up
➜ M300 git:(develop) git checkout feature/low-temperature-boot-up
Switched to branch 'feature/low-temperature-boot-up'
➜ M300 git:(feature/low-temperature-boot-up) git log
先就這一版來 build 個 image 方便下禮拜作測試
1305
morris 早上拿了兩片 M300 CPU Board 給我
先幫忙燒錄最新的 feature branch low-temperature-boot-up
方便下禮拜作測試
1315
monkeyjj time
1615
monkeyjj 終於要開始進入 Chapter 8: Socialite - One Click Facebook Login
章節
1655
先寫這禮拜的 engineering notebook