Translations of this page:
  • English
  • Русский

Cross building and installation RockBox

Installation is carried out from the source. I wanted to be able to fix the code if necessary.

Target device, for example - Sansa Clip Zip. Host operating system - FreeBSD

If you no have experience in compiling software from sources, then maybe you better use the prebuilded RockBox.

Building cross-tools

We need the cross-compiler, cross-assembler and cross-linker for microcontroller ARMv5 architecture, or rather for ARM926-EJ. 1), which will operate in the Rockbox Sansa ClipZip.

Expand this ports and compile in a sequence of libgmp, libmprf, binutils, gcc.

# cd ~
# tar xzpf libgmp.tar.gz
# cd libgmp
# make
# make install
...

Get sources of RockBox

Required utils git.

# mkdir ~/rockbox-src
# cd ~/rockbox-src

# git clone git://git.rockbox.org/rockbox.git
Cloning into 'rockbox'...
remote: Counting objects: 233174, done.
remote: Compressing objects: 100% (55335/55335), done.
remote: Total 233174 (delta 184951), reused 224731 (delta 176614)
Receiving objects: 100% (233174/233174), 121.43 MiB | 73 KiB/s, done.
Resolving deltas: 100% (184951/184951), done.

Prepare RockBox for build

In perl-scripts interpreter wrote as '#/usr/bin/perl' rather create link to real perl interpreter

# ln -s /usr/local/bin/perl /usr/bin/perl

Another variant, edit perl-scripts

# cd ~/rockbox-src/rockbox
# grep -rl . '^#!/usr/bin/perl' | xargs sed -I".orig" -e 's,/usr/bin/perl,/usr/local/bin/perl,'

Build RockBox

For create required perl, gmake, zip.

# cd ~/rockbox-src/rockbox
# mkdir build-clipzip
# cd build-clipzip
# ../tools/configure --target=65 --type=n

# gmake
# gmake fullzip
# ls -l *.zip
-rw-r--r--  1 root  wheel  6579099 27 Apr 23:47 rockbox-full.zip

The rockbox-full.zip is distributive RockBox.

Make RockBox bootloader

# cd rockbox-src/rockbox
# mkdir build-clipzip-bootloader
# cd build-clipzip-bootloader
# ../tools/configure --target=65 --type=b

 
# gmake
# ls -l *.sansa
-rw-r--r--  1 root  wheel  74828 25 Apr 12:59 bootloader-clipzip.sansa

# cd ../rbutil/mkamsboot
# sed -I.orig -e '/^APPVERSION /s,APPVERSION .*,APPVERSION = 007,' ../libtools.make
# gmake 
# ls -l mkamsboot
-rwxr-xr-x  1 root  wheel  33450 28 Apr 13:12 mkamsboot

Install RockBox bootloader

New loader for RockBox fits into the original firware from SanDick. After this patched firmware overwrites the old ClipZip in the device itself.

Need utility unzip.

# cd  ~/rockbox-src/rockbox/build-clipzip-bootloader
# ftp http://mp3support.sandisk.com/firmware/clipzip/clipzip01.01.20.zip

# unzip clipzip01.01.20.zip
Archive:  clipzip01.01.20.zip
 extracting: clpza.bin

# ../rbutil/mkamsboot/mkamsboot clpza.bin bootloader-clipzip.sansa clpza-new.bin

mkamsboot Version 007
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[INFO] Original firmware MD5 checksum match
[INFO] Model: Sansa ClipZip v1 - Firmware version: 1.01.20
[INFO] Firmware patching has begun !

[INFO] Original firmware size:      168432 bytes
[INFO] Packed OF size:               88908 bytes
[INFO] Bootloader size:              74820 bytes
[INFO] Packed bootloader size:       40258 bytes
[INFO] Dual-boot function size:        232 bytes
[INFO] UCL unpack function size:       168 bytes
[INFO] Original firmware version:      512 bytes
[INFO] Total size of new image:     130078 bytes

[INFO] Patching succeeded!

# ls -l clpza-new.bin
-rw-r--r--  1 root  wheel  15728640 25 Apr 13:01 clpza-new.bin

Rockbox install into Sansa ClipZip

On and link ClipZip with computer.

  • Mount ClipZip filesystem
# mkdir -p /mnt/clipzip
# mount_msdosfs -l /dev/da0 /mnt/clipzip
  • Copy of pathed firmware and rockbox distributive to ClipZip filesystem
# cp ~/rockbox-src/rockbox/build-clipzip/rockbox-full.zip /mnt/clipzip
# cp ~/rockbox-src/rockbox/build-clipzip-bootloader/clpza-new.bin /mnt/clipzip/clpza.bin
# cd /mnt/clipzip
# unzip rockbox-full.zip
# cd ~
  • Unmount ClipZip filesystem
# umount /mnt/clipzip
  • After unlink ClipZip from computer expect of firmware rewrite and reloading from patched clpza.bin

All. :) Tune RockBox for yorself.

First PagePrevious PageBack to overviewNext PageLast Page

1) It is in AS3536. I could be wrong with the AS3536, but essentially it not does change, in ClipZip core SoC is ARM926-EJ

Discussion

, 19-12-2014

Aw, this was a really nice post. In tuhhgot I would like to put in writing like this moreover – taking time and actual effort to make a very good article… but what can I say… I procrastinate alot and under no circumstances appear to get one thing done.

Enter your comment