Message ID | 1460549184-24312-1-git-send-email-clg@fr.ibm.com |
---|---|
State | RFC |
Headers | show |
Cédric Le Goater <clg@fr.ibm.com> writes: > Here is a quick patch to remove support of FSP based systems in > skiboot. The goal is to reduce the size of skiboot which is limited to > 1MB on OpenPOWER systems. > > To activate support, one needs to add CONFIG_FSP=1 to the make command > line. > > Signed-off-by: Cédric Le Goater <clg@fr.ibm.com> This is similar to my initial patch for it: id:1447881172-16680-1-git-send-email-stewart@linux.vnet.ibm.com https://patchwork.ozlabs.org/patch/546209/ However... we do have the possibility of just using xz compressed skiboot instead! The hostboot support for this was merged, although there were going to be some changes made so that it didn't require changes to PNOR layout. Elizabeth - are these changes going in soon?
Stewart, I'm hoping to get to the changes some time this month, but I'm not sure if I have the time at this moment. However, I can try to make this a priority if you think it would be useful for the skiboot team. Best, Elizabeth -- Elizabeth Liner Power Firmware Development - Hostboot IBM Systems & Technology Group - Austin, TX eliner@us.ibm.com 512-286-6493 From: Stewart Smith <stewart@linux.vnet.ibm.com> To: Cédric Le Goater <clg@fr.ibm.com>, skiboot@lists.ozlabs.org, Elizabeth Liner/Austin/IBM@IBMUS Cc: Cédric Le Goater <clg@fr.ibm.com> Date: 05/10/2016 12:27 AM Subject: Re: [RFC PATCH 1/2] config: introduce CONFIG_FSP in Makefiles Cédric Le Goater <clg@fr.ibm.com> writes: > Here is a quick patch to remove support of FSP based systems in > skiboot. The goal is to reduce the size of skiboot which is limited to > 1MB on OpenPOWER systems. > > To activate support, one needs to add CONFIG_FSP=1 to the make command > line. > > Signed-off-by: Cédric Le Goater <clg@fr.ibm.com> This is similar to my initial patch for it: id:1447881172-16680-1-git-send-email-stewart@linux.vnet.ibm.com https://patchwork.ozlabs.org/patch/546209/ However... we do have the possibility of just using xz compressed skiboot instead! The hostboot support for this was merged, although there were going to be some changes made so that it didn't require changes to PNOR layout. Elizabeth - are these changes going in soon? -- Stewart Smith OPAL Architect, IBM.
On 05/10/2016 07:27 AM, Stewart Smith wrote: > Cédric Le Goater <clg@fr.ibm.com> writes: >> Here is a quick patch to remove support of FSP based systems in >> skiboot. The goal is to reduce the size of skiboot which is limited to >> 1MB on OpenPOWER systems. >> >> To activate support, one needs to add CONFIG_FSP=1 to the make command >> line. >> >> Signed-off-by: Cédric Le Goater <clg@fr.ibm.com> > > This is similar to my initial patch for it: > id:1447881172-16680-1-git-send-email-stewart@linux.vnet.ibm.com > https://patchwork.ozlabs.org/patch/546209/ Ah. Sorry I missed that one and from what I read below it might not be useful. Thanks C. > However... we do have the possibility of just using xz compressed > skiboot instead! The hostboot support for this was merged, although > there were going to be some changes made so that it didn't require > changes to PNOR layout. > > Elizabeth - are these changes going in soon? >
Elizabeth Liner <eliner@us.ibm.com> writes: > I'm hoping to get to the changes some time this month, but I'm not sure if > I have the time at this moment. > However, I can try to make this a priority if you think it would be useful > for the skiboot team. It would be useful - even in just a testing capacity, as I'd like to start doing test runs with a GCOV enabled skiboot so that we can get code coverage data out of op-test-framework. However, building with GCOV bloats the binary size to ~1.5MB - which isn't a problem on an FSP machine, but is for OpenPOWER where we only have the 1MB partition. But the xz compression will make this work. Plus, we're getting close to the 1MB size anyway, and I'd prefer to just compress it on flash (as this also speeds up boot time) than start having config options to not build everything into skiboot (as this enables developers/ODMs to get things horribly wrong).
Okay, I will definitely try to get at least a working version done this month then. I'll let you know when I have something up in GitHub. Best, Elizabeth -- Elizabeth Liner Power Firmware Development - Hostboot IBM Systems & Technology Group - Austin, TX eliner@us.ibm.com 512-286-6493 From: Stewart Smith <stewart@linux.vnet.ibm.com> To: Elizabeth Liner/Austin/IBM@IBMUS Cc: Cédric Le Goater <clg@fr.ibm.com>, skiboot@lists.ozlabs.org Date: 05/10/2016 08:55 PM Subject: Re: [RFC PATCH 1/2] config: introduce CONFIG_FSP in Makefiles Elizabeth Liner <eliner@us.ibm.com> writes: > I'm hoping to get to the changes some time this month, but I'm not sure if > I have the time at this moment. > However, I can try to make this a priority if you think it would be useful > for the skiboot team. It would be useful - even in just a testing capacity, as I'd like to start doing test runs with a GCOV enabled skiboot so that we can get code coverage data out of op-test-framework. However, building with GCOV bloats the binary size to ~1.5MB - which isn't a problem on an FSP machine, but is for OpenPOWER where we only have the 1MB partition. But the xz compression will make this work. Plus, we're getting close to the 1MB size anyway, and I'd prefer to just compress it on flash (as this also speeds up boot time) than start having config options to not build everything into skiboot (as this enables developers/ODMs to get things horribly wrong). -- Stewart Smith OPAL Architect, IBM.
Hey Stewart, I was able to work on the XZ changes and recently got it merged and reviewed: Hostboot p8 review: https://ralgit01.raleigh.ibm.com/gerrit1/#/c/24609/ Op-build pull request: https://github.com/open-power/op-build/pull/520 Open-power/pnor pull request: https://github.com/open-power/pnor/pull/48 So now, you should be able to compress and decompress a section without additional pnor changes with op-build/master-next. However we currently are not automatically processing if a section is compressed or not, so if you need hostboot to decompress the image, I'll have to add in some additional functionality. The skiboot image will be processed though. Let me know if you have any trouble with the compression/decompression or if you want to add in another section. Also, here's the compression command that works with the xz decompressor: xz --check=crc32 $image Best, Elizabeth -- Elizabeth Liner Power Firmware Development - Hostboot IBM Systems & Technology Group - Austin, TX eliner@us.ibm.com 512-286-6493 From: Stewart Smith <stewart@linux.vnet.ibm.com> To: Elizabeth Liner/Austin/IBM@IBMUS Cc: Cédric Le Goater <clg@fr.ibm.com>, skiboot@lists.ozlabs.org Date: 05/10/2016 08:55 PM Subject: Re: [RFC PATCH 1/2] config: introduce CONFIG_FSP in Makefiles Elizabeth Liner <eliner@us.ibm.com> writes: > I'm hoping to get to the changes some time this month, but I'm not sure if > I have the time at this moment. > However, I can try to make this a priority if you think it would be useful > for the skiboot team. It would be useful - even in just a testing capacity, as I'd like to start doing test runs with a GCOV enabled skiboot so that we can get code coverage data out of op-test-framework. However, building with GCOV bloats the binary size to ~1.5MB - which isn't a problem on an FSP machine, but is for OpenPOWER where we only have the 1MB partition. But the xz compression will make this work. Plus, we're getting close to the 1MB size anyway, and I'd prefer to just compress it on flash (as this also speeds up boot time) than start having config options to not build everything into skiboot (as this enables developers/ODMs to get things horribly wrong). -- Stewart Smith OPAL Architect, IBM.
On Tue, Jul 12, 2016 at 09:19:21AM -0500, Elizabeth Liner wrote: > > Hey Stewart, > > I was able to work on the XZ changes and recently got it merged and > reviewed: > Hostboot p8 review: > https://ralgit01.raleigh.ibm.com/gerrit1/#/c/24609/ > Op-build pull request: > https://github.com/open-power/op-build/pull/520 > Open-power/pnor pull request: > https://github.com/open-power/pnor/pull/48 > > So now, you should be able to compress and decompress a section without > additional pnor changes with op-build/master-next. However we currently > are not automatically processing if a section is compressed or not, so if > you need hostboot to decompress the image, I'll have to add in some > additional functionality. The skiboot image will be processed though. Let > me know if you have any trouble with the compression/decompression or if > you want to add in another section. Since we no longer need PNOR flags to enable this, I wonder if we should enable this by default for the skiboot partition. Any opinions on this? > > Also, here's the compression command that works with the xz decompressor: > xz --check=crc32 $image > > Best, > Elizabeth > -- > Elizabeth Liner > Power Firmware Development - Hostboot > IBM Systems & Technology Group - Austin, TX > eliner@us.ibm.com > 512-286-6493 > > > > > From: Stewart Smith <stewart@linux.vnet.ibm.com> > To: Elizabeth Liner/Austin/IBM@IBMUS > Cc: Cédric Le Goater <clg@fr.ibm.com>, skiboot@lists.ozlabs.org > Date: 05/10/2016 08:55 PM > Subject: Re: [RFC PATCH 1/2] config: introduce CONFIG_FSP in Makefiles > > > > Elizabeth Liner <eliner@us.ibm.com> writes: > > I'm hoping to get to the changes some time this month, but I'm not sure > if > > I have the time at this moment. > > However, I can try to make this a priority if you think it would be > useful > > for the skiboot team. > > It would be useful - even in just a testing capacity, as I'd like to > start doing test runs with a GCOV enabled skiboot so that we can get > code coverage data out of op-test-framework. However, building with GCOV > bloats the binary size to ~1.5MB - which isn't a problem on an FSP > machine, but is for OpenPOWER where we only have the 1MB partition. But > the xz compression will make this work. > > Plus, we're getting close to the 1MB size anyway, and I'd prefer to just > compress it on flash (as this also speeds up boot time) than start > having config options to not build everything into skiboot (as this > enables developers/ODMs to get things horribly wrong). > > -- > Stewart Smith > OPAL Architect, IBM. > > > _______________________________________________ > Skiboot mailing list > Skiboot@lists.ozlabs.org > https://lists.ozlabs.org/listinfo/skiboot
Patrick Williams <patrick@stwcx.xyz> writes: > On Tue, Jul 12, 2016 at 09:19:21AM -0500, Elizabeth Liner wrote: >> >> Hey Stewart, >> >> I was able to work on the XZ changes and recently got it merged and >> reviewed: >> Hostboot p8 review: >> https://ralgit01.raleigh.ibm.com/gerrit1/#/c/24609/ >> Op-build pull request: >> https://github.com/open-power/op-build/pull/520 >> Open-power/pnor pull request: >> https://github.com/open-power/pnor/pull/48 >> >> So now, you should be able to compress and decompress a section without >> additional pnor changes with op-build/master-next. However we currently >> are not automatically processing if a section is compressed or not, so if >> you need hostboot to decompress the image, I'll have to add in some >> additional functionality. The skiboot image will be processed though. Let >> me know if you have any trouble with the compression/decompression or if >> you want to add in another section. > > Since we no longer need PNOR flags to enable this, I wonder if we should > enable this by default for the skiboot partition. Any opinions on > this? I think we should. It ever so slightly speeds up boot plus it'll mean we'll detect corruption in the skiboot partition. Current skiboot master builds a skiboot.lid.xz alongside skiboot.lid - and I can backport that if it makes it easier.
Elizabeth Liner <eliner@us.ibm.com> writes: > Hey Stewart, > > I was able to work on the XZ changes and recently got it merged and > reviewed: > Hostboot p8 review: > https://ralgit01.raleigh.ibm.com/gerrit1/#/c/24609/ > Op-build pull request: > https://github.com/open-power/op-build/pull/520 > Open-power/pnor pull request: > https://github.com/open-power/pnor/pull/48 Yep, I've been playing with it over the past week or so :)
On Wed, Jul 13, 2016 at 08:01:42AM +1000, Stewart Smith wrote: > Patrick Williams <patrick@stwcx.xyz> writes: > > > > Since we no longer need PNOR flags to enable this, I wonder if we should > > enable this by default for the skiboot partition. Any opinions on > > this? > > I think we should. It ever so slightly speeds up boot plus it'll mean > we'll detect corruption in the skiboot partition. > > Current skiboot master builds a skiboot.lid.xz alongside skiboot.lid - > and I can backport that if it makes it easier. Backport not required. The PNOR recipe already does the compression if BR2_TARGET_SKIBOOT_XZ is set. We just need someone to make a pull request with that set on all the supported machines. https://github.com/open-power/op-build/blob/master/openpower/package/openpower-pnor/Config.in#L38
Patrick Williams <patrick@stwcx.xyz> writes: > On Wed, Jul 13, 2016 at 08:01:42AM +1000, Stewart Smith wrote: >> Patrick Williams <patrick@stwcx.xyz> writes: >> > >> > Since we no longer need PNOR flags to enable this, I wonder if we should >> > enable this by default for the skiboot partition. Any opinions on >> > this? >> >> I think we should. It ever so slightly speeds up boot plus it'll mean >> we'll detect corruption in the skiboot partition. >> >> Current skiboot master builds a skiboot.lid.xz alongside skiboot.lid - >> and I can backport that if it makes it easier. > > Backport not required. The PNOR recipe already does the compression if > BR2_TARGET_SKIBOOT_XZ is set. We just need someone to make a pull > request with that set on all the supported machines. > > https://github.com/open-power/op-build/blob/master/openpower/package/openpower-pnor/Config.in#L38 Sweet. I blame the cold on forgetting that was there. I don't mind who puts in the pull req for it, if I don't see one some point today, I'll whip one up.
Index: skiboot.git/hw/Makefile.inc =================================================================== --- skiboot.git.orig/hw/Makefile.inc +++ skiboot.git/hw/Makefile.inc @@ -9,7 +9,9 @@ HW_OBJS += phb3.o sfc-ctrl.o fake-rtc.o HW_OBJS += dts.o lpc-rtc.o npu.o npu-hw-procedures.o HW=hw/built-in.o +ifeq ($(CONFIG_FSP),1) include $(SRC)/hw/fsp/Makefile.inc +endif include $(SRC)/hw/ec/Makefile.inc include $(SRC)/hw/ast-bmc/Makefile.inc include $(SRC)/hw/ipmi/Makefile.inc Index: skiboot.git/platforms/Makefile.inc =================================================================== --- skiboot.git.orig/platforms/Makefile.inc +++ skiboot.git/platforms/Makefile.inc @@ -1,9 +1,13 @@ +# -*-Makefile-*- + PLATDIR = platforms SUBDIRS += $(PLATDIR) PLATFORMS = $(PLATDIR)/built-in.o +ifeq ($(CONFIG_FSP),1) include $(SRC)/$(PLATDIR)/ibm-fsp/Makefile.inc +endif include $(SRC)/$(PLATDIR)/rhesus/Makefile.inc include $(SRC)/$(PLATDIR)/astbmc/Makefile.inc include $(SRC)/$(PLATDIR)/mambo/Makefile.inc Index: skiboot.git/Makefile.main =================================================================== --- skiboot.git.orig/Makefile.main +++ skiboot.git/Makefile.main @@ -65,6 +65,10 @@ CFLAGS += -Wl,--oformat,elf64-powerpc CFLAGS += $(call try-cflag,$(CC),-mabi=elfv1) CFLAGS += $(call try-cflag,$(CC),-std=gnu11) +ifeq ($(CONFIG_FSP),1) +CFLAGS += -DCONFIG_FSP +endif + ifeq ($(SKIBOOT_GCOV),1) CFLAGS += -fprofile-arcs -ftest-coverage -DSKIBOOT_GCOV=1 endif
Here is a quick patch to remove support of FSP based systems in skiboot. The goal is to reduce the size of skiboot which is limited to 1MB on OpenPOWER systems. To activate support, one needs to add CONFIG_FSP=1 to the make command line. Signed-off-by: Cédric Le Goater <clg@fr.ibm.com> --- Makefile.main | 4 ++++ hw/Makefile.inc | 2 ++ platforms/Makefile.inc | 4 ++++ 3 files changed, 10 insertions(+)