- What is Raspberry Pi?
- single-board computer
- Boards
- RPi 1 model B
- RPi 3 model B
- SoC: Broadcom BCM2837 (VideoCore API)
- CPU: Quad Core 1.2GHz 64bit
- GPU: Dual Core VideoCore IV® Multimedia Co-Processor; Open GL ES 2.0; hardware-accelerated OpenVG; 1080p60 H.264 high-profie decode
- WiFi: Broadcom BCM43438
- communication interface GPIO
- Serial Port
- RS232
- SPI (Serial Peripheral Interface)
- Model comparison
- Tutorial
- Software
- toolchain
- bootloader
- kernel/driver/rootfs
- image
- application
- Connection
- Reference
2017年7月1日 星期六
[Raspberry Pi] Portal
[Raspberry Pi] toolchain
- Compiler
- compile option
-Ofast -mfpu=vfp -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s
[RPi] Raspberry Pi
- Software
- Boot process
- first stage bootloader
- 在 GPU SoC中, 無法修改, 會去 mount SD card 上的FAT32 filesystem
- second stage boot-loader (bootcode.bin) - only released by binary
- retrieve GPU firmware in SD card, and starts the GPU
- GPU firmware (start.elf) - only released by binary
- GPU starts up CPU
- additional fixup.dat will check SDRAM partition
- User codes
- any binaries, e.g. kernel image (kernel.img), U-Boot, bare-bone applications
2017年6月16日 星期五
[License] GPL v.s. LGPL & GPL in Linux
- 簡單比較
- GPL:
- 保護 application
- 較嚴苛
- release binary時, 需要 release source code
- 僅為執行(非修改)此 binary使用, 不用 release source code
- LGPL:
- 保護 library
- 較寬鬆
- dynamically or statically link則無限制
- 在 kernel 上所執行的使用者應用程式都不受 GPL制約
2017年5月30日 星期二
[Company] 清算流程
- 就一人有限公司而言, 基本流程如下
- 向經濟部申請公司解散登記 (必須推舉清算人)
- 向稅捐機關註銷營業與稅籍登記
- 向稅捐機關申報所得稅決算
- 清算人向法院聲請就任清算人
- 申報股利盈餘分配扣繳
- 向稅捐機關清算所得稅
- 清算人向法院聲請清算完結
- Ref:
2017年4月10日 星期一
[Mantis] enable due date
- if you use google cloud deployment to deploy bitnami mantis service
- use ssh to login shell
- edit /opt/bitnami/apps/mantis/htdocs/config/config_inc.php
- add following lines in config/config_inc.php
$g_due_date_update_threshold = DEVELOPER; $g_due_date_view_threshold = REPORTER;
2017年2月25日 星期六
[Project] Jarvis
- 看到 Mark Zuckerberg 在 2016 年完成的 project Jarvis, 整個熱血沸騰. 希望今年有時間也來摸一下吧! 看了一下他設計的架構圖如下
- 看起來滿多細節與技術在裡頭, 譬如光 User Interface 就沒列到喇叭與麥克風, 應該是認為 iOS Voice App 就代表跑在手機上, 而這兩者手機都有!? 但, Language Processing 就可能分成 pre-process (e.g. Speech-to-Text), recognition( 其中包含 semantics analysis等), 看起來有點籠統, 喇叭的輸出應該也有 TTS(Text-to-Speech) 才是, Morgan Freeman的聲音不知是預錄的, 還是有特定的 TTS engine組合而成.
- 若要實作上面的系統, 目前手邊資源: iPhone, Raspberry Pi, 電視, USB camera, 預計架構為: USB camera (including Microphone) 作為 Input, 串接到 Raspberry Pi (RPi), RPi 作為 Server, 上面含有 AI system做任何判斷, 再以 HDMI 串接電視, 作為聲音與影像的輸出. 另外就是應用面的思考了. 360 camera+房仲系統?
- 既有軟體
[Mac] 清除 Mail 相關檔案
Mac OSX Sierra 在 System Information.app (系統資訊) 中加入了儲存空間管理 (Command + U)的功能, 但滿常看到, "郵件" 裡面有許多正在使用的儲存空間, 卻無法移除(如下圖)
可以到 ~/Library/Mail/V4/ 底下, 將一些數字ID的資料夾清除即可.
2017年1月22日 星期日
[Mac] read & writer NTFS by ntfs-3g
- 以前利用更改 /etc/fstab 或是利用工具 Paragon NTFS 來達成, 但在沒有購買軟體的情形下, 還是參考使用了 ntfs-3g
- 從癮科技的教學來看, 需使用 NTFS-3G+Fuse For OSX + fuse_wait, ...但我第一步下載安裝就一直給我顯示版本錯誤了, 後面提的
mount -t ntfs-3g /dev/disk2s5 /Volumes/mountPoint
我也失敗, 就先放棄這作法惹(我的理解, 安裝完應該要有/sbin/mount-ntfs03g
之類的才是...) - 以下是我嘗試後, 目前可用的作法
- 從 MacPort 安裝
sudo port install ntfs-3g
- 查詢要 mount的 ntfs disk並先 unmount, 最後 mount到 newMountPoint
diskutil list diskutil unmount /dev/disk2s5 sudo ntfg-3g /dev/disk2s5 /Volumes/newMountPoint
- Reference
2017年1月17日 星期二
[Toolchain] Autotools & CMake
- Autotools
- autoconf, automake, libtools
- Note: Mac OSX 自 XCode 4.3之後, 沒有內建這些 autotools了. 可以透過 port install autoconf automake
- Open source 三部曲
- ./configure
- 產生 Makefile 及 config.h (所以程式中盡量少用 config.h)
- make
- make install
- flowchart
- 利用 autoscan 建立 configure.ac (舊版 autotool叫做 configure.in)
autoscan mv configure.scan configure.ac
- 產生範本 configure.scan, 自行更名為 configure.ac供後面 autoconf使用. 同時會產生 autoscan.log (但成功的狀態似乎沒填任何東西, 要看過程反而是要用 autoscan --verbose來看)
- 從 verbose可以看到這個 autoscan做了些什麼事, 從掃描 source files開始, 會以目前執行的 directory 當作 srcdir, 分別掃描 cfiles, makefiles, shfiles, 以及瀏覽用到的 function, header, install 及相關變數 lists, 如下 samples (可自行以 open source project 驗證, 或如 reference裡用的 LilyTerm來練習)
autoscan: srcdir = . cfiles: src/console.c src/console.h src/data.h src/dialog.c src/dialog.h src/font.c src/font.h src/lilyterm.h src/main.c src/main.h src/menu.c src/menu.h src/misc.c src/misc.h src/notebook.c src/notebook.h src/pagename.c src/pagename.h src/profile.c src/profile.h src/property.c src/property.h src/window.c src/window.h makefiles: data/Makefile po/Makefile shfiles: src/unit_test.sh function: bzero: src/main.c:314 memset: src/menu.c:1995 src/menu.h:29
vi configure.ac
- configure.ac 基本上就是個 script, 只是裡面呼叫非常多 macros以利 m4 (GNU Marco Processor) 處理, e.g. AC_*( ), 其中 [ ] 為區隔字元, 以及 AC prefix代表 AutoConf 相關 marco; AM_*代表 AutoMake相關marco. 另外注意, macro名稱與左括號 ( 中間不要有空格, e.g. AC_PREREQ([2.69]) 而不是 AC_PREREQ ([2.69])
- #為註解
- 未更改
-
# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ([2.69]) AC_INIT([FULL-PACKAGE-NAME], [VERSION], [BUG-REPORT-ADDRESS]) AC_CONFIG_SRCDIR([src/console.c]) AC_CONFIG_HEADERS([config.h]) # Checks for programs. AC_PROG_CXX AC_PROG_CC AC_PROG_INSTALL AC_PROG_MAKE_SET # Checks for libraries. # Checks for header files. AC_PATH_X AC_CHECK_HEADERS([fcntl.h locale.h stdlib.h string.h sys/socket.h unistd.h]) # Checks for typedefs, structures, and compiler characteristics. AC_TYPE_PID_T # Checks for library functions. AC_FUNC_FORK AC_CHECK_FUNCS([bzero memset setenv setlocale socket strcasecmp strstr]) AC_CONFIG_FILES([data/Makefile po/Makefile]) AC_OUTPUT
- 利用 Autotools來建立 Makefile檔案
- Porting UNIX/Linux Applications to OS X
- A tutorial for porting to autoconf & automake
- front-end of make
- CTest
- 目的: 簡化 compile, install linux software to Mac. 可想成 apt-get, 即為 command line based package management
- 操作: port install, port search, port contents
- 通常會放在 /opt/local 底下
- 亦可透過 pkg-config --cflags port, 找到需要的 installed port header與 library
訂閱:
文章 (Atom)

