RSSAmplifier

Blog

oopsmonk

Recent content on oopsmonk

oopsmonk.github.ioRSS feed ↗87 posts

Latest posts

ARM Unlocked Taipei 2025

ARM Total Design, Arm Compute Subsystems (CSS), Synopsys, Siemens EDA

Lenovo ThinkPad fan control via ThinkFan on Ubuntu

The default fan control is annoying, Thinkfan is a simple, lightweight fan control program. vmatare/thinkfan - The minimalist fan control program Setup Thinkfan Install Thinkfan and lm-sensors sudo apt install lm-sensors thinkfan Read the doc $ man thinkfan.conf Check thermal devices hwmon-style $ find /sys/devices -type f -name 'temp*_input'…

The Littlest JupyterHub - TLJH

The Jupyter project is a free software, open standards, and web services for interactive computing across all programming languages. It provides: Jupyter Notebook : the classic notebook interface JupyterLab : the next-generation notebook interface Voilà : share your results with a secure, stand-alone web applications. JupyterHub : the multi-user server for Jupyter Notebook and JupyterLab The…

ARM AMBA

Advanced Microcontroller Bus Architecture( AMBA ) 2024-01-17 AMBA 5 is the latest generation of the freely available AMBA protocol specifications . It introduces the Coherent Hub Interface (CHI) architecture, which defines the interfaces to connect fully coherent processors and high-performance interconnects. AMBA 5 also introduces the AXI5, ACE5 and AHB5 protocols, which extend prior generations…

Extend Volume Size on AWS EC2

Extend EBS size on EC2 instance

Browser Graphics Are Broken

Cannot see graphics in browsers on Ubuntu

Lazy.nvim

A modern plugin manager for Neovim

Fcitx5 倉頡輸入法 on Ubuntu 22.04

description goes here

Note-taking and file sharing with Syncthing and Joplin

You can find many note-taking services, like, Evernote, Google Keep, Notion, Obsidian and online storage services such as, Dropbox, Google Drive, OneDrive, iCloud. They are easy to use and secure. But, secure is not equal to private! A way to keep privacy is host private services by self. Edward Snowden’s Privacy Tips: “Get Rid Of Dropbox,” Avoid Facebook And Google This is how I share/edit notes…

Install Perf on Ubuntu 20.04

What is Perf? Perf or perf-event is a Linux profiler and is part of the Linux Kernel which can help you solve advanced performance and troubleshooting functions. It covers hardware level (CPU/PMU, Performance Monitoring Unit) features and software features (software counters, tracepoints) as well. Install on Ubuntu If perf has not installed on the system $ perf WARNING: perf not found for kernel…

RPi vs i5-8250U

utarray benchmarking Week48~52 小筆記 bazel installation on Raspberry Pi Issue#1308 $ sudo apt-get install build-essential openjdk-8-jdk python zip unzip $ wget https://github.com/bazelbuild/bazel/releases/download/0.19.2/bazel-0.19.2-dist.zip $ mkdir bazel-0.19.2 && unzip ./bazel-0.19.2-dist.zip -d bazel-0.19.2 $ cd bazel-0.19.2 $ env BAZEL_JAVAC_OPTS='-J-Xms384m -J-Xmx512m' bash ./compile.sh 🍃…

RPi Home

Test Google Asistant on Raspberry Pi. Week40 44 (10/01 10/31) 網路文章 Wi-Fi 6: What’s Different, and Why it Matters 網路資源 Raspberry Pi BT setup Turn your Raspberry Pi into homemade Google Home Google Asistant SDK Google Asistant SDK C++ 使用Python lib常常會當機改用C++比較沒問題, 但C++版本有限制API使用的次數, 無法長期使用.

How many pointers you can have?

Pointers, again… How many pointers you can have? C89: 12 Week31 35 (07/29 08/31) 網路文章 What is the difference between const int*, const int * const, and int const *? Read it backwards (as driven by Clockwise/Spiral Rule ): int* - pointer to int int const * - pointer to const int int * const - const pointer to int int const * const - const pointer to const int Now the first const can be on…

Energetic People!

It’s blocks and no chain, keep fighting! Week27 30 (07/01 27) 網路文章 IOTA Summer Summit 2018

Hell Yeah! Keep Fighting

More bad ideas + Generosity = Good ideas Week22 26 (06/01 29) 網路文章 Elon Musk emails employees about ’extensive and damaging sabotage’ by employee 樹大招風….但內部管理是否有問題? 溝通一直是最難處理的問題之一, 尤其是資訊不對等的情況下. 網路資源 esp32-websocket websocket component for esp-idf. 讀書心得 論文學習

What Does The Fox Say?

Okinawa Churaumi Aquarium Kouri Bridge - The Longest Bridge in Okinawa Week18 21 (05/04 25) 網路文章 Students are being prepared for jobs that no longer exist. Here’s how that could change. NBC關於美國高中教育的深入報導, 提到現在的教育方式已經無法保證讓學生找到理想的工作,尤其是技職生. 文中提到几個點: 高中準時畢業的人有84%, 後來70%直升大學. 雖然學校盡力教導讓學生面對未來, 但學校也不知將來會是如何, 因為計劃跟不上變化. “We’re preparing kids for these jobs of tomorrow, but we really don’t even know…

Tangled

Algorithm, Blockchain, Coursera 真心推Coursera上的 Data Structures and Algorithms Specialization , 挑有興趣的就好. 2017年底至今拿了4張Certifications, Algorithms on Graphs 是比較有趣的課程. 其它3張是 Algorithmic Toolbox , Data Structures , Algorithms on Strings Week14 (04/06) 讀書心得 Burrows-Wheeler Transform - data compression Cyclic rotation Sorting Last column Inverting Burrows-wheeler transform Mark the occurrence of characters…

Never Split the Difference

Debug, Debug, Debug…, Muscle Up Tips Week9 (03/02) 讀書心得 FBI談判協商術 積極聆聽, 鏡像模仿, 極端錨點, 開放型/測試型/校準型問題, 對事不對人, 每個人都怕失去, 成見使人盲目, 假設提供指引. The power of “No”, Three types of “Yes”, The power of “Right”, Emotion is one of the keys, Be Honest. Thinking fast and slow. Week10 (03/09) 網路資源 Chris Voss: Never Split the Difference Week11 (03/16) 網路文章 Android Treble:…

cache not cash...

Android, Chinese New Year, blockchain, Cache miss Week5 (02/02) 這個月雖然有年假但比平常更忙! 結論: 放假不一定放鬆, 想專心做事 :-) 網路文章 Processor Pipeline Gallery of Processor Cache Effects Using Streamline to Guide Cache Optimization 參考這篇分析Kodi17.6影片播放時的L1/L2 cache access情況, 播放2160p影片時L1/L2 data ratios不高分別在0.046/0.18, 使用Kodi18更少分別為0.041/0.16. 另外Kodi18在記憶體使用上比17.6減少3.6%, cache miss 減少47~55%. Cache Refill Ratios算法 L1 data…

Is there a shortcut?

Android, Algorithms Week1 (01/05) 讀書心得 Algorithms on Graphs - Week5 給出座標上n個點: 找出最短路徑(the shortest path) 分群(Clustering) 為Minimun Spanning Tree相關問題, 可以使用Kruskal’s MST Algorithm 及 Disjoint-set 來解. for all u ∈ V : MakeSet(v ) X ← empty set // a set with solution edges sort the edges E by weight for all {u, v } ∈ E in non-decreasing weight order: if Find(u) != Find(v): add {u, v } to X Union(u, v )…

Resolution and Revolution!

SEAndroid, Algorithms, Numpy Android N -> O 被自己的石頭砸到腳 對於晶片廠來說Android決解了軟體開發的問題, 也加速了ODM/OEM的開發時程. 沒錯…但對於手機/電視之外的應用..存在些問題. 另外差異化及客制帶來些不定時炸彈. Sepolicy for Android Treble 使用numpy array修改pixel values. 網路資源 Machine Learning 101 - Jason Mayes New year’s resolutions IELTS overall 6.5 Data Structures and Algorithms Specialization Master of Computer Science in Data Science

Sepolicy for Android Treble

A Note about sepolicy in Android Oreo. First thing first SELinux documents: SELinux for Android 8.0 What is SELinux? What is SEAndroid? SELinux Policy Concepts and Overview Android sepolicy files Policy path: /system/sepolicy BOARD_SEPOLICY_DIR (device/$VENDOR/$DEVICE/sepolicy/, device/$VENDOR/$DEVICE/common/sepolicy/) Policy Macros: system/sepolicy/public/te_macros…

Preparing a preparation?! It's nonsense...

SELinux, Arm Tech Symposia 2017 Taiwan, golang, IoT Week44 (11/03) 網路資源 Firmware Updates over Low-Power Wide Area Networks Enabling firmware updates over LPWAN ARMmbed/lorawan-fota-demo 滿有趣的問題, IoT建置會預期device要能長達10年的壽命, 但10年間的變化是很大的. Week45 (11/10) 網路文章 Android SELinux Treble Android O 為了加速產品開發, 在framework上有重大的改變, 使用了Treble. Vender, ODM, OEM有各自需要維護的partitions. Week46 (11/17) 網路文章 Neural fuzzing:…

Policy Configuration of SELinux and SEAndroid

A Note for SELinux and SEAndroid policy configuration. SEAndroid Security-Enhanced Linux in Android SELinux for Android 8 - Treble mode SEAndroid安全機制中的文件安全上下文關聯分析 - file_context SEAndroid安全機制中的進程安全上下文關聯分析 - process Android 8 Treble mode: Kernel early mount PRODUCT_FULL_TREBLE, PRODUCT_FULL_TREBLE_OVERRIDE, BOARD_SEPOLICY_DIRS Android 4.3 ~ 6 TE macro define: external/sepolicy/te_macros Android 8…

ARM Mali Profiling Metrics

Some metrics for ARM Mali performance analysis in DS-5 Streamline or MGD. DS-5 Streamline Mali-470 (Utgard) GPU Bandwidth = (Words read, master + Words written, master) * Bus Width Overdraw = Fragments Passed Z/stencil count * Number of Cores / Resolution * FPS GPU Bandwidth = (38342943+38661456) * (128/8) = 1232070384 bytes/s = 1174.99 MB/s Overdraw =…

What's wrong with benchmarks?

ARM performance, Algorithms In fact, there is no universal benchmark tool. Week40 (10/06) 網路文章 Why do we learn algorithms? Why do we need so many sorting algorithms? Why do we need to learn different sorting algorithms when the STL sort function is already available to us in C++? 網路資源 The Algorithms 不同程式語言演算法的實現. every-programmer-should-know Data Structure Visualizations 演算法視覺化 Week41 (10/13) 網路文章…

Building Different Android Version Using schroot

I have a build environment with make4.1 and JDK8 for Android N/O, but JDK6 and make3.81 are required by Android KitKat. Here is a way to create a clean environment for Android KK. Create a new environment in current Ubuntu 16.04 install schroot and debootstrap sudo apt install schroot debootstrap if xenial no exist, update to latest version of debootstrap ls -l…

Waterline?

Jigsaw Puzzle, Hidden layers, New SoC, Algorithm basics, HTC Week35 (09/01) 第一次完成520片的拼圖, 花了4個晚上的時間, 大約12小時吧?! 下次記得顏色鮮明的圖會比較愜意些. Week36 (09/08) 網路文章 Credit firm Equifax says 143m Americans’ social security numbers exposed in hack 在新聞公開前高層就己賣掉市值1.8m的股票!! 網路資源 Google Developer Documentation Style Guide Google公佈了內部文件撰寫的格式及注意事項. Neural Networks and Deep Learning - Week 3 Tuning hidden layer size…

Faster R-CNN Use Caffe Framework

Install caffe framework and run Faster R-CNN demo on Ubuntu 16.04. Test environment CPU: Intel(R) Core(TM) i3-4130 CPU @ 3.40GHz 4-Cores GPU: ASUSTeK GeForce GTX 1060 with 6GB Memory HD: WDC WD5000AAKX OS: Ubuntu 16.04 Test Flow Install software requirement Video pre-processing: get jpeg images from source video Image Labeling Use Faster R-CNN to genrate trained model Run Faster R-CNN demo…

Going Deep

以前球隊在回防時, 教練總會說"快跑! 別回頭, 到定點再休息". 關於人生, 喘息點在哪兒? 我想就在滴水穿石之間! Deep Learning <&ndash;> keep learning Week31 (08/04) 網路文章 A Brief History of CNNs in Image Segmentation: From R-CNN to Mask R-CNN R-CNN: https://arxiv.org/abs/1311.2524 Visual Recognition就是從這裡爆發了&hellip; 透過Selective Search找到Region後丢給修改過的AlexNet學習, 最後再給Support Vector Machine (SVM) 這層CNN. 原本設計的R-CNN就只做這些: 用Selective Search找region…

Math

以前球隊在回防時, 教練總會說"快跑! 別回頭, 到定點再休息". 關於人生, 喘息點在哪兒? 我想就在滴水穿石之間! Week27 (07/07) 網路文章 Elon Musk: The world&rsquo;s population is accelerating toward collapse and nobody cares 網路資源 Barbara Oakley: &ldquo;Learning How to Learn&rdquo; | Talks at Google Week28 (07/14) 網路資源 Numpy Quick Start MathJax basic tutorial and quick reference MathJax語法速查及範例 Week29 (07/21) 網路文章 Path Guide: A New Approach to Indoor…

OSDI

以前球隊在回防時, 教練總會說"快跑! 別回頭, 到定點再休息". 關於人生, 喘息點在哪兒? 我想就在滴水穿石之間! Week22 (06/02) 讀書心得 OSDI: Memory Management Kernel space的memory management, 要考慮到的問題, Internal/External fregmentation, physical/logical contiguous, buddy system, slab allocator. User space的memory管理, page fault handler, Red-Black Tree / AVL Tree. 論文學習 FarmBeats: An IoT Platform for Data-Driven Agriculture PDF , Slides…

[Paper] - An Evolutionary Study of Linux Memory Management for Fun and Profit

Memory management主要的功能是page mapping, memory protection, and sharing, 但隨著時間不斷的演進已經算是kernel裡不小的subsystem. 這份研究分析2009~2015年之間4587筆有關memory management(mm)的patches, Linux版本由v2.6.32.1 ~ v4.0-rc4. Source: An Evolutionary Study of Linux Memory Management for Fun and Profit Memory Bugs 5種bugs存在mm: memory error, checking, concurrency, logic and programming. 透過heat map可清楚看到主要bug發生地方 主要的bug fix在: Memory…

RaspberryPi3: GLMark2 using weston with DRM backend

How to use weston with DRM backend in Raspbian, and gets benchmark score by GLMark2. With regards to hardware acceleration, We can enable VC4 driver through raspi-config . # update system and raspi-config script $ sudo apt-get update && sudo apt-get upgrade $ sudo apt-get install raspi-config # enable Broadcom VC4 driver $ sudo raspi-config Advanced Options -> GL Driver -> GL (Full KMS) Test…

LGS Hell

以前球隊在回防時, 教練總會說"快跑! 別回頭, 到定點再休息". 關於人生, 喘息點在哪兒? 我想就在滴水穿石之間! 主要在了解linux graphic system架構, 並分析wayland weston compositor/glmark2的repaint flow. Week18 (05/05) 網路文章 和百年公斤原器說再見!七大國際單位制將改頭換面 原來用抽像來定義實體早己行之有年. 網路資源 C++ Language Interface Foundation (CLIF) Google 做了一個C++ wrapper generator, 目前看來只for Python, 目標是支援更多的語言. Week19 (05/12) 網路文章 Weston repaint scheduling Week20 (05/19) Wayland的weston compositor可透過…

Linux Graphic Stack相關的名詞

Linux graphic 架構還滿複雜的, 在看時需要大略了解几個名詞及之間的關係. X Window System : 目前來到第11版本所以叫X11, 是以 X window System Core protocol 為基礎的window system. wayland : 由於X11太過複雜且在embbeded system中的效能不佳, 用來取代X window System Core protocol. weston (wayland compositor): 以wayland protocol來實做的compositor做為參考的範例, 實用上會用Westeros, Clutter&hellip;等. KMS/UMS : Kernel mode-setting 及User mode-setting. OpenGL: 由 Khronos Group 制定的跨平台graphic…

Enable gzip compression in Nginx

How to enable and test gzip in Nginx. Official document: ngx_http_gzip_module Enable gzip I use Raspberry Pi System Monitor to test gzip module. Modify /etc/nginx/sites-available/default to enable gzip. In this case I only change the RpiMonitor website in the server, you can apply it to global by /etc/nginx/nginx.conf location /rpi { proxy_pass http://127.0.0.1:9999/RpiMonitor; } Change to…

失速列車

以前球隊在回防時, 教練總會說"快跑! 別回頭, 到定點再休息". 關於人生, 喘息點在哪兒? 我想就在滴水穿石之間! 失速的這個月 Week14 (04/07) 網路文章 Adding A New System Service To Android 5: Tips and How To 由下到上打造一個android system service. HW -> HAL -> JNI -> Service -> Manager -> Registering. Adding New System Service in Android Native system service. 33 Foods that Starve Cancer 滿有趣的論點, 細胞沒有supplement會死亡沒錯, 但microscopic cancers能否自己生出新的血管? 大部份的癌症無關基因,…

Android USB Media Transfer Protocol(MPT)

Study USB MTP Device and Host mode in Android M. Source Code Cross Reference: Android 6.0.1_r10 MTP Device Mode Enable device mode: Settings -> Developer options -> Select USB Configuration -> MTP UsbDeviceManager: Setting USB config to mtp device/lge/hammerhead/init.hammerhead.usb.rc : on property:sys.usb.config=mtp system/core/rootdir/init.usb.configfs.rc: on property:sys.usb.config=mtp &&…

Slow and Fast

以前球隊在回防時, 教練總會說"快跑! 別回頭, 到定點再休息". 關於人生, 喘息點在哪兒? 我想就在滴水穿石之間! Week9 (03/03) 228的4天連假讓這週過的特別快. 網路文章 What Americans can learn from other food cultures Google breaks SHA-1 web crypto for good but Torvalds plays down impact on Git Announcing the first SHA1 collision Google 公怖與CWI Amsterdam合作生出了第一個SHA-1 collision, 對於使用SHA-1的Git來說會有什麼影響? 目前看來是影響不大, 主因如下: Git remote 與 local 發生衝突時local並不會被override. 相較於Git,…

在Shell使用vi-mode

Vi用慣了, 那在shell也可以vi-style嗎? 答案是可以的! 這個方法可使用在常用的shell, 例如bash, ksh, zsh, mksh. btw, mksh 是Android使用的shell, 但Ubuntu預設的dash 是不支援的. 在shell中執行 set -o vi 後按&rsquo;i&rsquo;進入insert mode, &lsquo;ESC&rsquo;為normal mode. 回到原本的模式則是 set -o emacs 如下圖: Reference: Using vi-mode in your shell

The First SHA1 Collision

CWI Institute in Amsterdam and Google genrate two PDF documents with the same SHA-1 digest. Google security blog - Announcing the first SHA1 collision SHA-1 collistion and Git If a file A with X hash in local repository and with X hash in remote (SHA-1 collistion between local and remote), would overwrite the local version? Nope. If it has the same SHA1, it means that when we receive the object…

新章

以前球隊在回防時, 教練總會說"快跑! 別回頭, 到定點再休息". 關於人生, 喘息點在哪兒? 我想就在滴水穿石之間! Week7 (02/17) 發現 minimal-mistakes 上缺了繁中, 便開了個PR #838 沒想到很快就被merge, 效率真快. 試玩 BeautifulSoup 寫了個簡單的 ck101Comics.py 用來下載卡提諾×揪漫畫. 網路文章 Diving Into Android &lsquo;M&rsquo; Doze & Diving into Doze Mode for Developers Android Doze在Nougat多了Light-Doze, Light-Doze的Maintenance Windows較短為了避免不同步問題, 當進入Deep-Doze(原本Marshmallow的Doze),…

Android Adoptable Storage

A study of adoptable storage in Android Marshmallow and Nougat. How to Setup a Private Disk (External USB Storage) Android adoptable storage allow APP install to external storage that can reserve more internal space for other APPs. Create Adoptable Storage Using Settings GUI Settings -> Storage & USB -> Portable storage -> Settings -> Format as internal Use sm (Storage Manager) Command Find disk…

Android Media Framework

Android APIs for media playback: MediaPlayer and MediaCodec. MediaPlayer mediaPlayer. setDataSource (path); //fd or url mediaPlayer. setDisplay (SurfaceHolder sh); //SurfaceView or VideoView mediaPlayer. prepare (); // MediaPlayer. start (); // MediaCodec /* init use MediaExtractor to get mime data create decoder by mime type configure decoder by video format and surface view */ MediaExtractor…

Android build error on Ubuntu 16.04 LTS

After update system from Ubuntu 14.04 to 16.04, I got some problems, when I was building Android source code. openjdk-7-jdk is gone Add PPA for OpenJDK7 sudo add-apt-repository ppa:openjdk-r/ppa sudo apt remove openjdk-* icedtea-* icedtea6-* sudo apt update && sudo apt install openjdk-7-jdk git ccache automake lzop bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 g++-multilib…

Android Full Disk Encryption Workflow (default encryption)

This study is based on Android Marshmallow. Android full disk encryption use dm-crypt, which works with block devices. Please refer to the following docs for more detail: Full Disk Encryption How to setup full disk encryption Android support forceencrypt and encryptable encryption flags, and only support ext4 and f2fs file systems. Setup forceencrypt fstab.bullhead :…

LibCEC on Raspberry Pi

Install requirements sudo apt-get install build-essential autoconf liblockdev1-dev \ libudev-dev git libtool pkg-config cmake libxrandr-dev -y Python and Swing support (Optional) sudo apt-get install python-dev swig -y Checkout and build libcec source code The current version is libcec-3.0.1, but I got an error as follows: make[2]: *** No rule to make target '1', needed by…

Firefox is Really Slow

Firefox is extremely slow on my system, include menu, right-click, tab opening&hellip;etc. Mozilla Firefox 40.0 Xubuntu 14.04 LTS 64-bit Linux 3.16.0-45-generic #60~14.04.1-Ubuntu SMP Fri Jul 24 21:16:23 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux After I turned off hardware acceleration , everything is fine. Type this in the browser&rsquo;s address bar to trun it off: about:preferences#advanced

Markdown Preview Use Sublime Text 3

Download Sublime Text 3 http://www.sublimetext.com/3 Install Package Control https://packagecontrol.io/installation#st3 Use Ctrl + ` or View > Show Console open the Sublime Text console. Copy the text into console and press Enter to install Package Control. Once finished installation, restart Sublime. Install Markdown Preview package Open command palette via Ctrl + Shift + p or Preferences >…