NS2 classic : can not replace u-boot mainline

NS2 classic : can not replace u-boot mainline

Postby elg22 » Fri Nov 08, 2024 10:44 am

Hello,

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 ;-)
elg22
Donator VIP
Donator VIP
 
Posts: 1
Joined: Thu Nov 07, 2024 2:44 pm

Re: NS2 classic : can not replace u-boot mainline

Postby fvdw » Fri Nov 08, 2024 1:23 pm

It surprises me that mainline has a hard coded environment. Anyhow a possibility could be loading with your mainline uboot another uimage of uboot, that has bubt command, in ram iso a linux kernel and use that to flash uboot. I have done this in the past but don't remember the details. Will check my archive if I can find the info.
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands


Return to Lacie Network Space vs2 and max version

Who is online

Users browsing this forum: No registered users and 7 guests