I have a Raspberry pi board and I need to make a linux distros to run on my board without use Raspberry pi kernel.
My main purpose is Make a .img file and write to SD-Card then run on my raspberry pi board.
Can i use LFS for this board?
I have a Raspberry pi board and I need to make a linux distros to run on my board without use Raspberry pi kernel.
My main purpose is Make a .img file and write to SD-Card then run on my raspberry pi board.
Can i use LFS for this board?
Can i use LFS for this board?
Maybe1, but
without use Raspberry pi kernel.
Sorry, you do not have a choice about that. The reason there is a Pi kernel is it includes bits necessary to the operation of the device that are not part of the vanilla kernel.
However, you don't have to use a pre-compiled version, the source for the Pi kernel is here, which you can drop into place with LFS2. I haven't updated this for a while (as I haven't had been doing it anymore), but you may want to glance through the notes here, paying particular attention to the use of the correct defconfig
.
1. There may end up being some odd issues with the C library, which is eccentrically organized. Also, there's some stuff you'll want or need to incorporate; have a look here for clues. Note that the use of device tree is something you will want to think about WRT the kernel. The stuff for that is in the same github repo you will find the /opt/vc
stuff and precompiled kernel.
2. If you don't follow this or any of the other points made here I very strongly urge you to give up on this quest now. LFS is tedious enough; cross-compiling it for the pi is going to be a torturous experience with a low educational value : time invested ratio. And the only real value of LFS for most people is education IMO; it is a great way to learn how GNU/Linux is put together but you might as well do it on the one system, not cross-compiling. If you aren't cross-compiling, be prepared to wait eons and be confronted with all kinds of headache. Put another way: This is not likely a worthwhile pursuit.
arch/arm
directory and go through all theKconfig
files in the various "mach", etc., subdirectories, you'll notice there are literally dozens of different platforms with specific C and ASM bits. If you compile a kernel for any of those, you must explicitly select them in the configuration first (and may be mutually exclusive). The Pi SoC's (BCM2835/6/7) are no different, just they again aren't part of the mainline kernel. – goldilocks Aug 09 '16 at 12:04