Commit Graph

4304 Commits

Author SHA1 Message Date
Mario Limonciello
c5efb21519 fu-util-common: Invert default behavior for reboot and shutdown prompts
Current behavior for the prompt:
```
Y … Restart & Update
y … Restart & Update
N … Tool abort & Update complete after next Power cycle
n …Tool abort & Update complete after next Power cycle
0 … Pause -> (Push anykey) -> Restart & Update
* … Pause -> (Push anykey) -> Restart & Update
“”(Enter Only) … Restart & Update
```

If someone just keeps pressing enter without reading the system will reboot
which might lead to data loss.

Set the default scenario to abort reboot, so they can just see the message
to reboot instead.
2019-11-25 08:22:42 -06:00
Mario Limonciello
802be8b1b3 trivial: fu-plugin-vfuncs: Add GTK documentation for all vfuncs 2019-11-25 09:29:46 +00:00
Richard Hughes
1665837e78 Make gudev a compile-time option
This should make it nearly possible to build fwupd on FreeBSD.
2019-11-25 09:29:46 +00:00
Richard Hughes
afdba37644 trivial: Set the offline trigger using an environment variable
This allows us to build a object that does not have a custom FU_OFFLINE_DESTDIR.
2019-11-25 09:29:46 +00:00
Mario Limonciello
9b36a370ae trivial: ci: pull lintian from unstable for now.
Fixes E: fwupd: library-not-linked-against-libc usr/lib/x86_64-linux-gnu/fwupd-plugins-3/libfu_plugin_upower.so

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=945276
2019-11-25 09:29:46 +00:00
Mario Limonciello
6abe21efbd trivial: stop including fu-hash.h as part of fu-plugin-vfuncs.h
Explicitly include it in all "in-tree" plugins.

If headers are exported out of tree we will likely explicitly not
export this header.
2019-11-25 09:29:46 +00:00
Leo
6640b571bf Fix shebangs on scripts 2019-11-24 18:51:56 -06:00
Richard Hughes
668ee21567 trivial: Use prefixes for DATADIR in config.h for portability
DATADIR is an enumerated type in MinGW, and the other names are very generic.
2019-11-24 14:17:38 -06:00
Richard Hughes
40bef88ce1 Allow compiling GUsb as a subproject
This allows us to get closer to compiling on FreeBSD.
2019-11-24 16:59:48 +00:00
Mario Limonciello
b3d4d2ff68 trivial: fu-udev-device: add a to_string func for debugging 2019-11-24 08:14:48 +00:00
Richard Hughes
00d6f4734f trivial: Don't assume that plugins end in .so 2019-11-24 08:14:48 +00:00
Mario Limonciello
89a9e245f9 trivial: optionrom: remove unneeded includes 2019-11-23 14:34:55 -06:00
Mario Limonciello
4fcf48606f trivial: debian: ci: ignore library-not-linked-against-libc for more 2019-11-23 20:18:36 +00:00
Mario Limonciello
d454485be3 trivial: remove version-format.md
It's not being kept up to date, and superceded by
https://fwupd.org/lvfs/docs/metainfo/version
2019-11-23 20:17:22 +00:00
Richard Hughes
1f68b021d1 trivial: Allow compiling without pwrite() 2019-11-23 17:07:53 +00:00
Richard Hughes
633445dc10 trivial: Allow compiling without <errno.h> 2019-11-23 17:07:53 +00:00
Richard Hughes
8694dee4e7 trivial: Allow compiling without realpath() 2019-11-23 17:07:53 +00:00
Richard Hughes
b026e456f3 trivial: Allow compiling without HAVE_LC_MESSAGES 2019-11-23 17:07:53 +00:00
Richard Hughes
01c0badd38 trivial: Allow compiling without getuid() 2019-11-23 17:07:53 +00:00
Richard Hughes
4f642400f8 trivial: Allow compiling without <sys/ioctl.h> 2019-11-23 17:07:53 +00:00
Richard Hughes
e7fbb248f9 trivial: Allow compiling without <poll.h> 2019-11-23 17:07:53 +00:00
Richard Hughes
fc1e267d33 trivial: Allow compiling without <sys/utsname.h> 2019-11-23 17:07:53 +00:00
Richard Hughes
17957ebf13 Ensure the _get_type() gets the same ABI version as the constructor
This was also causing the _get_type() symbol to be ignored for objects without
any class methods except constructors.
2019-11-23 12:59:47 +00:00
Richard Hughes
0fe4914320 Use the correct unlocker when using GRWLock
Linux doesn't care if you use g_rw_lock_reader_unlock() on a write lock, but
Windows really does.
2019-11-22 20:53:45 +00:00
Mario Limonciello
0f54b54250 trivial: plugins: only build coreboot when option set
The option was set but wasn't being used.
2019-11-22 14:50:15 -06:00
Mario Limonciello
52e75ba2b6 fwupdtool: don't show a warning when calling get-plugins
The plugins are not opened for this function so of course they
won't set their build hashes.

Fixes errors like this:
`uefi should call fu_plugin_set_build_hash()`
2019-11-22 13:55:30 -06:00
Richard Hughes
342a38b432 Release fwupd 1.3.4 2019-11-22 16:00:40 +00:00
Richard Hughes
08a125637c trivial: Don't force specific linker flash when cross building 2019-11-22 14:23:55 +00:00
Richard Hughes
18b0a739e2 dell: Use the more portable g_usleep() 2019-11-22 14:23:48 +00:00
Richard Hughes
4debb3dcd2 trivial: Fix unused header includes 2019-11-22 14:23:11 +00:00
Richard Hughes
7eeebae1c7 vli-usbhub: Make erasing less verbose and writing more obvious 2019-11-22 14:07:39 +00:00
Richard Hughes
ae21b15ec1 vli-usbhub: Correctly print the 24-bit USB3 offset 2019-11-22 14:07:39 +00:00
Richard Hughes
ad7c7e5fb3 vli-usbhub: Print the PD firmware offset and size for debugging 2019-11-22 14:07:39 +00:00
Richard Hughes
233868124e vli-usbhub: Open the parent device before attempting to read or write from the child 2019-11-22 14:07:39 +00:00
Richard Hughes
6496f12b37 vli-usbhub: Set the install duration for the PD device 2019-11-22 14:07:39 +00:00
Richard Hughes
24ce9837e9 trivial: Fix a failed error prefix string 2019-11-22 14:07:39 +00:00
Mario Limonciello
8bcaad800e trivial: wacom-raw: Remove embedded from device name
This is already implied by the internal flag.
2019-11-21 13:03:12 -06:00
Mario Limonciello
59970600ad wacom-raw: Correct HWID support
This support was using the wrong commands to add a HWID and thus
never actually functioned.  Furthermore it's purpose is to pull
the PID out of the bootloader to be able to properly identify
the device when in bootloader mode (as in recovery mode).

When in this state, generate the correct instance IDs for both
possible Wacom VID.  We can't tell which Wacom VID we are in
bootloader mode.
2019-11-21 13:03:12 -06:00
Richard Hughes
fdb4c4507b uefi: Just use a uint16_t for BootNext processing
This makes everything simpler, at the expense of not being able to create a
`BootFFFF` entry -- but if we get that far something has already gone very
wrong with the firmware...
2019-11-20 16:24:21 +00:00
Richard Hughes
5772e8451c uefi: Use a simpler entries set algorithm
Although slightly wasteful on memory, allocating 64kb is no big deal, and it
means we can simplify creation and reading a lot.
2019-11-20 16:24:21 +00:00
Richard Hughes
55b2df9df6 vli-usbhub: Add support for writing using I2C passthru 2019-11-20 11:07:23 +00:00
Richard Hughes
9f960c154a vli-usbhub: Support updating PD devices that share the hub flash 2019-11-20 11:07:23 +00:00
Richard Hughes
171f18c1c8 vli-usbhub: Support the PD file format 2019-11-20 11:07:23 +00:00
Mario Limonciello
66fcf55f9a trivial: uefi: correct a NULL pointer dereference
This could happen if the machine doesn't have `/etc/os-release`.
2019-11-18 16:22:01 -06:00
Mario Limonciello
e888b58ccd uefi: fall back to ID_LIKE when the path for ID doesn't exist (Fixes:# 1566)
Some derivative distributions re-use bootloader paths from their
upstream.  When this happens the current logic to look for the `ID`
key in `/etc/os-release` doesn't work properly.

Adjust the logic to:
1) Use `ID`
2) Test the path exists.  If so, use it.
3) If it doesn't use `ID_LIKE`.
4) Test if that path exists, if so use it.
5) If that path doesn't exist, return the key from `ID`
6) The plugin will make this path.
2019-11-18 14:55:04 -06:00
Jan Tojnar
34743c5fab uefi: Make generate_binary.sh more robust
command is a shell builtin unlike which, which might not be available.

While at it, let us also make the variables space-safe.
2019-11-18 18:43:40 +00:00
Richard Hughes
3d45e693cc Tokenize the Intel Hex file before parsing
The raw lines are required for some unspecified hardware.
2019-11-15 19:00:37 +00:00
Richard Hughes
22c124dba4 trivial: Detect the USB version automatically
Unfortunately we can't remove the usb2 and usb3 custom flags as we don't yet
depend on a new enough GUsb version.
2019-11-15 18:59:44 +00:00
Mario Limonciello
0f109b0d97 trivial: fu-util/fu-tool: explicitly block unsupported flags
Recently had a discussion on the expected behavior of calling
`#fwupdmgr update`/`fwupdtool update` with `--allow-reinstall`
in place.

It wasn't working which was confusing to the reporter, but I
feel that flag should only be usable with `install`.  Upgrades
are for upgrades and downgrades are for downgrades.  Reinstalls are
for reinstall.
2019-11-14 11:06:11 -06:00
Richard Hughes
f7006d2baa Add support for matching <firmware> requirements on device parents
For composite devices you might want to restrict the child device in respect
to the parent, for instance requiring the parent to have greater than a specific
firmware version number.

The other useful thing to use this for is checking if the parent has a specific
GUID (of any version) which allows us to match against the common VID&PID
instance IDs. This would allow us to restrict a generic child device update to
a specific OEM vendor parent.

This is specified as <firmware depth="1" ...> to match the parent device and
<firmware depth="2" ...> to match the grandparent device.
2019-11-14 16:25:58 +00:00