- 契機
- 最近在看 ATSC3.0 的 standard, 其中一部分 A/360 Security 問到關於 content protection 的部分, 整個被問倒, 只好好好筆記一下如何做到 content protection. 先來看看 ATSC3.0 定義的 content protection 在哪一層. 有此圖可知, 這是 based on ISO-BMFF 的 format

- Content Protection
- standards
- W3C Encrpyted Media Extension (EME)
- What: a Javascript API to enable
- Who:
- W3C defined
- a web application exchanges decryption keys
- MPEG Common Encrypted (CENC)
- What: ISO-BMFF format (e.g. mp4 container) 若要使用 DRM, 則需要 CENC, 可想成此規範定義了 ISO-BMFF 支援 DRM時, 需要在那些 box 定義 DRM 相關的 parameters, namely, Protection System Specific Header Box (pssh)
- Who:
- scrambling system
- ISO-BMFF file
- Where:
- When:
- Why: for DRM system
- How:
- only encrypts media samples, and keep metadata un-encrypted
- DRM comparison
2017年8月16日 星期三
[Security] DRM - Digital Right Management System
2017年8月15日 星期二
2017年8月2日 星期三
[Notes] Linux Devices Drivers 3Ed.
- Books: Linux Device Drivers
- Ch1. Introduction
- 說明驅動程式的角色
- 設計原則: 提供機制 (mechanism)-要提供什麼能力, 而非法則 (policy)-如何使用這些能力
- Kernel 概論
- Module
- Device分類: character device, block device, network interface
- Ch2. Module
- Kernel preparation
- Download Linux Kernel source codes
apt-get source linux-image-unsigned-$(uname -r)
sudo apt-get install libncurses-dev flex bison openssl libssl-dev dkms libelf-dev libudev-dev libpci-dev libiberty-dev autoconf
cp /boot/config-4.15.0-91-generic .
make menuconfig
make -j 16 clean
make -j 16
- build -
- include kernel headers (/usr/src/linux-headers)
- make file - obj-m
- sample module file
#include#include MODULE_DESCRIPTION("Hello_world"); MODULE_LICENSE("GPL"); static int hello_init(void) { printk(KERN_INFO "Hello world !\n"); return 0; } static void hello_exit(void) { printk(KERN_INFO "Bye !\n"); } module_init(hello_init); module_exit(hello_exit);
PWD := $(shell pwd) KVERSION := $(shell uname -r) KERNEL_DIR = /usr/src/linux-headers-$(KVERSION)/ MODULE_NAME = hello obj-m := $(MODULE_NAME).o all: make -C $(KERNEL_DIR) M=$(PWD) modules clean: make -C $(KERNEL_DIR) M=$(PWD) clean
insmod hello.ko dmseg
- header: 重要 headers: linux/init.h, linux/module.h 含有後面要用到的 marcos
- license
- module_init()
- module_exit
- module_param(parameterName, type, permission)
2017年7月15日 星期六
[Kernel] Portal
- Tool:
- trace kernel: LXR
- Steps
- Environment setup
- source code
- architecture
- fetch: apt-get source linux-image-$(uname -r)
- sources.list -> 可能需要 uncomment /etc/apt/sources.list 中 deb-src 的 #, 並且做 apt-get update
- build
- 推薦書目:
- Linux Kernel in a nutshell
- Understanding the Linux Kernel
- Professional Kernel Architecture - 中譯本: 深入探索 Linux 核心架構
- Linux Kernel Development - 中譯本: 精通Linux核心開發 : 設計與實作Linux核心的權威指南
- Understanding Linux Network Internals - 中譯本: Linux 網路原理
- Linux Device Driver - 中譯本: Linux驅動程式
- Essential Linux Device Driver - 中譯本: Linux 驅動程式開發實戰
- Debugging Linux Systems
- Linux 鳥哥的私房菜
- Reference:
[Git] Portal
- What is Git?
- 分散式版本控制軟體
- 利用 40 bytes的 hash key當作每次 commit ID
- stages
- 每次皆儲存完整內容, not diff
- 名詞
- hash
- commit
- repository (remote, local)
- branch
- HEAD
- pointer to latest commit of current branch
- Q: reference, rebase, cherry-pick?
- parent -> 延伸至哪個 version
- 行為
- clone
- checkout
- commit
- 修改 commit:
git commit --amend
- push
- pull
- 從 remote 抓取各版 merge成新的 commit
- fetch
- 與 pull的差異是, 僅抓取 remote的 log, 不 merge
- merge
- fast forward (branch 合回 master, 且 master 未更改)
- non-fast forward, merge into a new commit
- rebase, branch的修改會串到 master 後面
- Merge (From 連猴子都懂的 Git 入門指南)
修改內容的歷史記錄會維持原狀,但是合併後的歷史紀錄會變得更複雜。 - Rebase
修改內容的歷史記錄會接在要合併的分支後面,合併後的歷史記錄會比較清楚簡單,但是,會比使用 merge 更容易發生衝突。 - e.g. git checkout br3
- git rebase master
- 在 master 後面再串上 br3
- stash
- blame
- 可以 line-by-line 秀出各 commiter
- 教學
- 設定
- .gitignore
- filemode
- 常看到 git diff 只差在 old mode 100644 與 new mode 100755
- 可以利用 git config core.filemode false 來隱藏這些錯誤
- workspace config, user config, global config
- 可搭配 Google 的 Tool repo 進階 checkout 多個 repository 對應的特定版號, 以 manifest做管理 (xml format), 或是 snapshot.xml 做管理
2017年7月1日 星期六
[Raspberry Pi] Portal
- 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
[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:
訂閱:
文章 (Atom)