Quantcast

compiling kernel

classic Classic list List threaded Threaded
7 messages Options
raj
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

compiling kernel

raj
Hi,
Recently started using build root system, I have following questions, could you clarify?

1. how can I compile kernel and root file system separately, so that application user can use the kernel binary to create the root file system(no need to have kernel code)?

2. Even after using the pre-built target tool chain, build root compiles some of the host tools for the first time and later uses these host tools. Can I have pre-built host tools required for the build root similar to target tool chain? In multi user system on the Linux machine, only one user need to compile the target tool chain and host tools and rest of the user just create root file system using these target tool chain and host tools.


Thanks in advance,
Raj
 
 


_______________________________________________
buildroot mailing list
[hidden email]
http://lists.busybox.net/mailman/listinfo/buildroot
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: compiling kernel

Mike Zick
On Tue, 25 Feb 2014 15:08:27 -0800 (PST)
Basavaraj Hiremath <[hidden email]> wrote:

> Hi,
> Recently started using build root system, I have following questions,
> could you clarify?
>
> 1. how can I compile kernel and root file system separately, so that
> application user can use the kernel binary to create the root file
> system(no need to have kernel code)?
>

The kernel (and any code linked to it) is GPLv2 -
The source code must be available to whoever has the the binary.

The kernel can be separately compiled from the root file system,
but breaking the terms of the GPLv2 license is not one of the reasons.

If your system image uses proprietary code, the BR_EXTERNAL tree is
provided for that purpose.

> 2. Even after using the pre-built target tool chain, build root
> compiles some of the host tools for the first time and later uses
> these host tools. Can I have pre-built host tools required for the
> build root similar to target tool chain? In multi user system on the
> Linux machine, only one user need to compile the target tool chain
> and host tools and rest of the user just create root file system
> using these target tool chain and host tools.
>

Yes.

Your best starting place would be to review the buildroot manual.
Available both on-line and packaged with buildroot.

Mike
>
> Thanks in advance,
> Raj
_______________________________________________
buildroot mailing list
[hidden email]
http://lists.busybox.net/mailman/listinfo/buildroot
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: compiling kernel

Arnout Vandecappelle (Essensium/Mind)
On 26/02/14 08:48, Mike Zick wrote:

> On Tue, 25 Feb 2014 15:08:27 -0800 (PST)
> Basavaraj Hiremath <[hidden email]> wrote:
>
>> Hi,
>> Recently started using build root system, I have following questions,
>> could you clarify?
>>
>> 1. how can I compile kernel and root file system separately, so that
>> application user can use the kernel binary to create the root file
>> system(no need to have kernel code)?

 Compiling the kernel outside of buildroot is possible. You just
cross-compile it in the usual way, but pass
CROSS_COMPILE=<buildroot>/output/host/usr/bin/foo-bar-baz-
and
TARGET_DIR=<buildroot>/output/target

(the latter is for installing modules).

 If you use a pre-installed external toolchain, it's also possible to use
it directly for CROSS_COMPILE.

 Or you can make a separate buildroot config for the kernel and for the
rootfs, of course.

>>
>
> The kernel (and any code linked to it) is GPLv2 -
> The source code must be available to whoever has the the binary.

 There may be other reasons to want to compile them separately.

>
> The kernel can be separately compiled from the root file system,
> but breaking the terms of the GPLv2 license is not one of the reasons.
>
> If your system image uses proprietary code, the BR_EXTERNAL tree is
> provided for that purpose.
>
>> 2. Even after using the pre-built target tool chain, build root
>> compiles some of the host tools for the first time and later uses
>> these host tools. Can I have pre-built host tools required for the
>> build root similar to target tool chain? In multi user system on the
>> Linux machine, only one user need to compile the target tool chain
>> and host tools and rest of the user just create root file system
>> using these target tool chain and host tools.
>>
>
> Yes.

 Actually, no. Buildroot will always rebuild the host-packages that it
needs. Not rebuilding them would be part of the SDK concept that we've
been thinking about for two years, but nobody has ever actually worked on
that...


 Regards,
 Arnout

>
> Your best starting place would be to review the buildroot manual.
> Available both on-line and packaged with buildroot.
>
> Mike
>>
>> Thanks in advance,
>> Raj
> _______________________________________________
> buildroot mailing list
> [hidden email]
> http://lists.busybox.net/mailman/listinfo/buildroot
>


--
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
_______________________________________________
buildroot mailing list
[hidden email]
http://lists.busybox.net/mailman/listinfo/buildroot
raj
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: compiling kernel

raj
Hi Arnout,

Thanks much for your reply...
I want to compile kernel and root file system separately for couple of reasons:

1. I want application developer to just use prebuilt kernel binary + rootfs and run some script to create full Image so that, they don't need to have kernel source files.

could you give some clarity on creating separately file system and passing boot args to kernel to use the file system located in the dram.

2. I can compile kernel without the  "Initial RAM filesystem and RAM disk (initramfs/initrd) support", so that it has only the kernel image. How do I built the file system image?


Thanks & Regards,
Raj
 

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: compiling kernel

Arnout Vandecappelle (Essensium/Mind)
On 18/03/14 01:18, raj wrote:

> Hi Arnout,
>
> Thanks much for your reply...
> I want to compile kernel and root file system separately for couple of
> reasons:
>
> 1. I want application developer to just use prebuilt kernel binary + rootfs
> and run some script to create full Image so that, they don't need to have
> kernel source files.
>
> could you give some clarity on creating separately file system and passing
> boot args to kernel to use the file system located in the dram.

 I'm not sure what you mean exactly, but perhaps you should look into
unionfs-fuse. That allows you to boot a standard rootfs and then mount
the developer's additions on top of it.

>
> 2. I can compile kernel without the  "Initial RAM filesystem and RAM disk
> (initramfs/initrd) support", so that it has only the kernel image. How do I
> built the file system image?

 Look in buildroot's filesystem options menu.

 Regards,
 Arnout

>
>
> Thanks & Regards,
> Raj
>  
>
>
>
>
>
> --
> View this message in context: http://buildroot-busybox.2317881.n4.nabble.com/compiling-kernel-tp63718p65501.html
> Sent from the Buildroot (busybox) mailing list archive at Nabble.com.
> _______________________________________________
> buildroot mailing list
> [hidden email]
> http://lists.busybox.net/mailman/listinfo/buildroot
>


--
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
_______________________________________________
buildroot mailing list
[hidden email]
http://lists.busybox.net/mailman/listinfo/buildroot
raj
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: compiling kernel

raj
Hi Arnout,

I use the buildroot system to build the uImage and rootfs.cpio file, I am not building image linked with rootfs file system.

CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""

I want to pass boot arguments to kernel to use my file system(rootfs.cpio)

Ex: uImage located on DRAM address = 0x60080000
       rootfs.cpio  DRMA        address   = 0x61000000

my boot arguments
===============
root=/dev/mem rw initrd=0x61000000,8M init=/init console=ttyS1 ip=192.168.1.12:::::eth0:off



init file
==========

/bin/mount -t devtmpfs devtmpfs /dev

exec 0</dev/console
exec 1>/dev/console
exec 2>/dev/console

exec /sbin/init $*


Thanks & regards,
Raj
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: compiling kernel

Arnout Vandecappelle (Essensium/Mind)
On 21/03/14 23:02, raj wrote:

> Hi Arnout,
>
> I use the buildroot system to build the uImage and rootfs.cpio file, I am
> not building image linked with rootfs file system.
>
> CONFIG_BLK_DEV_INITRD=y
> CONFIG_INITRAMFS_SOURCE=""
>
> I want to pass boot arguments to kernel to use my file system(rootfs.cpio)
>
> Ex: uImage located on DRAM address = 0x60080000
>        rootfs.cpio  DRMA        address   = 0x61000000
>
> my boot arguments
> ===============
> root=/dev/mem rw initrd=0x61000000,8M init=/init console=ttyS1
> ip=192.168.1.12:::::eth0:off

 So, do you have a question? Doesn't this work?


 Regards,
 Arnout


>
>
>
> init file
> ==========
>
> /bin/mount -t devtmpfs devtmpfs /dev
>
> exec 0</dev/console
> exec 1>/dev/console
> exec 2>/dev/console
>
> exec /sbin/init $*
>
>
> Thanks & regards,
> Raj
>
>
>
>
> --
> View this message in context: http://buildroot-busybox.2317881.n4.nabble.com/compiling-kernel-tp63718p65689.html
> Sent from the Buildroot (busybox) mailing list archive at Nabble.com.
> _______________________________________________
> buildroot mailing list
> [hidden email]
> http://lists.busybox.net/mailman/listinfo/buildroot
>


--
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
_______________________________________________
buildroot mailing list
[hidden email]
http://lists.busybox.net/mailman/listinfo/buildroot
Loading...