Android Tablets Forum banner
1 - 16 of 16 Posts

·
Registered
Joined
·
7 Posts
Discussion Starter · #1 ·
Hey guys,I'm still waiting on my Eken but I tested my u-boot first stage upgrade script changes with MP4Doggie (THANKS!) and it's working!This makes it impossible (mostly, or atleast significantly less possible) to brick your eken with a rom update. If you lose power mid update, or have a bad SD card, or something weird happens - your eken can be recovered as soon as you get a fixed ROM or a new SD card and run again.This does not modify the running, internal boot loader in any way, just removes it from the upgrade process.I removed the u-boot, w-load and kernel nand writes from scriptcmd and created a proper u-boot header using mkimage.Unless you change the kernel this will work for all roms. Once we have a new kernel I can publish a new file to write that - but we should leave u-boot and w-load alone unless there is a reason to update! This DOES load the kernel off the SD card as it boots the linux micro distribution it uses to update the android filesystem, so it needs to be present, but you can remove uboot, wload, logo from your upgrade package if you like.Do NOT edit this file yourself without making a new header, it will break the header in most cases and wont run. You can download the new scriptcmd from here:http://slatedroid.humped.us/eken_m001/scripts/scriptcmdI'll release a new update.sh and init scripts as part of a ROM tomorrow one way or another - I'd like to be able to test, but grrr, UPS is being slow with my Eken and aPad.Any questions let me know.
 

·
Registered
Joined
·
784 Posts
I'm interested in how you made this. You see, i need to dump the M003 for one of the co-forumusers.It appears to me there's no erase commands in this one, so i could safely put this into /script on sd, right ?(And then proceed to dump the files from MTD into SD instead of write them from SD to MTD hehehe)
 

·
Registered
Joined
·
107 Posts
[quote author=f00kie link=topic=287.msg2440#msg2440 date=1274925382]Do NOT edit this file yourself without making a new header, it will break the header in most cases and wont run. You can download the new scriptcmd from here:http://slatedroid.humped.us/eken_m001/scripts/scriptcmd[/quote]Hi f00kie, you could manage editing "scriptcmd"?! Could you share the info of how you did it because I'm having trouble editing it for CE version of "scriptcmd".http://slatedroid.com/index.php?topic=25.msg2640#msg2640All I want is to edit one parameter from "0" to "1" but no matter what I use for editing (NotePad, binary editor, etc), it still fails to load installer. You'd mentioned "without making a new header", means there is somewhere else other than "scriptcmd" must be modified?Thanks in advance!!
 

·
Registered
Joined
·
164 Posts
[quote author=Taka link=topic=287.msg2654#msg2654 date=1275004235][quote author=f00kie link=topic=287.msg2440#msg2440 date=1274925382]Do NOT edit this file yourself without making a new header, it will break the header in most cases and wont run. You can download the new scriptcmd from here:http://slatedroid.humped.us/eken_m001/scripts/scriptcmd[/quote]Hi f00kie, you could manage editing "scriptcmd"?! Could you share the info of how you did it because I'm having trouble editing it for CE version of "scriptcmd".http://slatedroid.com/index.php?topic=25.msg2640#msg2640All I want is to edit one parameter from "0" to "1" but no matter what I use for editing (NotePad, binary editor, etc), it still fails to load installer. You'd mentioned "without making a new header", means there is somewhere else other than "scriptcmd" must be modified?Thanks in advance!![/quote]You use mkimage in linux, you can't just edit the script, if you send me a Txt file of your script I can change it too scriptcmd
 

·
Registered
Joined
·
7 Posts
Discussion Starter · #5 ·
Hey guys,This should answer both of your questions, let me know if you have any others or need any files generated to save you the hassle. U-boot is pretty cool and quite flexible just be super careful with it because if you overwrite the boot loader and break it... you're SOL most likely.1) If all you want to do is modify an existing file you can copy the files text contents (Minus the garbage at the top which is the "image header" that mkimage adds).2) You need to use a tool that comes with u-boot called mkimage to add a u-boot header to the script. You can apt-get install uboot-mkimage in ubuntu or grab it from the u-boot website. Once installed for linux scripts you just run:mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "any comment you want" -d ./textfile ./scriptcmdI am not sure how to generate the header for a wince file - likely the same - heres the output of mkimage:Invalid OS Type - valid names are: 4_4bsd, artos, dell, esix, freebsd, irix, linux, lynxos, ncr, netbsd, openbsd, psos, qnx, rtems, sco, solaris, svr4, u-boot, vxworksUsage: mkimage -l image -l ==> list image header information mkimage [-x] -A arch -O os -T type -C comp -a addr -e ep -n name -d data_file[:data_file...] image -A ==> set architecture to 'arch' -O ==> set operating system to 'os' -T ==> set image type to 'type' -C ==> set compression type 'comp' -a ==> set load address to 'addr' (hex) -e ==> set entry point to 'ep' (hex) -n ==> set image name to 'name' -d ==> use image data from 'datafile' -x ==> set XIP (execute in place)Let me know if you have any questions. And like I said, careful with u-boot if you don't know the addresses you're writing to ;)
 

·
Registered
Joined
·
107 Posts
Thanks Willo! I send a few email attaching "scriptcmd", .txt, .txt (compressed) in case your provider or mailer does not accept some of the format.And f00kie, thanks for the detailed instruction. I don't have Linux environment but now I got an idea why this scriptcmd editing was not working!!
 

·
Registered
Joined
·
784 Posts
This scriptcmd is not 100% fool proof. If run on M003 it will set the ENV variables for the wrong screen/framebuffer.
Code:
setenv lcdparam 1,30000,8,800,480,48,40,40,3,29,13setenv LCDC_FB 7900000setenv pwmparam 0,4,599,449
I would remove those, as they are already set. I think what eken is releasing, is complete flash code they use to program blank units with no env set at all.
 

·
Registered
Joined
·
7 Posts
Discussion Starter · #8 ·
[quote author=Asure link=topic=287.msg2868#msg2868 date=1275067896]This scriptcmd is not 100% fool proof. If run on M003 it will set the ENV variables for the wrong screen/framebuffer.
Code:
setenv lcdparam 1,30000,8,800,480,48,40,40,3,29,13setenv LCDC_FB 7900000setenv pwmparam 0,4,599,449
I would remove those, as they are already set. I think what eken is releasing, is complete flash code they use to program blank units with no env set at all.[/quote]True enough - i only removed the nand erase and bootloader flashing because it was dangerous. I will toss up a new version if anyone needs but all the roms are including their own now.My eken arrived on thursday and it was DOA. Waiting on a replacement until I can test anything else.
 

·
Registered
Joined
·
12 Posts
For anyone who is interested, here is mkimage for Windows: http://ubuntuforums.org/showpost.php?p=8629000&postcount=105Prerequisites:- A texteditor that retains the LF-only lineendings (i.e. VIM)- A scriptcmd file of your choice, rename it to i.e. "script.txt"- Open it with your editor and erase the binary header upto (but not including ;)) the first script line- most commonly some "setenv" command.Usage:- edit script.txt to your needs- issue a mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "Script Created by Win32" -d script.txt scriptcmdbtw. you can edit the comment "Script Created ..." as you like2nd btw: the mentioned forum itself is interesting too...
 

·
Registered
Joined
·
252 Posts
Hi there,why is this thread dead ? It sounds pretty interesting, flashing new ROMs without being afraid to brick the device. All custom ROMS I used still flashed the u-boot section, I'd like to get rid of that. F00kie, can you please update the link for the modified scriptcmd ? Thanks in advance,greetz, PADMAN
 

·
Registered
Joined
·
291 Posts
The biggest issue with that is current firmwares use a different set of flashing scripts/applications and we don't know for sure if there are any critical changes that we cannot see.
 

·
Registered
Joined
·
1 Posts
[quote author=f00kie link=topic=286.msg2627#msg2627 date=1275005056]
Hey guys,

This should answer both of your questions, let me know if you have any others or need any files generated to save you the hassle. U-boot is pretty cool and quite flexible just be super careful with it because if you overwrite the boot loader and break it... you're SOL most likely.

1) If all you want to do is modify an existing file you can copy the files text contents (Minus the garbage at the top which is the "image header" that mkimage adds).

2) You need to use a tool that comes with u-boot called mkimage to add a u-boot header to the script. You can apt-get install uboot-mkimage in ubuntu or grab it from the u-boot website. Once installed for linux scripts you just run:

mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "any comment you want" -d ./textfile ./scriptcmd

I am not sure how to generate the header for a wince file - likely the same - heres the output of mkimage:

Invalid OS Type - valid names are: 4_4bsd, artos, dell, esix, freebsd, irix, linux, lynxos, ncr, netbsd, openbsd, psos, qnx, rtems, sco, solaris, svr4, u-boot, vxworks
Usage: mkimage -l image
-l ==> list image header information
mkimage [-x] -A arch -O os -T type -C comp -a addr -e ep -n name -d data_file[:data_file...] image
-A ==> set architecture to 'arch'
-O ==> set operating system to 'os'
-T ==> set image type to 'type'
-C ==> set compression type 'comp'
-a ==> set load address to 'addr' (hex)
-e ==> set entry point to 'ep' (hex)
-n ==> set image name to 'name'
-d ==> use image data from 'datafile'
-x ==> set XIP (execute in place)

Let me know if you have any questions. And like I said, careful with u-boot if you don't know the addresses you're writing to ;)
[/quote]

Woow, thank you mate!
I've flashed my u-boot and w-load with moding the script, awsome now it works(flytouch WMT2.00_105)
 
1 - 16 of 16 Posts
Top