Jump to content

Updating script.bin


Recommended Posts

Hi All,

 

Can someone tell me how to update the script.bin in sd card and nand.

I am using a custom board, which has different usb pin config. So Im trying enable it in script.bin.

This is what I done so far.

 

 

For SD card

1. I delete  /boot/script.bin

2. Write new config in /boot/script.bin

3. Reboot

 

Then the usb is still not detected, it seems that I did something wrong.

 

 

For nand:

1. I boot via sd card

2. mount /dev/nanda /mnt/nanda

3. rm /mnt/nanda/script.bin

4. cp new_script.bin /mnt/nanda/script.bin

5. umount /mnt/nanda

6. reboot

 

Again, nothing happens.

The usb is still not detected

 

Thanks in advance.

Link to comment
Share on other sites

Yes, you are doing properly but of course you need to have proper pins assigned. Check manuals if exists otherwise trial / error ... Make sure you are powering via power connector with sufficient power supply. Undetected USB port is directly related to poor powering condition.

Link to comment
Share on other sites

It's a bit hard to answer your questions since basically you write just 'I did it right but it doesn't work' (providing no informations for others to follow the steps you did).

 

It seem's you're using the old Allwinner 3.4.x kernel so please have a look at http://linux-sunxi.org/Sunxi-tools#script-extractorto verify if/whether you exchanged anything correctly.

 

I'm assuming you're using Armbian with legacy kernel (do you?) so it should work the way you did but if you rely on different OS images there might script.bin exist somewhere that will never be read by bootloader/kernel (the crappy OS images for Banana Pis from SinoVoip are a good example for this).

Link to comment
Share on other sites

Using FEL mode you can boot what you want and then access NAND from the running system. You need to combine u-boot+SPL+kernel+rootfs and then use sunxi-fel to boot the stuff. Basically it's the same as when you boot from SD card and then access NAND.

 

Again: Given the informations you provide (zero) it's a bit hard to help :)

Link to comment
Share on other sites

Hello tkaiser,

 

For example using a cubieboard2 (with nand image), I enter fel mode as discussed here "http://linux-sunxi.org/FEL". From there I can do some fel commands like

> ./sunxi-fel version

and

> ./sunxi-fel read 0x43000000 0x20000 script.bin

So I am wondering if I can read it directly, maybe there is a way to write it directly using also fel tools.

What do you think?

 

Thanks.

Link to comment
Share on other sites

You need a driver to access NAND: http://linux-sunxi.org/MTD_Driver

 

So booting via FEL or SD card you'll have to boot a kernel and can then access NAND. I don't think it's feasible to access NAND directly through FEL since based on my understanding you can write/read stuff into/from memory only...

 

I still don't get what you really want but in case you try to update many boards in an automated fashion the only way this might work using FEL is to setup something like lima-memtester: https://github.com/ssvb/lima-memtester/releases/tag/20151207-orange-pi-pc-fel-test(combining mainline u-boot with a small rootfs being autoloaded through FEL)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines