A20-OLinuXino-MICRO-4GB - is there more to changing script.bin for NAND devices?

Started by kbro, February 09, 2014, 10:26:36 AM

Previous topic - Next topic

kbro

With my A20-OLinuXino-MICRO-4GB Android 4.2.2 I've mounted the /dev/block/nanda bootloader partition, downloaded the script.bin file, run it through bin2fex from sunxi-tools, made a change to script.fex, run it through fex2bin, uploaded the script.bin, run "sync", unmounted the nanda partition and rebooted, and the change has had no effect.

Without going into /what/ the change is, can someone please confirm whether this is the correct method for changing script.bin on an A20 with NAND, as I've read a few posts hinting that the nanda thing only works for SD card boot, and that there's something extra to do for NAND.  Is this true, or am I perpetuating a scurrilous rumour?

complete list of commands...

adb shell mkdir /mnt/bootloader
adb shell mount -t vfat /dev/block/nanda /mnt/bootloader
adb shell ls -l /mnt/bootloader
[ directory listing appears so mount is successful ]
adb pull /mnt/bootloader/script.bin oldscript.bin
bin2fex oldscript.bin oldscript.fex
cp oldscript.fex newscript.fex
vi newscript.fex
[ make changes and save file ]
fex2bin newscript.fex newscript.bin
adb push newscript.bin /mnt/bootloader/script.bin
adb shell sync
adb shell umount /mnt/bootloader
adb shell reboot

dave-at-axon

I see the same issue. No effect.

Strange thing is that if I make the change, power down, remove the power and and then plug in again and re-start it and then mount and read the script.bin file it is the modified version.

It's just very strange that it does not make any difference to the boot.


dave-at-axon

Our only option was to get the source and build a custom OS from it. That way we have complete control.

lavanyasubbu

Thanks for the quick reply.
You mean built your own livesuit image and did it?

BTW I was using MAC and move to a windows to see if that the problem.

Neither of them fixed it for me.

I am using andriod.

Also I had the EXACT same problem wiht the A13 about a year ago. So I am guessing its me

lavanyasubbu

Interestingly, I kept trying many times and I realized that the script.bin in one situation was 0 bytes.

Andorid still booted correctly. And its still using the last verion of script.bin

I am wondering if I am doing the wrong thing. Here are my steps

On Android
mkdir /mnt/hrhk
mount -t vfat /dev/block/nanda /mnt/hrhk

On my mac
./adb pull /mnt/hrhk/script.bin
./bin2fex script.bin script.fex

Edit Fex to test enabling and disabiling UART 6 and UART 7 (by changing the used swtihc)

rm script.bin
./fex2bin script.fex script.bin
./adb push script.bin /mnt/hrhk
./adb shell

Inside android
umount /mnt/hrhk
reboot

AFTER this system doesnt reflet my changes

USing newest android 4.2.2  and Kernel 3.4.39+(download a new one to see if old one was having a problem)

this harware is about 1 year old. Could that be causing a problem? can Uboot (whatever the bootloader is) be old?


Best regards
Ram k

dave-at-axon

Many of us tried similar steps. Something in the Android build has the FEX stored elsewhere and no matter what we did with mount/umount etc, it never took hold. Our only way was to custom build the Android source.

Not a bad idea to be honest as you can then remove or add what you need. I removed all of the Chinese apps from the build and included some custom ones of my own. I was even able to modify the app installer to go ahead and install without the user intervention so that I could update the apps via download (bypassing the Android store) This way my primary application was able to download an update and then start the installer and then reboot the system without any operator input.

Depending on your needs you might want to consider doing a custom build. You can build under a VM if you don't have a real Linux machine. I currently use Ubuntu 12.04 to build my Android system.

lavanyasubbu

Dave
Thanks for taking the time.

I am currently looking for an "easy way out". I tried to unpack the img file to see if I can see the script.bin but didnt find it. However theres a sys_config.fex which seeems to be exactly the same but changing that didnt work.

Building andorid is not difficult? I have a ubuntu 12.04 machine. Last time I did it it took over 4 hours to do it.

Do these summarize the build process?

Download your version @
https://drive.google.com/folderview?id=0BwKBcHR31e97ZWtTV2p3SWhhMmM&usp=sharing

Use procedure are in
https://www.olimex.com/forum/index.php?topic=2475.0


Thanks a bunch for your time

dave-at-axon

Yes, I suggest you download it and then build as it is. Once you can generate an image, you can then customise the build to your LCD and other interfaces etc.

I think I have some info on the blog on how to change to the Olimex LCD. My build will still work on the HDMI but nothing appears until Android boots.

Drop a message here if you have any issues.