u-boot-nwsp2-lite experiments

u-boot-nwsp2-lite experiments

Postby fvdw » Sun Jan 13, 2013 3:00 pm

The nwsp2-lite has a more recent u-boot version then the nwsp2 classic. This newer u-boot version support GPT partition tables (disks > 2TB) but it also appears to have a "back door" feature enabling you to use to change the boot command used. This makes it possible to boot the nwsp2 Lite for instance form usb or using a kernel from another partition then sda6.

The backdoor can be activated by setting an environment variable with name "LaBackdoor". You can give any value you like U-boot only checks if a variable with this name is set. If it is set it won't set the default boot command. This means that you can set it yourself without having u-boot overwriting what you have set. Be aware that if you set only the back door variable that the NAS won't boot because the boot command is not set ! So you must define a boot command as well !! The environment variable name of the the boot command is "bootcmd". Setting this to "run disk_disk" will let it boot as usual form hard disk. To boot from usb a different command is necessary as well as kernel and root files system on an usb disk. I am still testing but it will be published soon.

The nice thing about this is that setting the environmental variable can be done via Linux if you use a kernel that can access the flash memory (fvdw-sl kernels can do this :mrgreen: ). But you can also use "clunc", the u-boot net console. If you use clunc to change and save environmental variables the flash will be set protected. To be able to change the values via Linux you have to unprotect it again . The factory setting seems to be unprotected, but as soon as you write to it via clunc, it will be set to protected. It can be unprotected in clunc easily by using the command "protect off all".

When you changes u-boot environment variables via Linux then the protection is not set. To be able to set them via Linux you will need u-boot environment tools compiled for the specific board and flash. I have a version compiled for the nwsp2 that works on the classic and lite in combination with fvdw-sl 2.6.39.4 kernels version 57 or higher.

This back door also seems to be present on nwsp2 max, 2Big vs2 , 5big vs2, IS vs2 and probably also other ones with a recent u-boot version.
It is present in Lacie u-boot version 1.3.9, so probably all higher version may have it too.
It is not present in lacie u-boot version 1.2.8 used on the nwsp2 classic. But for that device I was able to compile a new version of u-boot version that also has this backdoor and support GPT partition tables to make it possible to use disks bigger then 2.2 TB
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Return to Development

Who is online

Users browsing this forum: No registered users and 8 guests