Commit graph

22 commits

Author SHA1 Message Date
Floris Bos
2bbb8bfba7 Windows: improve file system mounting for customization
- Check if config.txt exists on drive letter before proceeding to
  write changes. Wait up to 3 seconds if not.
- Force drive letter assignment for portable SSDs and other devices
  that pretend to be a fixed drive. (Windows only auto-assigns
  drive letters for removable media).

Ref #171
2021-03-21 16:25:32 +01:00
Floris Bos
86f893388c Shift+Ctrl+X for advanced users that likes to customize the image
- Adds "hidden" shift+ctrl+X shortcut for eXpert image customization
  options.

Allows one to set certain options on RPI OS images, namely:

* disable overscan
* set hostname
* enable ssh and
  - set Pi user password if using password authentication
  OR
  - set authorized_keys
    (if running Imager on Linux/Mac this will
     have contents of ~/.ssh/id_rsa.pub prefilled)
* configure wifi settings
  (if computer running Imager is connected by wifi it will
  prefill wifi SSID and if on Windows also PSK).
* set time zone and keyboard layout

  Related to feature requests/issues:
  Ref #127
  Ref #86
  Ref #102
  Ref #73
  Ref #68
  Ref #25
  Ref #12

- Option Window also allows setting a couple other general settings:

* Adds option for audible notification (beep) when imaging completes.
  Closes #46

* Adds option not to eject media when done.
  Closes #144

- No longer suspends a number of Windows services during Imaging
  (We want Windows to detect the drive and mount it, or we may
   not be able to alter files on FAT partition).
2021-01-17 17:43:17 +01:00
Floris Bos
f5b36b6dd0 Mac OS X: on access denied open "all files & folders" prefs instead of "full disk access" 2020-12-01 15:51:45 +01:00
Floris Bos
abeef65e7d Reconnect if download stalls for more than one minute 2020-11-23 19:48:50 +01:00
Floris Bos
e4d99008fe Fix \n -> <br> in translations
Closes #119
2020-11-19 19:05:09 +01:00
Floris Bos
6b178731c7 Improve status reporting
There are some user complaints that Imager hangs at "writing 0%"
Mention in the progress status what it is actually doing prior
to writing (e.g. opening storage, blkdiscarding,
zero'ing out MBR, starting download) to help diagnose
potential issues.
2020-11-19 18:10:05 +01:00
Floris Bos
65f9b9c1fd Improve download error reporting
Ref #107
2020-09-29 19:54:03 +02:00
Floris Bos
064f0c3361 Remove redundant delay 2020-07-21 15:10:25 +02:00
Floris Bos
7e4f5c9045 Mac: open preferences for user if Imager is not allowed access
Normally the system will prompt the user to allow Imager access
to removable volumes.
Open preferences and ask user to allow Imager manually in a
corner case in which this does not occur.
2020-07-21 15:04:38 +02:00
Floris Bos
385ee6d742 Windows: mention 'Controlled Folder Access' on ERROR_ACCESS_DENIED
If WriteFile() returns ERROR_ACCESS_DENIED and registry indicates
CFA is on, tell user rpi-imager (and fat32format) should be added
to the "allowed apps" in the CFA settings.
2020-07-06 00:42:44 +02:00
Floris Bos
5f42c7d7cb Windows: stop storage service during write
The moment we write the block containing the partition table
Windows services will start accessing the SD card and write data
to "System volume information" folder.

If others are writing to disk concurrently this may or may not
affect our ability to eject the drive.
Stop StorSvc temporarily between us writing the partition table
(saved for last) and ejecting the SD card, just in case.

Ref #75
2020-07-03 21:11:34 +02:00
Floris Bos
19bfc8eacb Close files on error 2020-07-03 21:08:51 +02:00
Floris Bos
83ae3f1cbd Linux: do not trust device write stats if higher than what we wrote
For reasons unknown the device write statistics sometimes report
higher numbers than the number of bytes we wrote to the device on
some hardware. Causing write percentage in progressbar text
to exceed 100%

Maximize amount of bytes to what we wrote to the device.
This do will result in unreliable write progress on these devices
(it will then show amount of bytes written to cache instead of
what made it to device yet)

Closes #82
2020-06-30 00:13:46 +02:00
Floris Bos
5b072f3196 Build changes
- Add support for embedded Linux without X, dbus, udisks, ntp, etc.
- Misc minor changes
2020-05-25 00:36:16 +02:00
Floris Bos
71eefa47cf Fix handling of UNC file URLs
- Qt thinks UNC URLs should look like: file://1.2.3.4/share/file.img
libcurl likes them: file:////1.2.3.4/share/file.img

So correct that.

- Mention it is an unspecified libcurl error if libcurl passes us
an error code with an empty error message string.

Closes #65
2020-05-24 00:00:35 +02:00
Floris Bos
3248f9f04b Linux: improve progess indication
Report data actually written to device instead of to cache.
2020-05-23 22:22:32 +02:00
Floris Bos
b08ed20e5f Linux: enable direct IO for verify
Linux has huge buffer cache (all free memory)
So make sure we are reading data back from the actual card instead
of cache.
2020-05-23 21:40:52 +02:00
Floris Bos
8048b5e47c Use accelerated hashing for verification
Modern CPUs have special instructions to accelerate computing
SHA hashes.
The Qt QCryptographicHash code is standard C, so not taking
advantage of those though.
Outsource the hashing to OpenSSL that does.

Shaves off some seconds during verification stage.
2020-05-23 17:50:59 +02:00
Floris Bos
0264af9b73 Performance improvements
- Use larger buffer size when writing uncompressed files
  (was libcurl's default of 16 kb, change it to 128 kb)
- Uncompress the next MB of data, while it is hashing/writing to
  disk in seperate thread.
2020-03-10 23:22:20 +01:00
Floris Bos
9a0454d07f Verify error: correct spelling 2020-03-09 13:04:21 +01:00
Floris Bos
a367ed0683 Fix verifying on images that are not dividable by block size 2020-03-06 12:00:46 +01:00
Floris Bos
d7b361ba44 Qt/QML edition 2020-03-04 16:55:40 +01:00