Quote:
Originally Posted by NiLuJe
@DNSB: Well, that's not terribly efficient, but, oh, well.  .
In any case, that's definitely not the step I'm concerned with (which is partly why it completely skipped my mind ^^), but thanks for the details  .
AFAIK, nickel itself never deals with the KoboRoot (by which I mean unpacking it), that's left entirely to the init script, so I'm mightily confused by you two final sentences.
The naively sane approach to the zip unpack failing would be to clean up and forget about it (or retry a fresh and/or delta download), not continue to attempt an update from half-broken assets?
|
I'm not sure what is confusing you with my last two sentences. There is unzipping the firmware .zip file and there are the further actions of unpacking (untgzing? untarring?) the contents of the KoboRoot.tgz file into the root file system. If the zip unpack fails to verify, as mentioned, the upgrade does not attempt to continue. If the zip unpack succeeds, once the presence of the RootKobo.tgz file is noticed, the Kobo reboots and the rcS script continues the upgrade.
Looking at the rcS, upgrade-wifi.sh and upgrade-generic.sh, it would appear that if /mnt/onboard/.kobo/KoboRoot.tgz exists, the first step is to set the boot to the recovery partition.
Code:
dd if=$UBOOT_RECOVERY of=/dev/mmcblk0 bs=128k count=1 seek=6
At this point, KoboRoot.tgz is verified and if good, unpacked into /. After the unpack, if the upgrade directory is present in /mnt/onboard/.kobo, upgrade-wifi.sh is executed. If all goes well, the boot is set back to the standard boot partition and reboot happens.
A few oddities. If a Kobo.tgz file is found, it seems to be treated the same as KoboRoot.tgz but is unpacked into /usr/local/Kobo. No check for the upgrade directory is made and the two upgrade-*.sh scripts are not run and no reboot is done.
I will admit I haven't played much with Kobo's startup scripts since I stopped trying to use advboot for playing with KOReader 5 or 6 years ago.