Buildroot question ?

Everyone,

I have built a boot image for BeagleBone Black with buildroot,
until :

-rw-r–r-- 1 bianchi bianchi 37264 May 5 13:32 am335x-boneblack.dtb
-rw-r–r-- 1 bianchi bianchi 35372 May 5 13:32 am335x-bone.dtb
-rw-r–r-- 1 bianchi bianchi 42096 May 5 13:32 am335x-evm.dtb
-rw-r–r-- 1 bianchi bianchi 40888 May 5 13:32 am335x-evmsk.dtb
-rw-r–r-- 1 bianchi bianchi 16777216 May 5 16:26 boot.vfat
-rw-r–r-- 1 bianchi bianchi 78292 May 5 13:18 MLO
-rw-r–r-- 1 bianchi bianchi 14505984 May 5 16:26 rootfs.ext2
lrwxrwxrwx 1 bianchi bianchi 11 May 5 16:26 rootfs.ext4 → rootfs.ext2
-rw-r–r-- 1 bianchi bianchi 10649600 May 5 16:26 rootfs.tar
-rw-r–r-- 1 bianchi bianchi 3424743 May 5 16:26 rootfs.tar.bz2
-rw-r–r-- 1 bianchi bianchi 31283712 May 5 16:26 sdcard.img
-rw-r–r-- 1 bianchi bianchi 625888 May 5 13:17 u-boot.img
-rwxr-xr-x 1 bianchi bianchi 77772 May 5 13:18 u-boot-spl.bin
-rw-r–r-- 1 bianchi bianchi 186 May 5 16:26 uEnv.txt
-rw-r–r-- 1 bianchi bianchi 4995616 May 5 13:32 zImage

My question is,
How can I make it boot until Linux prompt ?

Thanks

As I see it you should raw copy sdcard.img (dd, etcher) to a sdcard and make sure it gets booted from.
/Sven

I don’t use the default buildroot config for the BBB (I have my own custom one), but usually you just dd the sdcard.img

sudo dd if=sdcard.img of=/dev/sdb bs=1M

Assuming your SD card shows up at /dev/sdb

I have boot and root partition. And I have put sdcard.img on boot by cp command, will that work?

//
Regards,
Riko Ho
/
/

What is a "sdcard.img" ? Elaboration is required.

But typically, no it wont work. Typically, you'll want to use dd, or tar.
Then the partition that is meant to be bootable, needs to be marked as
bootable using a suitable tool. Such as fdisk, or perhaps sfdisk.

Such a workflow, would look something like this:
https://eewiki.net/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-RootFileSystem(smallflash)

Keep in mind this is Roberts build guide for the beaglebone black, and is
not intended in this context to be an exact steps example of what you need
to do. But it should give you a rough idea of what all needs to be
accomplished over all. *If* you're familiar enough with the Linux command
line, and tools used.

Additionally, if you search the internet for "debootstrap how to" You'll
probably find a lot of information on how one would create a rootfs, from
scratch, and how to apply that knowledge for this purpose. But again, in
this context, there will be a lot of superfluous information. So you'll
have to parse what you read, understand what's going on, and take away what
you need from it.

Ok thanks for the info, here’s about, sdcard.img

I have made two partitions from buildroot, those are files (output/image) I got from buildroot, I extracted and copied them manualy with “cp”

root@bianchi-HP-Pavilion-dv6-Notebook-PC:/media/bianchi/BOOT# ls -al
total 22208
drwxr-xr-x 2 bianchi bianchi 16384 Jan 1 1970 .
drwxr-x—+ 5 root root 4096 May 7 19:59 …
-rw-r–r-- 1 bianchi bianchi 37264 May 5 13:32 am335x-boneblack.dtb
-rw-r–r-- 1 bianchi bianchi 35372 May 5 13:32 am335x-bone.dtb
-rw-r–r-- 1 bianchi bianchi 42096 May 5 13:32 am335x-evm.dtb
-rw-r–r-- 1 bianchi bianchi 40888 May 5 13:32 am335x-evmsk.dtb
-rw-r–r-- 1 bianchi bianchi 16777216 May 5 20:32 boot.vfat
-rw-r–r-- 1 bianchi bianchi 78292 May 5 13:18 MLO
-rw-r–r-- 1 bianchi bianchi 625888 May 5 13:17 u-boot.img
-rw-r–r-- 1 bianchi bianchi 77772 May 5 13:18 u-boot-spl.bin
-rw-r–r-- 1 bianchi bianchi 186 May 5 20:32 uEnv.txt
-rw-r–r-- 1 bianchi bianchi 4995616 May 5 13:32 zImage

and root :
root@bianchi-HP-Pavilion-dv6-Notebook-PC:/media/bianchi/root# ls -alh
total 54M
drwxr-xr-x 2 root root 4.0K May 7 18:53 .
drwxr-x—+ 5 root root 4.0K May 7 19:59 …
-rw-r–r-- 1 root root 14M May 5 20:32 rootfs.ext2
lrwxrwxrwx 1 root root 11 May 7 18:53 rootfs.ext4 → rootfs.ext2
-rw-r–r-- 1 root root 11M May 5 20:32 rootfs.tar
-rw-r–r-- 1 root root 30M May 5 20:32 sdcard.img

do I need to “dd” sdcard.img to “root” ?

That images booted this far,

Thanks for the clue, I’ll keep posted …

I hadn’t done :

$ sudo dd if=buildroot/output/images/rootfs.ext4 of=/dev/sdb2

may be that's the problem ?

NO that's another problem..

sudo dd if=./sdcard.img of=/dev/sdb

It's labled as "sdcard" so you might as well use it..

Regards,

Well it's labeled as "sdcard.img" not "rootfs.img" or "boot.img"...

So give

sudo dd if=./sdcard.img of=/dev/sdb

a try, if it dooesn't work then go to:

https://buildroot.org/support.html

Regards,

I’ve been reading on it, I’ll follow it, hopefully it will work…

As Robert said, no that's not the problem. I'm kind of wondering how old
the sources are that buildroot is using. Because all modern official images
now days use a single partition. The date on uboot, looks reasonably new,
but that's not to say the sources are current.

You know, if you're really good at working with images, you can actually
use debootstrap to build your own image, add in beagleboard.org's repo,
download a kernel image, and get it working reasonably quick, and easily.
I've also no idea what kernel version you're using there *looks* looks like
4.4.32 it seems.

Just out of curiosity, is there any reason why you have to build your own
images ? The newer testing images are very stable from what I've
experienced( a lot of experience by the way ), and have features you may
want, that probably are not included in the ones buildroot is building for
you. For instance uboot is now able to load device tree overlays, and
someone, I'm not sure who, has made the TI kernel based images a pleasure
to work with. e.g. there are no longer a ton of kernel modules loaded at
boot if you do not need them. They only load as you need them, it seems.

It works already with “dd” sdcard.img into /dev/sdb2,

I built my own image, for my knowledge on how to do it.

Everyone,

I tried to run :

./beagleboard.org_jessie_image.sh, and at the end I got below :

Processing triggers for libc-bin (2.19-18+deb8u9) …
Processing triggers for initramfs-tools (0.120+deb8u3-1rcnee0~bpo80+20170219) …
update-initramfs: Generating /boot/initrd.img-4.4.62-ti-r99
Processing triggers for dbus (1.8.22-0+deb8u1) …
Processing triggers for python-support (1.0.15) …
Processing triggers for systemd (230-7~bpo8+2) …
Errors were encountered while processing:
c9-core-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)
Log: umount: [/home/bianchi/Documents/image-builder/ignore/tmp.6jaO2x0GNv/dev/pts]
Log: umount: [/home/bianchi/Documents/image-builder/ignore/tmp.6jaO2x0GNv/proc]
Log: umount: [/home/bianchi/Documents/image-builder/ignore/tmp.6jaO2x0GNv/sys]
Log: umount: [/home/bianchi/Documents/image-builder/ignore/tmp.6jaO2x0GNv/run]

Does anyone know what’s wrong with it ?

It’s a failure in qemu, run the image-builder on an arm target and it’ll be fine.

Regards,

No, it means qemu (google qemu to see what it is) choked on the armhf
-> x86 translation.. which is why the readme in the image-builder
project says to use a real ARM device.

Regards,

so I copy img-builder and run it on my beagle board ?

I personally use, WandBoard's, omap5_uevm's, X15's, or Jetson's tk as
they have more ram and more processing power then teh BBB..

But if you want to run it on the BBB go right ahead..

how can I modify the source code of LXDE ?

The same way you modify any source code.

Go find the source, download it, modify it, build it, run it.

I'm not a member of the lxde project, it's up to YOU to figure where
the source it located, to download it, to modify it, to build it and
to run it.

Regards,

Hmm....in that case, I want to run qemu on my ubuntu host....

Nice thought, BUT the image-builder script is already using "qemu"
when you run it on an x86. So your not actually doing or changing
anything..

I tried to rebuild debian 8 now...and see if I got qemu error again,

Oh you'll get the same issue "again", and i'll say once again it's
qemu, run it on an ARM platform.

Regards,

Hook what up?

I'm sorry, but it's pretty obvious..

You need to start with something "WAY" smaller.

LXDE is going to be too much of a project for your "first" build/hookup/etc..

Regards,