概要
wsl(wsl2じゃない)でnervesやってみる。
qemu(x86_64エミュレータ、ラズパイじゃない)でやってみた。
生成したnerves_livebook.imgを、QEMUで起動してテストしてみた。
linux周りを、調査する。
写真
実行結果
$ Nerves.Runtime.KV.get_all
%{
"a.nerves_fw_application_part0_devpath" => "/dev/rootdisk0p4",
"a.nerves_fw_application_part0_fstype" => "ext4",
"a.nerves_fw_application_part0_target" => "/root",
"a.nerves_fw_architecture" => "x86_64",
"a.nerves_fw_author" => "https://github.com/nerves-livebook/nerves_livebook/graphs/contributors",
"a.nerves_fw_description" => "Develop on embedded devices with Livebook and Nerves",
"a.nerves_fw_misc" => "",
"a.nerves_fw_platform" => "x86_64",
"a.nerves_fw_product" => "nerves_livebook",
"a.nerves_fw_uuid" => "3a89c283-9a44-57d2-0509-2f4115934675",
"a.nerves_fw_vcs_identifier" => "",
"a.nerves_fw_version" => "0.11.0",
"nerves_fw_active" => "a",
"nerves_fw_devpath" => "/dev/rootdisk0",
"nerves_serial_number" => "",
"wifi_force" => "",
"wifi_passphrase" => "",
"wifi_ssid" => ""
}
$ VintageNet.info()
VintageNet 0.13.5
All interfaces: ["eth0", "lo"]
Available interfaces: ["eth0"]
Interface eth0
Type: VintageNetEthernet
Present: true
State: :configured (0:16:12)
Connection: :internet (0:16:07)
Addresses: fec0::5054:ff:fe12:3456/64, fe80::5054:ff:fe12:3456/64, 10.0.2.15/24
MAC Address: "52:54:00:12:34:56"
Configuration:
%{type: VintageNetEthernet, ipv4: %{method: :dhcp}}
$ Toolshed.ifconfig
lo: flags=[:up, :loopback, :running]
inet 127.0.0.1 netmask 255.0.0.0
inet ::1 netmask ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff
hwaddr 00:00:00:00:00:00
eth0: flags=[:up, :broadcast, :running, :multicast]
inet 10.0.2.15 netmask 255.255.255.0 broadcast 10.0.2.255
inet fec0::5054:ff:fe12:3456 netmask ffff:ffff:ffff:ffff::
inet fe80::5054:ff:fe12:3456 netmask ffff:ffff:ffff:ffff::
hwaddr 52:54:00:12:34:56
$ Toolshed.cmd("df")
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 37632 37632 0 100% /
devtmpfs 1024 4 1020 0% /dev
tmpfs 404068 4 404064 0% /tmp
tmpfs 202036 4 202032 0% /run
/dev/rootdisk0p1 15477 3 15474 0% /boot/grub
/dev/rootdisk0p4 243631 1188 225240 1% /root
以上。