Update errors on Ubuntu desktop after installing cross toolchain

117 views
Skip to first unread message

Pavel Yermolenko

unread,
Sep 22, 2020, 9:32:25 AM9/22/20
to BeagleBoard
Hello,

After installing cross toolchain the following error occur upon desktop system update:

E: Failed to fetch http://fr.archive.ubuntu.com/ubuntu/dists/bionic/main/binary-armhf/Packages  404  Not Found [IP: 194.158.119.186 80]
E: Failed to fetch http://fr.archive.ubuntu.com/ubuntu/dists/bionic-updates/main/binary-armhf/Packages  404  Not Found [IP: 2001:860:f70a::2 80]
E: Failed to fetch http://fr.archive.ubuntu.com/ubuntu/dists/bionic-backports/main/binary-armhf/Packages  404  Not Found [IP: 2001:860:f70a::2 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/dists/bionic-security/main/binary-armhf/Packages  404  Not Found [IP: 2001:67c:1562::15 80]

Where is the problem ?

Thanks.

Robert Nelson

unread,
Sep 22, 2020, 10:25:41 AM9/22/20
to Beagle Board
That server doesn't host armhf packages, what directions are you following?


Regards,

Pavel Yermolenko

unread,
Sep 22, 2020, 10:30:28 AM9/22/20
to BeagleBoard
Sorry, I'm afraid I didn't understand what you mean saying "what directions".
Perhaps should I add another repository ?
Sincerely

Dennis Lee Bieber

unread,
Sep 22, 2020, 10:42:10 AM9/22/20
to Beagleboard
On Tue, 22 Sep 2020 07:30:28 -0700 (PDT), in
gmane.comp.hardware.beagleboard.user Pavel Yermolenko
<py.ohayo-FOWRGO...@public.gmane.org> wrote:

>Sorry, I'm afraid I didn't understand what you mean saying "what
>directions".

What book or web-site are you reading for the instructions on how to
set up the cross-build environment?

>Perhaps should I add another repository ?

Lots...
https://gist.github.com/josephlr/5034c933bbcfddc25a9275037821b048


--
Dennis L Bieber

jonnymo

unread,
Sep 22, 2020, 11:38:42 AM9/22/20
to Beagle Board
For cross compiling on the Beaglebone from Ubuntu, this might be helpful:

As Robert mentioned, if you go to the link in your error message, you'll see there are no ARM packages:

Neither does the non ".fr" link:

Cheers,

Jon

--
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/f53kmftbj1rgne1a0paa4022cq4gf5ej73%404ax.com.

Robert Nelson

unread,
Sep 22, 2020, 11:55:01 AM9/22/20
to Beagle Board
On Tue, Sep 22, 2020 at 10:38 AM jonnymo <jonn...@gmail.com> wrote:
>
> For cross compiling on the Beaglebone from Ubuntu, this might be helpful:
> https://www.itdev.co.uk/blog/building-linux-kernel-cross-compiling-beaglebone-black
>
> As Robert mentioned, if you go to the link in your error message, you'll see there are no ARM packages:
> http://fr.archive.ubuntu.com/ubuntu/dists/bionic/main/
>
> Neither does the non ".fr" link:
>1 http://archive.ubuntu.com/ubuntu/dists/bionic/main/

With ubuntu, all the ports are on "http://ports.ubuntu.com/"

But if you use debian, everything's setup for cross builds, just apt
update/ apt install..

So why ubuntu?

Hence what guide are you following..

Regards,

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

jonnymo

unread,
Sep 22, 2020, 12:40:22 PM9/22/20
to Beagle Board
From what I remember with Debian, you still need to add the arm arch to add cross build support:
sudo dpkg --add-architecture armhf
https://wiki.debian.org/CrossCompiling

Ubuntu seems to be more widely used on PCs so there seems to be more examples. No other reason for me.
Personally, I just like to download the toolchain and reference it from the folder location.

Cheers,
Jon



--
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.

Pavel Yermolenko

unread,
Sep 22, 2020, 1:43:25 PM9/22/20
to BeagleBoard
On Tuesday, September 22, 2020 at 4:42:10 PM UTC+2, Dennis Bieber wrote:
On Tue, 22 Sep 2020 07:30:28 -0700 (PDT), in
gmane.comp.hardware.beagleboard.user Pavel Yermolenko
<py.ohayo-FOWRGOYEGZlyDzI6CaY1VQ@public.gmane.org> wrote:

>Sorry, I'm afraid I didn't understand what you mean saying "what
>directions".

        What book or web-site are you reading for the instructions on how to
set up the cross-build environment?

 Exploring BeagleBone, 2nd Ed. I followed instructions from the book.


>Perhaps should I add another repository ?

        Lots...
https://gist.github.com/josephlr/5034c933bbcfddc25a9275037821b048

 But how to know which of them have binary-armhf/Packages



--
Dennis L Bieber

Pavel Yermolenko

unread,
Sep 22, 2020, 1:52:49 PM9/22/20
to BeagleBoard


On Tuesday, September 22, 2020 at 5:38:42 PM UTC+2, jonnymo wrote:
For cross compiling on the Beaglebone from Ubuntu, this might be helpful:

Hmm ... Here they advice to cross-compile the kernel. But at my Ubuntu cross-compilation works fine. The only problem - when I try to update my Ubuntu, there are errors, related to armhf.


As Robert mentioned, if you go to the link in your error message, you'll see there are no ARM packages:

So the question is what repository should I add to get arm pkgs.
 


Neither does the non ".fr" link:

Cheers,

Jon

On Tue, Sep 22, 2020 at 7:42 AM Dennis Lee Bieber <dennis...@gmail.com> wrote:
On Tue, 22 Sep 2020 07:30:28 -0700 (PDT), in
gmane.comp.hardware.beagleboard.user Pavel Yermolenko
<py.ohayo-FOWRGOYEGZlyDzI6CaY1VQ@public.gmane.org> wrote:

>Sorry, I'm afraid I didn't understand what you mean saying "what
>directions".

        What book or web-site are you reading for the instructions on how to
set up the cross-build environment?

>Perhaps should I add another repository ?

        Lots...
https://gist.github.com/josephlr/5034c933bbcfddc25a9275037821b048


--
Dennis L Bieber

--
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 beagl...@googlegroups.com.

Pavel Yermolenko

unread,
Sep 22, 2020, 1:55:52 PM9/22/20
to BeagleBoard

With ubuntu, all the ports are on "http://ports.ubuntu.com/"

But if you use debian, everything's setup for cross builds, just apt
update/ apt install..

So why ubuntu?

Because my Linux machine is Ubuntu machine.
 

Hence what guide are you following..

Exploring BeagleBone, 2nd Ed.

Robert Nelson

unread,
Sep 22, 2020, 2:01:14 PM9/22/20
to Beagle Board, py.o...@sunrise.ch
On Tue, Sep 22, 2020 at 12:56 PM Pavel Yermolenko <py.o...@sunrise.ch> wrote:
>>
>>
>> With ubuntu, all the ports are on "http://ports.ubuntu.com/"
>>
>> But if you use debian, everything's setup for cross builds, just apt
>> update/ apt install..
>>
>> So why ubuntu?
>
>
> Because my Linux machine is Ubuntu machine.
>
>>
>>
>> Hence what guide are you following..
>
>
> Exploring BeagleBone, 2nd Ed.

All Derek's examples assume Debian 9, running on x86_64, see
"Recommended.png" screen shot..

By using Ubuntu, you are really on your own, as the book assumes
Debian for setting up the environment...
Recommended.png

Pavel Yermolenko

unread,
Sep 22, 2020, 2:08:57 PM9/22/20
to BeagleBoard
All Derek's examples assume Debian 9, running on x86_64, see
"Recommended.png" screen shot..

By using Ubuntu, you are really on your own, as the book assumes
Debian for setting up the environment...

Well ... I was aware of it. I thought using Ubuntu won't create a lot of problems.
If my understanding is correct, the solution to the problem is to add a "good" Ubuntu repository (i.e. a repository that contains the arm staff). Correct?

jonnymo

unread,
Sep 22, 2020, 2:46:44 PM9/22/20
to Beagle Board
When you set-up the repos, did you set the architecture on your Ubuntu system to ARM?
You can check it via:
   dpkg --print-architecture
   or
   dpkg-architecture -qDEB_HOST_ARCH

Did you perhaps set the foreign architecture on your host to ARM?
You can check it via:
    dpkg --print-foreign-architectures

You could install something like VirtualBox on your Ubuntu system and then download a Debian image and work from there if you have too much of an issue using Ubuntu. 


  Jon


--
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.

jonnymo

unread,
Sep 22, 2020, 7:05:40 PM9/22/20
to Beagle Board
You should be able to get rid of those messages by running the following:
  sudo dpkg --remove-architecture armhf

Some options to run with the extended cross-compiling options are:
1. Run through the debootstrap option from the book.
  or
2. Download the ARM toolchain for the BB manually and just reference it in your code or IDE.
   This is what I use:  gcc-linaro-7.5.0-2019.12-i686-mingw32_arm-linux-gnueabihf toolchain from:
  or
3. Install the build tools on the BB and copy the BB arm-linux-gnueabihf from  /usr/bin, /usr/include, usr/lib, and /lib to the host system via rsync and reference this from your IDE:
    RasPi Example:
 or
4. Go the Debian VM or Install option.

Jon
  

Dennis Lee Bieber

unread,
Sep 22, 2020, 7:31:12 PM9/22/20
to Beagleboard
On Tue, 22 Sep 2020 09:39:48 -0700, in gmane.comp.hardware.beagleboard.user
jonnymo <jonnymovo-Re5JQE...@public.gmane.org> wrote:

>
>Ubuntu seems to be more widely used on PCs so there seems to be more
>examples. No other reason for me.
>

From what I've read, Ubuntu tries to be the more "user-friendly"
/desktop/ environment, having more bleeding-edge updates -- while it is
based off of Debian, Debian may take more time to incorporate and release
significant changes.

https://linuxconfig.org/debian-vs-ubuntu

Unless one is running an X desktop environment, the stability of Debian
is probably to be preferred for embedded systems.


--
Dennis L Bieber

Dennis Lee Bieber

unread,
Sep 22, 2020, 7:38:36 PM9/22/20
to Beagleboard
On Tue, 22 Sep 2020 10:43:25 -0700 (PDT), in
gmane.comp.hardware.beagleboard.user Pavel Yermolenko
<py.ohayo-FOWRGO...@public.gmane.org> wrote:

>
>> >Perhaps should I add another repository ?
>>
>> Lots...
>> https://gist.github.com/josephlr/5034c933bbcfddc25a9275037821b048
>>
>
> But how to know which of them have *binary-armhf/Packages*
>

You add all of the armhf specific repositories. Then run

apt update

to fetch the listing of the contents.

apt search <whatever>

to find candidate packages. I can't really help beyond that -- my desktop
machine runs W10, and I have Debian Buster in a VirtualBox environment, so
the book procedure was pretty much exact (allowing for the fact that the
book uses Debian 9 [or even 8] rather than 10).



--
Dennis L Bieber

jonnymo

unread,
Sep 22, 2020, 7:59:38 PM9/22/20
to Beagle Board
Debian might be the preferred OS for Debian based embedded systems, but in my world Red Hat is the Linux OS of choice. 

If you are cross compiling, it really should not make a diff what the host OS is. I can do this on Windows 10.  In this case, Debian just makes it easier since you can install the toolchain directly via apt. If one uses something like Ubuntu, it's just a bit more work but not impossible.

Jon

--
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,
Sep 22, 2020, 8:06:24 PM9/22/20
to Beagle Board
On Tue, Sep 22, 2020 at 6:59 PM jonnymo <jonn...@gmail.com> wrote:
>
> Debian might be the preferred OS for Debian based embedded systems, but in my world Red Hat is the Linux OS of choice.
>
> If you are cross compiling, it really should not make a diff what the host OS is. I can do this on Windows 10. In this case, Debian just makes it easier since you can install the toolchain directly via apt. If one uses something like Ubuntu, it's just a bit more work but not impossible.

Part of what Derek was showing in his book, it was a library
"matching" cross compiling..

As long as your running Debian 9.x on the Beagle, and Debian 9.x on
your x86 host, you can install the gcc Debian cross tools and build
against your "armhf" libraries on x86, and your application will have
the exact same library build version on the ARM Beagle..

jonnymo

unread,
Sep 22, 2020, 8:33:23 PM9/22/20
to Beagle Board
Or just rsync the libraries and includes from the BB or download the toolchain and libraries manually to the host and reference that. 

The section in question from Derek's book is in reference to Cross-Compilation with Third-Party Libraries (Multiarch).  This is one way to do that but not 100% necessary. Again, it;s just the easier way and perhaps best approach in this instance.
 
He does mention Ubuntu in the description though so that could be confusing for some.   
 
However, this is your realm so I will step back from this.

Cheers,

Jon

--
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.

Pavel Yermolenko

unread,
Sep 23, 2020, 9:08:12 AM9/23/20
to BeagleBoard
On Wednesday, September 23, 2020 at 1:59:38 AM UTC+2, jonnymo wrote:
Debian might be the preferred OS for Debian based embedded systems, but in my world Red Hat is the Linux OS of choice. 

If you are cross compiling, it really should not make a diff what the host OS is. I can do this on Windows 10.  In this case, Debian just makes it easier since you can install the toolchain directly via apt. If one uses something like Ubuntu, it's just a bit more work but not impossible.

Jon

Yes, I also agree with that. That's why I want to continue with Ubuntu (at least give it a few tries).
I added the repositories from the link Robert provided in one of  previous messages:

Unfortunately it didn't help.

Concerning your propositions from previous mail (i.e. options 1 ... 4) I just remark that cross toolchain works fine: I can build applications and then run them on BBB.
The problem is mostly related to Ubuntu. But maybe it's not too serious.



On Tue, Sep 22, 2020 at 4:38 PM Dennis Lee Bieber <dennis...@gmail.com> wrote:
On Tue, 22 Sep 2020 10:43:25 -0700 (PDT), in
gmane.comp.hardware.beagleboard.user Pavel Yermolenko
<py.ohayo-FOWRGOYEGZlyDzI6CaY1VQ@public.gmane.org> wrote:

>
>> >Perhaps should I add another repository ?
>>
>>         Lots...
>> https://gist.github.com/josephlr/5034c933bbcfddc25a9275037821b048
>>
>
> But how to know which of them have *binary-armhf/Packages*
>

        You add all of the armhf specific repositories. Then run

apt update

to fetch the listing of the contents.

apt search <whatever>

to find candidate packages. I can't really help beyond that -- my desktop
machine runs W10, and I have Debian Buster in a VirtualBox environment, so
the book procedure was pretty much exact (allowing for the fact that the
book uses Debian 9 [or even 8] rather than 10).



--
Dennis L Bieber

--
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 beagl...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages