gerrit | 2 Sep 22:35 2014

hwpatcher: add generic RKW file patching script

commit 21373e9043c1ecb1d961ff8a55da09395d439dc7
Author: Marcin Bukat <marcin.bukat <at> gmail.com>
Date:   Tue Sep 2 22:31:21 2014 +0200

    hwpatcher: add generic RKW file patching script

    This script is handy hacking tool to patch RKW file with
    arbitrary binary and put jump into implanted code.
    It also shows how to use hwstub crc routine.

    Change-Id: I89b5086dc1ddaca3dbc03df26a85472d8a20d51e

diff --git a/utils/hwpatcher/rkwpatch.lua b/utils/hwpatcher/rkwpatch.lua
new file mode 100644
index 0000000..85237b6
--- /dev/null
+++ b/utils/hwpatcher/rkwpatch.lua
 <at>  <at>  -0,0 +1,126  <at>  <at> 
+--[[
+RKW patching tool
+required argument (in order):
+- path to rkw
+- path to stub
+- physical address where to put bin blob
+- physical address where to put jump
+- path to output patched firmware
+]]-- 
+require("lib")
+require("arm")
+
(Continue reading)

gerrit | 2 Sep 22:07 2014

Clean up a bit and get switch statement out of loop in walk_path()

commit 0a66545487cf2457c6f483c288d02fc23ec705bb
Author: Michael Sevakis <jethead71 <at> rockbox.org>
Date:   Tue Sep 2 15:57:18 2014 -0400

    Clean up a bit and get switch statement out of loop in walk_path()

    It's nicer to look at and it obfuscated a bug where it should have
    exited the loop instead of the case (you probably wouldn't observe
    the effect very often).

    Change-Id: I33f3c72c8bb7e11b9d418f66cf84efc3082a37b4

diff --git a/firmware/common/file_internal.c b/firmware/common/file_internal.c
index b66aafd..58cb883 100644
--- a/firmware/common/file_internal.c
+++ b/firmware/common/file_internal.c
 <at>  <at>  -498,51 +498,44  <at>  <at>  walk_path(struct pathwalk *walkp, struct pathwalk_component *compp,
         if (!(compp->attr & ATTR_DIRECTORY))
             return -ENOTDIR;

-        switch (len)
+        if (len >= MAX_NAME)
+            return -ENAMETOOLONG;
+
+        /* check for "." and ".." */
+        if (name[0] == '.')
         {
-        case 1:
-        case 2:
-            /* check for "." and ".." */
(Continue reading)

gerrit | 1 Sep 06:06 2014

Fix a small late creep-in goof in path parsing on native targets

commit 802e0110db79473861b2859a5c1c7cc3764d9e5f
Author: Michael Sevakis <jethead71 <at> rockbox.org>
Date:   Mon Sep 1 00:00:19 2014 -0400

    Fix a small late creep-in goof in path parsing on native targets

    Anything of one dot and one character (e.g. ".a") would get treated as
    "." because I left out a condition when converting to recursionless
    parsing of relative components. Git 'er fixed up.

    Change-Id: Id5603ce0858b419dc08b1d496b4b187a573595f9

diff --git a/firmware/common/file_internal.c b/firmware/common/file_internal.c
index e5b43cd..b66aafd 100644
--- a/firmware/common/file_internal.c
+++ b/firmware/common/file_internal.c
 <at>  <at>  -505,8 +505,12  <at>  <at>  walk_path(struct pathwalk *walkp, struct pathwalk_component *compp,
             /* check for "." and ".." */
             if (name[0] == '.')
             {
-                if (len == 2 && name[1] == '.')
+                if (len == 1)
+                    break; /* is "." */
+
+                if (name[1] == '.')
                 {
+                    /* is ".." */
                     struct pathwalk_component *parentp = compp->nextp;
                     if (!parentp)
                         return WALK_RC_CONT_AT_ROOT;
(Continue reading)

gerrit | 30 Aug 20:06 2014

Remove I/O priority. It is harmful when used with the new file code.

commit 5b08f1a5b99136ef052b6f430b62bc618cd44946
Author: Michael Sevakis <jethead71 <at> rockbox.org>
Date:   Sat Aug 30 11:28:50 2014 -0400

    Remove I/O priority. It is harmful when used with the new file code.

    HAVE_IO_PRIORITY was defined for native targets with dircache.

    It is already effectively disabled for the most part since dircache no
    longer lowers its thread's I/O priority. It existed primarily for the
    aforementioned configuration.

    Change-Id: Ia04935305397ba14df34647c8ea29c2acaea92aa

diff --git a/apps/buffering.c b/apps/buffering.c
index 1826fa1..96ec922 100644
--- a/apps/buffering.c
+++ b/apps/buffering.c
 <at>  <at>  -1572,15 +1572,6  <at>  <at>  size_t buf_get_watermark(void)
     return BUF_WATERMARK;
 }

-#ifdef HAVE_IO_PRIORITY
-void buf_back_off_storage(bool back_off)
-{
-    int priority = back_off ?
-        IO_PRIORITY_BACKGROUND : IO_PRIORITY_IMMEDIATE;
-    thread_set_io_priority(buffering_thread_id, priority);
-}
-#endif
(Continue reading)

gerrit | 30 Aug 07:51 2014

Fix last warning for Warble

commit 5d31d3c3bc0358eeed08e2a5242dc2b065110aad
Author: Michael Sevakis <jethead71 <at> rockbox.org>
Date:   Sat Aug 30 01:47:35 2014 -0400

    Fix last warning for Warble

    Unused result warnings will have to be dealt with separately.

    Change-Id: I00c45e28d4d43a5376745036e650ff8df576c2db

diff --git a/lib/rbcodec/test/file.h b/lib/rbcodec/test/file.h
index b673fa8..ddf9a1d 100644
--- a/lib/rbcodec/test/file.h
+++ b/lib/rbcodec/test/file.h
 <at>  <at>  -2,3 +2,5  <at>  <at> 
 #define MAX_PATH 260
 #include <unistd.h>
 #include <fcntl.h>
+
+off_t filesize(int fd);
_______________________________________________
rockbox-cvs mailing list
rockbox-cvs <at> cool.haxx.se
http://cool.haxx.se/cgi-bin/mailman/listinfo/rockbox-cvs
gerrit | 30 Aug 07:30 2014

Get the last errors I hope!

commit da4938d6eed9c1c29e389e9a1de6a599d365fe09
Author: Michael Sevakis <jethead71 <at> rockbox.org>
Date:   Sat Aug 30 01:08:34 2014 -0400

    Get the last errors I hope!

    Change-Id: Ia285b95480cc9ac6494b745d80892c4b1b912341

diff --git a/firmware/target/hosted/samsungypr/ypr0/system-ypr0.c b/firmware/target/hosted/samsungypr/ypr0/system-ypr0.c
index a21c82b..9cc3070 100644
--- a/firmware/target/hosted/samsungypr/ypr0/system-ypr0.c
+++ b/firmware/target/hosted/samsungypr/ypr0/system-ypr0.c
 <at>  <at>  -94,6 +94,20  <at>  <at>  bool hostfs_present(IF_MD_NONVOID(int drive))
         return true; /* internal: always present */
 }

+#ifdef HAVE_MULTIDRIVE
+int volume_drive(int drive)
+{
+    return drive;
+}
+#endif /* HAVE_MULTIDRIVE */
+
+#ifdef CONFIG_STORAGE_MULTI
+int hostfs_driver_type(int drive)
+{
+    return drive > 0 ? STORAGE_SD_NUM : STORAGE_HOSTFS_NUM;
+}
+#endif /* CONFIG_STORAGE_MULTI */
+
(Continue reading)

gerrit | 30 Aug 05:37 2014

Hopefully fix most of the errors and warnings from the last push

commit f3d60aea34de60c4371c04fa1b8482ca71a64b53
Author: Michael Sevakis <jethead71 <at> rockbox.org>
Date:   Fri Aug 29 23:36:11 2014 -0400

    Hopefully fix most of the errors and warnings from the last push

    Change-Id: I1a466b2d55f120796910039a0296ca324c58e891

diff --git a/bootloader/iaudio_coldfire.c b/bootloader/iaudio_coldfire.c
index 2f31958..953e649 100644
--- a/bootloader/iaudio_coldfire.c
+++ b/bootloader/iaudio_coldfire.c
 <at>  <at>  -40,6 +40,7  <at>  <at> 
 #include "panic.h"
 #include "power.h"
 #include "powermgmt.h"
+#include "file_internal.h"
 #include "file.h"
 #include "version.h"
 #include "loader_strerror.h"
diff --git a/firmware/common/file_internal.c b/firmware/common/file_internal.c
index ebe77f0..e5b43cd 100644
--- a/firmware/common/file_internal.c
+++ b/firmware/common/file_internal.c
 <at>  <at>  -36,7 +36,8  <at>  <at> 

 /* for internal functions' scanning use to save quite a bit of stack space -
    access must be serialized by the writer lock */
-#if defined(CPU_SH) || defined(IAUDIO_M5)
+#if defined(CPU_SH) || defined(IAUDIO_M5) \
(Continue reading)

gerrit | 30 Aug 04:08 2014

Add normal alloca() definition and implement a strdupa and friends

commit 17a007bc60c69d6ea471a96a465e04ba4ac2d00f
Author: Michael Sevakis <jethead71 <at> rockbox.org>
Date:   Tue Aug 26 23:11:34 2014 -0400

    Add normal alloca() definition and implement a strdupa and friends

    Change-Id: I21c9c21fd664fb11bc8496ace4a389f535a030d6

diff --git a/firmware/include/string-extra.h b/firmware/include/string-extra.h
index 6a9e0c7..9ab53d8 100644
--- a/firmware/include/string-extra.h
+++ b/firmware/include/string-extra.h
 <at>  <at>  -34,4 +34,38  <at>  <at> 
 #endif
 #endif

+/* copies a buffer of len bytes and null terminates it */
+static inline char * strmemcpy(char *dst, const char *src, size_t len)
+{
+    /* NOTE: for now, assumes valid parameters! */
+    *(char *)mempcpy(dst, src, len) = '\0';
+    return dst;
+}
+
+/* duplicate and null-terminate a memory block on the stack with alloca() */
+#define strmemdupa(s, l) \
+    ({ const char *___s = (s);          \
+       size_t ___l = (l);               \
+       char *___buf = alloca(___l + 1); \
+       strmemcpy(___buf, ___s, ___l); })
(Continue reading)

gerrit | 30 Aug 03:48 2014

Rewrite filesystem code (WIP)

commit 7d1a47cf13726c95ac46027156cc12dd9da5b855
Author: Michael Sevakis <jethead71 <at> rockbox.org>
Date:   Mon Aug 5 22:02:45 2013 -0400

    Rewrite filesystem code (WIP)
    
    This patch redoes the filesystem code from the FAT driver up to the
    clipboard code in onplay.c.
    
    Not every aspect of this is finished therefore it is still "WIP". I
    don't wish to do too much at once (haha!). What is left to do is get
    dircache back in the sim and find an implementation for the dircache
    indicies in the tagcache and playlist code or do something else that
    has the same benefit. Leaving these out for now does not make anything
    unusable. All the basics are done.
    
    Phone app code should probably get vetted (and app path handling
    just plain rewritten as environment expansions); the SDL app and
    Android run well.
    
    Main things addressed:
    1) Thread safety: There is none right now in the trunk code. Most of
    what currently works is luck when multiple threads are involved or
    multiple descriptors to the same file are open.
    
    2) POSIX compliance: Many of the functions behave nothing like their
    counterparts on a host system. This leads to inconsistent code or very
    different behavior from native to hosted. One huge offender was
    rename(). Going point by point would fill a book.
    
(Continue reading)

gerrit | 28 Aug 16:45 2014

Fix up the bootloaders

commit 95a4c3afcd53a1f8b835dec33de51f9c304de4d9
Author: Michael Sevakis <jethead71 <at> rockbox.org>
Date:   Thu Aug 28 10:26:45 2014 -0400

    Fix up the bootloaders

    They can't access the raw RBVERSION define any longer.

    Change-Id: I698062b36306399945c01de54cdccaa1a1a8434e

diff --git a/bootloader/creativezvm.c b/bootloader/creativezvm.c
index f3a3960..f31f649 100644
--- a/bootloader/creativezvm.c
+++ b/bootloader/creativezvm.c
 <at>  <at>  -68,7 +68,7  <at>  <at>  void main(void)
     lcd_setfont(FONT_SYSFIXED);
     reset_screen();
     printf("Rockbox boot loader");
-    printf("Version " RBVERSION);
+    printf("Version %s", rbversion);

     ret = storage_init();
     if(ret)
diff --git a/bootloader/gigabeat-s.c b/bootloader/gigabeat-s.c
index 50ff12d..3b852db 100644
--- a/bootloader/gigabeat-s.c
+++ b/bootloader/gigabeat-s.c
 <at>  <at>  -354,7 +354,7  <at>  <at>  void main(void)
         verbose = true;

(Continue reading)

gerrit | 28 Aug 15:48 2014

Prevent spurious recompiles on account of changed version.

commit 21e2b595c2797c226699cf19a2a2ad4abf22b210
Author: Michael Sevakis <jethead71 <at> rockbox.org>
Date:   Wed Aug 27 20:47:46 2014 -0400

    Prevent spurious recompiles on account of changed version.

    After a local commit, any file that included version.h would have to
    be recompiled on account of the changed version string. This changes
    version.h in the build directory to rbversion.h and includes the
    preprocessor macro from rbversion.h in firmware/common/version.c so
    that only that one file needs to be recompiled after a local commit
    rather than a whole slew of them.

    Change-Id: I900d97e3a24a0610698283416d97b4fa3a3a2cf6
    Reviewed-on: http://gerrit.rockbox.org/937
    Reviewed-by: Michael Sevakis <jethead71 <at> rockbox.org>
    Tested: Michael Sevakis <jethead71 <at> rockbox.org>

diff --git a/firmware/common/version.c b/firmware/common/version.c
index 762842c..bb856e4 100644
--- a/firmware/common/version.c
+++ b/firmware/common/version.c
 <at>  <at>  -19,5 +19,5  <at>  <at> 
  *
  ****************************************************************************/

-#include "version.h"
+#include "rbversion.h"
 const char rbversion[] = RBVERSION;
diff --git a/firmware/firmware.make b/firmware/firmware.make
(Continue reading)


Gmane