From: Ulf Samuelsson <ulf@atmel.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] "1.at45":(1 of 4) [PATCH] [ARM] Merge to two files into a common file and split.
Date: Tue, 27 Mar 2007 19:01:48 +0200 [thread overview]
Message-ID: <46094DFC.8010404@atmel.com> (raw)
In-Reply-To: <20070327163704.CCFA135261B@atlas.denx.de>
Wolfgang Denk skrev:
> In message <4609420A.6070103@atmel.com> you wrote:
>> Merge to two virtually identical files.
>> "board/at91rm9200dk/at45.c"
>> "board/cmc_pu2/at45.c" (one bug fixed first)
>> into "driver/at45.c" then move at91rm9200 specific functions from
>> "driver/at45.c" to: "cpu/arm920t/at91rm9200/spi.c
>> Update Makefiles to reflect change
>
> Patches like this would be *much* easier to read if you used git,
> where file rename operations are handled properly.
>
True, but I am not there yet.
A script doing almost the same thing as the patch would look like.
#!/bin/bash
# split at45.c into two files
head --lines=<-N> board/at91rm9200dk/at45.c > driver/at45.c
tail --lines=<N> board/at91rm9200dk/at45.c > cpu/arm920t/at91rm9200/spi.c
rm -f board/at91rm9200dk/at45.c # remove the original file
rm -f board/cmc_pu2/at45.c # remove a copy of the original file.
Then the makefiles would have to be updated and a header file added (at45.h).
---------------------
So instead of each board building at45 in their local directory
they will build it in the driver directory.
The reason for splitting the file is that the original file
contains things which is specific for one CPU.
Moving it to a cpu specific directory makes it possible
to use the remainder of at45.c for other CPUs.
The U-Boot patches for at91sam926x chips use a common at45.c
in the driver directory to avoid duplicating it in the board
directory, but that patch cannot be applied the way u-boot works
today, since it will cause a conflict with the at45.c in the
board directory
The plan is that when the at91sam926x patches are applied
the directory structure will look like:
----------------------------
CURRENT U_BOOT
board
at92rm9200dk
at45.c
cmc_pu2
at45.c
----------------------------
PROPOSED U_BOOT
cpu
arm920t
at91rm9200
at91rm9200_spi.c
arm926ejs
at91sam926x
at91sam926x_spi.c
board
at91rm9200df
at91rm9200dk
at91rm9200ek
at91rm9260ek
at91rm9261ek
at91rm9263ek
cmc_pu2
driver
at45.c
----------------------------
U-BOOT IF PROPOSAL IS NOT ACCEPTED
board
at91rm9200df
at91rm9200_at45.c
at91rm9200dk
at91rm9200_at45.c
at91rm9200ek
at91rm9200_at45.c
at91rm9260ek
at91sam926x_at45.c
at91rm9261ek
at91sam926x_at45.c
at91rm9263ek
at91sam926x_at45.c
cmc_pu2
at91rm9200_at45.c
--
Best Regards,
Ulf Samuelsson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ulf.vcf
Type: text/x-vcard
Size: 301 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20070327/5971b6b5/attachment.vcf
next prev parent reply other threads:[~2007-03-27 17:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-27 16:10 [U-Boot-Users] "1.at45":(1 of 4) [PATCH] [ARM] Merge to two files into a common file and split Ulf Samuelsson
2007-03-27 16:37 ` Wolfgang Denk
2007-03-27 17:01 ` Ulf Samuelsson [this message]
2007-05-24 9:18 ` Ladislav Michl
2007-06-04 12:17 ` Ladislav Michl
2007-06-04 12:19 ` Ladislav Michl
2007-06-04 14:08 ` [U-Boot-Users] "1.at45":(1 of 4) [PATCH] [ARM] Merge to twofiles " Martin Krause
2007-06-04 14:32 ` Andreas Schweigstill
2007-06-04 14:47 ` Martin Krause
2007-06-04 17:15 ` Ladislav Michl
2007-06-04 17:27 ` Nelson Castillo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46094DFC.8010404@atmel.com \
--to=ulf@atmel.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox