summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-07-13debian/changelog: Bump to 0.2+36g293ab8b-1HEADdebian/0.2+36g293ab8b-1masterAníbal Limón
Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
2021-07-13Merge remote-tracking branch 'upstream/master'Aníbal Limón
2021-04-08storage: Sync changesBjorn Andersson
Open the storage devices as O_SYNC, to make sure modem writes aren't lingering in the event of power loss or sudden reboot. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2021-01-29debian/changelog: Fix version to be compatible with debian.debian/0.2+35g1cc12d3-1Aníbal Limón
Using git describe on upstream source, For example, $ git describe --match v0.* --tags UPSTREAM_BRANCH v0.2-35-g1cc12d3 Will be transform into 0.2+35g1cc12d3 and then add debian_revision. Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
2021-01-29debian/changelog: Update versioning using git describedebian/0.2-35-g1cc12d3Aníbal Limón
Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
2020-12-07Merge remote-tracking branch 'upstream/master'debian/0.0+1cc12d3dc1-6Aníbal Limón
Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
2020-12-07debian/changelog: Bump to rev 1cc12d3dc1Aníbal Limón
Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
2020-12-07storage: Use storage_close() to free up resources on exitBjorn Andersson
Use storage_close() to free up the shadow buffers as well, to avoid any lingering allocations. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-12-07rproc: Make start & stop threads detachedBjorn Andersson
We're not joining the start and stop threads, so create them in detached state to avoid having their resources lingering. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-12-07rproc: NUL-terminate the modaliasBjorn Andersson
According to valgrind the modalias read from the remoteproc device is not NUL-terminated, so do this to avoid reading in the weeds. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-12-07rproc: Make state update errors more helpfulBjorn Andersson
Include the reason for the failure to update the "state" sysfs attribtue in the error message. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-12-02debian/changelog: Bump to rev 3449744146debian/0.0+3449744146-5Aníbal Limón
Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
2020-12-02Merge remote-tracking branch 'master'Aníbal Limón
Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
2020-11-21rproc: Support -s for PAS based remoteproc as wellBjorn Andersson
The old mechanism searched for remoteproc instances from the qcom_q6v5_mss driver, but in modern platforms the MSA based remoteproc model has been replaced by the PAS based one. As such we use the common qcom_q6v5_pas driver - as with other subsystems. Use the modalias to find remoteproc drivers with the mpss-pas or mss-pil compatible to find these, and fall back to the old heuristics if this fails. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-11-20rmtfs: Exit even though there's no rprocfdBjorn Andersson
Attempting to shut down a system with rmtfs running without an associated remoteproc results in systemd waiting forever for the remoteproc code to never signal that it's done. Instead exit immediately when signalled, when there's no associated remoteproc. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-11-13storage: Add modem_tunning partition needed for Alcatel Idol 3 devicesVincent Knecht
2020-09-28sharedmem: Fix pointer arithmetic warnings.John Stultz
Building rmtfs on AOSP, we see a lot of the following: warning: arithmetic on a pointer to void is a GNU extension Fix this by casting the void* ptrs to char* when doing pointer arithmatic. Signed-off-by: John Stultz <john.stultz@linaro.org> [AmitP: Fixed cherry-pick conflicts and updated commit log] Signed-off-by: Amit Pundir <amit.pundir@linaro.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-09-28storage: Use -o option to override partition by-nameAmit Pundir
Instead of hardcoding BY_PARTLABEL_PATH for AOSP, reuse -o option as suggested by Bjorn to expand John's patch to find correct partition by-name on newer kernels (which is /dev/block/platform/soc*/*.*/by-name). For example: On db845c running v5.4+ kernel we run: rmtfs -o /dev/block/platform/soc@0/1d84000.ufshc/by-name -P -r -s Signed-off-by: Amit Pundir <amit.pundir@linaro.org> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-09-28sharedmem: Keep /dev/qcom_rmtfs_memX fd openAmit Pundir
/dev/qcom_rmtfs_mem0 fd is required to share the data. Fixes: 9ef260ba6f55 ("ANDROID: Add Android support") Signed-off-by: Amit Pundir <amit.pundir@linaro.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-02-03ANDROID: Add Android supportAmit Pundir
* Add Android.bp makefile to build rmtfs for AOSP. * libudev is not supported on AOSP so read /sys/class/rmtfs sysfs entries directly. Signed-off-by: Amit Pundir <amit.pundir@linaro.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-01-31debian/patches: Remove workaround for rmtfs startup issuedebian/0.0+dfb8f3ed1c-4Aníbal Limón
Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
2020-01-31debian/changelog: Bump to 0.0+dfb8f3ed1c-4Aníbal Limón
Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
2020-01-31Merge remote-tracking branch 'upstream/master'Aníbal Limón
2020-01-30rmtfs.service.in: Add RestartSec to 1 sec intervalsAníbal Limón
Systemd has a default restart policy of 5 retries so wait 1 second in each retry because if is too fast will fail to start properly. Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
2020-01-30rmtfs.c: Exit when fail to get rprocfdAníbal Limón
When -s option is specified rmtfs handled the start of rproc but at init may be the /sys entries are not fully populated yet due to module load/setup so exit with 1 and let systemd restart the service. Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
2020-01-28debian/changelog: Bump to debian/0.0+df6c19d033-3+linaro1debian/0.0+df6c19d033-3+linaro1Aníbal Limón
Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
2020-01-28debian/patches: Add patch to wait 1s before service startsAníbal Limón
Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
2019-08-01debian/changelog: Update to 0.0+df6c19d033-3debian/0.0+df6c19d033-3Aníbal Limón
Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
2019-08-01Merge remote-tracking branch 'upstream/master'Aníbal Limón
2019-07-28storage: Track opened files without backing storageBjorn Andersson
Upon populating the shadow_buf the no fd is associated with the rmtfd. Therefor the next open request will conclude that the rmtfd is available and use the same entry. Fix this by checking for both associated fd and shadow_buf in the open call. Fixes: c35633ab2312 ("storage: Allow read only backing storage") Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2019-07-25rmtfs.service: Add systemd serviceBjorn Andersson
Add rmtfs.service and install this. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2019-07-19rmtfs: Sync rmtfs server with rproc instanceSibi Sankar
Add sigterm/sigint handlers to enable graceful rmtfs server bringdown on first instance of SIGINT/SIGTERM. Start/Stop the remoteproc instance on RMTFS service up and SIGINT/SIGTERM respectively. Force quit on second instance of SIGINT/SIGTERM. Signed-off-by: Sibi Sankar <sibis@codeaurora.org> [bjorn: Pipe for event loop signaling, reworked /sys traversal] Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2019-07-17storage: Support operating on raw partitionsBjorn Andersson
Most devices has partitions named modemst1, modemst2, fsg and fsc backing the rmtfs. Add a new argument '-P' to get the storage implementation to use these partitions directly instead of files. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2019-07-17storage: Allow read only backing storageBjorn Andersson
Add a new argument '-r' to prevent writes back to the backing storage. This is useful for experimenting with the remote storage, without having the files overwritten. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2019-07-17storage: Revise APIBjorn Andersson
Pass "struct rmtfd" instead of file descriptors in the interface. This cleans up the api a little bit, but more importantly allow us to associate additional things with the remote file descriptors. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2019-07-17storage: Rename caller to "remote fd"Bjorn Andersson
The caller (and caller_id) are really "remote file descriptors", so rename them based on this. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2019-07-17rmtfs: Use pread/pwrite for storageBjorn Andersson
Instead of relying on an initial lseek, use pread/pwrite. This creates a cleaner interface towards the storage.c implementation, allowing us to provide a memory-only implementation of the backing storage. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2018-12-19storage: Allow specifying the storage directoryEvan Green
Enable the specification of storage paths other than /boot, using a new -o command line argument. Getoptify the command line arguments for better processing.
2018-12-19rmtfs: Better support for EFS backed by filesEvan Green
Currently, in order to back the EFS storage with a regular file, those files have to be pre-allocated, and with their correct size. This is especially problematic when preparing a minimal FSG, since we do not know ahead of time what size to pre-allocate. Allow reads that go beyond the end of the backing storage to simply read zeroes. When a write comes in, the file will be automatically expanded to the correct size. (And should really only be written if a full sector was pulled out of the modem). For solutions that use partitions instead of files, this change should be a no-op.
2018-09-11debian: update changelogdebian/0.0+2g0d3c49ec-1Nicolas Dechesne
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
2018-09-11Merge remote-tracking branch 'upstream/master'Nicolas Dechesne
2018-07-26rmtfs: remove unused cpu_to_le32 and le32_to_cpu functionsupstream/0.0+2g0d3c49ecBen Chan
This patch addresses the following compiler warnings on unused function: rmtfs.c:24:22: warning: unused function 'cpu_to_le32' [-Wunused-function] static inline __le32 cpu_to_le32(uint32_t x) { return htole32(x); } ^ rmtfs.c:25:24: warning: unused function 'le32_to_cpu' [-Wunused-function] static inline uint32_t le32_to_cpu(__le32 x) { return le32toh(x); } ^
2018-07-05rmtfs: fix the type of the phys_address argument of rmtfs_mem_ptr()Ben Chan
The 'phys_address' argument of rmtfs_mem_read() and rmtfs_mem_write() is an 'unsigned long' type value, which is then passed to the 'phys_address' argument of rmtfs_mem_ptr(), which is an 'unsigned int' type value. This patch fixes the mismatch. Signed-off-by: Ben Chan <benchan@chromium.org>
2018-07-05sharedmem: use 'unsigned long long' for memory region parsingBrian Norris
I see warnings like this: sharedmem.c:89:44: warning: incompatible pointer types passing 'uint64_t *' (aka 'unsigned long long *') to parameter of type 'unsigned long *' [-Wincompatible-pointer-types] Since 'unsigned long' might actually be smaller than 'uint64_t', we should really upgrade to 'unsigned long long' parsing. At the same time, the existing error handling was wrong: it should have been looking for ULONG_MAX (per the man page). Convert that to ULLONG_MAX to fix that bug while we're at it. Signed-off-by: Brian Norris <computersforpeace@gmail.com>
2018-07-05Makefile: allow $(CFLAGS), $(LDFLAGS) overrideBrian Norris
The caller might have specified CFLAGS or LDFLAGS. Let's respect those. Signed-off-by: Brian Norris <computersforpeace@gmail.com>
2018-05-21sharedmem: support uio deviceJoey Hewitt
Also a fix to error-reporting for opening the storage.
2018-04-19debian: update changelogdebian/0.0+1g0f800fa-3Nicolas Dechesne
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
2018-04-19debian: enable systemd packagingNicolas Dechesne
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
2018-04-18debian: update changelogdebian/0.0+1g0f800fa-2Nicolas Dechesne
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
2018-04-18debian: control: depends on libudev-devNicolas Dechesne
This is now needed since new upstream release. Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>