On Wed, 2016-08-03 at 11:04 -0700, Jianxun Zhang wrote: > This change shows how we can get rid of an error message caused > by board-specific design at runtime, and still keep the rest > in system generic. > > The new added hook removes line(s) in inittab which triggers the > error. > > README of rmc is also updated accordingly. > > [YOCTO #5351] > > Signed-off-by: Jianxun Zhang <[email protected]>
Reviewed-by: Saul Wold <[email protected]> > --- > common/recipes-bsp/rmc/boards/nucgen6/POSTINSTALL.sh | 7 +++++++ > documentation/rmc/README | 15 > ++++++++++++++- > 2 files changed, 21 insertions(+), 1 deletion(-) > create mode 100644 common/recipes- > bsp/rmc/boards/nucgen6/POSTINSTALL.sh > > diff --git a/common/recipes-bsp/rmc/boards/nucgen6/POSTINSTALL.sh > b/common/recipes-bsp/rmc/boards/nucgen6/POSTINSTALL.sh > new file mode 100644 > index 0000000..bec3be4 > --- /dev/null > +++ b/common/recipes-bsp/rmc/boards/nucgen6/POSTINSTALL.sh > @@ -0,0 +1,7 @@ > +# NUC Gen 6 specific retouch after RMC deployment > + > +# The generated inittab from OE build causes error messages: > +# "auth.err getty[615]: tcgetattr: Input/output error" > +# in /var/log/messages because NUC Gen 6 doesn't have any > +# serial tty. We delete line(s) here on target. > +sed -i '/start_getty.\+ttyS.*/d' /tgt_root/etc/inittab > diff --git a/documentation/rmc/README b/documentation/rmc/README > index ba476b0..c392eb2 100644 > --- a/documentation/rmc/README > +++ b/documentation/rmc/README > @@ -70,6 +70,7 @@ following this example, so that RMC recipes can > pick up them correctly in build. > | |- board1.fp fingerprint file must be provided > (NOTE 1) > | |- BOOTENTRY.CONFIG optional config file for boot > entries. (NOTE 2) > | |- INSTALLER.CONFIG optional config file for installer. > (NOTE 3) > + | |- POSTINSTALL.sh optional script hook for installer > (NOTE 4) > | |- board_file_1 A file blob specific to the type of > board > | |- board_file_2 An another file specific to the > type of board > | |- ...more files > @@ -153,6 +154,13 @@ Installer simply ignores any errors in RMC > deployment stage. > The name of this config file is what installer looks up first, so it > must be > INSTALLER.CONFIG. > > +Note 4: > +At the end of RMC deployment during installation, RMC installer > queries a script > +file POSTINSTALL.sh from RMC database file, and execute it when > query is > +successful on the running board. This hook provides developers > almost ultimate > +flexibility to retouch what have been deployed on the target. There > are some > +steps still can override results from this hook for boot entries and > KBOOTPARAM. > + > > > Enable RMC Feature > @@ -236,7 +244,8 @@ This is a combo example with all supported > configuration data for NUC Gen 6 > product. It shows two boot entries in bootloader menu when you boot > image on NUC > Gen 6 product, with "NUC Gen6" in entry titles. There shall no any > "console=" in > /proc/cmdline when you boot with either of two "NUC Gen6"entries. We > designed it > -this way because there is no accessible tty port on NUC Gen 6 with > housing. > +this way because there is no accessible tty port on NUC Gen 6 with > housing. The > +post-install hook is also provided in this example. > > This example also includes a global kernel cmdline fragment > KBOOTPARAM. Content > of KBOOTPARAM shall be at the end of /proc/cmdline no matter which > boot entry > @@ -256,6 +265,10 @@ A directory /etc/mylib/ is created and a file > "mylib.conf" is there. The content > of that file shall be what we put in mylib.conf in > common/recipes-bsp/rmc/boards/nucgen6 > > +POSTINSTALL.sh shows how we get rid of an error message caused by no > serial > +console available on NUC Gen 6, without creating another static > board > +configuration. > + > EXAMPLE 4: For validation only > T100 (32bit): > common/recipes-bsp/rmc/boards/T100-32bit > -- > 2.7.4 > -- _______________________________________________ meta-intel mailing list [email protected] https://lists.yoctoproject.org/listinfo/meta-intel
