Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader > Kobo Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 09-04-2015, 08:15 AM   #1
lomo74
Junior Member
lomo74 began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Sep 2015
Device: Kobo Glo N613
bug in upgrade-wifi.sh?

Hello all,
I'm very new to the forum and to Kobo hacking.
While looking at /etc/init.d/upgrade-wifi.sh from 3.17.3 release, I discovered a possible bug. Look around lines 23~33:

if [ $CPU ]; then
PCB=`ntx_hwconfig -s -p /dev/mmcblk0 PCB`
RAM=`ntx_hwconfig -s -p /dev/mmcblk0 RAMType`
RAM_SIZE=`ntx_hwconfig -s -p /dev/mmcblk0 RamSize`
RAM_SIZE=`echo $RAM_SIZE | awk '{print $RAM_SIZE-MB}'`
NEW_UBOOT=/mnt/onboard/.kobo/upgrade/$PLATFORM/u-boot_mddr_$RAM_SIZE-$PCB-$RAM.bin
NEW_KERNEL=/mnt/onboard/.kobo/upgrade/$PLATFORM/uImage-$PCB
[ ! -e NEW_UBOOT ] && NEW_UBOOT=/mnt/onboard/.kobo/upgrade/$PLATFORM/u-boot_lpddr2_$RAM_SIZE-$PCB-$RAM.bin
UBOOT=$NEW_UBOOT
KERNEL=$NEW_KERNEL
fi

See the bolded line, shouldn't it read:

[ ! -e $NEW_UBOOT ] && NEW_UBOOT=/mnt/onboard/.kobo/upgrade/$PLATFORM/u-boot_lpddr2_$RAM_SIZE-$PCB-$RAM.bin

Am I wrong? Without the dollar, NEW_UBOOT variable is not expanded, the test fails and the variable NEW_UBOOT is always assigned the value /mnt/onboard/.kobo/upgrade/$PLATFORM/u-boot_lpddr2_$RAM_SIZE-$PCB-$RAM.bin.
As no u-boot_lpddr2* file exists in the package, the bootloader is never updated.
Any thoughts?
Cheers
- Lorenzo -
lomo74 is offline   Reply With Quote
Old 09-04-2015, 11:18 AM   #2
frostschutz
Linux User
frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.
 
frostschutz's Avatar
 
Posts: 2,282
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
It makes sense. Although in case of my H2O it does not make any difference.

In my package there are two files:

u-boot_lpddr2_512-E606G0-LPDDR2.bin
u-boot_mddr_256-E606F0B-K4X2G323PC.bin

But it would look for u-boot_mddr_512-E606G0-LPDDR2.bin (which does not exist) so with and without the change it would end up using u-boot_lpddr2_512-E606G0-LPDDR2.bin instead.

Have you checked whether it actually affects your reader?

It should be reported to Kobo in any case, it looks unintentional. Although I guess if they actually installed the wrong bootloader for a device they would notice? (Presumably it would cause booting problems or similar?)
frostschutz is offline   Reply With Quote
Advert
Old 09-04-2015, 12:05 PM   #3
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,527
Karma: 78910202
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
I'm sure I remember davidfor pointing out some issues with the upgrade scripts in the past and nothing ever changing with them.
PeterT is offline   Reply With Quote
Old 09-04-2015, 09:23 PM   #4
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
The problem I pointed out was with the kernel. The upgrade script generates a file name the includes the PCB. But, the mark4 firmware package doesn't include a kernel that matches the name generated for either the Glo or the N905C Touch. There is a version for the other devices in their packages.

I think I agree with the analysis here, but my shell scripting in rubbish and I need to actually test it before agreeing completely.

As to how much it matters, it really depends on how often the image and uboot are changed. From comparing the upgrades, it doesn't happen that often. But it does happen. And not upgrading these might explain some different behaviour that people see. And, from memory, the version of this in the recovery firmware for the Glo gets the names right. Which means the uboot and kernel are installed for next first update. And that probably explains why a factory reset fixes some of the unusual problems.
davidfor is offline   Reply With Quote
Old 09-08-2015, 04:47 PM   #5
Lucas Malor
Pain in the arse
Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.
 
Lucas Malor's Avatar
 
Posts: 758
Karma: 77856
Join Date: Apr 2013
Device: Kobo Aura One, Kindle 4
Report the bug here:
https://github.com/kobolabs/Kobo-Rea...pen+is%3Aissue
Lucas Malor is offline   Reply With Quote
Advert
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Aura HD WiFi Bug? 93terp Kobo Reader 10 08-17-2017 11:21 AM
Kindle 4 WiFi bug? Blossom Amazon Kindle 33 11-30-2011 12:25 AM
Firmware Update K3 wifi upgrade question jarretttt Amazon Kindle 2 10-21-2011 05:56 AM
Where's the Kobo Wifi Upgrade KrowNB Kobo Reader 103 05-07-2011 05:44 PM
Firmware version 538 upgrade and bug fixes HarryT Bookeen 41 05-13-2008 01:39 PM


All times are GMT -4. The time now is 07:09 PM.


MobileRead.com is a privately owned, operated and funded community.