RUSEFI MSD to contain bundle-specific URL #2848
refactoring and progress
This commit is contained in:
parent
502df0d85b
commit
4f9b3cc4d0
|
@ -51,7 +51,7 @@ java -DSystemOut.name=gen_config_board \
|
||||||
# 1) using unique file name for each configuration?
|
# 1) using unique file name for each configuration?
|
||||||
# 2) leverage consistent caching mechanism so that image is generated only in case of fresh .ini. Laziest approach would be to return exit code from java process above
|
# 2) leverage consistent caching mechanism so that image is generated only in case of fresh .ini. Laziest approach would be to return exit code from java process above
|
||||||
#
|
#
|
||||||
hw_layer/mass_storage/create_ini_image.sh ./tunerstudio/generated/${INI} ./hw_layer/mass_storage/ramdisk_image.h
|
hw_layer/mass_storage/create_ini_image.sh ./tunerstudio/generated/${INI} ./hw_layer/mass_storage/ramdisk_image.h 112 ${SHORT_BOARDNAME}
|
||||||
hw_layer/mass_storage/create_ini_image_compressed.sh ./tunerstudio/generated/${INI} ./hw_layer/mass_storage/ramdisk_image_compressed.h
|
hw_layer/mass_storage/create_ini_image_compressed.sh ./tunerstudio/generated/${INI} ./hw_layer/mass_storage/ramdisk_image_compressed.h 1024 ${SHORT_BOARDNAME}
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -3,17 +3,25 @@
|
||||||
# fail on error
|
# fail on error
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
FULL_INI=$1
|
||||||
|
H_OUTPUT=$2
|
||||||
|
FS_SIZE=$3
|
||||||
|
SHORT_BOARDNAME=$4
|
||||||
|
|
||||||
|
echo "ini $FULL_INI to $H_OUTPUT size $FS_SIZE for $SHORT_BOARDNAME"
|
||||||
|
|
||||||
|
|
||||||
rm -f rusefi.zip ramdisk_image.h
|
rm -f rusefi.zip ramdisk_image.h
|
||||||
|
|
||||||
# copy *count*KB of zeroes
|
# copy *count*KB of zeroes
|
||||||
dd if=/dev/zero of=ramdisk.image bs=1024 count=112
|
dd if=/dev/zero of=ramdisk.image bs=1024 count=$FS_SIZE
|
||||||
|
|
||||||
# create a FAT filesystem inside, name it RUSEFI
|
# create a FAT filesystem inside, name it RUSEFI
|
||||||
mkfs.fat ramdisk.image
|
mkfs.fat ramdisk.image
|
||||||
fatlabel ramdisk.image RUSEFI
|
fatlabel ramdisk.image "RUSEFI $SHORT_BOARDNAME"
|
||||||
|
|
||||||
# -j option dumps all files in the root of the zip (instead of inside directories)
|
# -j option dumps all files in the root of the zip (instead of inside directories)
|
||||||
zip -j rusefi.ini.zip $1
|
zip -j rusefi.ini.zip $FULL_INI
|
||||||
|
|
||||||
# Put the zip inside the filesystem
|
# Put the zip inside the filesystem
|
||||||
mcopy -i ramdisk.image rusefi.ini.zip ::
|
mcopy -i ramdisk.image rusefi.ini.zip ::
|
||||||
|
@ -22,9 +30,12 @@ mcopy -i ramdisk.image hw_layer/mass_storage/filesystem_contents/README.txt ::
|
||||||
mcopy -i ramdisk.image hw_layer/mass_storage/filesystem_contents/rusEFI\ Forum.url ::
|
mcopy -i ramdisk.image hw_layer/mass_storage/filesystem_contents/rusEFI\ Forum.url ::
|
||||||
mcopy -i ramdisk.image hw_layer/mass_storage/filesystem_contents/rusEFI\ Wiki.url ::
|
mcopy -i ramdisk.image hw_layer/mass_storage/filesystem_contents/rusEFI\ Wiki.url ::
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# write out as a C array, with "static const" tacked on the front
|
# write out as a C array, with "static const" tacked on the front
|
||||||
xxd -i ramdisk.image \
|
xxd -i ramdisk.image \
|
||||||
| cat <(echo -n "static const ") - \
|
| cat <(echo -n "static const ") - \
|
||||||
> $2
|
> $H_OUTPUT
|
||||||
|
|
||||||
rm ramdisk.image rusefi.ini.zip
|
rm ramdisk.image rusefi.ini.zip
|
||||||
|
|
|
@ -2,18 +2,26 @@
|
||||||
|
|
||||||
# fail on error
|
# fail on error
|
||||||
set -e
|
set -e
|
||||||
|
RUSEFI MSD to contain bundle-specific URL #2848
|
||||||
|
FULL_INI=$1
|
||||||
|
H_OUTPUT=$2
|
||||||
|
FS_SIZE=$3
|
||||||
|
SHORT_BOARDNAME=$4
|
||||||
|
|
||||||
rm -f rusefi.zip ramdisk_image.h
|
rm -f rusefi.zip ramdisk_image.h
|
||||||
|
|
||||||
# copy 1MB of zeroes
|
# copy *count*KB of zeroes
|
||||||
dd if=/dev/zero of=ramdisk.image bs=1024 count=1024
|
dd if=/dev/zero of=ramdisk.image bs=1024 count=$FS_SIZE
|
||||||
|
|
||||||
# create a FAT filesystem inside, name it RUSEFI
|
# create a FAT filesystem inside, name it RUSEFI
|
||||||
mkfs.fat ramdisk.image
|
mkfs.fat ramdisk.image
|
||||||
fatlabel ramdisk.image RUSEFI
|
fatlabel ramdisk.image RUSEFI
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Put the zip inside the filesystem
|
# Put the zip inside the filesystem
|
||||||
mcopy -i ramdisk.image $1 ::
|
mcopy -i ramdisk.image $FULL_INI ::
|
||||||
# Put a readme text file in there too
|
# Put a readme text file in there too
|
||||||
mcopy -i ramdisk.image hw_layer/mass_storage/filesystem_contents/README.nozip.txt ::README.txt
|
mcopy -i ramdisk.image hw_layer/mass_storage/filesystem_contents/README.nozip.txt ::README.txt
|
||||||
mcopy -i ramdisk.image hw_layer/mass_storage/filesystem_contents/rusEFI\ Forum.url ::
|
mcopy -i ramdisk.image hw_layer/mass_storage/filesystem_contents/rusEFI\ Forum.url ::
|
||||||
|
@ -25,6 +33,6 @@ gzip ramdisk.image
|
||||||
# write out as a C array, with "static const" tacked on the front
|
# write out as a C array, with "static const" tacked on the front
|
||||||
xxd -i ramdisk.image.gz \
|
xxd -i ramdisk.image.gz \
|
||||||
| cat <(echo -n "static const ") - \
|
| cat <(echo -n "static const ") - \
|
||||||
> $2
|
> $H_OUTPUT
|
||||||
|
|
||||||
rm ramdisk.image.gz
|
rm ramdisk.image.gz
|
||||||
|
|
Loading…
Reference in New Issue