Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Ubuntu MATE 24.04 - eMMC boot

When you run 'make config' to configure your build environment and after selecting the board, you will be prompted to choose a boot device. Refer to the picture below and Enter “1” to select eMMC.

...

“v1.0” is the hardware revision and it must be the same as “hardware-compatibility” in sw-description.

Update images

You The Ubuntu platform can update images (update.swu) via the command or web server.

...

You can use the following command to update images for itself.

Code Block
sudo swupdate -i update.swu -k /home/sunplus/work/my_key/mycert.cert.pem -v

...

Code Block
sunplus@ubuntu:~/work/swu_ubuntu$ sudo swupdate -i update.swu -k /home/sunplus/work/my_key/mycert.cert.pem -v
[TRACE] : SWUPDATE running :  [load_cert_chain] : Read PEM #1: /O=SWUpdate /CN=target /O=SWUpdate /CN=target
SWUpdate v

Licensed under GPLv2. See source distribution for detailed copyright notices.

[TRACE] : SWUPDATE running :  [print_registered_bootloaders] : Registered bootloaders:
[TRACE] : SWUPDATE running :  [print_registered_bootloaders] :  uboot   loaded.
[TRACE] : SWUPDATE running :  [print_registered_bootloaders] :  none    loaded.
[TRACE] : SWUPDATE running :  [print_registered_bootloaders] :  grub    loaded.
[TRACE] : SWUPDATE running :  [print_registered_bootloaders] :  ebg     loaded.
[INFO ] : SWUPDATE running :  [main] : Using default bootloader interface: none
[INFO ] : SWUPDATE running :  [lua_handlers_init] : External Lua handler(s) not found.
[TRACE] : SWUPDATE running :  [lua_report_exception] : Lua exception:
[TRACE] : SWUPDATE running :  [lua_report_exception] : [string "require ("swupdate_handlers")"]:1: module 'swupdate_handlers' not found:
[TRACE] : SWUPDATE running :  [lua_report_exception] :  no field package.preload['swupdate_handlers']
[TRACE] : SWUPDATE running :  [lua_report_exception] :  no file '/usr/local/share/lua/5.4/swupdate_handlers.lua'
[TRACE] : SWUPDATE running :  [lua_report_exception] :  no file '/usr/local/share/lua/5.4/swupdate_handlers/init.lua'
[TRACE] : SWUPDATE running :  [lua_report_exception] :  no file '/usr/local/lib/lua/5.4/swupdate_handlers.lua'
[TRACE] : SWUPDATE running :  [lua_report_exception] :  no file '/usr/local/lib/lua/5.4/swupdate_handlers/init.lua'
[TRACE] : SWUPDATE running :  [lua_report_exception] :  no file '/usr/share/lua/5.4/swupdate_handlers.lua'
[TRACE] : SWUPDATE running :  [lua_report_exception] :  no file '/usr/share/lua/5.4/swupdate_handlers/init.lua'
[TRACE] : SWUPDATE running :  [lua_report_exception] :  no file './swupdate_handlers.lua'
[TRACE] : SWUPDATE running :  [lua_report_exception] :  no file './swupdate_handlers/init.lua'
[TRACE] : SWUPDATE running :  [lua_report_exception] :  no file '/usr/local/lib/lua/5.4/swupdate_handlers.so'
[TRACE] : SWUPDATE running :  [lua_report_exception] :  no file '/usr/lib/aarch64-linux-gnu/lua/5.4/swupdate_handlers.so'
[TRACE] : SWUPDATE running :  [lua_report_exception] :  no file '/usr/lib/lua/5.4/swupdate_handlers.so'
[TRACE] : SWUPDATE running :  [lua_report_exception] :  no file '/usr/local/lib/lua/5.4/loadall.so'
[TRACE] : SWUPDATE running :  [lua_report_exception] :  no file './swupdate_handlers.so'
[INFO ] : SWUPDATE running :  [main] : Running on SP7350 Revision v1.0
[INFO ] : SWUPDATE running :  [print_registered_handlers] : Registered handlers:
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     dummy
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     archive
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     tar
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     uboot
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     bootloader
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     btrfs
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     copy
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     rawcopy
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     flash
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     delta
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     diskformat
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     diskpart
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     toggleboot
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     gptswap
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     gptpart
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     uniqueuuid
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     flash-hamming1
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     lua
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     raw
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     rawfile
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     rdiff_image
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     rdiff_file
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     readback
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     shellscript
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     preinstall
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     postinstall
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     ssblswitch
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     swuforward
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     ubivol
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     ubipartition
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     ubiswap
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     ucfw
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     docker_imageload
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     docker_imagedelete
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     docker_imageprune
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     docker_containercreate
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     docker_containerdelete
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     docker_containerstart
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     docker_networkcreate
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     docker_networkdelete
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     docker_volumecreate
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     docker_volumedelete
[DEBUG] : SWUPDATE running :  [read_module_settings] : No config settings found for module versions
[TRACE] : SWUPDATE running :  [listener_create] : got no socket at /tmp/swupdateprog from systemd
[TRACE] : SWUPDATE running :  [network_initializer] : Main loop daemon
[TRACE] : SWUPDATE running :  [listener_create] : creating socket at /tmp/swupdateprog
[TRACE] : SWUPDATE running :  [listener_create] : got no socket at /tmp/sockinstctrl from systemd
[TRACE] : SWUPDATE running :  [listener_create] : creating socket at /tmp/sockinstctrl
[DEBUG] : SWUPDATE running :  [read_module_settings] : No config settings found for module download
[TRACE] : SWUPDATE running :  [start_swupdate_subprocess] : Started chunks_downloader with pid 2054 and fd 8
[TRACE] : SWUPDATE running :  [network_thread] : Incoming network request: processing...
[INFO ] : SWUPDATE started :  Software Update started !
[TRACE] : SWUPDATE running :  [network_initializer] : Software update started
[TRACE] : SWUPDATE running :  [start_delta_downloader] : Starting Internal process for downloading chunks
[WARN ] : SWUPDATE running :  [scan_mtd_devices] : MTD is not present on the target
[WARN ] : SWUPDATE running :  [mtd_init] : MTD is not present in the system
[WARN ] : SWUPDATE running :  [mtd_init] : cannot open libmtd
[TRACE] : SWUPDATE running :  [extract_file_to_tmp] : Found file
[TRACE] : SWUPDATE running :  [extract_file_to_tmp] :   filename sw-description
[TRACE] : SWUPDATE running :  [extract_file_to_tmp] :   size 828
[TRACE] : SWUPDATE running :  [extract_file_to_tmp] : Found file
[TRACE] : SWUPDATE running :  [extract_file_to_tmp] :   filename sw-description.sig
[TRACE] : SWUPDATE running :  [extract_file_to_tmp] :   size 2110
[WARN ] : SWUPDATE running :  [check_signer_name] : The X.509 common name might not be equal to .
[TRACE] : SWUPDATE running :  [swupdate_verify_file] : Verified OK
[DEBUG] : SWUPDATE running :  [parse_cfg] : Parsing config file /tmp/sw-description
[TRACE] : SWUPDATE running :  [get_common_fields] : Version 1.0
[TRACE] : SWUPDATE running :  [get_common_fields] : reboot_required 1
[TRACE] : SWUPDATE running :  [parse_hw_compatibility] : Accepted Hw Revision : v1.0
[TRACE] : SWUPDATE running :  [_parse_images] : Found Image: uImage in device : /dev/mmcblk0p7 for handler raw
[TRACE] : SWUPDATE running :  [_parse_images] : Found Image: u-boot.img in device : /dev/mmcblk0p2 for handler raw
[TRACE] : SWUPDATE running :  [_parse_images] : Found Image: xboot.img in device : /dev/mmcblk0boot0 for handler raw
[TRACE] : SWUPDATE running :  [parse] : Number of found artifacts: 3
[TRACE] : SWUPDATE running :  [parse] : Number of scripts: 0
[TRACE] : SWUPDATE running :  [parse] : Number of steps to be run: 3
[TRACE] : SWUPDATE running :  [check_hw_compatibility] : Hardware SP7350 Revision: v1.0
[TRACE] : SWUPDATE running :  [check_hw_compatibility] : Hardware compatibility verified
[DEBUG] : SWUPDATE running :  [preupdatecmd] : Running Pre-update command
[TRACE] : SWUPDATE running :  [extract_files] : Found file
[TRACE] : SWUPDATE running :  [extract_files] :         filename xboot.img
[TRACE] : SWUPDATE running :  [extract_files] :         size 139052 required
[TRACE] : SWUPDATE running :  [extract_files] : Found file
[TRACE] : SWUPDATE running :  [extract_files] :         filename u-boot.img
[TRACE] : SWUPDATE running :  [extract_files] :         size 937816 required
[TRACE] : SWUPDATE running :  [extract_files] : Found file
[TRACE] : SWUPDATE running :  [extract_files] :         filename uImage
[TRACE] : SWUPDATE running :  [extract_files] :         size 9354240 required
[TRACE] : SWUPDATE running :  [extract_padding] : Expecting up to 512 padding bytes at end-of-file
[TRACE] : SWUPDATE running :  [network_initializer] : Valid image found: copying to FLASH
[INFO ] : SWUPDATE running :  Installation in progress
[TRACE] : SWUPDATE running :  [install_single_image] : Found installer for stream xboot.img raw
[TRACE] : SWUPDATE running :  [blkprotect] : Device /dev/mmcblk0boot0: changed force_ro to 0
[TRACE] : SWUPDATE running :  [blkprotect] : Device /dev/mmcblk0boot0: changed force_ro to 1
[TRACE] : SWUPDATE running :  [install_single_image] : Found installer for stream u-boot.img raw
[TRACE] : SWUPDATE running :  [install_single_image] : Found installer for stream uImage raw
[INFO ] : SWUPDATE successful ! SWUPDATE successful !
[TRACE] : SWUPDATE running :  [network_initializer] : Main thread sleep again !
[INFO ] : No SWUPDATE running :  Waiting for requests...
[INFO ] : SWUPDATE running :  [endupdate] : SWUpdate was successful !
[DEBUG] : SWUPDATE running :  [postupdate] : Running Post-update command
[TRACE] : SWUPDATE running :  [unlink_sockets] : unlink socket /tmp/swupdateprog
[TRACE] : SWUPDATE running :  [unlink_sockets] : unlink socket /tmp/sockinstctrl
sunplus@ubuntu:~/work/swu_ubuntu$ [ 1215.274202] [dhd] STATIC-MSG) dhd_static_buf_exit : Enter
[ 1215.981005] reboot: Restarting system
INFO:    PSCI Power Domain Map:
INFO:      Domain Node : Level 2, parent_node -1, State ON (0x0)
INFO:      Domain Node : Level 1, parent_node 0, State ON (0x0)
INFO:      CPU Node : MPID 0x0, parent_node 1, State ON (0x0)
INFO:      CPU Node : MPID 0x100, parent_node 1, State ON (0x0)
INFO:      CPU Node : MPID 0x200, parent_node 1, State ON (0x0)
INFO:      CPU Node : MPID 0x300, parent_node 1, State ON (0x0)

Web server

You The Ubuntu platform can update images via the web server for by itself or another platformother Ubuntu platforms.

SWUpdate web interface files

...

Therefore, you can update the images for it.

...

Buildroot 2024.02 - eMMC boot

When you run 'make config' to configure your build environment and after selecting the board, you will be prompted to choose a boot device. Refer to the picture below and Enter “1” to select eMMC.

...

After selecting eMMC size, you will be prompted to choose a root file system. Refer to the picture below and Enter “11” to select Buildroot 2024.02.

...

Buildroot Setup

After the completion of running “make config”, enter the buildroot configuration by running the following command in the top directory of project.

Code Block
make bconfig

Select submenus for swupdate : Target packages → System tools. Select <*> for swupdate . Save the configuration and exit. Then execute “make” command to build the images.

...

Generate self-signed certificates

After updating the images to the platform and boot the system of it, it would fail to start SWUpdate daemon as shown below. It lacks a public key to activate the web server.

...

The procedure to generate self-signed certificates is the same as that in Ubuntu MATE 24.04 - eMMC boot. After generating the public key (mycert.cert.pem) by itself or coping it from other platforms which generate it, pack update.swu and will update the images for this Buildroot platform, add the parameter of SWUPDATE_ARGS=”-k /root/work/my_key/mycert.cert.pem -v” to /usr/lib/swupdate/conf.d/10-mongoose-args of the Buildroot platform and the web server will be activated successfully after reboot.

...

sw-description configuration file

Reference it in Ubuntu MATE 24.04 - eMMC boot.

Building a signed SWU image with CMS signature

Reference it in Ubuntu MATE 24.04 - eMMC boot.

HW_FILE

Reference it in Ubuntu MATE 24.04 - eMMC boot.

Update images

The Buildroot platform can update images (update.swu) via the command by itself or web server only by other Ubuntu platforms.

Run SWUpdate

Reference it in Ubuntu MATE 24.04 - eMMC boot.

Web server

Besides adding the parameter (the path of the public key) to /usr/lib/swupdate/conf.d/10-mongoose-args for activating the web server, make sure the platform system clock is within the validity period of the public key (mycert.cert.pem) and reference the procedure of updating images by other Ubuntu platforms in Ubuntu MATE 24.04 - eMMC boot.