Announcement

Collapse
No announcement yet.

Modifying existing firmware

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Modifying existing firmware

    Hi again,

    Since I didn't manage to build the correct firmware, I've tried modifying the firmware we are using now (7.5.1).

    What I did was to unzip the .bin file, mount root.cramfs, copy the files there to a new r/w folder. Some of the folders in the mounted image, it says are hardlinks to /etc/default, which doesn't get copied, so I've made them manually in the new folder, as symlinks to etc/default. The proc folder wont copy either, so this I've just made as a regular folder. (have tried it as a symlink to etc/default as well). I've made sure all the files are owned by root, so uid/gid = 1. To make sure there are no other missing files (other hardlinks that didn't get copied or /dev files or whatever) I've done a "find .|wc -l" and it says 3059 lines both in the original and my folder.

    After thus I edit some files (just testing, changing some strings in strings.txt), and version number in /etc/squeezeos.version.

    Then I mkcramfs, get the new md5 and update the md5 file, and zip the files to a new custom.baby.bin. Also I've updated custom.baby.version.

    This makes the server send the new firmware to the Radio, where I accept and it downloads nicely. After this however, it hangs on bootup, the display says "Restoring factory settings" or something like that. I've waited a long time, and it doesn't go away..

    Luckily I get the previous fw back, by pressing the REW button on bootup

    Does anyone know why this doesn't work?

    #2
    I got it to work, following this technique:
    (using cpio instead of cp)


    1. Mount the cramfs file system image as a loop device. This will be read-only image. 2. Create a new directory (e.g $HOME/initrd-new) which will be used for modifying the image (RW mode) 3. Go to …

    Comment


      #3
      What are you trying to modify ?
      If it's a matter of small changes it might be easier to apply them with a patch through the third party Patch Installer applet, that way you don't have to re-build a new firmware image whenever Logitech releases a new version.

      If you want to build a custom firmware image, keep in mind that unless I've misunderstood it contains some drivers and other stuff which you aren't allowed to redistribute without permissions from Logitech. This is of course only an issue if you are going to redistribute it, if you just do it for your own personal usage it's not an issue.
      Erland Lindmark (My homepage)
      Developer of many plugins/applets
      Starting with LMS 8.0 I no longer support my plugins/applets (see here for more information )

      Comment


        #4
        so for ip3k and other stuff the FW is open source? you just can't redistribute it if u make any changes to it?

        Comment


          #5
          Originally posted by MrSinatra View Post
          so for ip3k and other stuff the FW is open source? you just can't redistribute it if u make any changes to it?
          IP3K (firmware in old players) is not open source as far as I know.
          SqueezePlay (firmware in new players) is open source.

          You are not allowed to redistribute modified or unmodified versions of any of the firmware or SBS/LMS unless you either:
          1. Remove the parts which only is allowed to be distributed by Logitech directly, it's some drivers, codec, artwork and similar things that has to be removed.
          or
          2. Get permission from Logitech to redistribute it

          The License.txt files contains more details and the following wiki page describes a bit regarding SqueezeOS and the licenses used:

          (It's not updated with the license change to BSD license though, I believe Logitech Public Source is licensed as BSD now)
          Erland Lindmark (My homepage)
          Developer of many plugins/applets
          Starting with LMS 8.0 I no longer support my plugins/applets (see here for more information )

          Comment


            #6
            thx for the info. i thought i recalled some kind of restriction to ip3k... note my comment in this bug, still waiting to hear them answer that riddle:

            Comment


              #7
              Originally posted by MrSinatra View Post
              thx for the info. i thought i recalled some kind of restriction to ip3k... note my comment in this bug, still waiting to hear them answer that riddle:

              http://bugs.slimdevices.com/show_bug.cgi?id=6376
              More like a mistake , this blanket statement can be found in many bugs , I think they did this when ip3 was put in maintenance instead of any active development.

              You can't find the ip3 source anywhere ( squeezplay is all over svn ) and the required toolset is very expensive . If I get it rigth ip3 application is compiled to a binary(ies) that can be executed by this particular ubicom processors ( squeezeplay squeezos fw is a package of different things ) there is nothing human readable at all .

              You can log on to a Touch with SSH and read the actual lua scripts that makes up most of squeezplay
              --------------------------------------------------------------------
              Main hifi: Rasbery PI digi+ MeridianG68J MeridianHD621 MeridianG98DH 2 x MeridianDSP5200 MeridianDSP5200HC 2 xMeridianDSP3100 +Rel Stadium 3 sub.
              Bedroom/Office: Boom
              Loggia: Raspi hifiberry dac + Adams
              Bathroom : Radio (with battery)
              iPad with iPengHD & SqueezePad
              (spares Touch, SB3, reciever ,controller )
              server Intel NUC Esxi VM Linux mint 18 LMS 7.9.2

              http://people.xiph.org/~xiphmont/demo/neil-young.html

              Comment


                #8
                Originally posted by erland View Post
                You are not allowed to redistribute modified or unmodified versions of any of the firmware or SBS/LMS unless you either:
                1. Remove the parts which only is allowed to be distributed by Logitech directly, it's some drivers, codec, artwork and similar things that has to be removed.
                Do you have some pointers to information about what drivers etc? From the wiki page bellow, it looks like it's just some 3rd party applets? If you know someone who has done this, I would love to get in touch with them.

                Originally posted by erland View Post
                The License.txt files contains more details and the following wiki page describes a bit regarding SqueezeOS and the licenses used:

                (It's not updated with the license change to BSD license though, I believe Logitech Public Source is licensed as BSD now)
                Is there a generic License.txt for the firmware itself? I can't find it in neither the repos nor the file itself..

                Thanks
                Magg

                Comment


                  #9
                  Originally posted by Magg View Post
                  Do you have some pointers to information about what drivers etc? From the wiki page bellow, it looks like it's just some 3rd party applets?
                  Regarding drivers I suspect all you have access to probably is fine, but I'm just guessing, you would have to get in contact with someone from Logitech to know for sure. For example, I'm referring to the following post by Andy:


                  I'm not sure about the licensing of artwork on the SqueezeOS image, I suspect it's the same as for Squeezebox Server where all icons and other images are copyrighted by Logitech, but again, you need to check with someone from Logitech to know for sure.

                  Originally posted by Magg View Post
                  If you know someone who has done this, I would love to get in touch with them.
                  I'm not aware of anyone that have done it but if there is anyone I suspect they have just ignored the licensing and do their best to make sure Logitech don't notice that they exist.

                  Originally posted by Magg View Post
                  Is there a generic License.txt for the firmware itself? I can't find it in neither the repos nor the file itself..
                  I don't think so, I think all individual parts define their own license, if you want to get an overview the wiki image is probably the best you can get.

                  I suspect you are going to have to spend some time to investigate all this if you really want to do it the right way and unfortunately I suspect some of the people that actually knows the answers might not work for Logitech anymore.
                  Erland Lindmark (My homepage)
                  Developer of many plugins/applets
                  Starting with LMS 8.0 I no longer support my plugins/applets (see here for more information )

                  Comment


                    #10
                    Other than the artwork, there are some binaries which are probably restricted:
                    /lib/firmware contains 2 binary images for the support chips,
                    there's also a kernel module for the wireless chip which is closed source in /lib/modules

                    Clearly a self build image doesn't contain the closed source libraries for the additional codecs and streaming services. You would probably also want to check the patent license situation on distributing an mp3 decoder (I believe they don't charge free/open source decoders?)

                    Comment

                    Working...
                    X