<div dir="ltr">Hello James,<br><br>Thanks for your quick response.<br><br>From what I understand, `rpi23-gen-image` repository is old so it cannot be used for this project.<br>I think I should run Sugar on Raspberry Pi OS and identify what is broken/bugs, so I can work on fixing them during my GSoC period.<br><br>I will also check out other debian image builders for Raspberry Pi which can be leveraged to create Sugar OS images.<br><br>I would also request my mentors @walterbender and @alexperez  to see if my understanding is correct and also discuss the hardware requirements to extend the functionalities of existing activities like Turtle Blocks, Measure, and Pippy.<br><br>Thanks and Best Regards<div>Simrann Arora<br>GitHub Handle: <a class="gmail_plusreply" id="m_-1787204107895656850plusReplyChip-3">@simrann20</a><br></div></div><img src="https://my-email-signature.link/signature.gif?u=968470&e=341252691&v=31e83d816bcfcd6dc600fb930419e1e477b00f05b0fd51456d2505354ff729fe" alt="" width="0" height="0" style="width:2px;max-height:0;overflow:hidden"><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Mar 28, 2023 at 5:39 AM James Cameron <<a href="mailto:quozl@laptop.org">quozl@laptop.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello Simrann,<br>
<br>
I've just now tested <a href="https://github.com/drtyhlpr/rpi23-gen-image" rel="noreferrer" target="_blank">https://github.com/drtyhlpr/rpi23-gen-image</a> on a<br>
Debian 10 Buster 64-bit system, and it got past the debootstrap stage,<br>
compiled a kernel, generated an image, but failed with "losetup:<br>
cannot find an unused loop device".  I did not see an exec format<br>
error.  The method was;<br>
<br>
```<br>
apt install -y git debootstrap debian-archive-keyring qemu-user-static binfmt-support dosfstools rsync bmap-tools whois git bc psmisc dbus sudo crossbuild-essential-armhf crossbuild-essential-armel bison flex libssl-dev<br>
git clone <a href="https://github.com/drtyhlpr/rpi23-gen-image.git" rel="noreferrer" target="_blank">https://github.com/drtyhlpr/rpi23-gen-image.git</a><br>
cd rpi23-gen-image<br>
./rpi23-gen-image.sh<br>
```<br>
<br>
I suggest making sure you are using the operating system versions<br>
described in the README.md file, and the HEAD of the master branch.<br>
<br>
Do not use the Sugar Labs fork of the repository, as it is very old.<br>
<br>
Do engage with the rpi23-gen-image project; it is not part of Sugar<br>
Labs, and we have not used it for a while.  Your problem with<br>
debootstrap is best answered there, or by reading the debootstrap<br>
or Linux source code.<br>
<br>
I'm not a mentor for Google Summer of Code this year, but I've a few<br>
things to say.<br>
<br>
I doubt that rpi23-gen-image is suitable for your project.  It is for<br>
making images.  It is an external tool, and not part of the workflow<br>
of either the Raspberry Pi Foundation, Debian Project, or Fedora<br>
Project.  These projects use other tools to prepare their images,<br>
based on their package archives.<br>
<br>
Sugar is available for Raspberry Pi on Debian, Fedora, and Raspberry<br>
Pi OS already.<br>
<br>
Raspberry Pi OS does not include Sugar in the images, but it can be<br>
installed.  This is because Raspberry Pi OS is based on Debian.<br>
<br>
The Fedora Sugar on a Stick images are available for Raspberry Pi.<br>
<br>
The number of organisations involved that are not Sugar Labs makes<br>
your project a challenge.  Mentors working for Sugar Labs can't easily<br>
affect the other projects or make resources available for you.  You<br>
should ask your mentors to better define the scope, without creating<br>
work dependencies on other organisations.<br>
<br>
Sugar on Raspberry Pi does have several bugs, and does not have<br>
Raspberry Pi specific extensions.<br>
<br>
Fixing those bugs is a matter of either (a) fixing our software in a<br>
Sugar Labs repository, (b) fixing packaging in the Fedora or Debian<br>
Projects, and (c) waiting for the fixes to reach the released images.<br>
That wait always exceeds the time available for Google Summer of Code.<br>
<br>
Adding features specific to the Raspberry Pi is important.  For that,<br>
you will need a Raspberry Pi, and electronics components and tools.<br>
If you've worked on Arduino previously, this will be easy.  You will<br>
write software in Sugar Labs repositories, such as Turtle Blocks,<br>
Measure, and Pippy.<br>
<br>
References:<br>
<br>
<a href="https://arm.fedoraproject.org/" rel="noreferrer" target="_blank">https://arm.fedoraproject.org/</a><br>
<a href="https://spins.fedoraproject.org/en/soas/" rel="noreferrer" target="_blank">https://spins.fedoraproject.org/en/soas/</a><br>
<a href="https://fedoraproject.org/wiki/Architectures/ARM/Raspberry_Pi" rel="noreferrer" target="_blank">https://fedoraproject.org/wiki/Architectures/ARM/Raspberry_Pi</a><br>
<a href="https://github.com/sugarlabs/sugar/blob/master/docs/rpi-soas.md" rel="noreferrer" target="_blank">https://github.com/sugarlabs/sugar/blob/master/docs/rpi-soas.md</a><br>
<a href="https://github.com/sugarlabs/sugar/blob/master/docs/rpi.md" rel="noreferrer" target="_blank">https://github.com/sugarlabs/sugar/blob/master/docs/rpi.md</a><br>
<a href="https://github.com/sugarlabs/sugar/blob/master/docs/debian.md" rel="noreferrer" target="_blank">https://github.com/sugarlabs/sugar/blob/master/docs/debian.md</a><br>
<a href="https://wiki.sugarlabs.org/go/Raspberry_Pi" rel="noreferrer" target="_blank">https://wiki.sugarlabs.org/go/Raspberry_Pi</a><br>
<br>
On Tue, Mar 28, 2023 at 03:09:48AM +0530, Simrann Arora wrote:<br>
> Hi Mentors, <br>
> <br>
> Hope you all are doing well!<br>
> <br>
> My name is Simrann Arora and I am an aspiring GSoC 2023 contributor. I have<br>
> been actively trying to contribute to the 'Sugar on Raspberry Pi' project that<br>
> has been selected for GSoC this year. As far as my progress is concerned, till<br>
> now I have completed the following tasks: <br>
> - Setting up Debian version 11(bullseye) VM on my mac using Parallels Desktop,<br>
> earlier I had installed Ubuntu 23.04 using VMware Fusion<br>
> - Cloning the rpi23-gen-image repo for building Sugar OS image.<br>
> - I tried running the rpi23-gen-image builder script but I am getting this<br>
> error:<br>
> ```<br>
>  chroot: failed to run command '/debootstrap/debootstrap': Exec format error.<br>
> ```<br>
> <br>
> I did some research to fix this, and found out that it might have occured due<br>
> to the architecture mismatch of the chroot environment and the command that I<br>
> am using to run the script, like suppose the chroot environment is 64-bit and<br>
> the executable is 32-bit. Another reason could be that the executable is not<br>
> compatible with the OS or the linux distro within the chroot environment.<br>
> <br>
> - To fix this, I created a chroot environment of Debian version 9 (stretch)<br>
> within my Debian 11 distro to make it compatible with the `rpi3stretch-sugar`<br>
> template as given in the `rpi23-gen-image` repository and cloned it.<br>
> However, when I ran the script, I encountered the same error:<br>
> ```<br>
>  chroot: failed to run command '/debootstrap/debootstrap': Exec format error. <br>
> ```<br>
> <br>
> To further troubleshoot this, I tried installing the `binfmts support` and<br>
> enabling qemu-arm within the chroot. <br>
> Again I got an error:  `update-binfmts: warning: qemu-arm not in database of<br>
> installed binary formats. `<br>
> <br>
> Now to fix this one I tried reinstalling qemu-user-static and enabling it but<br>
> it says that it might be possible that this package isn't installed in my<br>
> system's repo or I need to use another repo for the same.<br>
> <br>
> I would like to request the mentors to guide me further on this and discuss the<br>
> next steps of implementation and the project requirements. <br>
> I am very keen on working on this project, gaining in-depth understanding on<br>
> this and taking it further.<br>
> <br>
> Also, as the proposal deadline is just around the corner, I would be really<br>
> grateful if I could connect with all the mentors on a Zoom/GMeets call to<br>
> discuss the project<br>
> <br>
> Thanks a lot<br>
> Simrann Arora<br>
> GitHub Handle - @simrann20<br>
> <br>
> *<br>
</blockquote></div>