v1.14.0 #304
15
README.md
15
README.md
@ -162,21 +162,26 @@ which contains the following two files:
|
|||||||
|
|
||||||
These files can be created manually:
|
These files can be created manually:
|
||||||
|
|
||||||
1. Build the release image and then switch into the build directory
|
1. Build the release image inside `cmake-build-release-q7s`
|
||||||
2. Run the following command to create the version file
|
2. Switch into the build directory
|
||||||
|
3. Run the following command to create the version file
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
git describe --tags --always --exclude docker_* > obsw_version.txt
|
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
|
```sh
|
||||||
tar -cJvf eive-sw-update.tar.xz eive-obsw-stripped obsw_version.txt
|
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
|
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 three steps.
|
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
|
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
|
to either the `/mnt/sd0/bin` or `/mnt/sd1/bin` folder if the OBSW update
|
||||||
|
@ -55,8 +55,8 @@ class CoreController : public ExtendedControllerBase {
|
|||||||
static constexpr char CONF_FOLDER[] = "conf";
|
static constexpr char CONF_FOLDER[] = "conf";
|
||||||
|
|
||||||
static constexpr char OBSW_UPDATE_ARCHIVE_FILE_NAME[] = "eive-sw-update.tar.xz";
|
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 STRIPPED_OBSW_BINARY_FILE_NAME[] = "eive-obsw-stripped";
|
||||||
static constexpr char OBSW_VERSION_FILE_NAME = "obsw_version.txt";
|
static constexpr char OBSW_VERSION_FILE_NAME[] = "obsw_version.txt";
|
||||||
static constexpr char VERSION_FILE_NAME[] = "version.txt";
|
static constexpr char VERSION_FILE_NAME[] = "version.txt";
|
||||||
static constexpr char REBOOT_FILE_NAME[] = "reboot.txt";
|
static constexpr char REBOOT_FILE_NAME[] = "reboot.txt";
|
||||||
static constexpr char TIME_FILE_NAME[] = "time.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);
|
"/" + std::string(CONF_FOLDER) + "/" + std::string(REBOOT_FILE_NAME);
|
||||||
const std::string TIME_FILE = "/" + std::string(CONF_FOLDER) + "/" + std::string(TIME_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_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_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_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_1_COPY_1_MOUNT_DIR[] = "/tmp/mntupdate-xdi-qspi1-gold-rootfs";
|
||||||
|
|
||||||
static constexpr ActionId_t LIST_DIRECTORY_INTO_FILE = 0;
|
static constexpr ActionId_t LIST_DIRECTORY_INTO_FILE = 0;
|
||||||
static constexpr ActionId_t SWITCH_REBOOT_FILE_HANDLING = 5;
|
static constexpr ActionId_t SWITCH_REBOOT_FILE_HANDLING = 5;
|
||||||
|
@ -1,17 +1,21 @@
|
|||||||
#!/bin/bash
|
#!/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 "No file eive-obsw-stripped found. Please ensure you are in the "
|
||||||
echo "build folder and the OBSW was built properly"
|
echo "build folder and the OBSW was built properly"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f obsw_version.txt ]; then
|
if [ ! -f obsw_version.txt ]; then
|
||||||
echo "No OBSW version file found."
|
echo "No OBSW version file found."
|
||||||
echo "You can use the create-version-file.sh script to create it"
|
echo "You can use the create-version-file.sh script to create it"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cmd="tar -cJvf eive-obsw.tar.xz eive-obsw-stripped obsw_version.txt"
|
cmd="tar -cJvf eive-sw-update.tar.xz eive-obsw-stripped obsw_version.txt"
|
||||||
echo "Running command ${cmd} to generate compressed SW update archive"
|
echo "Running command ${cmd} to generate compressed SW update archive."
|
||||||
eval ${cmd}
|
eval ${cmd}
|
||||||
|
echo "Generated eive-sw-update.tar.xz update archive."
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
source create-version-file.sh
|
|
||||||
source create-sw-update.sh
|
|
Loading…
Reference in New Issue
Block a user