Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Updating script.bin

Featured Replies

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.

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).

  • Author

Hi Igor & tkaiser,

 

Thanks for you input.

I'm just wondering if there is a way to update directly the script.bin from nand using fel mode?

 

Do you have any idea?

 

Thanks.

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 :)

  • Author

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.

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)

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.