Skip to content

Commit

Permalink
Merged GT-BE98U binary blobs from 102_37346
Browse files Browse the repository at this point in the history
  • Loading branch information
gnuton committed Jan 1, 2025
1 parent 2738e5e commit a60c187
Show file tree
Hide file tree
Showing 362 changed files with 3,466 additions and 24,524 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified release/src-rt-5.04behnd.4916/hostTools/prebuilt/GT-BE98/lzop
Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
#include <stdio.h>
#include <stdlib.h>

#include "bcm_flashutil.h"
#include "bcm_imgutil_api.h"

#include <sys/reboot.h>

#define BOOT_SET_NEW_IMAGE '0'
#define BOOT_SET_NEW_IMAGE_ONCE '2'


CmsImageFormat parseImgHdr(UINT8 *bufP __attribute__((unused)), UINT32 bufLen __attribute__((unused)))
{
Expand All @@ -21,6 +29,7 @@ int main(int argc, char *argv[])
FILE *fp;
imgif_flash_info_t flash_info;
static IMGIF_HANDLE imgifHandle = NULL;
int live_update = 0;

if (argc != 2)
{
Expand All @@ -33,6 +42,8 @@ int main(int argc, char *argv[])
fprintf(stderr, "ERROR!!! Could not open %s\n", argv[1]);
return -1;
}
if (strstr(argv[1], "linux.trx"))
live_update = 1;

fseek(fp, 0, SEEK_END);
size = ftell(fp);
Expand Down Expand Up @@ -104,11 +115,25 @@ int main(int argc, char *argv[])
if (imgif_close(imgifHandle, 0) != 0)
{
fprintf(stderr, "ERROR!!! Failed to flash upgrade image \n");

if (live_update)
reboot(RB_AUTOBOOT);

return -1;
}
else
else {
printf("\nImage flash complete, you may reboot the board\n");

if (live_update) {
if (setBootImageState(BOOT_SET_NEW_IMAGE) != 0)
printf("%s: setBootImageState(BOOT_SET_NEW_IMAGE) failed..\n", __func__);
else
printf("%s: setBootImageState(BOOT_SET_NEW_IMAGE) failed..\n", __func__);

reboot(RB_AUTOBOOT);
}
}

return size; // return the amount we copied
}

Binary file not shown.
Loading

0 comments on commit a60c187

Please sign in to comment.