Fiasco image: Allow to specify device string without hw revision (then image is valid for all hw revisions). Generating images should be complete!
This commit is contained in:
1 parent
9195f3c7da
commit
2110196958
2 files changed
+8
-7
No files matched your search
+4
-3
@@ -459,6 +459,7 @@ int fiasco_add(int fd, const char *name, const char *file, const char *layout, c
|
||||
write(fd, device, len);
|
||||
for (i=0; i<16-len; ++i)
|
||||
write(fd, "\x00", 1);
|
||||
if (hwrevs) {
|
||||
ptr = hwrevs;
|
||||
oldptr = hwrevs;
|
||||
while ((ptr = strchr(ptr, ','))) {
|
||||
@@ -476,6 +477,7 @@ int fiasco_add(int fd, const char *name, const char *file, const char *layout, c
|
||||
for (i=0; i<8-len; ++i)
|
||||
write(fd, "\x00", 1);
|
||||
}
|
||||
}
|
||||
|
||||
/* append layout subsection */
|
||||
if (layout) {
|
||||
@@ -554,7 +556,7 @@ int fiasco_pack(int optind, char *argv[])
|
||||
if (strncmp(arg, "version:", strlen("version:"))==0)
|
||||
continue;
|
||||
|
||||
// format: [[[[dev:hw:]ver:]type:]file[%layout]
|
||||
// format: [[[[dev:[hw:]]ver:]type:]file[%layout]
|
||||
ptr = strdup(arg);
|
||||
layout = strchr(ptr, '%');
|
||||
if (layout) {
|
||||
@@ -576,10 +578,9 @@ int fiasco_pack(int optind, char *argv[])
|
||||
if (version) {
|
||||
*(version++) = 0;
|
||||
hwrevs = strchr(ptr, ':');
|
||||
if (hwrevs) {
|
||||
if (hwrevs)
|
||||
*(hwrevs++) = 0;
|
||||
device = ptr;
|
||||
}
|
||||
} else {
|
||||
version = ptr;
|
||||
}
|
||||
|
||||
+4
-4
@@ -112,9 +112,9 @@ void show_usage()
|
||||
|
||||
printf ("Image specification:\n"
|
||||
" -p [arg] specify normal image\n"
|
||||
" arg is [[[dev:hw:]ver:]type:]file[%%layout]\n"
|
||||
" arg is [[[dev:[hw:]]ver:]type:]file[%%layout]\n"
|
||||
" hw is device HW revision\n"
|
||||
" dev is device string\n"
|
||||
" dev is device name string\n"
|
||||
" ver is image version string\n"
|
||||
" type is image type\n"
|
||||
" file is image file name\n"
|
||||
@@ -169,9 +169,9 @@ void show_usage()
|
||||
" -i show device information (let standby mode)\n"
|
||||
" -l list supported usb device ids\n"
|
||||
" -p format piece-of-firmware\n"
|
||||
" piece format: [[[[dev:hw:]ver:]type:]file[%%layout]\n"
|
||||
" piece format: [[[[dev:[hw:]]ver:]type:]file[%%layout]\n"
|
||||
" hw is device HW revision\n"
|
||||
" dev is device string\n"
|
||||
" dev is device name string\n"
|
||||
" ver is image version string\n"
|
||||
" type is image type\n"
|
||||
" file is image file name\n"
|
||||
|
||||
Reference in new issue
Block a user