華邦 Security flash 於 raspberry pi 安裝文件
華邦 security 介紹文件:
https://pcsnas.iottalk.tw:5001/sharing/mM1s0F65j
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
若非使用外掛的 security flash,則可省略 Step 1. 以及 Step 2.
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
若 linux kernel version 非 5.x 版本,則須自行編譯 kernel 成 5.x 版本 (承德科技的工業用樹梅派已內建 5.x 版本)
機器: 工業用樹梅派 (自行外掛 security flash):
user:pi
password:artt25815695
機器: 工業用樹梅派 (內建security flash):
user:artt
password:artt
Step 0. 安裝 IoTtalk
將 IoTtalk 安裝於 /home/pi 底下
- 參考安裝指南:
https://pcsnas.iottalk.tw:5001/sharing/SLx5n0j7x
Step 1. 連接樹梅派與華邦 security flash
將工業用樹梅派與華邦 security flash 如下圖連接:
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
Step 2. 建立華邦 output 文件
- 下載文件,並解壓縮放至樹梅派
/boot/output/
底下
https://pcsnas.iottalk.tw:5001/sharing/c2JkH91k9
放置的檔案及路徑應如下:
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
Step 3. 放入 IoTtalk 機密文件至華邦 security flash
- 開啟 security flash
於 ls /dev/mt*
,應找出如下裝置:
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
- 此時,已開啟華邦 security flash,路徑為
/secert
將以下 IoTtalk 檔案機密檔案至 /secert/
底下,並在原本的檔案位置,使用 soft link 指向 /secret/
底下對應的檔案
Linux soft linx 用法:
移動 IoTtalk 機密檔案後,/secret/
底下檔案應如下:
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
- 關閉華邦 security flash
Step 4. 建立自動執行的加密 bash 檔案
透過 test.py
讀取該樹梅派 MAC 位置,並生成加密的 test.sh
test.sh
於樹梅派開機後自動執行以下步驟:
- 確認本地 MAC 位置是否與當初建立的 MAC 相同
- 開啟華邦 security flash,載入 IoTtalk 機密程式碼至記憶體,再關閉華邦 security flash
1. 安裝加密 bash 檔案所需套件
執行上述 python 檔案後,將產生加密的 test.sh
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
請刪除該 test.py
於 /etc/rc.local 下,註解原本 IoTtalk 的自動開機指令,並加入 test.sh
,如下:
