mailing list of musl libc
 help / color / mirror / code / Atom feed
* Embedded distro
@ 2013-08-03 16:19 Kirk Terrell
  2013-08-03 16:43 ` Szabolcs Nagy
  2013-08-03 20:28 ` John Spencer
  0 siblings, 2 replies; 10+ messages in thread
From: Kirk Terrell @ 2013-08-03 16:19 UTC (permalink / raw)
  To: musl

[-- Attachment #1: Type: text/plain, Size: 496 bytes --]

Good morning,

I've been working on a distro that is a fork from the CLFS Embedded 
project that uses musl libc in place of libc. I've managed to boot an 
emulated Vexpress-a9 target using the instructions at 
http://kanj.github.io/elfs/book/armMusl/index.html.

kirk
____________________________________________________________
RN to BSN Online Option
Earn Your RN To BSN in 3 Semesters. Online, Affordable & User Friendly
http://thirdpartyoffers.netzero.net/TGL3341/51fd2d47aa4442d454d94st03duc

[-- Attachment #2: Type: text/html, Size: 1225 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Embedded distro
  2013-08-03 16:19 Embedded distro Kirk Terrell
@ 2013-08-03 16:43 ` Szabolcs Nagy
  2013-08-03 18:14   ` Kirk Terrell
  2013-08-03 20:28 ` John Spencer
  1 sibling, 1 reply; 10+ messages in thread
From: Szabolcs Nagy @ 2013-08-03 16:43 UTC (permalink / raw)
  To: musl

* Kirk Terrell <knjterrell@mybluelight.com> [2013-08-03 09:19:22 -0700]:
> I've been working on a distro that is a fork from the CLFS Embedded
> project that uses musl libc in place of libc. I've managed to boot
> an emulated Vexpress-a9 target using the instructions at
> http://kanj.github.io/elfs/book/armMusl/index.html.
> 

is the --host really the CLFS_TARGET? should it be renamed in the configure script?

CROSS_COMPILE=${CLFS_TARGET}-  ./configure --prefix=${CLFS} --disable-gcc-wrapper \
    --host=${CLFS_TARGET} --build=${CLFS_HOST} --syslibdir=${CLFS}/lib --includedir=${CLFS}/usr/include

what needs these header hacks?

cp ${CLFS}/usr/include/linux/if_slip.h ${CLFS}/usr/include/net/if_slip.h
cp ${CLFS}/usr/include/net/if_arp.h ${CLFS}/usr/include/linux/if_arp.h



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Embedded distro
  2013-08-03 16:43 ` Szabolcs Nagy
@ 2013-08-03 18:14   ` Kirk Terrell
  2013-08-03 19:57     ` Rich Felker
  2013-08-07 16:36     ` Rob Landley
  0 siblings, 2 replies; 10+ messages in thread
From: Kirk Terrell @ 2013-08-03 18:14 UTC (permalink / raw)
  To: musl

On 08/03/2013 09:43 AM, Szabolcs Nagy wrote:
> * Kirk Terrell <knjterrell@mybluelight.com> [2013-08-03 09:19:22 -0700]:
>> I've been working on a distro that is a fork from the CLFS Embedded
>> project that uses musl libc in place of libc. I've managed to boot
>> an emulated Vexpress-a9 target using the instructions at
>> http://kanj.github.io/elfs/book/armMusl/index.html.
>>
> is the --host really the CLFS_TARGET? should it be renamed in the configure script?
>
> CROSS_COMPILE=${CLFS_TARGET}-  ./configure --prefix=${CLFS} --disable-gcc-wrapper \
>      --host=${CLFS_TARGET} --build=${CLFS_HOST} --syslibdir=${CLFS}/lib --includedir=${CLFS}/usr/include
According to ./configure --help
System types:
   --target=TARGET         configure to run on target TARGET [detected]
   --host=HOST             same as --target

I think --host is legitimate but is confusing. I should look into 
changing this.

>
> what needs these header hacks?
>
> cp ${CLFS}/usr/include/linux/if_slip.h ${CLFS}/usr/include/net/if_slip.h
> cp ${CLFS}/usr/include/net/if_arp.h ${CLFS}/usr/include/linux/if_arp.h
>
>
>
I did this because busybox complained about header locations - these are 
headers from the kernel, not from Musl.  This issue did not present when 
building a similar system using uClibc.

Thank you for the feedback.

kirk
____________________________________________________________
RN to BSN Online Option
Earn Your RN To BSN in 3 Semesters. Online, Affordable & User Friendly
http://thirdpartyoffers.netzero.net/TGL3341/51fd482e7e5c1482b4672st04duc


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Embedded distro
  2013-08-03 18:14   ` Kirk Terrell
@ 2013-08-03 19:57     ` Rich Felker
  2013-08-04  2:56       ` Kirk Terrell
  2013-08-07 16:36     ` Rob Landley
  1 sibling, 1 reply; 10+ messages in thread
From: Rich Felker @ 2013-08-03 19:57 UTC (permalink / raw)
  To: musl

On Sat, Aug 03, 2013 at 11:14:08AM -0700, Kirk Terrell wrote:
> On 08/03/2013 09:43 AM, Szabolcs Nagy wrote:
> >* Kirk Terrell <knjterrell@mybluelight.com> [2013-08-03 09:19:22 -0700]:
> >>I've been working on a distro that is a fork from the CLFS Embedded
> >>project that uses musl libc in place of libc. I've managed to boot
> >>an emulated Vexpress-a9 target using the instructions at
> >>http://kanj.github.io/elfs/book/armMusl/index.html.
> >>
> >is the --host really the CLFS_TARGET? should it be renamed in the configure script?
> >
> >CROSS_COMPILE=${CLFS_TARGET}-  ./configure --prefix=${CLFS} --disable-gcc-wrapper \
> >     --host=${CLFS_TARGET} --build=${CLFS_HOST} --syslibdir=${CLFS}/lib --includedir=${CLFS}/usr/include
> According to ./configure --help
> System types:
>   --target=TARGET         configure to run on target TARGET [detected]
>   --host=HOST             same as --target
> 
> I think --host is legitimate but is confusing. I should look into
> changing this.

Yes, it's confusing. GCC has "build", "host", and "target":

- Build: the system you're compiling GCC on.
- Host: the system you're compiling GCC to run on.
- Target: the system you're compiling GCC to generate code for.

So if you're cross-compiling a native compiler for $CLFS_TARGET, both
host and target should be $CLFS_TARGET.

On the other hand, for compiling a cross-compiler that will run on
your host system but produce code for $CLFS_TARGET, you would use
$CLFS_HOST for host (this should be the default anyway) and
$CLFS_TARGET for target.

Confusing enough? :)

> >what needs these header hacks?
> >
> >cp ${CLFS}/usr/include/linux/if_slip.h ${CLFS}/usr/include/net/if_slip.h
> >cp ${CLFS}/usr/include/net/if_arp.h ${CLFS}/usr/include/linux/if_arp.h
> >
> I did this because busybox complained about header locations - these
> are headers from the kernel, not from Musl.  This issue did not
> present when building a similar system using uClibc.

I wasn't aware of these issues. Which files are they in? Maybe we
should look into getting this fixed upstream...

Rich


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Embedded distro
  2013-08-03 16:19 Embedded distro Kirk Terrell
  2013-08-03 16:43 ` Szabolcs Nagy
@ 2013-08-03 20:28 ` John Spencer
  1 sibling, 0 replies; 10+ messages in thread
From: John Spencer @ 2013-08-03 20:28 UTC (permalink / raw)
  To: musl; +Cc: Kirk Terrell

On 08/03/2013 06:19 PM, Kirk Terrell wrote:
> Good morning,
>
> I've been working on a distro that is a fork from the CLFS Embedded
> project that uses musl libc in place of libc. I've managed to boot an
> emulated Vexpress-a9 target using the instructions at
> http://kanj.github.io/elfs/book/armMusl/index.html.

looking at 
http://kanj.github.io/elfs/book/armMusl/materials/packages.html it 
mentions uclibc, but not musl.

is there a specific reason you use ancient busybox and kernel ?
using busybox 1.20.2 with the patches used by sabotage[1]
would at least give you a completely working sed that can be used to 
build anything that depends on sed without having to install gnu's.

[1] https://github.com/rofl0r/sabotage/tree/master/KEEP


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Embedded distro
  2013-08-03 19:57     ` Rich Felker
@ 2013-08-04  2:56       ` Kirk Terrell
  2013-08-04 11:40         ` Rich Felker
  0 siblings, 1 reply; 10+ messages in thread
From: Kirk Terrell @ 2013-08-04  2:56 UTC (permalink / raw)
  To: musl

On 08/03/2013 12:57 PM, Rich Felker wrote:
> On Sat, Aug 03, 2013 at 11:14:08AM -0700, Kirk Terrell wrote:
>> On 08/03/2013 09:43 AM, Szabolcs Nagy wrote:
>>> * Kirk Terrell <knjterrell@mybluelight.com> [2013-08-03 09:19:22 -0700]:
>>>> I've been working on a distro that is a fork from the CLFS Embedded
>>>> project that uses musl libc in place of libc. I've managed to boot
>>>> an emulated Vexpress-a9 target using the instructions at
>>>> http://kanj.github.io/elfs/book/armMusl/index.html.
>>>>
>>> is the --host really the CLFS_TARGET? should it be renamed in the configure script?
>>>
>>> CROSS_COMPILE=${CLFS_TARGET}-  ./configure --prefix=${CLFS} --disable-gcc-wrapper \
>>>      --host=${CLFS_TARGET} --build=${CLFS_HOST} --syslibdir=${CLFS}/lib --includedir=${CLFS}/usr/include
>> According to ./configure --help
>> System types:
>>    --target=TARGET         configure to run on target TARGET [detected]
>>    --host=HOST             same as --target
>>
>> I think --host is legitimate but is confusing. I should look into
>> changing this.
> Yes, it's confusing. GCC has "build", "host", and "target":
>
> - Build: the system you're compiling GCC on.
> - Host: the system you're compiling GCC to run on.
> - Target: the system you're compiling GCC to generate code for.
>
> So if you're cross-compiling a native compiler for $CLFS_TARGET, both
> host and target should be $CLFS_TARGET.
>
> On the other hand, for compiling a cross-compiler that will run on
> your host system but produce code for $CLFS_TARGET, you would use
> $CLFS_HOST for host (this should be the default anyway) and
> $CLFS_TARGET for target.
>
> Confusing enough? :)
>
>>> what needs these header hacks?
>>>
>>> cp ${CLFS}/usr/include/linux/if_slip.h ${CLFS}/usr/include/net/if_slip.h
>>> cp ${CLFS}/usr/include/net/if_arp.h ${CLFS}/usr/include/linux/if_arp.h
>>>
>> I did this because busybox complained about header locations - these
>> are headers from the kernel, not from Musl.  This issue did not
>> present when building a similar system using uClibc.
> I wasn't aware of these issues. Which files are they in? Maybe we
> should look into getting this fixed upstream...
>
> Rich
>
>
The headers were to address the following issues that occurred while 
compiling busybox1.18.4. I'm using GCC-4.6.0 and Musl 0.9.11. I've 
passed the extra cflags -D_GNU_SOURCE -Dfdprintd=dprintf. My target is 
armel-unknown-linux-gnueabi. While compiling busybox I got the following 
errors:

> CC      networking/ifconfig.o
> networking/ifconfig.c:43:26: fatal error: net/if_slip.h: No such file 
> or directory
> compilation terminated.

After turning off ifconfig I get the following:

> networking/libiproute/ll_types.c:11:26: fatal error: linux/if_arp.h: 
> No such file or directory
> compilation terminated.

Since these headers come from the kernel and not Musl I suspect its a 
busybox issue. Any insight would be appreciated.







____________________________________________________________
Fast, Secure, NetZero 4G Mobile Broadband. Try it.
http://www.netzero.net/?refcd=NZINTISP0512T4GOUT2


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Embedded distro
  2013-08-04  2:56       ` Kirk Terrell
@ 2013-08-04 11:40         ` Rich Felker
  2013-08-05  0:57           ` Kirk Terrell
  0 siblings, 1 reply; 10+ messages in thread
From: Rich Felker @ 2013-08-04 11:40 UTC (permalink / raw)
  To: musl

On Sat, Aug 03, 2013 at 07:56:35PM -0700, Kirk Terrell wrote:
> >>>what needs these header hacks?
> >>>
> >>>cp ${CLFS}/usr/include/linux/if_slip.h ${CLFS}/usr/include/net/if_slip.h
> >>>cp ${CLFS}/usr/include/net/if_arp.h ${CLFS}/usr/include/linux/if_arp.h
> >>>
> >>I did this because busybox complained about header locations - these
> >>are headers from the kernel, not from Musl.  This issue did not
> >>present when building a similar system using uClibc.
> >I wasn't aware of these issues. Which files are they in? Maybe we
> >should look into getting this fixed upstream...
> >
> The headers were to address the following issues that occurred while
> compiling busybox1.18.4. I'm using GCC-4.6.0 and Musl 0.9.11. I've
> passed the extra cflags -D_GNU_SOURCE -Dfdprintd=dprintf. My target
> is armel-unknown-linux-gnueabi. While compiling busybox I got the
> following errors:
> 
> >CC      networking/ifconfig.o
> >networking/ifconfig.c:43:26: fatal error: net/if_slip.h: No such
> >file or directory
> >compilation terminated.
> 
> After turning off ifconfig I get the following:
> 
> >networking/libiproute/ll_types.c:11:26: fatal error:
> >linux/if_arp.h: No such file or directory
> >compilation terminated.
> 
> Since these headers come from the kernel and not Musl I suspect its
> a busybox issue. Any insight would be appreciated.

Like John said in his reply to you, you're using an ancient version of
Busybox with lots of known bugs, some of which are especially
problematic if you'll be using the busybox utilities in place of
coreutils when running programs' configure scripts and building
software. I would recommend upgrading to latest busybox. As far as I
know, it has all the issues against musl fixed, as well as having
fixes for the bugs I just mentioned.

Rich


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Embedded distro
  2013-08-04 11:40         ` Rich Felker
@ 2013-08-05  0:57           ` Kirk Terrell
  2013-08-05  1:16             ` Rich Felker
  0 siblings, 1 reply; 10+ messages in thread
From: Kirk Terrell @ 2013-08-05  0:57 UTC (permalink / raw)
  To: musl

On 08/04/2013 04:40 AM, Rich Felker wrote:
> On Sat, Aug 03, 2013 at 07:56:35PM -0700, Kirk Terrell wrote:
>>>>> what needs these header hacks?
>>>>>
>>>>> cp ${CLFS}/usr/include/linux/if_slip.h ${CLFS}/usr/include/net/if_slip.h
>>>>> cp ${CLFS}/usr/include/net/if_arp.h ${CLFS}/usr/include/linux/if_arp.h
>>>>>
>>>> I did this because busybox complained about header locations - these
>>>> are headers from the kernel, not from Musl.  This issue did not
>>>> present when building a similar system using uClibc.
>>> I wasn't aware of these issues. Which files are they in? Maybe we
>>> should look into getting this fixed upstream...
>>>
>> The headers were to address the following issues that occurred while
>> compiling busybox1.18.4. I'm using GCC-4.6.0 and Musl 0.9.11. I've
>> passed the extra cflags -D_GNU_SOURCE -Dfdprintd=dprintf. My target
>> is armel-unknown-linux-gnueabi. While compiling busybox I got the
>> following errors:
>>
>>> CC      networking/ifconfig.o
>>> networking/ifconfig.c:43:26: fatal error: net/if_slip.h: No such
>>> file or directory
>>> compilation terminated.
>> After turning off ifconfig I get the following:
>>
>>> networking/libiproute/ll_types.c:11:26: fatal error:
>>> linux/if_arp.h: No such file or directory
>>> compilation terminated.
>> Since these headers come from the kernel and not Musl I suspect its
>> a busybox issue. Any insight would be appreciated.
> Like John said in his reply to you, you're using an ancient version of
> Busybox with lots of known bugs, some of which are especially
> problematic if you'll be using the busybox utilities in place of
> coreutils when running programs' configure scripts and building
> software. I would recommend upgrading to latest busybox. As far as I
> know, it has all the issues against musl fixed, as well as having
> fixes for the bugs I just mentioned.
>
> Rich
>
>
I tried the most recent version of busybox and had the same issue, and 
so I looked a little further:

> excerpt from busybox networking/ifconfig.c
> if ENABLE_FEATURE_IFCONFIG_SLIP
> # include <net/if_slip.h>
> #endif
>
> clfs-kanj:~/sources/musl-0.9.11/include/net$ ls
> ethernet.h  if.h  if_arp.h  route.h
>
> clfs-kanj:~/sources/uClibc-0.9.31/include/net$ ls
> ethernet.h  if_arp.h     if_ppp.h     if_slip.h   ppp_defs.h
> if.h        if_packet.h  if_shaper.h  ppp-comp.h  route.h
>
> from sabatoge-master/KEEP/busybox.patch
>
> #if ENABLE_FEATURE_IFCONFIG_SLIP
> -# include <net/if_slip.h>
> +# include <linux/if_slip.h>
>  #endif
>
To me it appears that uClibc is installing headers, that busybox expects 
to see,  that Musl does not install.  I am attempting to use Musl as far 
as possible as drop in replacement. I will update to a recent version of 
Busybox.

Kirk

____________________________________________________________
Stand With Our President
Show your support for raising the minimum wage. Sign the petition!
http://thirdpartyoffers.netzero.net/TGL3341/51fef88b8b830788a3f5fst01vuc


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Embedded distro
  2013-08-05  0:57           ` Kirk Terrell
@ 2013-08-05  1:16             ` Rich Felker
  0 siblings, 0 replies; 10+ messages in thread
From: Rich Felker @ 2013-08-05  1:16 UTC (permalink / raw)
  To: musl

On Sun, Aug 04, 2013 at 05:57:50PM -0700, Kirk Terrell wrote:
> I tried the most recent version of busybox and had the same issue,
> and so I looked a little further:
> 
> >excerpt from busybox networking/ifconfig.c
> >if ENABLE_FEATURE_IFCONFIG_SLIP
> ># include <net/if_slip.h>
> >#endif
> >
> >clfs-kanj:~/sources/musl-0.9.11/include/net$ ls
> >ethernet.h  if.h  if_arp.h  route.h
> >
> >clfs-kanj:~/sources/uClibc-0.9.31/include/net$ ls
> >ethernet.h  if_arp.h     if_ppp.h     if_slip.h   ppp_defs.h
> >if.h        if_packet.h  if_shaper.h  ppp-comp.h  route.h
> >
> >from sabatoge-master/KEEP/busybox.patch
> >
> >#if ENABLE_FEATURE_IFCONFIG_SLIP
> >-# include <net/if_slip.h>
> >+# include <linux/if_slip.h>
> > #endif
> >
> To me it appears that uClibc is installing headers, that busybox
> expects to see,  that Musl does not install.  I am attempting to use
> Musl as far as possible as drop in replacement. I will update to a
> recent version of Busybox.

Ah, I've probably never tried enabling slip. We're talking about a
protocol that hasn't been used since the early 90s. :) I'll see if
someone can look into whether we could add such a header, though.

Rich


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Embedded distro
  2013-08-03 18:14   ` Kirk Terrell
  2013-08-03 19:57     ` Rich Felker
@ 2013-08-07 16:36     ` Rob Landley
  1 sibling, 0 replies; 10+ messages in thread
From: Rob Landley @ 2013-08-07 16:36 UTC (permalink / raw)
  To: musl; +Cc: Kirk Terrell

[-- Attachment #1: Type: text/plain, Size: 1888 bytes --]

On 08/03/2013 01:14:08 PM, Kirk Terrell wrote:
> On 08/03/2013 09:43 AM, Szabolcs Nagy wrote:
>> * Kirk Terrell <knjterrell@mybluelight.com> [2013-08-03 09:19:22  
>> -0700]:
>>> I've been working on a distro that is a fork from the CLFS Embedded
>>> project that uses musl libc in place of libc. I've managed to boot
>>> an emulated Vexpress-a9 target using the instructions at
>>> http://kanj.github.io/elfs/book/armMusl/index.html.
>>> 
>> is the --host really the CLFS_TARGET? should it be renamed in the  
>> configure script?
>> 
>> CROSS_COMPILE=${CLFS_TARGET}-  ./configure --prefix=${CLFS}  
>> --disable-gcc-wrapper \
>>      --host=${CLFS_TARGET} --build=${CLFS_HOST}  
>> --syslibdir=${CLFS}/lib --includedir=${CLFS}/usr/include
> According to ./configure --help
> System types:
>   --target=TARGET         configure to run on target TARGET [detected]
>   --host=HOST             same as --target
> 
> I think --host is legitimate but is confusing. I should look into  
> changing this.
> 
>> 
>> what needs these header hacks?
>> 
>> cp ${CLFS}/usr/include/linux/if_slip.h  
>> ${CLFS}/usr/include/net/if_slip.h
>> cp ${CLFS}/usr/include/net/if_arp.h  
>> ${CLFS}/usr/include/linux/if_arp.h
>> 
>> 
>> 
> I did this because busybox complained about header locations - these  
> are headers
> from the kernel, not from Musl.  This issue did not present when  
> building a
> similar system using uClibc.

uClibc #includes the kernel headers in its own headers, and/or parses  
stuff out of them at build time. Thus you have to tell uClibc where the  
kernel headers are in order to build uClibc, so kernel headers are  
installed as part of the uClibc build process.

Musl doesn't use kernel headers. You can install them after the fact  
(attached is the script I use to do so), but musl itself is not  
involved in this.

Rob

[-- Attachment #2: whack2.sh --]
[-- Type: application/x-shellscript, Size: 435 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-08-07 16:36 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-03 16:19 Embedded distro Kirk Terrell
2013-08-03 16:43 ` Szabolcs Nagy
2013-08-03 18:14   ` Kirk Terrell
2013-08-03 19:57     ` Rich Felker
2013-08-04  2:56       ` Kirk Terrell
2013-08-04 11:40         ` Rich Felker
2013-08-05  0:57           ` Kirk Terrell
2013-08-05  1:16             ` Rich Felker
2013-08-07 16:36     ` Rob Landley
2013-08-03 20:28 ` John Spencer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).