[llvmlinux] Latest LLVMLinux Git not booting (both from build architecture and source tree)

Vinícius Tinti viniciustinti at gmail.com
Tue Nov 4 16:38:01 UTC 2014


On Tue, Nov 4, 2014 at 1:39 PM, Jason Gionta <jjgionta at ncsu.edu> wrote:
> Thanks for the intuition. Specifically "eval `make -s
> kernel-shell-for-build` $SHELL". This helped wonders! I was able to copy the
> gcc builds *.o from boot to the clang build and it booted (out of setup) and
> root shell!!! thank you very much.

Great! I have forgotten to send a copy to the maillist. I am sending now.

> On Mon, Nov 3, 2014 at 3:26 PM, Vinícius Tinti <viniciustinti at gmail.com>
> wrote:
>>
>> On Mon, Nov 3, 2014 at 3:03 PM, Jason Gionta <jjgionta at ncsu.edu> wrote:
>> > Hi Jan-Simon,
>> >
>> > Thanks for the reply. Please don't consider my reply as anything less
>> > than
>> > having the utmost respect for the project. I understand the large amount
>> > of
>> > work that is going in to maintaining LLVMLinux. I am just looking to get
>> > insight into how to get this thing booting. I assumed that the build
>> > framework would solve this problem. While getting the setup.elf working,
>> > I
>> > figured that compiling arch/x86/boot with gcc would solve the problem
>> > but I
>> > couldn't find the switch do to so. Is there a simple way to force that
>> > directory to build with gcc?
>>
>> Hi Jason,
>>
>> It is not a simple way but you can do as follows:
>>
>> 1) compile the gcc kernel
>>
>> make kernel-gcc-build
>>
>> 2) configure clang kernel
>>
>> make kernel-configure
>>
>> 3) enter in a build shell for clang (a shell with various LLVMLinux
>> flags exported)
>>
>> eval `make -s kernel-shell-for-build` $SHELL
>>
>> 4) build clang's arch/x86/boot/built-in.o
>>
>> $BUILD_COMMAND arch/x86/boot/built-in.o
>>
>> 5) copy gcc's built-in.o into clang's built-in.o
>>
>> cp path/gcc/arch/x86/boot/built-in.o path/clang/arch/x86/boot/built-in.o
>>
>> 6) build clang's kernel
>>
>> $BUILD_COMMAND bzImage modules
>>
>> Let me know if it works. I did this once on ARM under drivers/
>> something and it worked.
>>
>> Regards,
>> Tinti
>>
>> > Thanks again for speedy replies.
>> >
>> > -Jason
>> >
>> > On Mon, Nov 3, 2014 at 11:50 AM, Jan-Simon Moeller <dl9pf at gmx.de> wrote:
>> >>
>> >> Am Montag, 3. November 2014, 10:18:47 schrieb Jason Gionta:
>> >> > Thanks for the reply. It seems your patch has fixes that are
>> >> > relevant.
>> >> > Why
>> >> > aren't these part of the latest tree? I cloned the resources from
>> >> > http://git.linuxfoundation.org/llvmlinux/kernel.git/ which is
>> >> > supposed
>> >> > to
>> >> > have the latest patches. Are there other patches that need to be
>> >> > applied
>> >> > to
>> >> > make a working and stable build?
>> >>
>> >> Hi Jason,
>> >>
>> >> llvmlinux is a work-in-progress tree upstreaming to linux and llvm.
>> >> Probably it got accidently remove during the reworking of the patches
>> >> for
>> >> upstreaming. For quite some time we used gcc+gas for everything below
>> >> arch/x86/boot , which has hidden the issue.
>> >>
>> >> I'll look into it - @David, do you think the regparm attribut +
>> >> function
>> >> wrapping can be reused upstream ?
>> >>
>> >> Best regards,
>> >> Jan-Simon
>> >>
>> >
>> >
>> >
>> > --
>> > Jason Gionta
>> > Cyber Defense Lab
>> > North Carolina State University
>> > jjgionta at ncsu.edu
>> >
>> > _______________________________________________
>> > LLVMLinux mailing list
>> > LLVMLinux at lists.linuxfoundation.org
>> > https://lists.linuxfoundation.org/mailman/listinfo/llvmlinux
>>
>>
>>
>> --
>> Simplicity is the ultimate sophistication
>
>
>
>
> --
> Jason Gionta
> Cyber Defense Lab
> North Carolina State University
> jjgionta at ncsu.edu



-- 
Simplicity is the ultimate sophistication


More information about the LLVMLinux mailing list