20170103_jeffrey - silenceuncrio/diary GitHub Wiki

Index

  • 0950 - review - engineering notebook
  • 1020 - 上禮拜四下班前還有寫 bfirmware.shbimage.sh
  • 1045 - 上禮拜四還跟 develop 做了整合
  • 1140 - aaron 上禮拜參考 redux.js.org 跟 m300 作了一些整合
  • 1300 - 重新進入 docker 的方法
  • 1405 - 發現 FirmwareUpgrade.sh 的權限忘了修改
  • 1420 - 從 develop 跟 nandflash 作 merge
  • 1455 - 幫 m300 成員作 mfgtool flash firmware
  • 1550 - 整理一下 dokuwiki 文件
  • 1715 - 幫 nobrand 換了背景

0950

review

engineering notebook

1020

上禮拜四下班前還有寫 bfirmware.sh

bimage.sh 放在同一個 folder

#!/bin/bash
# build the firmware for m300

mkdir firmware

rm -f firmware.tar

cp images/zImage firmware
cp images/zImage-imx6ul-14x14-evk.dtb firmware
cp images/core-image-minimal-m300.tar.bz2 firmware
tar -cf firmware.tar firmware
rm -rf firmware

echo "build the firmware for m300 succeeded"
exit 0

還作了 commit

commit f09ef131a1022de7914297599aa31de8fa78248a
Author: jeffrey <[email protected]>
Date:   Thu Dec 29 15:43:56 2016 +0800

    add bfirmware for build the firmware for m300

1045

上禮拜四還跟 develop 做了整合

先作 git checkout develop

➜  M300 git:(nandflash) git checkout develop
Switched to branch 'develop'
Your branch is up-to-date with 'origin/develop'.

然後做了 git pull

➜  M300 git:(develop) git pull
remote: Counting objects: 332, done.
remote: Compressing objects: 100% (188/188), done.
remote: Total 332 (delta 172), reused 247 (delta 137)
Receiving objects: 100% (332/332), 199.31 KiB | 0 bytes/s, done.
Resolving deltas: 100% (172/172), done.
From 192.168.0.242:RD/M300
   e3f733d..182528f  develop    -> origin/develop
Updating e3f733d..182528f
Fast-forward
 meta-proscend/recipes-core/busybox/busybox_1.23.2.bbappend             |     1 +
 meta-proscend/recipes-core/busybox/files/syslogd-update-tz.patch       |    49 +
 ...
 proscend/prosrc/www/brand_digicomm/brand/top.html                      |     6 +-
 proscend/prosrc/www/brand_nobrand/brand/top.html                       |     6 +-
 474 files changed, 1258 insertions(+), 227540 deletions(-)
 create mode 100644 meta-proscend/recipes-core/busybox/files/syslogd-update-tz.patch
 create mode 100644 meta-proscend/recipes-kernel/linux/files/revert_alarm_active_low.patch
 rename proscend/mconfig/configs/M300/{0_DIGITCOM => 0_GENERIC}/defconfig (58%)
 delete mode 100644 proscend/prosrc/drvIfx/Makefile
 delete mode 100644 proscend/prosrc/drvIfx/ifx_ppa_datapath.h
 ...

然後切回 nandflash - git checkout nandflash

➜  M300 git:(develop) git checkout nandflash
Switched to branch 'nandflash'

然後作 git rebase develop

➜  M300 git:(nandflash) git rebase develop
First, rewinding head to replay your work on top of it...
Applying: - define `UBOOT_CONFIG = "nand"` at proscend-m300.conf
Applying: - patch linux-imx_4.1.15.bbappend for nandflash
Using index info to reconstruct a base tree...
M       meta-proscend/recipes-kernel/linux/linux-imx_4.1.15.bbappend
.git/rebase-apply/patch:12: space before tab in indent.
        fsl,ldo-bypass = <0>; /* DCDC, ldo-enable */
.git/rebase-apply/patch:14: trailing whitespace.

.git/rebase-apply/patch:27: space before tab in indent.
        pinctrl-names = "default";
.git/rebase-apply/patch:28: space before tab in indent.
        pinctrl-0 = <&pinctrl_uart1>;
.git/rebase-apply/patch:30: space before tab in indent.
        status = "okay";
warning: squelched 16 whitespace errors
warning: 21 lines add whitespace errors.
Falling back to patching base and 3-way merge...
Auto-merging meta-proscend/recipes-kernel/linux/linux-imx_4.1.15.bbappend
CONFLICT (content): Merge conflict in meta-proscend/recipes-kernel/linux/linux-imx_4.1.15.bbappend
error: Failed to merge in the changes.
Patch failed at 0002 - patch linux-imx_4.1.15.bbappend for nandflash
The copy of the patch that failed is found in: .git/rebase-apply/patch

When you have resolved this problem, run "git rebase --continue".
If you prefer to skip this patch, run "git rebase --skip" instead.
To check out the original branch and stop rebasing, run "git rebase --abort".

發現 conflict - CONFLICT (content): Merge conflict in meta-proscend/recipes-kernel/linux/linux-imx_4.1.15.bbappend

利用 git status 看一下 merge 的狀況

➜  M300 git:(be6c6a7) ✗ git status
rebase in progress; onto 182528f
You are currently rebasing branch 'nandflash' on '182528f'.
  (fix conflicts and then run "git rebase --continue")
  (use "git rebase --skip" to skip this patch)
  (use "git rebase --abort" to check out the original branch)

Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

        new file:   meta-proscend/recipes-kernel/linux/files/add_nandflash.patch
        modified:   proscend/base_fs/default/rootfs/etc/rc.local
        modified:   proscend/base_fs/default/rootfs/usr/sbin/fw_printenv
        modified:   proscend/base_fs/default/rootfs/usr/sbin/fw_setenv
        new file:   proscend/prosrc/icos/script/FirmwareUpgrade.sh

Unmerged paths:
  (use "git reset HEAD <file>..." to unstage)
  (use "git add <file>..." to mark resolution)

        both modified:   meta-proscend/recipes-kernel/linux/linux-imx_4.1.15.bbappend

解決 linux-imx_4.1.15.bbappend 的 conflict

再利用 git status 看一下 merge 的狀況

➜  M300 git:(be6c6a7) ✗ git status
rebase in progress; onto 182528f
You are currently rebasing branch 'nandflash' on '182528f'.
  (all conflicts fixed: run "git rebase --continue")

Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

        new file:   meta-proscend/recipes-kernel/linux/files/add_nandflash.patch
        modified:   meta-proscend/recipes-kernel/linux/linux-imx_4.1.15.bbappend
        modified:   proscend/base_fs/default/rootfs/etc/rc.local
        modified:   proscend/base_fs/default/rootfs/usr/sbin/fw_printenv
        modified:   proscend/base_fs/default/rootfs/usr/sbin/fw_setenv
        new file:   proscend/prosrc/icos/script/FirmwareUpgrade.sh

利用 git rebase --continue 繼續 merge

➜  M300 git:(be6c6a7) ✗ git rebase --continue
Applying: - patch linux-imx_4.1.15.bbappend for nandflash
Applying: - iweb - offer firmware upload api
Applying: correct the misspelled word - "failed"
Applying: add bfirmware for build the firmware for m300

利用 git log 確認自己 nandflash 修改的部分已經跟 develop 作了整合

commit f09ef131a1022de7914297599aa31de8fa78248a
Author: jeffrey <[email protected]>
Date:   Thu Dec 29 15:43:56 2016 +0800

    add bfirmware for build the firmware for m300

commit 582d5daa8c59af60d0cfa97cbe841dfc729bd393
Author: jeffrey <[email protected]>
Date:   Thu Dec 29 15:13:22 2016 +0800

    correct the misspelled word - "failed"

commit 2682d10caba72b87d616321750eca10f3100ee4a
Author: jeffrey <[email protected]>
Date:   Thu Dec 29 13:59:08 2016 +0800

    - iweb - offer firmware upload api
    - script - firmware upgrade shell script
    - webcgi - firmware upgrade cgi
    - www - firmware upgrade web ui

commit 0f5c01afd81206bbaf47ab13f974f6b6b0327f8d
Author: jeffrey <[email protected]>
Date:   Mon Dec 26 17:46:48 2016 +0800

    - patch linux-imx_4.1.15.bbappend for nandflash
    - modify rc.local for attach the related MTD device to UBI, according to the current rootfs
    - add FirmwareUpgrade.sh for firmware upgrade

commit be6c6a7228e2ed8fa7afc6172cd1667dfa490df8
Author: jeffrey <[email protected]>
Date:   Mon Dec 26 14:38:31 2016 +0800

    - define `UBOOT_CONFIG = "nand"` at proscend-m300.conf
    - add `UBOOT_CONFIG[nand] = "mx6ul_14x14_evk_nand_config,ubifs"` at m300.conf
    - patch u-boot-imx_2015.04.bbappend for nand flash
    - prepare the tools for firmware upgrade(include uboot)

commit 182528f451f02e1fab7080140c00f78c3905f5c8
Author: ariel <[email protected]>
Date:   Thu Dec 29 15:20:14 2016 +0800

    speed up di/do alarm

commit 178a9b770c5a0491b2042f373b5580643dad7d0f
Author: ariel <[email protected]>
Date:   Thu Dec 29 14:51:48 2016 +0800

    reduce polling time and take off previosu status control

commit 8adfb984e392cf89fe29612dbc9858799f76faff
Author: ariel <[email protected]>
Date:   Thu Dec 29 14:51:01 2016 +0800

    re-read for SIM_BUSY to speed up connection

...

把 nandflash 這個 branch push 上去 - git push --set-upstream origin nandflash

➜  M300 git:(nandflash) git push --set-upstream origin nandflash
Counting objects: 84, done.
Compressing objects: 100% (77/77), done.
Writing objects: 100% (84/84), 30.81 KiB | 0 bytes/s, done.
Total 84 (delta 45), reused 0 (delta 0)
remote:
remote: Create merge request for nandflash:
remote:   http://192.168.0.242/RD/M300/merge_requests/new?merge_request%5Bsource_branch%5D=nandflash
remote:
To [email protected]:RD/M300.git
 * [new branch]      nandflash -> nandflash
Branch nandflash set up to track remote branch nandflash from origin.

1140

aaron 上禮拜參考了 http://redux.js.org/docs/introduction/Examples.html#real-world

跟 m300 作了一些整合

看來很適合開始切一個 branch 慢慢來盤 web ui 目前已經有的機制

然後慢慢把 react 版本備齊

1300

bfirmware.sh 要修改 不然會從 docker 跳出去

重新進入 docker 的方法如下

➜  M300 git:(nandflash) pwd
/home/jeffrey/M300_git/M300/
➜  M300 git:(nandflash) docker run -v `pwd`:/var/m300 -it m300 /bin/bash

1405

發現 FirmwareUpgrade.sh 的權限忘了修改

順便把 bfirmware.sh 的修改也作了 commit

commit beed630a5679b5928a2f24dafe5f384515faff2a
Author: jeffrey <[email protected]>
Date:   Tue Jan 3 13:59:02 2017 +0800

    chmod +x the FirmwareUpgrede.sh

1420

知會 m300 成員先暫停一下 commit 到 develop 的事情

我先切到 develop

➜  script git:(nandflash) git checkout develop
Switched to branch 'develop'
Your branch is up-to-date with 'origin/develop'.

從 develop 跟 nandflash 作 merge

➜  script git:(develop) git merge nandflash
Updating 83b2034..2dae656
Fast-forward
 meta-proscend/conf/distro/proscend-m300.conf                 |     2 +-
 meta-proscend/conf/machine/m300.conf                         |     1 +
 ...
 27 files changed, 23386 insertions(+), 4709 deletions(-)
 create mode 100644 meta-proscend/recipes-bsp/u-boot/files/nandflash.patch
 create mode 100644 meta-proscend/recipes-kernel/linux/files/add_nandflash.patch
 ...

build image... ok

mfgtool flash firmware... ok

開機... ok

web upgrade... ok

重開機... ok

git push... ok

➜  script git:(develop) git push
warning: push.default is unset; its implicit value has changed in
Git 2.0 from 'matching' to 'simple'. To squelch this message
and maintain the traditional behavior, use:

  git config --global push.default matching

To squelch this message and adopt the new behavior now, use:

  git config --global push.default simple

When push.default is set to 'matching', git will push local branches
to the remote branches that already exist with the same name.

Since Git 2.0, Git defaults to the more conservative 'simple'
behavior, which only pushes the current branch to the corresponding
remote branch that 'git pull' uses to update the current branch.

See 'git help config' and search for 'push.default' for further information.
(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
'current' instead of 'simple' if you sometimes use older versions of Git)

Counting objects: 92, done.
Compressing objects: 100% (85/85), done.
Writing objects: 100% (92/92), 31.39 KiB | 0 bytes/s, done.
Total 92 (delta 51), reused 0 (delta 0)
remote:
remote: Create merge request for develop:
remote:   http://192.168.0.242/RD/M300/merge_requests/new?merge_request%5Bsource_branch%5D=develop
remote:
To [email protected]:RD/M300.git
   83b2034..2dae656  develop -> develop

可以去跟 m300 成員收 CPU 卡片囉

1455

開始幫每個 m300 成員作 mfgtool flash firmware

mfgtool flash firmware 都沒問題

歸還各成員 切換成 nand flash 開機的 CPU 版

1550

整理一下文件

先統一整理在 http://192.168.0.244/dokuwiki/doku.php?id=mantis:m300:start

1715

幫 nobrand 換了背景

logo 也簡單作了一張 logo.png 讓客戶知道這邊可以放他們自己公司的 logo

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