Note: Work with Meteor and NodeJs on Ubuntu 14.04

去年某個案子開始用Nodejs/Meteor 不過是北歐的合作廠商負責的 我還是只負責底層 BSP porting 用的是Yocto Distribution 本來案子被我很快的呼嚨完客戶很快的就量產 但是技術債就是這樣遲早都要還 經過半年後 客戶發現某一部份功能不太穩定 希望我這邊重新看看可不可以修正

結果卻發生怎樣都沒辦法build meteor package 重新裝了 meteor/build-essential/nodejs … 等等
還是 build failed 跟之前作案子時完全不同, 經過幾小時嘗試各種方式 然後去看build log 只知道某些 npm package 安裝 failed然後又重新裝各種 nodejs 0.10.x/npm/node-gyp … 還是無法解決 >_<

直到我重新review host 上的 gcc version 才發現目前default 用gcc-4.9, 起因是前幾周在測試 Qt5.6 ~ Qt5.8/Boot2Qt 等等時, 它需要切換到gcc-4.9 配合新的語言標準才行,

但是此時卻發生了npm install packages failed後來透過 sudo update-alternatives –config 把gcc 切回gcc 4.8 果然解決問題

 

Tips:
Debug 中 學到下列
cd ~/.meteor/
ls -al可以看到安裝的meteor version
meteor->packages/meteor-tool/<RELEASE>/<PLATFORM>/meteor
curl https://install.meteor.com > meteor.install
vim meteor.install # 可以去找RELEASE 改成想要安裝的版本, 我自己的案子目前建議還是用 “1.3.2.4″ 目前抓到的應該是 “1.4.2.3″
修改過後用 cat meteor.install | sh 就可以安裝了

廣告

Note: Test build Legato Platform of Sierra on Ubuntu 14.04

只需要在Sierra Wireless 上註冊帳號就可以下載他的 Source code
它現在採主流 Embedded Linux 的開發環境 Yocto Project,解開後很簡單只需下 make 就可以完成 喔對了網頁上會寫要裝哪些套件成功 build code

但是如果按照這樣的步驟會發現有兩個 package 會出現問題 原因是他在bb 的function 中呼叫了 bash 的內建函式 而bb是呼叫/bin/sh 在 Ubuntu 上預設的 sh 是dash 所以會不能正確執行, 需要做一個work around 當然你也可以手動砍掉symolically 在重新建立連到 bash 的link 也是可行的

 

  • Check that /bin/sh (ls -l /bin/sh) is not symbolically linked to dash. “dash" is a POSIX compliant shell that is much smaller than “bash" — however some broken shell scripts still make use of bash extensions while calling into /bin/sh. To work around this issue call “sudo dpkg-reconfigure dash" and select No when it asks you to install dash as /bin/sh.

 

WorkNote: git-daemon-run & add remote repository to fetch

Host A, IP:192.168.10.4 ( fetch remote repository )
Host B, IP:192.168.10.5 ( remote repository, have a branch “uPad" )

First on Host B install git-daemon-run service (on Ubuntu/Debian) and follow the below steps.

read /usr/share/doc/git-daemon-run/README.Debian document, the article describe how do to setup a git daemon on your computer.

1. sudo ln -s ~/kernel/android-3.0/.git /var/cache/git/android-3.0.git  # create a syminks for git-daemon-run
2. touch ~/kernel/android-3.0/.git/git-daemon-export-ok  # create a tag file for git-daemon-run
3. su sv restart git-deamon  # restart git-deamon-run service

On Host A fetch the git repository step

5. git remote add MyRepo git://192.168.10.5/git/android-3.0.git
6. git fetch MyRepo uPad:uPad

Results:

remote: Counting objects: 15, done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 8 (delta 7), reused 0 (delta 0)
Unpacking objects: 100% (8/8), done.
From git://192.168.10.5/git/android-3.0
* [new branch] uPad -> uPad

Note: an UNetbootin tip

Today I need to setup a host machine to run Ubuntu 10.04 for my work(Android development), so I download an Ubuntu 10.04.4 LTS (Lucid Lynx)  ISO and UNetbootin for Windows version. Just went make a USB disk for Ubuntu install.

But always got a “NTLDR is missing”message when use the Install USB Disk to boot system.

I to try again and again to fixed the issues until reformat the USB Disk and file system change to FAT32.

Keypoint:should check your USB disk is FAT system first when use UNetbootin or similar program

Close WM6 BSP relation workitem, Next workitem

Jun 13. 2008 過了WM6 CIT 的 LTK Certification

今天又收到了 WM 6 AKU1.3.0 的Professional(include Phone Edition) notification mail for CST LTK certification

算是真的將Windows Mobile 告一段落了, 還有可能的事情是Change Phone module/Upgrade size of MDOC(H3)不過這些都做過了, 真的要改也是一兩天的事情而已。

接下來就是 new ATOM 平台的工作

Windows XP/Vista/Linux 32/64bits GPIO/ACPI driver and application for wireless control.

Windows 的AP應該會繼續用 WTL寫.

Linux 的目前想法會寫一個console app + GTK 的wrapper UI 透過 redirection standard I/O 方式, 這樣應該比較容易應付客戶的各種需求

Embedded Controller 的Firmware Modify有P社/I社的Code base, P是Keil A51, I是 Keil C51. 配合Hotkey 定義 add combination key

BIOS 應該是 P社的 MASM + C wrapper to EFI inteface

should need create the following application by myself or outsourcing.

  • Change display resolution application
  • Rotate display oriented.
  • Hotkey manger and launch application.
  • Pointer driver and setting applicaiton(from touch panel/pointer vendor)
  • Hook keyevent on Linux to implement Hotkey manger

Building Mobile Linux image on the platform

建議HW 使用EC的GPIO 不要透過Southbidge的 GPIO, 建立在ACPI的機制上, 將driver單純與單一化, 並且可以用在新的chipset平台上, 不受INTEL的未來規劃影響.

Work Note: RIL

SIEMENS – RILDrv v1.2.5.10, MC75 rev 3 or rev4 (Test on rev 3 module)

WM 6 AKU 1.3 Build 20269

症狀:

        有時Power On 開機會發生, GSM Module 燈亮, 但是Today 顯示No Service 過了幾分鐘後, 會顯示 Phone Off, 在Clean boot 時, 特別容易發生。

除錯:

        觀察與比對正常與不正常的 RETAILMSG 發現有時會開不了 "com" port, 判斷是MUXDRV 還來不及建立 COM/DATA/AUX PORT

 

Workaround:

        修改TurnOnModule method 呼叫 OpenPortDevice 時加入 Re-try mechanism (3 times) + Sleep(50)

測試結果:

測試10 times, 觀察到都只發生一次Re-OpenPortDevice 即可成功正確打開GSM Module

 

(1 day)