2018-06-13 11:28:38 +00:00
|
|
|
Update file with .upt extension is actually ISO9660 image. Inside
|
|
|
|
there are:
|
|
|
|
1) uboot.bin - uBoot image
|
|
|
|
2) uimage.bin - linux kernel image packed in legacy uboot format
|
|
|
|
3) system.ubi - UBIFS rootfs image
|
|
|
|
4) update.txt - text file describing update image content
|
|
|
|
5) version.txt - text file describing version of update image
|
|
|
|
|
2018-02-26 12:47:29 +00:00
|
|
|
Steps needed to patch update.upt with rockbox bootloader are explained in
|
2018-06-13 11:28:38 +00:00
|
|
|
below. Process is quite involved and some custom tools are needed.
|
|
|
|
bootloader_install.sh scipt is design to automate the process.
|
|
|
|
|
|
|
|
1) First content of ISO9660 .upt file needs to be unpacked
|
|
|
|
2) system.ubi UBIFS image needs to be unpacked
|
|
|
|
3) Rockbox bootloader is copied to unpacked rootfs
|
|
|
|
4) Recreate UBIFS with altered content
|
|
|
|
5) Update update.txt file with correct CRC of altered system.ubi
|
|
|
|
6) Recreate ISO9660 .upt file
|
2018-02-26 12:47:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
For convenience Dockerfile is provided which prepares custom image based
|
|
|
|
on debian 9 which has all the tools needed to work with Agptek Rocker update
|
|
|
|
images.
|
|
|
|
|
|
|
|
Basically image extends standard debian image by:
|
|
|
|
1) Installing developer packages from stock debian
|
2018-06-13 11:28:38 +00:00
|
|
|
2) Cloning rockbox repository http://gerrit.rockbox.org/p/rockbox
|
2018-02-26 12:47:29 +00:00
|
|
|
3) Building custom cross toolchain
|
|
|
|
4) Cloning and installing tools to work with UBIFS
|
|
|
|
|
|
|
|
You first need to build image with:
|
|
|
|
docker build . -t "agptek-dev"
|
|
|
|
|
|
|
|
Then you can start container and work with update.upt.
|
|
|
|
If you want to generate patched update image in automatic way:
|
|
|
|
docker run --rm -it -v /path/to/dir/with/update.upt:/upt \
|
|
|
|
-e UPT_DIR=/upt agptek-dev bootloader_install.sh
|
|
|
|
|
|
|
|
Patched update.upt with rockbox bootloader and rockbox.zip should end up in
|
|
|
|
specified directory.
|
|
|
|
|
|
|
|
If you want to play around, hack something etc. you can run container in
|
|
|
|
interactive mode:
|
|
|
|
docker run -it -v /path/to/dir/with/update.upt:/upt \
|
|
|
|
-e UPT_DIR=/upt agptek-dev bash
|
|
|
|
|
|
|
|
|
|
|
|
Files in this directory:
|
2018-06-13 11:28:38 +00:00
|
|
|
README - this file
|
|
|
|
|
2018-02-26 12:47:29 +00:00
|
|
|
bootloader_install.sh - shell script documenting process of patching
|
|
|
|
agptek rocker update images
|
|
|
|
|
|
|
|
update_update.py - little helper utility to patch update.txt
|
|
|
|
controll file
|
|
|
|
|
|
|
|
hiby_player.sh - shell script called on player boot which
|
|
|
|
originally started music player application
|
|
|
|
and now it starts bootloader
|
|
|
|
|
|
|
|
Dockerfile - file to build docker image with all needed
|
|
|
|
tools to play with agptek rocker files
|