[U-Boot] [PATCH V2 00/12] Series to move headers to a consistent include location
Simon Glass
sjg at chromium.org
Sun Dec 20 00:07:11 CET 2015
Hi Nishanth,
On 12 November 2015 at 22:43, Nishanth Menon <nm at ti.com> wrote:
> Hi,
> This series is hopefully to setup the stage for consolidation of board/vendor/common
> include header organization in u-boot.
>
> Discussion thread:
> https://patchwork.ozlabs.org/patch/540280/
> https://patchwork.ozlabs.org/patch/541068/
> https://patchwork.ozlabs.org/patch/542424/
>
> In short, we:
> a) Dont want to have symlinks for include headers
> b) Want to be able to reference headers in reuse by doing #include <board-common/xyz.h>
>
> So, we follow the "option #6" discussed in the last of the threads above.
> Only the first patch in this series was pasted and discussed previously.
> The remaining 11 in the series is natural cleanups as a result.
>
> The series is Based on:
> master ade766acfb27 Merge branch 'next' of git://git.denx.de/u-boot-blackfin
>
>
> Script 1: identifying the board/vendors impacted:
> #!/bin/bash
>
> for common in `git grep "../common" board|grep "#include"|cut -d ':' -f1|cut -d '/' -f1,2|sort -u`
> do
> cfiles=`git grep "../common" $common|grep "#include"|cut -d '"' -f2|sort -u|grep c$`
> headers=`git grep "../common" $common|grep "#include"|cut -d '"' -f2|sort -u|grep h$`
> if [ -z "$headers" ]; then
> continue;
> fi
> echo $common : $headers : $cfiles
> done
> Output:
> board/BuR : ../common/bur_common.h :
> board/compulab : ../common/common.h ../common/eeprom.h :
> board/freescale : ../common/cadmus.h ../common/dcu_sii9022a.h ../common/diu_ch7301.h ../common/eeprom.h ../common/fman.h ../common/idt8t49n222a_serdes_clk.h ../common/ngpixis.h ../common/pfuze.h ../common/pixis.h ../common/pq-mds-pib.h ../common/qixis.h ../common/sgmii_riser.h ../common/sleep.h ../common/via.h ../common/vid.h ../common/vsc3316_3308.h ../common/zm7300.h :
> board/gdsys : ../common/dp501.h ../common/mclink.h ../common/osd.h ../common/phy.h :
> board/keymile : ../common/common.h :
> board/LaCie : ../common/common.h ../common/cpld-gpio-bus.h :
> board/mpl : ../common/common_util.h ../common/isa.h :
> board/seco : ../common/mx6.h :
> board/siemens : ../common/factoryset.h : ../common/board.c
> board/varisys : ../common/eeprom.h :
> board/xes : ../common/fsl_8xxx_misc.h :
>
> Script2: this is used to move the headers to relevant locations:
> #!/bin/bash
> vendor=$1
> common=$vendor/common
>
> cfiles=`git grep "../common" $vendor|grep "#include"|cut -d '"' -f2|sort -u|grep c$`
> headers=`git grep "../common" $vendor|grep "#include"|cut -d '"' -f2|sort -u|grep h$`
>
> mkdir -p $common/include/board-common
> set -x
> for header in $headers
> do
> echo "processing $header in $common"
> hbase=`basename $header`
> git mv $common/$hbase $common/include/board-common
> sed -i -e "s/\"..\/common\/$hbase\"/<board-common\/$hbase>/g" $vendor/*/*.[chS]
> sed -i -e "s/\"$hbase\"/<board-common\/$hbase>/g" $vendor/common/*.[chS]
> done
>
>
> Build tested with the following with at least the ARM platforms:
> MAKEALL -v compulab -v BuR -v LaCie -v seco -v siemens
>
>
> NOTE: I know this series impacts a lot of platforms..
> other than patch #1, they are probably nice to have.. but upto you guys
> if you'd like it or not.. it will be good to standardize things
> a bit here. I am *NOT* trying to fix the following code:
> $ git grep "\.\./common" board/*/*/*.[chS]|sort -u
> board/amcc/bamboo/flash.c:#include "../common/flash.c"
> board/amcc/bubinga/flash.c:#include "../common/flash.c"
> board/amcc/luan/flash.c:#include "../common/flash.c"
> board/amcc/walnut/flash.c:#include "../common/flash.c"
> board/esd/cpci2dp/flash.c:#include "../common/flash.c"
> board/esd/cpci405/cpci405.c:#include "../common/fpga.c"
> board/esd/cpci405/flash.c:#include "../common/flash.c"
> board/esd/plu405/flash.c:#include "../common/flash.c"
> board/esd/plu405/plu405.c:#include "../common/fpga.c"
> board/esd/vom405/flash.c:#include "../common/flash.c"
> board/siemens/draco/board.c:#include "../common/board.c"
> board/siemens/pxm2/board.c:#include "../common/board.c"
> board/siemens/rut/board.c:#include "../common/board.c"
>
>
> Nishanth Menon (12):
> Makefile: Include vendor common library in include search path
> board: BuR: Move common headers to board-common directory
> board: compulab: Move common headers to board-common directory
> board: freescale: Move common headers to board-common directory
> board: gdsys: Move common headers to board-common directory
> board: keymile: Move common headers to board-common directory
> board: LaCie: Move common headers to board-common directory
> board: mpl: Move common headers to board-common directory
> board: seco: Move common headers to board-common directory
> board: siemens: Move common headers to board-common directory
> board: varisys: Move common headers to board-common directory
> board: xes: Move common headers to board-common directory
>
> Makefile | 3 +++
> board/BuR/common/common.c | 2 +-
> board/BuR/common/{ => include/board-common}/bur_common.h | 0
> board/BuR/kwb/board.c | 2 +-
> board/BuR/tseries/board.c | 2 +-
> board/LaCie/common/cpld-gpio-bus.c | 2 +-
> board/LaCie/common/{ => include/board-common}/common.h | 0
> board/LaCie/common/{ => include/board-common}/cpld-gpio-bus.h | 0
> board/LaCie/edminiv2/edminiv2.c | 2 +-
> board/LaCie/net2big_v2/net2big_v2.c | 4 ++--
> board/LaCie/netspace_v2/netspace_v2.c | 2 +-
> board/compulab/cm_fx6/cm_fx6.c | 4 ++--
> board/compulab/cm_t335/cm_t335.c | 2 +-
> board/compulab/cm_t35/cm_t35.c | 4 ++--
> board/compulab/cm_t3517/cm_t3517.c | 4 ++--
> board/compulab/cm_t54/cm_t54.c | 2 +-
> board/compulab/common/common.c | 4 ++--
> board/compulab/common/eeprom.c | 2 +-
> board/compulab/common/{ => include/board-common}/common.h | 0
> board/compulab/common/{ => include/board-common}/eeprom.h | 0
> board/compulab/common/omap3_smc911x.c | 2 +-
> board/freescale/b4860qds/b4860qds.c | 8 ++++----
> board/freescale/b4860qds/eth_b4860qds.c | 6 +++---
> board/freescale/b4860qds/spl.c | 2 +-
> board/freescale/bsc9132qds/bsc9132qds.c | 2 +-
> board/freescale/common/arm_sleep.c | 2 +-
> board/freescale/common/cds_pci_ft.c | 2 +-
> board/freescale/common/ics307_clk.c | 6 +++---
> board/freescale/common/idt8t49n222a_serdes_clk.c | 2 +-
> board/freescale/common/{ => include/board-common}/cadmus.h | 0
> board/freescale/common/{ => include/board-common}/dcu_sii9022a.h | 0
> board/freescale/common/{ => include/board-common}/diu_ch7301.h | 0
> board/freescale/common/{ => include/board-common}/eeprom.h | 0
> board/freescale/common/{ => include/board-common}/fman.h | 0
> .../common/{ => include/board-common}/idt8t49n222a_serdes_clk.h | 0
> board/freescale/common/{ => include/board-common}/ngpixis.h | 0
> board/freescale/common/{ => include/board-common}/pfuze.h | 0
> board/freescale/common/{ => include/board-common}/pixis.h | 0
> board/freescale/common/{ => include/board-common}/pq-mds-pib.h | 0
> board/freescale/common/{ => include/board-common}/qixis.h | 0
> board/freescale/common/{ => include/board-common}/sgmii_riser.h | 0
> board/freescale/common/{ => include/board-common}/sleep.h | 0
> board/freescale/common/{ => include/board-common}/via.h | 0
> board/freescale/common/{ => include/board-common}/vid.h | 0
> board/freescale/common/{ => include/board-common}/vsc3316_3308.h | 0
> board/freescale/common/{ => include/board-common}/zm7300.h | 0
> board/freescale/common/mpc85xx_sleep.c | 2 +-
> board/freescale/common/ngpixis.c | 2 +-
> board/freescale/common/pq-mds-pib.c | 2 +-
> board/freescale/common/qixis.c | 2 +-
> board/freescale/common/sys_eeprom.c | 2 +-
> board/freescale/common/vid.c | 2 +-
> board/freescale/common/vsc3316_3308.c | 2 +-
> board/freescale/common/zm7300.c | 2 +-
> board/freescale/corenet_ds/corenet_ds.c | 2 +-
> board/freescale/corenet_ds/eth_hydra.c | 4 ++--
> board/freescale/corenet_ds/eth_p4080.c | 4 ++--
> board/freescale/corenet_ds/eth_superhydra.c | 4 ++--
> board/freescale/ls1021aqds/dcu.c | 2 +-
> board/freescale/ls1021aqds/eth.c | 4 ++--
> board/freescale/ls1021aqds/ls1021aqds.c | 4 ++--
> board/freescale/ls1021atwr/dcu.c | 2 +-
> board/freescale/ls1021atwr/ls1021atwr.c | 2 +-
> board/freescale/ls1043ardb/eth.c | 2 +-
> board/freescale/ls2085aqds/eth.c | 2 +-
> board/freescale/ls2085aqds/ls2085aqds.c | 2 +-
> board/freescale/ls2085ardb/ls2085ardb.c | 2 +-
> board/freescale/mpc832xemds/mpc832xemds.c | 2 +-
> board/freescale/mpc832xemds/pci.c | 2 +-
> board/freescale/mpc837xemds/mpc837xemds.c | 2 +-
> board/freescale/mpc8536ds/mpc8536ds.c | 2 +-
> board/freescale/mpc8541cds/mpc8541cds.c | 6 +++---
> board/freescale/mpc8544ds/mpc8544ds.c | 2 +-
> board/freescale/mpc8548cds/mpc8548cds.c | 6 +++---
> board/freescale/mpc8555cds/mpc8555cds.c | 6 +++---
> board/freescale/mpc8569mds/mpc8569mds.c | 2 +-
> board/freescale/mpc8572ds/mpc8572ds.c | 2 +-
> board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c | 2 +-
> board/freescale/mx6qsabreauto/mx6qsabreauto.c | 2 +-
> board/freescale/mx6sabresd/mx6sabresd.c | 2 +-
> board/freescale/mx6slevk/mx6slevk.c | 2 +-
> board/freescale/mx6sxsabresd/mx6sxsabresd.c | 2 +-
> board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c | 2 +-
> board/freescale/mx7dsabresd/mx7dsabresd.c | 2 +-
> board/freescale/p1022ds/diu.c | 2 +-
> board/freescale/p1022ds/p1022ds.c | 2 +-
> board/freescale/p1022ds/spl.c | 2 +-
> board/freescale/p2041rdb/eth.c | 2 +-
> board/freescale/t102xqds/eth_t102xqds.c | 4 ++--
> board/freescale/t102xqds/spl.c | 2 +-
> board/freescale/t102xqds/t102xqds.c | 4 ++--
> board/freescale/t102xrdb/eth_t102xrdb.c | 2 +-
> board/freescale/t102xrdb/spl.c | 2 +-
> board/freescale/t102xrdb/t102xrdb.c | 2 +-
> board/freescale/t1040qds/diu.c | 4 ++--
> board/freescale/t1040qds/eth.c | 4 ++--
> board/freescale/t1040qds/t1040qds.c | 4 ++--
> board/freescale/t104xrdb/diu.c | 2 +-
> board/freescale/t104xrdb/eth.c | 2 +-
> board/freescale/t104xrdb/spl.c | 2 +-
> board/freescale/t104xrdb/t104xrdb.c | 2 +-
> board/freescale/t208xqds/eth_t208xqds.c | 4 ++--
> board/freescale/t208xqds/spl.c | 2 +-
> board/freescale/t208xqds/t208xqds.c | 6 +++---
> board/freescale/t208xrdb/t208xrdb.c | 2 +-
> board/freescale/t4qds/eth.c | 4 ++--
> board/freescale/t4qds/spl.c | 2 +-
> board/freescale/t4qds/t4240qds.c | 4 ++--
> board/freescale/t4rdb/eth.c | 2 +-
> board/gdsys/405ep/dlvision-10g.c | 2 +-
> board/gdsys/405ep/iocon.c | 6 +++---
> board/gdsys/common/{ => include/board-common}/dp501.h | 0
> board/gdsys/common/{ => include/board-common}/mclink.h | 0
> board/gdsys/common/{ => include/board-common}/osd.h | 0
> board/gdsys/common/{ => include/board-common}/phy.h | 0
> board/gdsys/common/osd.c | 2 +-
> board/gdsys/mpc8308/hrcon.c | 6 +++---
> board/gdsys/p1022/controlcenterd.c | 2 +-
> board/keymile/common/common.c | 2 +-
> board/keymile/common/{ => include/board-common}/common.h | 0
> board/keymile/common/ivm.c | 2 +-
> board/keymile/km82xx/km82xx.c | 2 +-
> board/keymile/km83xx/km83xx.c | 2 +-
> board/keymile/km83xx/km83xx_i2c.c | 2 +-
> board/keymile/km_arm/km_arm.c | 2 +-
> board/keymile/kmp204x/kmp204x.c | 2 +-
> board/keymile/kmp204x/qrio.c | 2 +-
> board/mpl/common/common_util.c | 2 +-
> board/mpl/common/{ => include/board-common}/common_util.h | 0
> board/mpl/common/{ => include/board-common}/isa.h | 0
> board/mpl/common/isa.c | 2 +-
> board/mpl/common/kbd.c | 2 +-
> board/mpl/common/pci.c | 2 +-
> board/mpl/mip405/cmd_mip405.c | 2 +-
> board/mpl/mip405/mip405.c | 2 +-
> board/mpl/pip405/cmd_pip405.c | 2 +-
> board/mpl/pip405/pip405.c | 4 ++--
> board/mpl/vcma9/cmd_vcma9.c | 2 +-
> board/mpl/vcma9/vcma9.c | 2 +-
> board/seco/common/{ => include/board-common}/mx6.h | 0
> board/seco/mx6quq7/mx6quq7.c | 2 +-
> board/siemens/common/board.c | 2 +-
> board/siemens/common/factoryset.c | 2 +-
> board/siemens/common/{ => include/board-common}/factoryset.h | 0
> board/siemens/draco/board.c | 2 +-
> board/siemens/pxm2/board.c | 2 +-
> board/siemens/rut/board.c | 2 +-
> board/varisys/common/{ => include/board-common}/eeprom.h | 0
> board/varisys/common/sys_eeprom.c | 2 +-
> board/varisys/cyrus/cyrus.c | 2 +-
> board/xes/common/board.c | 2 +-
> board/xes/common/{ => include/board-common}/fsl_8xxx_misc.h | 0
> board/xes/xpedite517x/xpedite517x.c | 2 +-
> 153 files changed, 160 insertions(+), 157 deletions(-)
> rename board/BuR/common/{ => include/board-common}/bur_common.h (100%)
> rename board/LaCie/common/{ => include/board-common}/common.h (100%)
> rename board/LaCie/common/{ => include/board-common}/cpld-gpio-bus.h (100%)
> rename board/compulab/common/{ => include/board-common}/common.h (100%)
> rename board/compulab/common/{ => include/board-common}/eeprom.h (100%)
> rename board/freescale/common/{ => include/board-common}/cadmus.h (100%)
> rename board/freescale/common/{ => include/board-common}/dcu_sii9022a.h (100%)
> rename board/freescale/common/{ => include/board-common}/diu_ch7301.h (100%)
> rename board/freescale/common/{ => include/board-common}/eeprom.h (100%)
> rename board/freescale/common/{ => include/board-common}/fman.h (100%)
> rename board/freescale/common/{ => include/board-common}/idt8t49n222a_serdes_clk.h (100%)
> rename board/freescale/common/{ => include/board-common}/ngpixis.h (100%)
> rename board/freescale/common/{ => include/board-common}/pfuze.h (100%)
> rename board/freescale/common/{ => include/board-common}/pixis.h (100%)
> rename board/freescale/common/{ => include/board-common}/pq-mds-pib.h (100%)
> rename board/freescale/common/{ => include/board-common}/qixis.h (100%)
> rename board/freescale/common/{ => include/board-common}/sgmii_riser.h (100%)
> rename board/freescale/common/{ => include/board-common}/sleep.h (100%)
> rename board/freescale/common/{ => include/board-common}/via.h (100%)
> rename board/freescale/common/{ => include/board-common}/vid.h (100%)
> rename board/freescale/common/{ => include/board-common}/vsc3316_3308.h (100%)
> rename board/freescale/common/{ => include/board-common}/zm7300.h (100%)
> rename board/gdsys/common/{ => include/board-common}/dp501.h (100%)
> rename board/gdsys/common/{ => include/board-common}/mclink.h (100%)
> rename board/gdsys/common/{ => include/board-common}/osd.h (100%)
> rename board/gdsys/common/{ => include/board-common}/phy.h (100%)
> rename board/keymile/common/{ => include/board-common}/common.h (100%)
> rename board/mpl/common/{ => include/board-common}/common_util.h (100%)
> rename board/mpl/common/{ => include/board-common}/isa.h (100%)
> rename board/seco/common/{ => include/board-common}/mx6.h (100%)
> rename board/siemens/common/{ => include/board-common}/factoryset.h (100%)
> rename board/varisys/common/{ => include/board-common}/eeprom.h (100%)
> rename board/xes/common/{ => include/board-common}/fsl_8xxx_misc.h (100%)
>
> --
> 2.6.2.402.g2635c2b
Are you going to do a new version of this series? It seems like a good
idea to me and I'd like to see it applied.
Regards,
Simon
More information about the U-Boot
mailing list