Remove correct file in create_ini_image.sh (#3460)
This commit is contained in:
parent
a18beadb03
commit
cb546dd67b
|
@ -12,20 +12,23 @@ FS_SIZE=$3
|
|||
SHORT_BOARDNAME=$4
|
||||
BOARD_SPECIFIC_URL=$5
|
||||
|
||||
IMAGE=ramdisk.image
|
||||
ZIP=rusefi.ini.zip
|
||||
|
||||
echo "create_ini_image: ini $FULL_INI to $H_OUTPUT size $FS_SIZE for $SHORT_BOARDNAME [$BOARD_SPECIFIC_URL]"
|
||||
|
||||
rm -f rusefi.zip ramdisk_image.h
|
||||
rm -f $ZIP $IMAGE
|
||||
|
||||
# copy *count*KB of zeroes
|
||||
dd if=/dev/zero of=ramdisk.image bs=1024 count=$FS_SIZE
|
||||
dd if=/dev/zero of=$IMAGE bs=1024 count=$FS_SIZE
|
||||
|
||||
# create a FAT filesystem inside, name it RUSEFI
|
||||
mkfs.fat ramdisk.image
|
||||
mkfs.fat -v -r 64 $IMAGE
|
||||
# labels can be no longer than 11 characters
|
||||
fatlabel ramdisk.image RUSEFI
|
||||
fatlabel $IMAGE RUSEFI
|
||||
|
||||
# -j option dumps all files in the root of the zip (instead of inside directories)
|
||||
zip -j rusefi.ini.zip $FULL_INI
|
||||
zip -j $ZIP $FULL_INI
|
||||
|
||||
cp hw_layer/mass_storage/filesystem_contents/rusEFI_Wiki_template.url hw_layer/mass_storage/wiki.temp
|
||||
echo "URL=${BOARD_SPECIFIC_URL}" >> hw_layer/mass_storage/wiki.temp
|
||||
|
@ -33,19 +36,19 @@ cp hw_layer/mass_storage/filesystem_contents/README.template.txt hw_layer/mass_s
|
|||
echo ${BOARD_SPECIFIC_URL} >> hw_layer/mass_storage/readme.temp
|
||||
|
||||
# Put the zip inside the filesystem
|
||||
mcopy -i ramdisk.image rusefi.ini.zip ::
|
||||
mcopy -i $IMAGE $ZIP ::
|
||||
# Put a readme text file in there too
|
||||
mcopy -i ramdisk.image hw_layer/mass_storage/readme.temp ::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\ Quick\ Start.url ::
|
||||
mcopy -i ramdisk.image hw_layer/mass_storage/wiki.temp ::rusEFI\ ${SHORT_BOARDNAME}\ Wiki.url
|
||||
mcopy -i $IMAGE hw_layer/mass_storage/readme.temp ::README.txt
|
||||
mcopy -i $IMAGE hw_layer/mass_storage/filesystem_contents/rusEFI\ Forum.url ::
|
||||
mcopy -i $IMAGE hw_layer/mass_storage/filesystem_contents/rusEFI\ Quick\ Start.url ::
|
||||
mcopy -i $IMAGE hw_layer/mass_storage/wiki.temp ::rusEFI\ ${SHORT_BOARDNAME}\ Wiki.url
|
||||
|
||||
|
||||
|
||||
|
||||
# write out as a C array, with "static const" tacked on the front
|
||||
xxd -i ramdisk.image \
|
||||
xxd -i $IMAGE \
|
||||
| cat <(echo -n "static const ") - \
|
||||
> $H_OUTPUT
|
||||
|
||||
rm ramdisk.image rusefi.ini.zip
|
||||
rm $ZIP $IMAGE
|
||||
|
|
|
@ -12,17 +12,19 @@ FS_SIZE=$3
|
|||
SHORT_BOARDNAME=$4
|
||||
BOARD_SPECIFIC_URL=$5
|
||||
|
||||
echo "create_ini_image: ini $FULL_INI to $H_OUTPUT size $FS_SIZE for $SHORT_BOARDNAME [$BOARD_SPECIFIC_URL]"
|
||||
IMAGE=ramdisk.image
|
||||
|
||||
rm -f rusefi.zip ramdisk_image.h
|
||||
echo "create_ini_image_compressed: ini $FULL_INI to $H_OUTPUT size $FS_SIZE for $SHORT_BOARDNAME [$BOARD_SPECIFIC_URL]"
|
||||
|
||||
rm -f $IMAGE $IMAGE.gz
|
||||
|
||||
# copy *count*KB of zeroes
|
||||
dd if=/dev/zero of=ramdisk.image bs=1024 count=$FS_SIZE
|
||||
dd if=/dev/zero of=$IMAGE bs=1024 count=$FS_SIZE
|
||||
|
||||
# create a FAT filesystem inside, name it RUSEFI
|
||||
mkfs.fat ramdisk.image
|
||||
mkfs.fat $IMAGE
|
||||
# labels can be no longer than 11 characters
|
||||
fatlabel ramdisk.image RUSEFI
|
||||
fatlabel $IMAGE RUSEFI
|
||||
|
||||
|
||||
|
||||
|
@ -33,19 +35,19 @@ cp hw_layer/mass_storage/filesystem_contents/README.nozip.template.txt hw_layer/
|
|||
echo ${BOARD_SPECIFIC_URL} >> hw_layer/mass_storage/readme.temp
|
||||
|
||||
# Put the zip inside the filesystem
|
||||
mcopy -i ramdisk.image $FULL_INI ::
|
||||
mcopy -i $IMAGE $FULL_INI ::
|
||||
# Put a readme text file in there too
|
||||
mcopy -i ramdisk.image hw_layer/mass_storage/readme.temp ::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\ Quick\ Start.url ::
|
||||
mcopy -i ramdisk.image hw_layer/mass_storage/wiki.temp ::rusEFI\ ${SHORT_BOARDNAME}\ Wiki.url
|
||||
mcopy -i $IMAGE hw_layer/mass_storage/readme.temp ::README.txt
|
||||
mcopy -i $IMAGE hw_layer/mass_storage/filesystem_contents/rusEFI\ Forum.url ::
|
||||
mcopy -i $IMAGE hw_layer/mass_storage/filesystem_contents/rusEFI\ Quick\ Start.url ::
|
||||
mcopy -i $IMAGE hw_layer/mass_storage/wiki.temp ::rusEFI\ ${SHORT_BOARDNAME}\ Wiki.url
|
||||
|
||||
# Compress the image as DEFLATE with gzip
|
||||
gzip ramdisk.image
|
||||
gzip $IMAGE
|
||||
|
||||
# write out as a C array, with "static const" tacked on the front
|
||||
xxd -i ramdisk.image.gz \
|
||||
xxd -i $IMAGE.gz \
|
||||
| cat <(echo -n "static const ") - \
|
||||
> $H_OUTPUT
|
||||
|
||||
rm ramdisk.image.gz
|
||||
rm $IMAGE.gz
|
||||
|
|
Loading…
Reference in New Issue