buildroot for raspberry pi


22 posts
by kondaveetiarungopal » Thu Aug 29, 2013 4:21 pm
Hi,

iam tried to build a root file system and kernel for raspberry pi...iam download the builroot from buildroot.org and download the raspberry pi kernel from git....iam compile a raspberry pi kernel using bcmrpi_defconfig and cross compile using raspberry pi toolsmaster...i got zimage..using buildroot i got the root filesystem in tar format..iam download the firmware from git...problem is iam copied zimage to my memory card fat 32partition with name kernel.img and copy my firmware to my boot partition of memory card...and in ext4 partition iam untar root file system in this partition..so now iam unmount the memory card plug in raspberry pi.but it is not booting the kernel...please give me some inputs..what is problem here?how to rectify this problem..
Posts: 27
Joined: Fri Apr 26, 2013 6:35 am
by topguy » Thu Aug 29, 2013 6:34 pm
Your post is a little difficult to read, use the "enter" key more.

I have been using different buildroot based environments the last one can be found here: https://github.com/albertd/buildroot-rpi

You can download a copy of my last build here: https://www.dropbox.com/s/oeamwqinmc2od ... 013.tar.gz

And you can compare which files you have with what I have. Then we can see if you are missing any files, and you should compare the contents of config.txt.

Can you also describe the partition table of your SD-card ? ( the output from "sudo parted -l" can also help if you are on linux )
User avatar
Posts: 647
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway
by kondaveetiarungopal » Thu Aug 29, 2013 7:27 pm
Hi,
thank you for giving reply..
my sd card details:-

/dev/sdb1 fat 16
/dev/sdb2 ext4..
this buildroot for raspberry pi..what iam did is iam download the general buildroot and i made a changes according to raspberry pi board..
yes this buildroot is also useful to me..but i want to do this method..
iam compile a raspberry pi kernel form elinux.org kernel compilation..now i got a zimage
now iam using a buildroot i got a root file system..i am send these files to my memory card
that is boot is in fat and root file system in ext4..
i completed this step but kernel is unable to boot..this is problem
Posts: 27
Joined: Fri Apr 26, 2013 6:35 am
by topguy » Thu Aug 29, 2013 11:05 pm
Its hard for us to guess which part of your build could be the problem.
- It is the firmware and config.txt ?
- It is the kernel (zImage) ?
- or could it be the files in your ext4 (root) partition ?

I have given you link to a working set of files ( firmware + kernel + buildroot ) so you have the possibility to replace some of your own files with something that works. That way we might be able to identify which part is the problem and ask for more relevant information.
User avatar
Posts: 647
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway
by AndrewS » Fri Aug 30, 2013 10:43 am
Interestingly, https://github.com/raspberrypi/noobs also uses buildroot :-)
See https://github.com/raspberrypi/noobs/issues/8 for more info.
User avatar
Posts: 2777
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK
by kondaveetiarungopal » Fri Aug 30, 2013 1:01 pm
Hi Tog,

i followed u r link..i was take a default configuration for raspberry pi..meas make bcmrpi_defconfig.
iam not use make menuconfig..
so now problem is it shows the cmdline but it is not booted..
it shows welcome to buildroot and some thing..
it is shows upto
usb 1.1:new usbdeviced 3 using dwc-otg found,id vendor=0424,id product
smsc 95xx v1.0.4
smsc 95xx v1.0.4
smsc 95xx 1-1.1;1.0 eth0:register smsc95xx at usb-bcm2708_usb-1.1 smsc95xx usb 2.0 ethernet,
thats it..it is not shows anything and it is not booted..
what is the problem here..?
Posts: 27
Joined: Fri Apr 26, 2013 6:35 am
by topguy » Fri Aug 30, 2013 3:15 pm
kondaveetiarungopal wrote:Hi Tog,

i followed u r link..

what is the problem here..?


Which link ? I gave you two.
You have to be more detailed about what you do (or try to do) or else we have no chance of providing any help.

I think our main problem is communication.
User avatar
Posts: 647
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway
by kondaveetiarungopal » Sat Aug 31, 2013 4:14 am
Hi,
may be communication problem..
i was followed this link..
https://github.com/albertd/buildroot-rpi
yes i got zimage and rootfs.tar and rpi-firmware.
i was followed steps..
cmdline shows upto
usb 1.1:new usbdeviced 3 using dwc-otg found,id vendor=0424,id product
smsc 95xx v1.0.4
smsc 95xx v1.0.4
smsc 95xx 1-1.1;1.0 eth0:register smsc95xx at usb-bcm2708_usb-1.1 smsc95xx usb 2.0 ethernet,

please give me some inputs...
Posts: 27
Joined: Fri Apr 26, 2013 6:35 am
by topguy » Sun Sep 01, 2013 11:55 pm
The it seems like the firmware is Ok, and probably the kernel is booting, but maybe the root-partition is not correct.

Maybe the output from an "ls" on both partitions would help.
User avatar
Posts: 647
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway
by kondaveetiarungopal » Mon Sep 02, 2013 10:32 am
Hi Thank you for replying..now it is booted it shows only a command line with out gui...how to add gui to this..i mean i want to add lxde desktop to this..how to add this...and i want to add my booting image during raspberry pi booting ..how to do this..please give some inputs....
Posts: 27
Joined: Fri Apr 26, 2013 6:35 am
by topguy » Mon Sep 02, 2013 10:56 am
If you want an LXDE desktop, why aren't you using the standard Rasbian image ??

Buildroot is a good tool when you want to build a minimal image with just the basic packages you need. But if you are going to build X-windows and stuff the build time and size is going to grow quite large.
User avatar
Posts: 647
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway
by kondaveetiarungopal » Mon Sep 02, 2013 11:02 am
ofcource that is also one solution using standard image..but i want do step by step in os..so please tell me how to install lxde or other gui supported for raspberry pi installation and how to add booting image to raspberry pi..
Posts: 27
Joined: Fri Apr 26, 2013 6:35 am
by topguy » Mon Sep 02, 2013 11:17 am
I have no idea, you should probably look in buildroot documentation.
User avatar
Posts: 647
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway
by AndrewS » Mon Sep 02, 2013 4:05 pm
It sounds like ArchLinux would be a better fit for your needs - it has the "start simple and gradually work your way up" approach that you seem to be looking for.
User avatar
Posts: 2777
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK
by kondaveetiarungopal » Mon Sep 02, 2013 4:12 pm
HI Andrew thank you for reply..i was get a command line promt using buildroot..now i want to add gui..iam asking this...how to add light weight gui to this platform..
Posts: 27
Joined: Fri Apr 26, 2013 6:35 am
by AndrewS » Mon Sep 02, 2013 4:35 pm
As topguy says, you'll need to check the buildroot documentation.
I believe that in the majority of cases buildroot is only used to build command-line environments, which is why I suggested that Arch may suit you better.
User avatar
Posts: 2777
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK
by kondaveetiarungopal » Tue Sep 03, 2013 12:27 pm
Hi,
when iam tried to install any package using apt-get it shows apt-get not found..iam getting only command line..how to install firefox and some features..
Posts: 27
Joined: Fri Apr 26, 2013 6:35 am
by topguy » Tue Sep 03, 2013 1:38 pm
apt-get is not present, because that only works on debian-based distros. (like raspbian)

A buildroot environment will never support any package-management system, because the whole point of buildroot is that you build everything with buildroot.

You can add stuff to buildroot by running "make menuconfig" and add packages there. Then run make and copy the new root filesystem to your SD-card.
User avatar
Posts: 647
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway
by kondaveetiarungopal » Tue Sep 03, 2013 3:09 pm
Hi Thank you for giving reply to me...if iam add apt-get in buildroot...so i will place a root file in memory card.at that time it supports apt-get supports right?if i want to install in which path i was prefered in buildroot....
Posts: 27
Joined: Fri Apr 26, 2013 6:35 am
by ghans » Tue Sep 03, 2013 3:52 pm
I guess all those questions are best answered on the
buildroot mailinglist(s) ...


ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org
Posts: 4369
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany
by AndrewS » Tue Sep 03, 2013 3:53 pm
You can't use apt-get with buildroot no matter what you try, it simply won't work.
  • If you want a truly-minimal system that you've built yourself from scratch, then use buildroot, but as already explained with buildroot you have to decide ahead-of-time what packages you'll want included in your rootfs (and it'll be very difficult, if possible at all, to include any GUI programs).
  • If you want a minimal system that gives you lots of control and options to customise, but still comes with a package manager (which even allows you to add a GUI later on), use Arch.
  • If you want to use apt-get, use Raspbian or one of the other Debian-spinoffs.

I keep getting the impression that you're trying to run before you can walk... :|
User avatar
Posts: 2777
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK
by ghans » Tue Sep 03, 2013 4:44 pm
Why don't you use a distro , customise it , and then make a
.img via Win32DiskImager ?


ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org
Posts: 4369
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany