I have decided to hack my NS2 and followed that wiki : https://lacie-nas.org/doku.php?id=uboot
I did not build u-boot but downloaded and installed most recent precompiled for NS2 : u-boot-netspace_v2-2020.07-rc5-00057-gfce0bb3e2bd8.kwb (https://downloads.lacie-nas.org/u-boot/)
Everything gone right, u-boot version is now mainline :
- Code: Select all
ns2> version
U-Boot 2020.07-rc5-00057-gfce0bb3e2bd8 (Jul 09 2020 - 11:11:59 +0200) NS v2
arm-buildroot-linux-gnueabi-gcc.br_real (Buildroot 2020.02-00011-g7ea8a52) 8.4.0
GNU ld (GNU Binutils) 2.32
After booting on u-boot mainline, I modified env var bootcmd en diskload to boot from usb and install debian on hdd
Everything gone right, I have ssh access to debian system
Now I'd like u-boot mainline to load uimage and uinitrd without needing I connect to netconsole to modify env var and run bootcmd
From netconsole I tried savenv which says saving env to flash but after reset env var are still the default one
I tried sf probe 0 ; sf protect unlock 0 but it did not help more saving env
- Code: Select all
ns2> sf probe 0
SF: Detected mx25l4005a with page size 256 Bytes, erase size 4 KiB, total 512 KiB
ns2> sf protect unlock 0x00000000 524288
ns2>
From debian I dumped mtd0 and opened it with hex editor
It seems that env var are hard coded in u-boot and I did not found u-boot mainline env somewhere else in flash
(I found old lacie stock u-boot env in flash but it's not what I was looking for)
So I decided to try other u-boot for NS2 which will allow me to save env var in flash or a file, but I can not replace it anymore
I can not use clunc with bubt now because it looks to work only with lacie stock uboot on NS2
I tried updating uboot with tftp :
- Code: Select all
ns2> tftpboot 0x800000 u-boot-netspace_v2.kwb
#################
45.9 KiB/s
done
Bytes transferred = 237980 (3a19c hex)
ns2> sf probe 0
SF: Detected mx25l4005a with page size 256 Bytes, erase size 4 KiB, total 512 KiB
ns2> sf erase 0 0x50000
SF: 327680 bytes @ 0x0 Erased: OK
ns2> sf write 0x800000 0 0x50000
device 0 offset 0x0, size 0x50000
SF: 327680 bytes @ 0x0 Written: OK
ns2> reset
resetting ...
but after reset u-boot version still the same
I tried flashing u-boot with fvdw-sl-console and u-boot for NS2 classic provided with it
fvdw-sl-console uses also clunc and bubt to update u-boot, so apparently not compatible with replacing my u-boot mainline that does not have bubt command
So, my question is : does someone has an idea how I could overwrite my NS2 u-boot mainline ?
Thanks for reading this far ;-)