[U-Boot] [PATCH 00/19] First step towards Kbuild: Use Kbuild style makefiles

Masahiro Yamada yamada.m at jp.panasonic.com
Tue Sep 17 02:35:33 CEST 2013


Hello Gerhard.


> This test only proves that the code compiles, nothing else.  Even
> for a single board you may not run-test all features, given the
> many functions and high interactivity and options that U-Boot
> provides.  This becomes worse when your change affects several
> more boards or even the whole tree (which is the case here).
> 
> I'd suggest a more formal approach to test or verification.
> Being able to build the code (not having broken the compile
> phase) is just a prerequisite.  But you want to prove that no
> harm was done, i.e. that the code still is operational (at least
> that it works as good as it did before the manipulation).


I thought compiling with no errors/warnings means no harm
because no source files except makefiles were touched
in this patch series.

That's why I believed the only build check is sufficient
and I did not try run-test.

But your suggestion sounds interesting.
If we could programmatically compare the generated executables
in an easy way, that would be worth checking.

So I gave it a try.
Finally it turned out to be much harder than I had expected. (Almost nightware)

Anyway, let's see what I did one by one.


(1) Time stamp

Because U-boot executable includes a timestamp,
Everytime U-Boot is compiled, include/generated/timestamp_autogenerated.h
is updated, which results in different outcome.

So, I tweaked include/timestamp.h not to include it:

     #ifndef DO_DEPS_ONLY
    -#include "generated/timestamp_autogenerated.h"
    +/* #include "generated/timestamp_autogenerated.h" */
    +#define U_BOOT_DATE "DUMMY"
    +#define U_BOOT_TIME "DUMMY"
     #endif


(2) Git commit hash

Git commit hash is contained in include/generated/version_autogenerated.h.
So, I also modified include/version.h not to include it as follows:

     #ifndef DO_DEPS_ONLY
    -#include "generated/version_autogenerated.h"
    +/* #include "generated/version_autogenerated.h" */
    +#define PLAIN_VERSION "__DUMMY__"
    +#define U_BOOT_VERSION "__DUMMY__"
    +#define CC_VERSION_STRING "__DUMMY__"
    +#define LD_VERSION_STRING "__DUMMY__"
     #endif


(3) Show md5sum

I added a line to MAKEALL script to show md5sum of u-boot and u-boot-spl.

         ${CROSS_COMPILE}size ${OBJS} | tee -a ${LOG_DIR}/$target.MAKELOG

    +    md5sum ${OBJS}
    +
         [ -e "${LOG_DIR}/${target}.ERR" ] && cat "${LOG_DIR}/${target}.ERR"


(4) Make sure to build in the same path

The output executables (ELF) depends on the directory path where it was built.
(Of course, the "u-boot.bin" does not carry this information.)
So, we need to make sure to build in the same path in order to get indentical ELF files.


(5) Take care of the difference of symbols order

The output file depends on the order of the object files at the link stage.
Even if you change the order of the *.o files, you can still get a correct outcome.
But now we want to compare md5sum, so we must keep the same order.

Let's closely look some makefiles.

Some of makefiles sort object files before linking, and others do not.

For example, let's see "common/Makefile" first.


    COBJS   := $(sort $(COBJS-y))
    ---< snip >---
    OBJS    := $(addprefix $(obj),$(COBJS))
    ---< snip >---
    $(LIB): $(obj).depend $(OBJS)
            $(call cmd_link_o_target, $(OBJS))


Before linked into common/libcommon.o, the object files
are sorted in alphabetical order by $(sort ...) function.


For another example, let's take a look arch/arm/cpu/armv7/am33xx/Makefile.

    COBJS-$(CONFIG_AM33XX)  += clock_am33xx.o
    COBJS-$(CONFIG_TI814X)  += clock_ti814x.o
    COBJS-$(CONFIG_AM43XX)  += clock_am43xx.o
    
    ifneq ($(CONFIG_AM43XX)$(CONFIG_AM33XX),)
    COBJS   += clock.o
    endif
    
    COBJS-$(CONFIG_TI816X)  += clock_ti816x.o
    COBJS   += sys_info.o
    COBJS   += mem.o
    COBJS   += ddr.o
    COBJS   += emif4.o
    COBJS   += board.o
    COBJS   += mux.o
    COBJS-$(CONFIG_NAND_OMAP_GPMC)  += elm.o
    
    SRCS    := $(SOBJS:.o=.S) $(COBJS:.o=.c)
    OBJS    := $(addprefix $(obj),$(COBJS) $(COBJS-y) $(SOBJS))


Be aware that both "COBJS-y" and "COBJS" are used
and $(COBJS) $(COBJS-y) are added in this order to $(OBJS).
So the resulting $(OBJS) contains the *.o files in the following order:
 clock.o sys_info.o mem.o ddr.o emif4.o board.o mux.o
 clock_am33xx.o clock_ti814.o .....

In this commit series, I converted both COBJS-y and COBJS into obj-y.
So, after applying this patch series, the object files are listed in
different order.

In the conventional U-Boot Makefiles, the order of object files
which are linked together is depending on makefiles.

  - Some of them sort objects in alphabetical order with $(sort ...) function.
  - Some of them keep the order in which they apper.
  - Other cases (like arch/arm/cpu/armv7/am33xx/Makefile)

This variation makes it very difficult to programatically compare the output files.

So, I standerdized the order of the object files to alphabetical order.
I added $(sort ...) function to the linkage rule in each sub makefile like follows:

     $(LIB):        $(OBJS)
    -       $(call cmd_link_o_target, $(OBJS))
    +       $(call cmd_link_o_target, $(sort $(OBJS)))


(6) Another timestamp problem

Even after I eliminated a timestamp header problem in (1),
I still found a board that produces different output at every compile.

See board/cray/L1/Makefile.

    ---< snip >---
    $(obj)bootscript.c: $(obj)bootscript.image
            od -t x1 -v -A x $^ | awk -f x2c.awk > $@
    
    $(obj)bootscript.image: $(src)bootscript.hush $(src)Makefile
            -$(OBJTREE)/tools/mkimage -A ppc -O linux -T script -C none -a 0 -e 0 -n bootscript -d (src)bootscript.hush $@
    ---< snip >---

The source code, board/cray/L1/bootscript.c is
generated from board/cray/L1/bootscript.image.
The timestamp information is embedded in bootscript.image by mkimage tool.

I gave up to solve this problem.


(7) Fix PowerPC code

I am only familiar with ARM architecture, but anyway I needed to compile over all architectures.
While working on PowerPC, I noticed lots of PowerPC boards failed in compiling on v2013-10-rc2 tag.

What I did is:

    CROSS_COMPILE_POWERPC=powerpc-linux-gnu- ./MAKEALL -a powerpc

The result is:


--------------------- SUMMARY ----------------------------
Boards compiled: 660
Boards with errors: 139 ( HWW1U1A MPC8572DS MPC8572DS_36BIT MPC8572DS_NAND P1020MBG-PC P1020MBG-PC_36BIT P1020MBG-PC_36BIT_SDCARD P1020MBG-PC_SDCARD P1020RDB P1020RDB_36BIT P1020RDB_36BIT_SDCARD P1020RDB_36BIT_SPIFLASH P1020RDB_NAND P1020RDB-PC P1020RDB-PC_36BIT P1020RDB-PC_36BIT_NAND P1020RDB-PC_36BIT_SDCARD P1020RDB-PC_36BIT_SPIFLASH P1020RDB-PC_NAND P1020RDB-PC_SDCARD P1020RDB-PC_SPIFLASH P1020RDB_SDCARD P1020RDB_SPIFLASH P1020RDB-PD P1020RDB-PD_NAND P1020RDB-PD_SDCARD P1020RDB-PD_SPIFLASH P1020UTM-PC P1020UTM-PC_36BIT P1020UTM-PC_36BIT_SDCARD P1020UTM-PC_SDCARD P1021RDB-PC P1021RDB-PC_36BIT P1021RDB-PC_36BIT_NAND P1021RDB-PC_36BIT_SDCARD P1021RDB-PC_36BIT_SPIFLASH P1021RDB-PC_NAND P1021RDB-PC_SDCARD P1021RDB-PC_SPIFLASH P1022DS P1022DS_NAND P1022DS_36BIT_NAND P1022DS_SPIFLASH P1022DS_36BIT_SPIFLASH P1022DS_SDCARD P1022DS_36BIT_SDCARD P1022DS_36BIT P1023RDB P1023RDS P1023RDS_NAND P1024RDB P1024RDB_36BIT P1024RDB_NAND P1024RDB_SDCARD P1024RDB_SPIFLASH P1025RDB P1025RDB_36BIT P1025RDB_NAND P1025RDB_SDCARD P1025RDB_SPIFLASH TWR-P1025 P2020COME_SDCARD P2020COME_SPIFLASH P2020DS P2020DS_36BIT P2020DS_DDR2 P2020DS_SDCARD P2020DS_SPIFLASH P2020RDB P2020RDB_36BIT P2020RDB_36BIT_SDCARD P2020RDB_36BIT_SPIFLASH P2020RDB_NAND P2020RDB-PC P2020RDB-PC_36BIT P2020RDB-PC_36BIT_NAND P2020RDB-PC_36BIT_SDCARD P2020RDB-PC_36BIT_SPIFLASH P2020RDB-PC_NAND P2020RDB-PC_SDCARD P2020RDB-PC_SPIFLASH P2020RDB_SDCARD P2020RDB_SPIFLASH P2041RDB P2041RDB_NAND P2041RDB_SDCARD P2041RDB_SECURE_BOOT P2041RDB_SPIFLASH P2041RDB_SRIO_PCIE_BOOT P3041DS P3041DS_NAND P3041DS_SDCARD P3041DS_SECURE_BOOT P3041DS_SPIFLASH P3041DS_SRIO_PCIE_BOOT P4080DS P4080DS_SDCARD P4080DS_SECURE_BOOT P4080DS_SPIFLASH P4080DS_SRIO_PCIE_BOOT P5020DS P5020DS_NAND P5020DS_SDCARD P5020DS_SECURE_BOOT P5020DS_SPIFLASH P5020DS_SRIO_PCIE_BOOT P5040DS P5040DS_NAND P5040DS_SDCARD P5040DS_SPIFLASH BSC9132QDS_NOR_DDRCLK100 BSC9132QDS_NOR_DDRCLK133 BSC9132QDS_NAND_DDRCLK100 BSC9132QDS_NAND_DDRCLK133 BSC9132QDS_SDCARD_DDRCLK100 BSC9132QDS_SDCARD_DDRCLK133 BSC9132QDS_SPIFLASH_DDRCLK100 BSC9132QDS_SPIFLASH_DDRCLK133 controlcenterd_36BIT_SDCARD controlcenterd_36BIT_SDCARD_DEVELOP controlcenterd_TRAILBLAZER controlcenterd_TRAILBLAZER_DEVELOP T4240QDS T4240EMU T4240QDS_SDCARD T4240QDS_SPIFLASH T4240QDS_SRIO_PCIE_BOOT T4160QDS T4160QDS_SDCARD T4160QDS_SPIFLASH B4860QDS B4860QDS_NAND B4860QDS_SPIFLASH B4860QDS_SRIO_PCIE_BOOT B4420QDS B4420QDS_NAND B4420QDS_SPIFLASH xpedite537x xpedite550x )
Boards with warnings but no errors: 3 ( MPC8572DS_36BIT SPD823TS taishan )


The reason of the error seemed to locate in arch/powerpc/cpu/mpc85xx/release.S

    release.S:137: Error: value of 4294963524 too large for field of 2 bytes at 174
    release.S:138: Error: operand out of range (0xfffffffffffff144 is not between 0x0000000000000000 and 0x000000000000ffff)
    release.S:138: Error: value of 4294963524 too large for field of 2 bytes at 178
    release.S:281: Error: value of 4294963524 too large for field of 2 bytes at 210
    release.S:282: Error: operand out of range (0xfffffffffffff144 is not between 0x0000000000000000 and 0x000000000000ffff)
    release.S:282: Error: value of 4294963524 too large for field of 2 bytes at 214
    release.S:306: Error: value of 4294963520 too large for field of 2 bytes at 282
    release.S:307: Error: operand out of range (0xfffffffffffff140 is not between 0x0000000000000000 and 0x000000000000ffff)
    release.S:307: Error: value of 4294963520 too large for field of 2 bytes at 286


I am not familiar with PowerPC at all and I am not sure my build procedure was correct either,
but anyway I could not compile lots of boards even on the u-boot/master.
I needed the final output files in order to get md5sum matching.

So I forcibly made the compiling passed by simply commenting out the code which caused the error like follows:

            /* get our PIR to figure out our table entry */
    -       lis     r3,toreset(__spin_table_addr)@h
    -       ori     r3,r3,toreset(__spin_table_addr)@l
    +/*     lis     r3,toreset(__spin_table_addr)@h
    +       ori     r3,r3,toreset(__spin_table_addr)@l */
            lwz     r3,0(r3)

Even after this workaround, I could not compile 3 boards ( MPC8572DS_36BIT SPD823TS taishan )
for PowerPC architecture.

    $ cat LOG/MPC8572DS_36BIT.ERR 
    powerpc-linux-gnu-ld.bfd: section .bootpg loaded at [00000000effff000,00000000effff4bb] overlaps section .u_boot_list loaded at [00000000efffeb84,00000000effff41b]
    powerpc-linux-gnu-ld.bfd: u-boot: section .bootpg lma 0xeffff000 adjusted to 0xeffff41c
    make: *** [u-boot] Error 1
    $ cat LOG/SPD823TS.ERR 
    u-boot.lds:12 cannot move location counter backwards (from 00000000ff008008 to 00000000ff008000)
    make: *** [u-boot] Error 1
    $ cat LOG/taishan.ERR
    powerpc-linux-gnu-ld.bfd: section .bootpg loaded at [00000000fffff000,00000000fffff24f] overlaps section .u_boot_list loaded at [00000000ffffe7ec,00000000fffff157]
    powerpc-linux-gnu-ld.bfd: u-boot: section .bootpg lma 0xfffff000 adjusted to 0xfffff158
    make: *** [u-boot] Error 1

I gave up these 3 boards.


(8) Other minor architectures

For arm, avr32, sandbox, x86 architectures, I succeeded in compiling all boards, without any errors/warnings.
For powerpc, I could compiled most of boards by modifing one file as shown in (7).

I could not find cross compilers for nds32 and nios2 in
ftp://ftp.kernel.org/pub/tools/crosstool/.
I omitted nds32 (3 boards) and nios2 (3 boards) 

For blackfin, m68k, microblaze,mips, openrisc, sh, sparc architecures,
I could compile some boards and I could not others.
But the "SUMMARY" result was still the same after applying this series,
that is,
 - Boards with errors list
 - Boards with warnings but no errors list
 - error / warnings messages
were the same.

This means compiling succeeded the same way it did,
and compiling failed the same way it did.

Comparison of md5sum was done for only boards which could generate the final ELF file.


(9) How to check the md5sum diffs

The following is my procedure for comparing md5sum.

I got arm-linux-gnueabi-gcc and powerpc-linux-gnu-gcc by Ubuntu apt-get.
I downloaded other cross compilers from ftp://ftp.kernel.org/pub/tools/crosstool/.
(Gerhard taught me this site, Thanks!)

Assume we have two repositories, "u-boot-org" and "u-boot-kbuild".

u-boot-org is:
     v2013.10-rc2 tag
   + Time stamp tweak as shown in (1)
   + Git hash tweak as shown in (2)
   + Show md5sum as shown in (3)
   + Sort *.o files in alphabetical order as shown in (5)
   + Fix PowerPC code as shown in (7)

u-boot-kbuild is:
     v2013.10-rc2 tag
   + This patch series (0001-0019)
   + Time stamp tweak as shown in (1)
   + Git hash tweak as shown in (2)
   + Show md5sum as shown in (3)
   + Fix PowerPC code as shown in (7)


I took care to build in the same directory path.

mv u-boot-org u-boot
cd u-boot
CROSS_COMPILE=arm-linux-gnueabi- ./MAKEALL -a arm 2>&1 | tee u-boot-org.log.arm
   ... (do this for all architectures)

cd ..
mv u-boot u-boot-org

mv u-boot-kbuild u-boot
cd u-boot

CROSS_COMPILE=arm-linux-gnueabi- ./MAKEALL -a arm 2>&1 | tee u-boot-kbuild.log.arm
   ... (do this for all architectures)


I got md5sum along with SUMMAY, error/warning messages.
I compared log files between u-boot-org and u-boot-kbuild.


(10) Results

- arm

    --------------------- SUMMARY ----------------------------
    Boards compiled: 336
    ----------------------------------------------------------

For all 336 boards, compiling succeeded and the md5sum matched.

- avr32

    --------------------- SUMMARY ----------------------------
    Boards compiled: 10
    ----------------------------------------------------------

For all 10 boards, compiling succeeded and the md5sum matched.

- blackfin

    --------------------- SUMMARY ----------------------------
    Boards compiled: 35
    Boards with errors: 5 ( bct-brettl2 bf506f-ezkit bf533-stamp bf609-ezkit cm-bf548 )
    Boards with warnings but no errors: 30 ( bf518f-ezbrd bf525-ucr2 bf526-ezbrd
    bf527-ad7160-eval bf527-ezkit bf527-ezkit-v2 bf527-sdp bf533-ezkit bf537-minotaur
    bf537-pnav bf537-srv1 bf537-stamp bf538f-ezkit bf548-ezkit bf561-acvilon bf561-ezkit
    blackstamp blackvme br4 cm-bf527 cm-bf533 cm-bf537e cm-bf537u cm-bf561 dnp5370
    ibf-dsp561 ip04 pr1 tcm-bf518 tcm-bf537 )
    ----------------------------------------------------------

The result of compiling was the same for both before and after this series.
 (errors for 5 boards and warnings for 30 boards)

For 21 boards, the u-boot ELF file was produced and the md5sum matched.

- m68k

    --------------------- SUMMARY ----------------------------
    Boards compiled: 50
    Boards with errors: 6 ( M5253DEMO M54455EVB M54455EVB_a66 M54455EVB_i66 M54455EVB_intel M54455EVB_stm33 )
    Boards with warnings but no errors: 44 ( M52277EVB M52277EVB_stmicro M5235EVB M5235EVB_Flash32 cobra5272
    idmr eb_cpu5282 eb_cpu5282_internal TASREG M5208EVBE M5249EVB M5253EVBE M5271EVB M5272C3 M5275EVB
    M5282EVB astro_mcf5373l M53017EVB M5329AFEE M5329BFEE M5373EVB M54418TWR M54418TWR_nand_mii
    M54418TWR_nand_rmii M54418TWR_nand_rmii_lowfreq M54418TWR_serial_mii M54418TWR_serial_rmii M54451EVB
    M54451EVB_stmicro M5475AFE M5475BFE M5475CFE M5475DFE M5475EFE M5475FFE M5475GFE M5485AFE M5485BFE
    M5485CFE M5485DFE M5485EFE M5485FFE M5485GFE M5485HFE )
    ----------------------------------------------------------

The result of compiling was the same for both before and after this series.
 (errors for 6 boards and warnings for 44 boards)

For 44 boards, the u-boot ELF file was produced and the md5sum matched.


- microblaze

    --------------------- SUMMARY ----------------------------
    Boards compiled: 1
    Boards with errors: 1 ( microblaze-generic )
    ----------------------------------------------------------

I could not compile microblaze at all.
Microblaze is a processor custom-designed in Xilinx FPGA.
I am not sure, but I may need additional files descripting the hardware.

I could not compare md5sum.


- mips

    --------------------- SUMMARY ----------------------------
    Boards compiled: 28
    Boards with warnings but no errors: 26 ( qemu_mips qemu_mipsel qemu_malta qemu_maltael vct_platinum
    vct_platinumavc vct_platinumavc_onenand vct_platinumavc_onenand_small vct_platinumavc_small
    vct_platinum_onenand vct_platinum_onenand_small vct_platinum_small vct_premium vct_premium_onenand
    vct_premium_onenand_small vct_premium_small dbau1000 dbau1100 dbau1500 dbau1550 dbau1550_el pb1000
    incaip incaip_100MHz incaip_133MHz incaip_150MHz )
    ----------------------------------------------------------

The result of compiling was the same for both before and after this series.
 (success for 2 boards and warnings for 26 boards)


For 28 boards, the u-boot ELF file was generated and the md5sum matched.


- nds32

I could not get a suitable cross compiler, so 3 nds32 boards were skipped.


- nios2

I could not get a suitable cross compiler, so 3 nios2 boards were skipped.


- openrisc

    --------------------- SUMMARY ----------------------------
    Boards compiled: 1
    Boards with warnings but no errors: 1 ( openrisc-generic )
    ----------------------------------------------------------

The result of compiling was the same for both before and after this series.
 (warnings for 1 boards)

For 1 board, the u-boot ELF file was generated and md5sum matched.


- powerpc

    --------------------- SUMMARY ----------------------------
    Boards compiled: 660
    Boards with warnings but no errors: 3 ( MPC8572DS_36BIT SPD823TS taishan )
    ----------------------------------------------------------

By tweaking arch/powerpc/cpu/mpc85xx/release.S in (7),
I could successfully build most of boards, except ( MPC8572DS_36BIT SPD823TS taishan ).
I omitted these three boards.
As I mentioned in (6), CRAYL1 board produces every time different ELF file
because of timestamp.
I also omitted this board.

The md5sum checking was done for 656 boards.
I found lots of unmatched md5sum for mpc8260 cpu.
I think arch/powerpc/cpu/mpc8260/Makefile should be fixed
to get the same md5sum.
I discuss this item lator. See (11) below.


- sandbox

    --------------------- SUMMARY ----------------------------
    Boards compiled: 1
    ----------------------------------------------------------

sandbox has only one board.
The u-boot ELF file was produced and the md5sum matched.


- sh

    --------------------- SUMMARY ----------------------------
    Boards compiled: 21
    Boards with errors: 6 ( rsk7203 rsk7264 rsk7269 mpr2 ms7720se shmin )
    ----------------------------------------------------------

The result of compiling was the same for both before and after this series.
 (success for 15 boards, errors for 6 boards.)

For 21 boards, the u-boot ELF file was produced and the md5sum matched.


- sparc

    --------------------- SUMMARY ----------------------------
    Boards compiled: 5
    Boards with errors: 4 ( gr_cpci_ax2000 gr_ep2s60 grsim gr_xc3s_1500 )
    Boards with warnings but no errors: 1 ( grsim_leon2 )
    ----------------------------------------------------------

The result of compiling was the same for both before and after this series.
 (errors for 4 boards and warnings for 1 board)

No u-boot ELF file was generated, so I could not check md5sum.


- x86

    --------------------- SUMMARY ----------------------------
    Boards compiled: 1
    ----------------------------------------------------------

x86 has only one board.
The u-boot ELF file was produced and the md5sum matched.


(11) One file turned out to be fixed

md5sum unmatching were found for powerpc mpc8260 cpu.

arch/powerpc/cpu/mpc8260/Makefile is originally like follows:


    include $(TOPDIR)/config.mk
    
    LIB     = $(obj)lib$(CPU).o
    
    START   = start.o kgdb.o
    COBJS   = traps.o serial_smc.o serial_scc.o cpu.o cpu_init.o speed.o \
              interrupts.o ether_fcc.o i2c.o commproc.o \
              bedbug_603e.o pci.o spi.o
    
    COBJS-$(CONFIG_ETHER_ON_SCC) = ether_scc.o
    
    COBJS   += $(COBJS-y)
    
    SRCS    := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
    OBJS    := $(addprefix $(obj),$(SOBJS) $(COBJS))
    START   := $(addprefix $(obj),$(START))
    
    all:    $(obj).depend $(START) $(LIB)
    
    $(LIB): $(OBJS)
            $(call cmd_link_o_target, $(OBJS) $(obj)kgdb.o)



See the last line "$(call cmd_link_o_target, $(OBJS) $(obj)kgdb.o)".
This is very weird.
kgdb.o is not included in $(OBJS) but linked into $(LIB).

So, in the first place

    START   = start.o kgdb.o

should have been

    START   = start.o
    SOBJS   = kgdb.o

and

    $(LIB): $(OBJS)
            $(call cmd_link_o_target, $(OBJS) $(obj)kgdb.o)

should have been

    $(LIB): $(OBJS)
            $(call cmd_link_o_target, $(OBJS))

My patch series converted arch/powerpc/cpu/mpc8260/Makefile
by following the simple rule like this:


    extra-y = start.o kgdb.o
    obj-y   = traps.o serial_smc.o serial_scc.o cpu.o cpu_init.o speed.o \
              interrupts.o ether_fcc.o i2c.o commproc.o \
              bedbug_603e.o pci.o spi.o
    
    obj-$(CONFIG_ETHER_ON_SCC) += ether_scc.o


Above still should work fine (for both compiling and run testing)
because arch/powerpc/cpu/mpc8260/kgdb.S is not used at all.

But, in order to get identical output and the same md5sum,
it should be fixed like follows:

    extra-y = start.o
    obj-y   = traps.o serial_smc.o serial_scc.o cpu.o cpu_init.o speed.o \
              interrupts.o ether_fcc.o i2c.o commproc.o \
              bedbug_603e.o pci.o spi.o kdbg.o
    
    obj-$(CONFIG_ETHER_ON_SCC) += ether_scc.o


After fixing arch/powerpc/cpu/mpc8260/Makefile,
md5sum perfectly matched for all boards with mpc8260 cpu.


(12) Conclusion

I made as much effort as I could do now
in order to get md5sum matching.

I found one file (arch/powerpc/cpu/mpc8260/Makefile)
to be fixed. (Working but better to be fixed.)

I will post version2 with this fix plus rebased on the current master.

In this series, I touched
  - arch/arm/
  - arch/powerpc/
  - arch/sandbox/
  - and commonly used part (drivers/, fs/, common/, net/, lib/, disk/)


I could not compile lots of minor architecture boards,
but the results of md5sum for arm, powerpc, sandbox architectures
is sufficient to support my correctness.

But I want to know the reason why the compile failed for such many boards.
Of course my procedure might be wrong, but I think at least some of warnings
are caused by immature code. I mean more or less boards look to be already broken.



> Getting cross compilers for other architectures should be easy.
> There's a prebuilt collection at kernel.org, so that you just
> need to download any of them as the need arises.  See
> ftp://ftp.kernel.org/pub/tools/crosstool/

Thanks!
But I could not find nds32 and nios2 compilers.

I hope the collection of necessary compilers to build all achitectures
supported by U-boot is prepared in U-Boot web site
(+ tips to build all boards).


Best Regards,
Masahiro Yamada



More information about the U-Boot mailing list