2021年7月18日 星期日

Redfishtool 的安裝和使用


redfishtool is a commandline tool that implements the client side of the Redfish RESTful API for Data Center Hardware Management.
redfishtool是一個命令行工具,用於實現用於數據中心硬件管理的 Redfish RESTful API 的客戶端。

Redfishtool,是DMTF用python3來開發的,我們可以透過redfishtool來下指令給redfish,但通常很少會用到這個tool,因為postman和curl其實就很好用了,但基於好奇,我在自己的模擬器裡面安裝來玩看看,安裝指令

2021年7月4日 星期日

[BMC][PFR] 橢圓曲線數位簽章算法 Elliptic Curve Digital Signature Algorithm (ECDSA)

Intel 目前推出的Platform Firmware Resiliency (PFR) 方案中,在secure update/boot中的sign image的部分是使用ECDSA來製作的,因此在我們開始分析PFR 使用的update image要怎麼sign 之前,必須先了解什麼是ECDSA

ECDSA 全名是 Elliptic Curve Digital Signature Algorithm,從名字我們就可以知道他是 Elliptic Curve Cryptography(ECC)和 ​Digital Signature Algorithm(DSA)的結合。

2021年6月27日 星期日

[OpenBMC] 從程式碼談 Redfish 的Log 機制 (LogService & EventService)

和往常一樣,OpenBMC中官方對Redfish 的Log 機制已經有很詳細的介紹,所以這篇是結合一些額外的資料來看整個LogService 的架構和原理 (*如果之後OpenBMC架構有變,這邊不會再更新)

docs/redfish-logging-in-bmcweb.md at master · openbmc/docs · GitHub

[編碼理論] LDPC decode (C++)

 編碼理論的期末作業其中一題是

Continued from the very end of our handout’s Page CT.087.1, perform one more iteration of BP (including one upward (i.e. variable-to-check) BP and one downward (i.e. check-to-variable) BP). Then compute the soft decision (i.e. Prob(bit=1)) for all of the eight variable bits.

原本打算拿起計算機開始算,但算完第一個機率後,決定還是寫個程式來把答案直接印出來,所以底下的程式真的是亂寫+不知道有沒有符合理論,也沒特別抓蟲了


2021年6月19日 星期六

[軌道力學期末報告] Risk of increasing temperature due to climate change on highspeed rail network in Spain

軌道力學期末報告是要找一篇有力學方程式的論文,我找了一周後,挑選了一篇和軌道挫曲相關的論文,主要內容是想要預測未來一世紀西班牙的軌道挫曲和氣候變化關係

順便放下報告ppt




2021年5月29日 星期六

openBMC LDAP 設定(二) - openldap server 架設和bmc設定

在前一篇"openBMC LDAP 設定(一) - nss-pam-ldapd" 提到了openbmc ldap設定和驗證,能從以下幾個方向來看 

  • nss-pam-ldapd
  • ldap server 架設
  • redfish/web 設定
這篇會接續介紹剩下兩個部分,就是ldap server的架設和redfish/web設定

因為openbmc支援了 openldap 和 windows 的ad,因此這篇選用OpenLDAP server架設為範例

LDAPS: openBMC LDAP 設定(三) - LDAPS(LDAP over TLS)

2021年5月28日 星期五

openBMC LDAP 設定(一) - nss-pam-ldapd

obmc的user managment 可以參考官方文件 (https://github.com/openbmc/docs/blob/master/architecture/user-management.md

openbmc ldap設定和驗證,能從以下幾個方向來看 
先了解 nss-pam-ldapd 的概念後就能進行ldap server的設定,設定完就能驗證redfish/web的ldap功能是否正常

這篇會介紹nss-pam-ldap,ldap server的架設和 redfish& web設定會在openBMC LDAP 設定(二) - openldap server 架設和bmc設定中介紹,LDAPS在openBMC LDAP 設定(三) - LDAPS(LDAP over TLS)

2021年5月11日 星期二

Lua Tutorial - Coroutines

想看更多Lua教學可以看之前的文章: Learn Lua in 10 minutes 裡面有內容大綱和更多仔細地介紹

Lua的Coroutines可以說是一個能隨時停止或執行的function,官網原文是

A coroutine is a function that can suspend execution to be resumed later.

意思就是"coroutine 是個可以隨時暫停等待再次被執行的 function",我們這邊簡單舉個例子

2021年5月6日 星期四

10分鐘學會Lua Basics ( Multiple Assignment, Table, Module, Function )

這是一篇文章能讓你10 分鐘學會lua 基本用法的教學文

底下是這篇文章會介紹到的基本用法,灰色部分會在其他章節中另外介紹

Lua Basics

Comment

String

Number

Variable scope

Ternary Operator

Loop Activity(while, repeat)

Table

Multiple Assignment

Function

Module 

Coroutines(點我)

Metatables

Prototype Based OO Programming

LuaJIT - FFI Library


以下會用各種範例來和大家介紹lua有哪些功能和用法,知道這些用法之後,遇到不懂的語法也能知道怎麼搜尋關鍵字