[PATCH 3/5] board/Synology: Unify legacy kernel support

Phil Sutter phil at nwl.cc
Thu Mar 4 14:11:50 CET 2021


On Thu, Mar 04, 2021 at 02:03:58PM +0100, Stefan Roese wrote:
> On 03.03.21 01:55, Phil Sutter wrote:
> > Move the relevant bits from ds109.{c,h} into common/ and adjust the code
> > to fit both DS109 and DS414. Moreover:
> > 
> > * Introduce syno_board_id() which translates CONFIG_MACH_TYPE into the
> >    expected board ID tag value.
> > 
> > * Properly initialize isusbhost, mac and mtu fields from env variables.
> > 
> > * Set the right bootargs/bootcmd to correctly boot legacy kernel out of
> >    the (DS414) box. Getting the ramdisk location right is a bit tedious.
> > 
> > Cc: Walter Schweizer <swwa at users.sourceforge.net>
> > Signed-off-by: Phil Sutter <phil at nwl.cc>
> > ---
> >   board/Synology/common/Makefile |  5 +++
> >   board/Synology/common/legacy.c | 75 ++++++++++++++++++++++++++++++++++
> >   board/Synology/common/legacy.h | 33 +++++++++++++++
> >   board/Synology/ds109/ds109.c   | 32 ---------------
> >   board/Synology/ds109/ds109.h   | 17 --------
> >   configs/ds414_defconfig        |  2 +-
> >   include/configs/ds109.h        |  3 +-
> >   include/configs/ds414.h        | 15 ++++++-
> >   8 files changed, 130 insertions(+), 52 deletions(-)
> >   create mode 100644 board/Synology/common/Makefile
> >   create mode 100644 board/Synology/common/legacy.c
> >   create mode 100644 board/Synology/common/legacy.h
> > 
> > diff --git a/board/Synology/common/Makefile b/board/Synology/common/Makefile
> > new file mode 100644
> > index 0000000000000..62354cc2e82e6
> > --- /dev/null
> > +++ b/board/Synology/common/Makefile
> > @@ -0,0 +1,5 @@
> > +# SPDX-License-Identifier: GPL-2.0+
> > +#
> > +# Copyright (C) 2021 Phil Sutter <phil at nwl.cc>
> > +
> > +obj-y	+= legacy.o
> > diff --git a/board/Synology/common/legacy.c b/board/Synology/common/legacy.c
> > new file mode 100644
> > index 0000000000000..678e7b6809168
> > --- /dev/null
> > +++ b/board/Synology/common/legacy.c
> > @@ -0,0 +1,75 @@
> > +// SPDX-License-Identifier: GPL-2.0+
> > +/*
> > + * Copyright (C) 2021
> > + * Walter Schweizer <swwa at users.sourceforge.net>
> > + * Phil Sutter <phil at nwl.cc>
> > + */
> > +
> > +#include <common.h>
> 
> Please don't include "common.h" any more. There is ongoing work to
> depricate this common header.

OK, I'll respin. Thanks for the heads-up!

Phil


More information about the U-Boot mailing list