[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debian on Synology Armada 370/XP NAS boxes



On 15/05/14 12:47, Ian Campbell wrote:
On Wed, 2014-05-14 at 19:16 +0200, Alexander Pohl wrote:
Ideally, one would have to supply an u-boot version which has the Grub
API enabled and then to chain load Grub from there,
Ideally perhaps but in reality there are various issues with running
grub on u-boot (the u-boot API is pretty broken, grub is not relocatable
etc), I at least have given up on that path.

  which in turns loads Debian initramfs and kernel images. This way
keeping the system up to date with newer kernels would be easy as this
is all handled by Grub.
The current tool we have for doing this is "flash-kernel". Adding
support should just be a case of figuring out the correct stanza for the
machine. It supports various modes, including copying kernel+flash to
dedicated flash partitions (either raw or with a filesystem), writing a
boot.scr, appending a device-tree as necessary etc. It should be
possible to integrate with the factory u-boot.

Even if you are keen to go the grub route I would suggest getting things
working via flash-kernel first to enable these systems to be used, and
then treat the grub thing as a future thing.

u-boot folks seem to be standardising on parsing the extlinux/syslinux
config file format for this stuff, I might take a look at whether the
extlinux-update script can be made available on ARM at some point (it's
currently in an x86 only package).

The problem for development and testing I see is that the u-boot image
supplied by Synology does not have the Grub API enabled, so one has to
flash a new version of u-boot first, which is targeted for the
specific platform. The bootrom of the DS213j does not support the uart
boot method implemented in kwboot, so if the update of the u-boot
image fails one is left with a bricked unit. One could try to program
the SPI flash in-circuit, but this might not work.
With the flash-kernel method there should be no need to reflash grub,
unless the factory one is horribly broken somehow.


I think that is the case here (factory image is horribly broken) as I am not able to get the kernel to boot (see my other post).

The flash is only 64 Mbit. Is that too small to fit a Debian kernel and initrd? That is also the reason why I like the idea of chain loading another boot loader such as grub, which is for sure small enough to fit into the flash. Kernel and initrd images can then be loaded from hard disk. I know the real u-boot can load images from ext2 partitions as well, but that would require the saveenv command to work to be able to store the alterations to the boot command line permanently, which is not enabled on factory u-boot.

Could you please elaborate on the reasons why Synology boxes are not
yet supported by the Debian installer images and where the problems
are to implement support in the future.
AFAIK there are none. These things happen when interested people send
patches.

Ian.



--
Dr. Alexander Pohl
Enzstrasse 12b
76344 Eggenstein-Leopolshafen
Telefon: 07247 9690526
Mobil: 0176 34724208


Reply to: