updated helper scripts
EIVE/eive-obsw/pipeline/head This commit looks good Details

This commit is contained in:
Robin Müller 2022-09-26 11:31:29 +02:00
parent ec91d9977a
commit 7d824f5448
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
4 changed files with 24 additions and 18 deletions

View File

@ -162,21 +162,26 @@ which contains the following two files:
These files can be created manually:
1. Build the release image and then switch into the build directory
2. Run the following command to create the version file
1. Build the release image inside `cmake-build-release-q7s`
2. Switch into the build directory
3. Run the following command to create the version file
```sh
git describe --tags --always --exclude docker_* > obsw_version.txt
```
3. Run the following command to create the compressed archive
You can also use the `create-version-file.sh` helper shell script
located in the `scripts` folder to do this.
4. Run the following command to create the compressed archive
```sh
tar -cJvf eive-sw-update.tar.xz eive-obsw-stripped obsw_version.txt
```
You can also use the helper script `prepare-obsw-update.sh` inside the build folder
after sourcing the `q7s-env.sh` helper script to perform all three steps.
You can also use the helper script `create-sw-update.sh` inside the build folder
after sourcing the `q7s-env.sh` helper script to perform all steps including
a rebuild.
After creating these files, they need to be transferred onto the Q7S
to either the `/mnt/sd0/bin` or `/mnt/sd1/bin` folder if the OBSW update

View File

@ -55,8 +55,8 @@ class CoreController : public ExtendedControllerBase {
static constexpr char CONF_FOLDER[] = "conf";
static constexpr char OBSW_UPDATE_ARCHIVE_FILE_NAME[] = "eive-sw-update.tar.xz";
static constexpr char STRIPPED_OBSW_BINARY_FILE_NAME = "eive-obsw-stripped";
static constexpr char OBSW_VERSION_FILE_NAME = "obsw_version.txt";
static constexpr char STRIPPED_OBSW_BINARY_FILE_NAME[] = "eive-obsw-stripped";
static constexpr char OBSW_VERSION_FILE_NAME[] = "obsw_version.txt";
static constexpr char VERSION_FILE_NAME[] = "version.txt";
static constexpr char REBOOT_FILE_NAME[] = "reboot.txt";
static constexpr char TIME_FILE_NAME[] = "time.txt";
@ -67,10 +67,10 @@ class CoreController : public ExtendedControllerBase {
"/" + std::string(CONF_FOLDER) + "/" + std::string(REBOOT_FILE_NAME);
const std::string TIME_FILE = "/" + std::string(CONF_FOLDER) + "/" + std::string(TIME_FILE_NAME);
static constexpr char CHIP_0_COPY_0_MOUNT_DIR = "/tmp/mntupdate-xdi-qspi0-nom-rootfs";
static constexpr char CHIP_0_COPY_1_MOUNT_DIR = "/tmp/mntupdate-xdi-qspi0-gold-rootfs";
static constexpr char CHIP_1_COPY_0_MOUNT_DIR = "/tmp/mntupdate-xdi-qspi1-nom-rootfs";
static constexpr char CHIP_1_COPY_1_MOUNT_DIR = "/tmp/mntupdate-xdi-qspi1-gold-rootfs";
static constexpr char CHIP_0_COPY_0_MOUNT_DIR[] = "/tmp/mntupdate-xdi-qspi0-nom-rootfs";
static constexpr char CHIP_0_COPY_1_MOUNT_DIR[] = "/tmp/mntupdate-xdi-qspi0-gold-rootfs";
static constexpr char CHIP_1_COPY_0_MOUNT_DIR[] = "/tmp/mntupdate-xdi-qspi1-nom-rootfs";
static constexpr char CHIP_1_COPY_1_MOUNT_DIR[] = "/tmp/mntupdate-xdi-qspi1-gold-rootfs";
static constexpr ActionId_t LIST_DIRECTORY_INTO_FILE = 0;
static constexpr ActionId_t SWITCH_REBOOT_FILE_HANDLING = 5;

View File

@ -1,17 +1,21 @@
#!/bin/bash
if [ -f eive-obsw-stripped ]; then
cmake --build . -j
source create-version-file.sh
if [ ! -f eive-obsw-stripped ]; then
echo "No file eive-obsw-stripped found. Please ensure you are in the "
echo "build folder and the OBSW was built properly"
exit 1
fi
if [ -f obsw_version.txt ]; then
if [ ! -f obsw_version.txt ]; then
echo "No OBSW version file found."
echo "You can use the create-version-file.sh script to create it"
exit 1
fi
cmd="tar -cJvf eive-obsw.tar.xz eive-obsw-stripped obsw_version.txt"
echo "Running command ${cmd} to generate compressed SW update archive"
cmd="tar -cJvf eive-sw-update.tar.xz eive-obsw-stripped obsw_version.txt"
echo "Running command ${cmd} to generate compressed SW update archive."
eval ${cmd}
echo "Generated eive-sw-update.tar.xz update archive."

View File

@ -1,3 +0,0 @@
#!/bin/bash
source create-version-file.sh
source create-sw-update.sh