* linux headers
@ 2007-06-04 16:59 Robert Millan
2007-06-04 17:24 ` Robert Millan
2007-06-04 17:35 ` Jeroen Dekkers
0 siblings, 2 replies; 5+ messages in thread
From: Robert Millan @ 2007-06-04 16:59 UTC (permalink / raw)
To: grub-devel
How is it that util/biosdisk.c makes effort to avoid including Linux headers
and defines Linux ioctl macros on its own?
This adds an extra maintainance burden, so I guess there must be a reason to do
it, but can't think of one..
--
Robert Millan
My spam trap is honeypot@aybabtu.com. Note: this address is only intended
for spam harvesters. Writing to it will get you added to my black list.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: linux headers
2007-06-04 16:59 linux headers Robert Millan
@ 2007-06-04 17:24 ` Robert Millan
2007-06-04 17:35 ` Jeroen Dekkers
1 sibling, 0 replies; 5+ messages in thread
From: Robert Millan @ 2007-06-04 17:24 UTC (permalink / raw)
To: grub-devel
On Mon, Jun 04, 2007 at 06:59:30PM +0200, Robert Millan wrote:
>
> How is it that util/biosdisk.c makes effort to avoid including Linux headers
> and defines Linux ioctl macros on its own?
>
> This adds an extra maintainance burden, so I guess there must be a reason to do
> it, but can't think of one..
Ah, and also I'm not really sure that ioctl definitions are always architecture
independant.
--
Robert Millan
My spam trap is honeypot@aybabtu.com. Note: this address is only intended
for spam harvesters. Writing to it will get you added to my black list.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: linux headers
2007-06-04 16:59 linux headers Robert Millan
2007-06-04 17:24 ` Robert Millan
@ 2007-06-04 17:35 ` Jeroen Dekkers
1 sibling, 0 replies; 5+ messages in thread
From: Jeroen Dekkers @ 2007-06-04 17:35 UTC (permalink / raw)
To: The development of GRUB 2
At Mon, 4 Jun 2007 18:59:30 +0200,
Robert Millan wrote:
>
>
> How is it that util/biosdisk.c makes effort to avoid including Linux headers
> and defines Linux ioctl macros on its own?
>
> This adds an extra maintainance burden, so I guess there must be a reason to do
> it, but can't think of one..
It only defines it when it isn't defined yet. It seems to be taken
from GRUB Legacy's lib/device.c and probably comes from a time those
things weren't always defined. The checks for glibc also don't seem
that useful to me. It needs a cleanup.
Jeroen Dekkers
^ permalink raw reply [flat|nested] 5+ messages in thread
* Linux headers
@ 2016-01-26 15:17 Yegor Yefremov
2016-01-26 21:41 ` Sascha Hauer
0 siblings, 1 reply; 5+ messages in thread
From: Yegor Yefremov @ 2016-01-26 15:17 UTC (permalink / raw)
To: barebox
AFAIK include/linux/barebox-wrapper.h was introduced to simplify Linux
driver porting. During my current effort to port SquashFS driver I had
to repeatedly remove such includes like:
#include <linux/vfs.h>
#include <linux/slab.h>
#include <linux/vmalloc.h>
#include <linux/sched.h>
#include <linux/spinlock.h>
#include <linux/wait.h>
and so on.
Would it be better to provide such headers even if they would almost
always include dummy code? Though it would pollute the include folder
somehow, but it will be easier to port/sync Linux drivers and it will
help to preserve the structure of this drivers.
What do you think about this?
Yegor
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Linux headers
2016-01-26 15:17 Linux headers Yegor Yefremov
@ 2016-01-26 21:41 ` Sascha Hauer
0 siblings, 0 replies; 5+ messages in thread
From: Sascha Hauer @ 2016-01-26 21:41 UTC (permalink / raw)
To: Yegor Yefremov; +Cc: barebox
Hi Yegor,
On Tue, Jan 26, 2016 at 04:17:39PM +0100, Yegor Yefremov wrote:
> AFAIK include/linux/barebox-wrapper.h was introduced to simplify Linux
> driver porting. During my current effort to port SquashFS driver I had
> to repeatedly remove such includes like:
>
> #include <linux/vfs.h>
> #include <linux/slab.h>
> #include <linux/vmalloc.h>
> #include <linux/sched.h>
> #include <linux/spinlock.h>
> #include <linux/wait.h>
>
> and so on.
>
> Would it be better to provide such headers even if they would almost
> always include dummy code? Though it would pollute the include folder
> somehow, but it will be easier to port/sync Linux drivers and it will
> help to preserve the structure of this drivers.
>
> What do you think about this?
What would you add to these header files? I mean for spinlock.h it's
clear, it would contain dummy spinlocks. For other files I'm not sure
how much useful stuff we can put in there. For example wait.h contains
much stuff that - when it's used in the code you are porting - cannot
simply be replaced with dummy code but must be handled somehow. So if we
create the Linux header files there should be more gain than only the
ability to keep the include list untouched. I don't know for how many
files this is the case.
Porting over Linux code to barebox is often a balancing act. We can put
much effort into creating header files which make it possible to (almost)
blindly copy over code or we can keenly modify the Linux code to fit
into barebox. One extreme leads to easily portable but probably
inefficient code, the other leads to hard to update but probably better
understandable code. The truth is probably somewhere between both
extremes.
Anyway, to put it short, I think it makes sense to at least move the
stuff we already have in barebox-wrapper.h to their original places.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-01-26 21:41 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-04 16:59 linux headers Robert Millan
2007-06-04 17:24 ` Robert Millan
2007-06-04 17:35 ` Jeroen Dekkers
-- strict thread matches above, loose matches on Subject: below --
2016-01-26 15:17 Linux headers Yegor Yefremov
2016-01-26 21:41 ` Sascha Hauer
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.