building something from source in image-builder script

47 views
Skip to first unread message

John Allwine

unread,
Apr 27, 2021, 1:47:24 PM4/27/21
to BeagleBoard
The image-builder scripts (https://github.com/beagleboard/image-builder) are great for putting together a Beaglebone image. Is there a mechanism in there to build specific packages from source? I see some references to qemu in various places. Is it set up to cross compile? 

Any tips are appreciated!

Robert Nelson

unread,
Apr 27, 2021, 2:05:24 PM4/27/21
to Beagle Board
On Tue, Apr 27, 2021 at 12:47 PM John Allwine <jo...@pocketnc.com> wrote:
>
> The image-builder scripts (https://github.com/beagleboard/image-builder) are great for putting together a Beaglebone image. Is there a mechanism in there to build specific packages from source? I see some references to qemu in various places. Is it set up to cross compile?
>
> Any tips are appreciated!

That what this final "target" bash script was for:

https://github.com/beagleboard/image-builder/blob/master/target/chroot/beagleboard.org-buster.sh

anything not packaged, etc..

Just note, qemu can be a funky beast with a mind of it's own..

Regards,

--
Robert Nelson
https://rcn-ee.com/

John Allwine

unread,
Apr 27, 2021, 2:36:01 PM4/27/21
to Beagle Board
Is there a way to drop into a bash terminal within the qemu environment to debug? I ran the RootStock-NG.sh script and see the ignore/tmp.XXXXX directory. Does something like this work?

After running RootStock-NG.sh;
sudo chroot /path/to/ignore/tmp.XXX /bin/bash

(I get a /lib/ld-linux-armhf.so.3: No such file or directory when I do that)

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CAOCHtYhxydbZ2zpcOu%3D-LYiW-e5j15pdYk%3DaoTqHXE0ZD-9%2B6A%40mail.gmail.com.

Robert Nelson

unread,
Apr 27, 2021, 2:42:26 PM4/27/21
to Beagle Board
On Tue, Apr 27, 2021 at 1:36 PM John Allwine <jo...@pocketnc.com> wrote:
>
> Is there a way to drop into a bash terminal within the qemu environment to debug? I ran the RootStock-NG.sh script and see the ignore/tmp.XXXXX directory. Does something like this work?
>
> After running RootStock-NG.sh;
> sudo chroot /path/to/ignore/tmp.XXX /bin/bash
>
> (I get a /lib/ld-linux-armhf.so.3: No such file or directory when I do that)

Before you chroot, make sure you mount sys, proc, dev/pts

https://github.com/beagleboard/image-builder/blob/master/scripts/chroot.sh#L171-L187

Then if host does not equal chroot architecture, copy qemu-arm-static
under the chroot:

https://github.com/beagleboard/image-builder/blob/master/scripts/chroot.sh#L246-L253

At which case you can chroot in...

John Allwine

unread,
Apr 27, 2021, 2:59:35 PM4/27/21
to Beagle Board
It seems like that tmp dir is missing a lot of data. Is there a clean up step I need to comment out?

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.

Robert Nelson

unread,
Apr 27, 2021, 3:09:38 PM4/27/21
to Beagle Board
On Tue, Apr 27, 2021 at 1:59 PM John Allwine <jo...@pocketnc.com> wrote:
>
> It seems like that tmp dir is missing a lot of data. Is there a clean up step I need to comment out?

If you kill it right here:

https://github.com/beagleboard/image-builder/blob/master/scripts/chroot.sh#L1363

You can re-chroot in..

John Allwine

unread,
Apr 27, 2021, 3:12:24 PM4/27/21
to Beagle Board
Perfect, thanks!


I must be looking at a partial temp directory from a canceled run or something.

Thanks for your help Robert!


--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages