Skip to content

Commit

Permalink
subsys/mgmt/hawkbit: change 'Hawkbit' & 'hawkbit' to 'hawkBit'
Browse files Browse the repository at this point in the history
Change 'Hawkbit' and 'hawkbit' to 'hawkBit' wherever
makes sense, and a bit of touch ups here and there.

Signed-off-by: Yong Cong Sin <[email protected]>
  • Loading branch information
ycsin authored and fabiobaltieri committed Apr 4, 2024
1 parent 828a0c0 commit 10592b9
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 46 deletions.
8 changes: 4 additions & 4 deletions samples/subsys/mgmt/hawkbit/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@
#
# SPDX-License-Identifier: Apache-2.0
#
mainmenu "Hawkbit sample configuration"
mainmenu "hawkBit sample configuration"

choice
prompt "Hawkbit mode"
prompt "hawkBit mode"
default HAWKBIT_POLLING
depends on HAWKBIT

config HAWKBIT_POLLING
bool "Hawkbit Polling mode"
bool "hawkBit Polling mode"
help
Polling mode runs automatically on a predefined period, probing the
server for updates and installing them without requiring user
intervention.

config HAWKBIT_MANUAL
bool "Hawkbit manual mode"
bool "hawkBit manual mode"
help
Manual mode requires the user to call the server probe and then, if
there is an available update, also requires the user to decide if
Expand Down
24 changes: 12 additions & 12 deletions samples/subsys/mgmt/hawkbit/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The Eclipse hawkBit update server provides REST resources which are consumed by
device to retrieve software update tasks. This API is based on HTTP standards
and a polling mechanism.

This sample shows how to use Hawkbit DDI API in both a polling and manual
This sample shows how to use hawkBit DDI API in both a polling and manual
update mode.

Polling mode run automatically on a predefined period, probing the server
Expand All @@ -25,22 +25,22 @@ source code for this mode hawkbit_manual
Caveats
*******

* The Zephyr port of ``Hawkbit`` is configured to run on a
* The Zephyr port of hawkBit is configured to run on a
:ref:`Freedom-K64F <frdm_k64f>` MCU by default. The application should
build and run for other platforms with support internet connection. Some
platforms need some modification. Overlay files would be needed to support
BLE 6lowpan, 802.15.4 or OpenThread configurations as well as the
understanding that most other connectivity options would require an edge
gateway of some sort (Border Router, etc).

* The MCUboot bootloader is required for ``Hawkbit`` to function properly.
* The MCUboot bootloader is required for hawkBit to function properly.
More information about the Device Firmware Upgrade subsystem and MCUboot
can be found in :ref:`mcuboot`.

Building and Running
********************

The below steps describe how to build and run the ``Hawkbit`` sample in
The below steps describe how to build and run the hawkBit sample in
Zephyr. Where examples are given, it is assumed the sample is being build for
the Freedom-K64F Development Kit (``BOARD=frdm_k64f``).

Expand All @@ -60,7 +60,7 @@ be done by,
west flash
Step 3: Start the Hawkbit Docker
Step 3: Start the hawkBit Docker
================================

By default, the hawkbit application is set to run on http at port:8080.
Expand All @@ -75,10 +75,10 @@ This will start the hawkbit server on the host system.Opening your browser to
the server URL, ``<your-ip-address>:8080``, and logging into the server using
``admin`` as the login and password by default.

Step 4: Build Hawkbit
Step 4: Build hawkBit
=====================

``Hawkbit`` can be built for the frdm_k64f as follows:
hawkBit can be built for the frdm_k64f as follows:

.. zephyr-app-commands::
:zephyr-app: samples/subsys/mgmt/hawkbit
Expand All @@ -102,7 +102,7 @@ From this section onwards you use a binary (``.bin``) image format.
The command above creates a signed and confirmed image file called
:file:`zephyr.signed.confirmed.bin` in the build directory. It's important for
the first image to be confirmed as MCUboot isn't able to confirm an image that
is flashed using a hardware tool, and Hawkbit will reboot to trigger a firmware
is flashed using a hardware tool, and hawkBit will reboot to trigger a firmware
swap if it isn't able to confirm the running image on init.

Step 6: Flash the first image
Expand All @@ -123,7 +123,7 @@ upload a firmware binary to the server, and update it using this UI.
Step 7: Building and signing the test image
===========================================

The easiest way to test the functionality of Hawkbit is to repeat step 4 to
The easiest way to test the functionality of hawkBit is to repeat step 4 to
build the sample again, so that the build time will be different. Then, similar
to step 5, sign the image and assign it a different version number but without
confirming it like so:
Expand All @@ -143,7 +143,7 @@ Then upload the signed image to the server with Upload file Icon.

Click on distribution icon in the left pane of UI and create a new Distribution
with type Apps only (``name:frdm_k64f_update,version:1.0.1``). Assign the
``hawkbit`` software module to the created distribution. Click on Deployment
hawkBit software module to the created distribution. Click on Deployment
icon in the left pane of UI and assign the ``frdm_k64f_update`` distribution to
the target ``frdm_k64f``.

Expand Down Expand Up @@ -278,13 +278,13 @@ Change authentication security from false to true.
java -jar ./hawkbit-runtime/hawkbit-update-server/target/ \
hawkbit-update-server-#version#-SNAPSHOT.jar
Step 11: Build Hawkbit HTTPS
Step 11: Build hawkBit HTTPS
============================

* Convert the server.pem file to self_sign.der and place the der file in
hawkbit/src directory

``Hawkbit https`` can be built for the frdm_k64f as follows:
``hawkBit https`` can be built for the frdm_k64f as follows:

.. zephyr-app-commands::
:zephyr-app: samples/subsys/mgmt/hawkbit
Expand Down
8 changes: 4 additions & 4 deletions samples/subsys/mgmt/hawkbit/prj.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Turn on the Hawkbit
#Enable hawkBit
CONFIG_HAWKBIT=y
CONFIG_NVS=y
CONFIG_FLASH=y
Expand All @@ -18,7 +18,7 @@ CONFIG_BOOTLOADER_MCUBOOT=y
#Main Stack Size
CONFIG_MAIN_STACK_SIZE=4096

#Minimal Heap mem pool size for the Hawkbit working
#Minimal Heap mem pool size for hawkBit to work
CONFIG_HEAP_MEM_POOL_SIZE=4096
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096

Expand All @@ -42,10 +42,10 @@ CONFIG_HAWKBIT_SHELL=y
CONFIG_KERNEL_SHELL=y
CONFIG_SHELL_STACK_SIZE=4096

#Hawkbit polling mode
#hawkBit polling mode
CONFIG_HAWKBIT_POLLING=y

#Config Hawkbit Server
#Config hawkBit Server
CONFIG_HAWKBIT_SERVER="192.168.1.110"

#Debug helpers
Expand Down
2 changes: 1 addition & 1 deletion samples/subsys/mgmt/hawkbit/sample.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
common:
filter: CONFIG_FULL_LIBC_SUPPORTED
sample:
description: Hawkbit Firmware Over-the-Air (FOTA)
description: hawkBit Firmware Over-the-Air (FOTA)
name: hawkbit
tests:
sample.net.hawkbit:
Expand Down
12 changes: 6 additions & 6 deletions samples/subsys/mgmt/hawkbit/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ int main(void)
{
int ret = -1;

LOG_INF("Hawkbit sample app started");
LOG_INF("hawkBit sample app started");
LOG_INF("Image build time: " __DATE__ " " __TIME__);

app_dhcpv4_startup();
Expand All @@ -37,16 +37,16 @@ int main(void)
ret = hawkbit_init();

if (ret < 0) {
LOG_ERR("Failed to init hawkbit");
LOG_ERR("Failed to init hawkBit");
}

#if defined(CONFIG_HAWKBIT_POLLING)
LOG_INF("Starting hawkbit polling mode");
LOG_INF("Starting hawkBit polling mode");
hawkbit_autohandler();
#endif

#if defined(CONFIG_HAWKBIT_MANUAL)
LOG_INF("Starting hawkbit manual mode");
LOG_INF("Starting hawkBit manual mode");

switch (hawkbit_probe()) {
case HAWKBIT_UNCONFIRMED_IMAGE:
Expand All @@ -63,7 +63,7 @@ int main(void)
break;

case HAWKBIT_CANCEL_UPDATE:
LOG_INF("Hawkbit update cancelled from server");
LOG_INF("hawkBit update cancelled from server");
break;

case HAWKBIT_OK:
Expand All @@ -75,7 +75,7 @@ int main(void)
break;

case HAWKBIT_PROBE_IN_PROGRESS:
LOG_INF("Hawkbit is already running");
LOG_INF("hawkBit is already running");
break;

default:
Expand Down
20 changes: 10 additions & 10 deletions subsys/mgmt/hawkbit/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX -License-Identifier: Apache-2.0

menuconfig HAWKBIT
bool "Hawkbit Firmware Over-the-Air support"
bool "Eclipse hawkBit Firmware Over-the-Air support"
depends on NVS
depends on FLASH
depends on REBOOT
Expand All @@ -19,7 +19,7 @@ menuconfig HAWKBIT
select IMG_ENABLE_IMAGE_CHECK
select IMG_ERASE_PROGRESSIVELY
help
Hawkbit is a domain independent back-end framework for polling out
hawkBit is a domain independent back-end framework for polling out
software updates to constrained edge devices as well as more powerful
controllers and gateways connected to IP based networking infrastructure.

Expand All @@ -33,10 +33,10 @@ config HAWKBIT_POLL_INTERVAL
This time interval is zero and 43200 minutes(30 days).

config HAWKBIT_SHELL
bool "Hawkbit shell utilities"
bool "hawkBit shell utilities"
depends on SHELL
help
Activate shell module that provides Hawkbit commands.
Activate shell module that provides hawkBit commands.

config HAWKBIT_SERVER
string "User address for the hawkbit server"
Expand All @@ -51,23 +51,23 @@ config HAWKBIT_PORT
Configure the hawkbit port number.

choice HAWKBIT_DDI_SECURITY
prompt "Hawkbit DDI API authentication modes"
prompt "hawkBit DDI API authentication modes"
default HAWKBIT_DDI_NO_SECURITY

config HAWKBIT_DDI_NO_SECURITY
bool "No authentication security"
help
No authentication security for the Hawkbit DDI API.
No authentication security for the hawkBit DDI API.

config HAWKBIT_DDI_TARGET_SECURITY
bool "Use target security token authentication"
help
Use target security token authentication for the Hawkbit DDI API.
Use target security token authentication for the hawkBit DDI API.

config HAWKBIT_DDI_GATEWAY_SECURITY
bool "Use gateway security token authentication"
help
Use gateway security token authentication for the Hawkbit DDI API.
Use gateway security token authentication for the hawkBit DDI API.

endchoice

Expand All @@ -76,12 +76,12 @@ config HAWKBIT_DDI_SECURITY_TOKEN
depends on HAWKBIT_DDI_TARGET_SECURITY || HAWKBIT_DDI_GATEWAY_SECURITY
default ""
help
Authentication security token for the configured Hawkbit DDI
Authentication security token for the configured hawkBit DDI
authentication mode.

module = HAWKBIT
module-str = Log Level for hawkbit
module-help = Enables logging for Hawkbit code.
module-help = Enables logging for hawkBit code.
source "subsys/logging/Kconfig.template.log_config"

endif
6 changes: 3 additions & 3 deletions subsys/mgmt/hawkbit/hawkbit.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ static int hawkbit_device_acid_update(int32_t new_value)
}

/*
* Update sleep interval, based on results from hawkbit base polling
* Update sleep interval, based on results from hawkBit base polling
* resource
*/
static void hawkbit_update_sleep(struct hawkbit_ctl_res *hawkbit_res)
Expand Down Expand Up @@ -513,7 +513,7 @@ static int hawkbit_parse_deployment(struct hawkbit_dep_res *res, int32_t *json_a

/*
* Find the download-http href. We only support the DEFAULT
* tenant on the same hawkbit server.
* tenant on the same hawkBit server.
*/
href = artifact->_links.download_http.href;
if (!href) {
Expand Down Expand Up @@ -1004,7 +1004,7 @@ enum hawkbit_response hawkbit_probe(void)
}

/*
* Query the hawkbit base polling resource.
* Query the hawkBit base polling resource.
*/
LOG_INF("Polling target data from hawkBit");

Expand Down
2 changes: 1 addition & 1 deletion subsys/mgmt/hawkbit/hawkbit_priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/** @file
*
* @brief This file contains structures representing JSON messages
* exchanged with a hawkbit
* exchanged with a hawkBit server
*/

#ifndef __HAWKBIT_PRIV_H__
Expand Down
10 changes: 5 additions & 5 deletions subsys/mgmt/hawkbit/shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ static void cmd_run(const struct shell *sh, size_t argc, char **argv)
ARG_UNUSED(argc);
ARG_UNUSED(argv);

shell_fprintf(sh, SHELL_INFO, "Starting Hawkbit run...\n");
shell_fprintf(sh, SHELL_INFO, "Starting hawkBit run...\n");
switch (hawkbit_probe()) {
case HAWKBIT_UNCONFIRMED_IMAGE:
shell_fprintf(
Expand All @@ -30,7 +30,7 @@ static void cmd_run(const struct shell *sh, size_t argc, char **argv)

case HAWKBIT_CANCEL_UPDATE:
shell_fprintf(sh, SHELL_INFO,
"Hawkbit update Cancelled from server\n");
"hawkBit update Cancelled from server\n");
break;

case HAWKBIT_NO_UPDATE:
Expand Down Expand Up @@ -84,8 +84,8 @@ static int cmd_info(const struct shell *sh, size_t argc, char *argv)

SHELL_STATIC_SUBCMD_SET_CREATE(
sub_hawkbit,
SHELL_CMD(info, NULL, "Dump Hawkbit information", cmd_info),
SHELL_CMD(run, NULL, "Trigger an Hawkbit update run", cmd_run),
SHELL_CMD(info, NULL, "Dump hawkBit information", cmd_info),
SHELL_CMD(run, NULL, "Trigger an hawkBit update run", cmd_run),
SHELL_SUBCMD_SET_END);

SHELL_CMD_REGISTER(hawkbit, &sub_hawkbit, "Hawkbit commands", NULL);
SHELL_CMD_REGISTER(hawkbit, &sub_hawkbit, "hawkBit commands", NULL);

0 comments on commit 10592b9

Please sign in to comment.