werdnum
11/03/2023, 9:38 PMdd if=tp2-firmware-sdcard-v2.0.0-RC1.img status=progress | ssh root@192.168.124.54 dd of=/dev/mmcblk0 bs=1M
2. Once you reboot the BMC it goes into a "do you really want to reflash the whole board?" thing, which you can skip by typing CONFIRM over UART or triple-tapping the power or reset button
3. Once it's reflashed the board, you have to either pull the microSD card, or you can erase it by connecting to UART, pressing any key when prompted to interrupt boot, and then using mmc erase 0 10000
to erase the MicroSD card.geerlingguy
11/03/2023, 10:35 PMterarex
11/05/2023, 3:52 PMcfsworks
11/05/2023, 6:24 PMwerdnum
11/05/2023, 8:09 PMsvenrademakers
11/05/2023, 10:40 PMterarex
11/06/2023, 12:27 AMwerdnum
11/06/2023, 1:34 AMterarex
11/06/2023, 5:07 AMrmeier
11/06/2023, 8:39 AMsvenrademakers
11/06/2023, 2:17 PMv2-RC1 improvements
UI
* Updated styling of bmc-UI
* UI: Fixes in the progress-bar and labels
BMCD
* Simplified power controller
* pressing KEY_1 will toggle all nodes on if 3 or less nodes are powered
on
* pressing KEY_1 when all nodes are off will turn all nodes on
* pressing KEY_1 when all nodes are on will turn all nodes off
* long press KEY_1 will force every node to on
* persistency: improve logging, decrease write timeout
* ban_patrol: simplify ban deadline
* Update default_config.yaml
* serial: replace custom ring buffer impl with a crate
(Fixes #135)
* move the default www directory to /srv/bmcd/www
* authentication: auto reload users
* auth: ban consecutive failed requests
* humantime: convert durations into human readable
* expose reboot over API
TPI
* rename `tpi power get` to `tpi power status`
* return error response from server on authentication error
* throw away token if invalid. Prevents constant retry of authentication
request with wrong token
* add spinner for 'verifying checksum'
* add reboot command
* allow local file transfers to be issued outside BMC, fix phrasing
rmeier
11/06/2023, 8:26 PMcfsworks
11/06/2023, 8:35 PMubinfo -a
show?rootfs_new
?)svenrademakers
11/06/2023, 9:00 PMteslamax
11/06/2023, 11:04 PMcfsworks
11/06/2023, 11:18 PMteslamax
11/06/2023, 11:36 PMterarex
11/07/2023, 2:04 AMrmeier
11/07/2023, 5:44 AMgunther2908
11/07/2023, 7:47 AMsvenrademakers
11/07/2023, 8:08 AMrmeier
11/07/2023, 8:25 AMsvenrademakers
11/07/2023, 8:31 AMwerdnum
11/07/2023, 8:39 AMsvenrademakers
11/07/2023, 8:41 AMwerdnum
11/07/2023, 8:41 AMsvenrademakers
11/07/2023, 8:42 AMcfsworks
11/07/2023, 10:38 AMosupdate
in bmcd
to allow streaming the volume update over the network -- including through a zip-extracting filter layer. So if someone provides a .zip instead of a .tpu the bmcd
implementation can detect that and do the correct thing.svenrademakers
11/07/2023, 10:44 AMosupdate
in bmcd
to allow streaming the volume update over the network -- including through a zip-extracting filter layer. So if someone provides a .zip instead of a .tpu the bmcd
implementation can detect that and do the correct thing
"streaming" is a bit of a loaded term for me. the bmcd
is already capable of receiving a chunked volume, the only caveat is that its written to tmpfs before osupdate
executes it. This should be fine for now as we have plenty RAM.osupdate
to be reimplemented as wel somewhere in the future, calling shell scripts from an API is not really ideal regarding securityteslamax
11/07/2023, 7:10 PMbhuism
11/07/2023, 10:54 PMteslamax
11/08/2023, 12:10 AMwerdnum
11/08/2023, 12:23 AMbhuism
11/08/2023, 5:41 AMwerdnum
11/08/2023, 10:01 PMteslamax
11/09/2023, 12:29 AMcfsworks
11/09/2023, 12:34 AMterarex
11/09/2023, 3:03 AMjoesroom
11/09/2023, 11:55 AMsvenrademakers
11/09/2023, 3:15 PMtpi
from the bmc's sdcard to the CM4 any slower compared to using rpi-imager over the usb-a
port?terarex
11/09/2023, 3:39 PMsvenrademakers
11/09/2023, 3:58 PMcfsworks
11/09/2023, 3:59 PMtime dd if=/dev/zero of=/dev/sda bs=8M
on the BMC while the CM4 is in flashing mode.bs=
parameterbhuism
11/09/2023, 4:30 PMtime xz -d < metal-rpi_generic-arm64.img.xz | sudo dd of=/dev/sda bs=1M status=progress conv=fsync
893665280 bytes (894 MB, 852 MiB) copied, 3 s, 298 MB/s1306525696 bytes (1,3 GB, 1,2 GiB) copied, 3,82763 s, 341 MB/s
0+152937 records in
0+152937 records out
1306525696 bytes (1,3 GB, 1,2 GiB) copied, 99,591 s, 13,1 MB/s
real 1m39,600s
user 0m3,607s
sys 0m0,226s
cfsworks
11/09/2023, 4:32 PMbhuism
11/09/2023, 4:32 PMcfsworks
11/09/2023, 4:33 PMbhuism
11/09/2023, 4:34 PMcfsworks
11/09/2023, 4:35 PMbhuism
11/09/2023, 4:35 PMsvenrademakers
11/10/2023, 7:39 AMConducted a dd test locally on the BMC to determine the correct block
size for writing to a raspberry CM4.
Times measured using a 206Mb file:
512B 1m50.22s
512K 43.0s
1M 43.03s
4M 42.96s
8M 43.19s
16M 43.00s
32M 45.95s
Concluded 4M is the optimal blocksize.
Ran some tests writing `2023-05-03-raspios-bullseye-armhf-lite.img`
* using dd 4M => 6m23.86s
* using tpi with -l flag => 6m22s
* using tpi over local network => 16m02s
* using tpi over local network with 4M blocks => 6m40s
cfsworks
11/10/2023, 2:08 PMsvenrademakers
11/10/2023, 2:32 PMrpiboot
. since we use the same backend on the BMC, i would start my investigation therecfsworks
11/10/2023, 2:36 PMsvenrademakers
11/10/2023, 2:36 PMterarex
11/10/2023, 4:45 PMcfsworks
11/10/2023, 4:50 PMterarex
11/10/2023, 5:12 PMcfsworks
11/10/2023, 5:13 PMsvenrademakers
11/10/2023, 6:52 PMcfsworks
11/11/2023, 4:07 PMbmcd
webui should do for you? 👀):
ssh root@bmc 'tar -cvC /mnt/overlay/upper .' | bzip2 > bmc-backup.tar.bz2
svenrademakers
11/11/2023, 4:35 PMcfsworks
11/11/2023, 4:48 PMsvenrademakers
11/11/2023, 9:45 PMcfsworks
11/12/2023, 8:34 PMbmcd
is once again monitoring the node UARTs, it's going to create some confusion when people try to open the /dev/ttyS# devices with microcom and see random read bytes go missing. I wonder if there's a good way to deter that and encourage that users access serial through bmcd
bcf0d024fff03f16e7e693310f8624aa7c6f6527
has the gadget been replaced with USB CDC-ACM or is it currently just unused?svenrademakers
11/12/2023, 8:53 PMcfsworks
11/12/2023, 8:53 PMsvenrademakers
11/12/2023, 8:55 PMcfsworks
11/12/2023, 8:57 PMacm
kernel driver?svenrademakers
11/12/2023, 8:57 PMcfsworks
11/12/2023, 8:58 PM# CONFIG_USB_CONFIGFS_ACM is not set
yeah that needs to be toggled on, but it should otherwise be easysvenrademakers
11/12/2023, 8:58 PMcfsworks
11/12/2023, 9:00 PMsvenrademakers
11/12/2023, 9:02 PMcfsworks
11/12/2023, 9:02 PMsvenrademakers
11/12/2023, 9:02 PMcfsworks
11/12/2023, 9:03 PMsvenrademakers
11/12/2023, 9:03 PMwerdnum
11/12/2023, 11:34 PMcfsworks
11/12/2023, 11:39 PMscreen
-like thing in tpi
like...
tpi uart -n 1 attach
...and, like screen
, it shows you the current terminal state and takes over CTRL+C, CTRL+D, etc. -- and connects through a WebSocket so you get a nice low-latency connection.
That might be a little ways away though. 😦bmcd
development and send a PR implementing the necessary UART stuff, or if Sven/Ruslan are focused on that.werdnum
11/12/2023, 11:47 PMterarex
11/13/2023, 3:32 AMsvenrademakers
11/13/2023, 8:10 AMajtzak
11/13/2023, 1:28 PMcat /etc/*release*
it still showed the VERSION as RC1 but the git hash seemed to match the action run linked here.
I didn't read everyone's messages between but I noticed when I power on a node through the webui and refresh the page it did not save the state of my powered on nodes (they were unchecked- though powered on).
edit: when refreshing, it does appear to be getting the payload correctly-- just a UI bug?
{
"response": [
{
"result": [
{
"node1": "1",
"node2": "0",
"node3": "0",
"node4": "0"
}
]
}
]
}
svenrademakers
11/13/2023, 1:59 PMajtzak
11/13/2023, 2:10 PMcfsworks
11/13/2023, 2:49 PMsvenrademakers
11/13/2023, 3:07 PMterarex
11/13/2023, 6:03 PMsvenrademakers
11/13/2023, 6:07 PMterarex
11/13/2023, 6:14 PMwerdnum
11/13/2023, 11:02 PMcfsworks
11/13/2023, 11:14 PMwss://bmc/.../4?terminal=true
and ?terminal=false
, which indicates whether the client wants to be synced up to the terminal emulator running inside bmcd
or just wants to be subscribed to the byte stream going forward.bmcd
just has to shovel bytes coming out of the node into a vt100::Parser
instance), and the crate also has parser.screen().state_formatted()
which generates the byte sequence necessary to get a connecting terminal to the same state as the emulated terminal.
In short all of this means that the terminal=true
param just controls whether or not the client wants the output of parser.screen().state_formatted()
prepended, and either case subscribes them to the stream bytes coming out of the node UART.terarex
11/14/2023, 2:41 AMrmeier
11/14/2023, 6:26 AMcfsworks
11/14/2023, 6:43 AMrmeier
11/14/2023, 7:08 AMrmeier
11/14/2023, 7:20 AMcfsworks
11/14/2023, 7:21 AMrmeier
11/14/2023, 7:21 AMcfsworks
11/14/2023, 7:22 AMrmeier
11/14/2023, 7:24 AMcfsworks
11/14/2023, 7:24 AMhttps://files.readme.io/3bf121b-image.png▾
rmeier
11/14/2023, 7:38 AMcfsworks
11/14/2023, 7:43 AMrmeier
11/14/2023, 7:46 AMcfsworks
11/14/2023, 7:53 AMrmeier
11/14/2023, 8:21 AMsvenrademakers
11/14/2023, 8:50 AM/mnt/overlay/upper
and download it to your computer not to your SD card. Which browser are you using?
If its failing, the stdout of the BMC should show as well what the cause waswerdnum
11/14/2023, 10:17 AMsvenrademakers
11/14/2023, 10:19 AMrmeier
11/14/2023, 10:41 AMterarex
11/14/2023, 3:43 PMsvenrademakers
11/14/2023, 6:45 PMterarex
11/14/2023, 6:53 PMsvenrademakers
11/15/2023, 10:30 AMwerdnum
11/15/2023, 1:10 PMxz
uses ~10-20% of the memory required to compress.svenrademakers
11/15/2023, 1:14 PMwerdnum
11/15/2023, 1:14 PMsvenrademakers
11/15/2023, 1:18 PMwerdnum
11/15/2023, 1:18 PMsvenrademakers
11/15/2023, 1:20 PMwerdnum
11/15/2023, 1:28 PMsvenrademakers
11/15/2023, 1:31 PMwerdnum
11/15/2023, 1:39 PMsvenrademakers
11/15/2023, 1:40 PMcfsworks
11/15/2023, 2:55 PMSKIPSKIPSKIPSKIP
... it's the creator of the image saying the partition layout, filesystem, or whatever doesn't use that block, so an imaging tool should just skip writing it to save time.svenrademakers
11/15/2023, 3:29 PMcfsworks
11/15/2023, 3:31 PMsvenrademakers
11/15/2023, 3:35 PMterarex
11/15/2023, 4:14 PMsvenrademakers
11/15/2023, 4:18 PMterarex
11/15/2023, 4:22 PMsvenrademakers
11/15/2023, 4:26 PMterarex
11/15/2023, 4:30 PMsvenrademakers
11/15/2023, 4:45 PMterarex
11/15/2023, 6:54 PMbplein
11/15/2023, 6:58 PMmaster
today using the README.md
instructions and the build container, and everythign "works" up until the last line of cd output/images/
cp -a ../../../tp2bmc/swupdate/* .
./genSWU.sh 1.0.0
. The shell script doesn't exist. Is there a different way to create the OTA version for 2.0-RC2?cfsworks
11/15/2023, 7:05 PMREADME.md
is woefully outdated, needs to be updated for 2.0.0.
The OTA update is the buildroot/output/images/rootfs.erofs
file. The OTA files are just EROFS images, renamed to .tpu.werdnum
11/15/2023, 7:35 PMbhuism
11/15/2023, 8:47 PMkjellra
11/15/2023, 9:10 PMbplein
11/15/2023, 9:32 PMcp buildroot/output/images/rootfs.erofs tp2bmc-2.0-rc2.tpu
or similar and use it for OTA? Sounds easy! Thanks~terarex
11/16/2023, 3:48 AMrmeier
11/16/2023, 7:51 AMsvenrademakers
11/16/2023, 11:05 AMbhuism
11/16/2023, 9:11 PMterarex
11/16/2023, 9:41 PMsvenrademakers
11/16/2023, 9:57 PM/mnt/overlay/upper/
on your board which is the upper layer that gets mounted over the read only filesystem. I wonder if your mount is broken or perhaps there is something funky going on with symlinks that you created?cfsworks
11/16/2023, 9:58 PMsvenrademakers
11/16/2023, 9:58 PMcfsworks
11/16/2023, 9:58 PMterarex
11/16/2023, 10:01 PMsvenrademakers
11/16/2023, 10:04 PMcfsworks
11/16/2023, 10:04 PMsvenrademakers
11/16/2023, 10:05 PMcfsworks
11/16/2023, 10:27 PM@ xz -d < ubuntu-22.04.3-preinstalled-server-arm64-turing-rk1.img.xz | ssh black-bmc 'time dd of=/dev/sda bs=4M'
real 13m 27.79s
user 0m 0.97s
sys 3m 41.30s
@ xz -d < ubuntu-22.04.3-preinstalled-server-arm64-turing-rk1.img.xz | lz4 | ssh black-bmc 'time ./lz4 -d | dd of=/dev/sda bs=4M'
real 12m 40.04s
user 1m 2.23s
sys 0m 33.84s
svenrademakers
11/16/2023, 10:55 PMwerdnum
11/17/2023, 1:55 AMbhuism
11/17/2023, 4:29 PMterarex
11/17/2023, 4:37 PMbhuism
11/17/2023, 4:45 PMbplein
11/17/2023, 5:04 PMcp buildroot/output/images/rootfs.erofs ~/tp2-bmc-2.0-RC.tpu
and copied that from my build machine to my desktop and uploaded it.bhuism
11/17/2023, 5:14 PMbplein
11/17/2023, 8:42 PMmake clean
so there's a chance I didn't pick up everything, well, cleanly)teslamax
11/18/2023, 1:00 AMinquisitor_1337
11/18/2023, 1:24 AMterarex
11/18/2023, 5:22 AMcfsworks
11/18/2023, 6:00 AMteslamax
11/18/2023, 8:23 AMgunther2908
11/18/2023, 10:24 AMteslamax
11/19/2023, 8:54 PMterarex
11/20/2023, 5:14 AMwerdnum
11/20/2023, 6:24 AMterarex
11/20/2023, 1:27 PMsvenrademakers
11/20/2023, 2:19 PMbplein
11/20/2023, 3:39 PMterarex
11/20/2023, 3:40 PMsvenrademakers
11/21/2023, 2:56 PMterarex
11/21/2023, 3:07 PMsvenrademakers
11/21/2023, 3:09 PM- name: stamp images
run: |
mkdir artifacts
sudo mv buildroot/output/images/tp2-bmc-firmware-sdcard.img artifacts/tp2-firmware-sdcard-${{ env.BUILD_VERSION }}.img
sudo mv buildroot/output/images/rootfs.erofs artifacts/tp2-ota-${{ env.BUILD_VERSION }}.tpu
bplein
11/21/2023, 3:33 PM# ls -la images/
total 180992
drwxr-xr-x 4 root root 4096 Nov 17 15:13 .
drwxr-xr-x 6 root root 4096 Nov 17 15:13 ..
-rw-r--r-- 1 root root 1120290 Nov 17 15:13 installer.cpio.gz
-rw-r--r-- 1 root root 39550976 Nov 17 15:13 rootfs.erofs
-rw-r--r-- 1 root root 69171200 Nov 17 15:13 rootfs.tar
-rw-r--r-- 1 root root 27794977 Nov 17 15:13 rootfs.tar.gz
drwxr-xr-x 3 root root 4096 Nov 17 15:13 sdcard-bootpart
-rw-r--r-- 1 root root 16777216 Nov 17 15:13 sdcard-bootpart.img
-rwxr-xr-x 1 root root 45830 Nov 17 15:11 sun8iw20p1-t113-turingmachines-tp2bmc.dtb
drwxr-xr-x 3 root root 4096 Nov 17 15:13 tmp
-rw-r--r-- 1 root root 57376768 Nov 17 15:13 tp2-bmc-firmware-sdcard.img
-rw-r--r-- 1 root root 611188 Nov 17 15:10 u-boot-sunxi-with-spl.bin
-rw-r--r-- 1 root root 578356 Nov 17 15:10 u-boot.bin
-rw-r--r-- 1 root root 3880528 Nov 17 15:11 zImage
tp2-bmc-firmware-sdcard.img
terarex
11/21/2023, 3:45 PMcfsworks
11/21/2023, 4:46 PMrootfs.erofs
is the "OTA image" (containing all of userspace and the kernel), it's also a partition in the tp2-bmc-firmware-sdcard.img
file (for direct booting and/or installing from the microSD card)terarex
11/21/2023, 5:08 PMHagak
11/21/2023, 8:37 PMterarex
11/21/2023, 8:50 PMHagak
11/21/2023, 8:57 PMcfsworks
11/21/2023, 9:03 PMwerdnum
11/21/2023, 9:10 PMbhuism
11/22/2023, 7:00 PMsvenrademakers
11/22/2023, 8:56 PMbhuism
11/22/2023, 9:02 PMwerdnum
11/23/2023, 1:14 AMbhuism
11/23/2023, 6:04 AMinquisitor_1337
11/23/2023, 2:02 PMsvenrademakers
11/23/2023, 3:41 PMinquisitor_1337
11/24/2023, 6:52 AMggbiker
11/24/2023, 8:59 AMwerdnum
11/24/2023, 9:38 AMtobiaskohlbau
11/24/2023, 10:21 AMgenerate_self_signedx509.sh
script after upgrading in order to get bmcd to boot? Without this the program failed at start stating that it lacked the required pem files.werdnum
11/24/2023, 10:29 AMechelon101
11/24/2023, 10:34 AM/etc/bmcd/config,yml
are config keys for key files.
you can probably configure your own cert that way
https://cdn.discordapp.com/attachments/1170114820457111592/1177559625697067008/image.png?ex=6572f2dc&is=65607ddc&hm=2c92962808f4fa73f22e546f1d35c9bf53c6d5844241fba4f4cd651be87efa98&teslamax
11/26/2023, 12:42 AMgunther2908
11/26/2023, 7:06 AMphearzero
11/27/2023, 2:15 AMwerdnum
11/27/2023, 2:16 AMsvenrademakers
11/27/2023, 9:37 AMphearzero
11/27/2023, 9:51 PMteslamax
11/27/2023, 10:46 PMcfsworks
11/28/2023, 6:20 AMrockusb
driver (?) where it mistakenly believes the eMMC of the RK1 is 2064384MiB larger than it is.usbplug
that's loaded on the RK3588 by bmcd. I don't remember this coming up in my testing but I was also using the latest binary from Rockchip.svenrademakers
11/28/2023, 10:34 AMuberdouche
11/28/2023, 3:13 PMcyphersnep
11/28/2023, 3:24 PMterarex
11/28/2023, 3:50 PMcyphersnep
11/28/2023, 3:51 PM_dhanos_
11/28/2023, 3:53 PMcyphersnep
11/28/2023, 3:53 PM_dhanos_
11/28/2023, 3:55 PMcyphersnep
11/28/2023, 3:56 PMNode 1: /dev/ttyS2
Node 2: /dev/ttyS1
Node 3: /dev/ttyS4
Node 4: /dev/ttyS5
_dhanos_
11/28/2023, 3:57 PMraspi-cconfig
available?cyphersnep
11/28/2023, 3:58 PM_dhanos_
11/28/2023, 4:08 PMdmesg
commandbhuism
11/28/2023, 6:47 PMcfsworks
11/28/2023, 6:54 PMBMC_RESET
button behaves but it would mean Linux can reboot without affecting the nodes._dhanos_
11/28/2023, 7:51 PMbhuism
11/28/2023, 7:53 PM_dhanos_
11/28/2023, 7:55 PMdethtungue
11/28/2023, 9:12 PM1solon
11/28/2023, 9:22 PM_dhanos_
11/28/2023, 9:23 PM1solon
11/28/2023, 9:24 PM_dhanos_
11/28/2023, 9:25 PM1solon
11/28/2023, 9:25 PM_dhanos_
11/28/2023, 9:25 PM1solon
11/28/2023, 9:26 PM_dhanos_
11/28/2023, 9:26 PM/mnt/sdcard
1solon
11/28/2023, 9:26 PM_dhanos_
11/28/2023, 9:30 PMcfsworks
11/28/2023, 9:34 PMK:\
and see install.txt
?1solon
11/28/2023, 9:34 PMcfsworks
11/28/2023, 9:35 PMcfsworks
11/28/2023, 9:44 PM1solon
11/28/2023, 9:49 PM_dhanos_
11/28/2023, 10:29 PMcfsworks
11/29/2023, 12:15 AMrockusb
code somewhere. Worse, it doesn't happen on my own system but it does happen when compiled for the BMC.rmeier
11/29/2023, 6:48 AMsvenrademakers
11/29/2023, 9:28 AMuberdouche
11/29/2023, 9:48 AM_dhanos_
11/29/2023, 3:48 PM1solon
11/29/2023, 4:12 PMbhuism
12/02/2023, 2:30 PM