Skip to content

Generate /etc/machine-info & add deviceinfo_chassis variable to all devices

Administrator requested to merge etc-machineinfo into master

Ref #591 (closed)

I've set the Ouya as "embedded" and the Librem 5 & PinePhone devkits as "handset", the rest is pretty clear.

And here are some stats :)

Type Count
laptop 1
tablet 35
handset 158
watch 2
embedded 9
vm 2

For reference here's my script for adding the deviceinfo_chassis variable (fish shell):

for f in device/*/*/deviceinfo
    grep -q deviceinfo_chassis $f; and continue
    set name (cat $f | grep deviceinfo_name | cut -d'"' -f2)
    echo "Device name: $name"
    open "http://google.at/search?q="(string escape --style=url $name) >/dev/null 

    read -l chassis
    sed -i '/^deviceinfo_keyboard=.*/i deviceinfo_chassis="'$chassis'"' $f
end

and for the table with type and count:

set types desktop laptop convertible server tablet handset watch embedded vm container
echo "| Type | Count |"
echo "|------|-------|"
for type in $types
    set count (git grep deviceinfo_chassis=\"$type\" | wc -l)
    test $count -eq 0; and continue
    echo "| $type | $count |"
end

Merge request reports

Loading