Rockbox Technical Forums

Rockbox Development => Starting Development and Compiling => Topic started by: 1rms on September 06, 2018, 08:04:13 AM

Title: Trying to apply a .diff to Rockbox for Sansa Clip+
Post by: 1rms on September 06, 2018, 08:04:13 AM
Hi all, newbie here so please be gentle  ;)

My device is a Sansa Clip+ and I’m trying to apply a patch to Rockbox to allow playback to be paused at power on of the device as per my post at this link: http://forums.rockbox.org/index.php/topic,52450.0.html. Developer Bilgus kindly offered to help, although I like to show willing at least, and I thought I’d have a go and see how far I could get.

I am working in the VirtualBox Ubuntu environment downloaded via the link in the DevelopmentGuide, and have downloaded Rockbox from Git. I’ve read through the "Working with patches" Wiki. From that, I have placed the .diff file in the Rockbox folder, run Terminal in that folder and using the command “patch < patchfile”. Terminal starts to run but stops at “File to patch:" with a blinking cursor. I’ve mainly guessed at doing these steps as some of the tech wording goes over my head, I’m in my 60’s after all. I also tried adding -p0 or -p1 or -p2 etc. without success.

I also compiled Rockbox to a “Build” folder and tried applying the patch within that folder with the same result. At this point my braincell runs away to hide in a dark corner lol.

As mentioned I’m a newbie and have little experience of the command line environment, compiling or development. I’d greatly appreciate the assistance of a wise guru to help this dummy through this please. Ask away for further information if needed and I’ll do my best provide it. Thanks.

Here’s what shows in Terminal:

rock@osboxes:~/rockbox$ patch < 0909354.diff
can't find file to patch at input line 26
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|From 09093543f9bd7e3d18211f7fe842ef5643e7e92b Mon Sep 17 00:00:00 2001
|From: William Wilgus <me.theuser@yahoo.com>
|Date: Wed, 22 Nov 2017 00:06:32 +0100
|Subject: [PATCH] Add option to pause first loaded track on startup
|
|There have been several requests to not auto-resume playback
|on startup this adds the option 'Pause First Loaded Track'
|to mainmenu>Settings>General>Startup/Shutdown
|
|If setting is active then playback is automatically paused on startup
|
|Fixed: Pass playback state through param in order to only pause at startup
|       -- Michael Sevakis' code
|
|As always testing needed.
|
|Requires http://gerrit.rockbox.org/r/#/c/1744/
|
|Change-Id: Id13116f5a1a53dd4a9c66038e381aa3a66a2754c
|---
|
|diff --git a/apps/lang/english.lang b/apps/lang/english.lang
|index d4e0697..6bfeab8 100644
|--- a/apps/lang/english.lang
|+++ b/apps/lang/english.lang
--------------------------
File to patch:
Title: Re: Trying to apply a .diff to Rockbox for Sansa Clip+
Post by: Bilgus on September 06, 2018, 10:04:19 AM
Sorry for the false start after looking at this patch the backend has changed a lot
this patch has been sitting on the vine for a while and needs some major manual rework to get it ready to patch
so I doubt you are going to have a fun time trying to do this but I applaud your efforts

I really don't have time atm to fix this but I'll revisit it in a few weeks if I get the chance
Title: Re: Trying to apply a .diff to Rockbox for Sansa Clip+
Post by: 1rms on September 06, 2018, 10:20:11 AM
Sorry for the false start after looking at this patch the backend has changed a lot
this patch has been sitting on the vine for a while and needs some major manual rework to get it ready to patch
so I doubt you are going to have a fun time trying to do this but I applaud your efforts

I really don't have time atm to fix this but I'll revisit it in a few weeks if I get the chance

Thanks again for your response. I was surprised to find this feature isn't standard for Rockbox.

If you do get to it, please let me know and I'll be more than happy to try again and test it.  ;)