ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6124
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Easily run 64-bit Debian Buster packages on a Raspbian system: new RPi4 / RPi3 image released (systemd-nspawn, LXDE)

Wed Nov 20, 2019 9:22 am

jahboater wrote:
Wed Nov 20, 2019 8:11 am
I use:

Code: Select all

dpkg --print-architecture
in a makefile, which prints the user space architecture.
The problem is usually other software that you have no control over. Chromium, for example, will fail to build without setarch and finding every spot they incorrectly try to determine the architecture can be too tedious. Dpkg is rarely used because that will only work on debian derivatives.

In most cases, the best thing to do is to rely on the compiler defaults and provide configure flags where appropriate. Then things either just work and cause the least headaches.

jahboater
Posts: 4939
Joined: Wed Feb 04, 2015 6:38 pm

Re: Easily run 64-bit Debian Buster packages on a Raspbian system: new RPi4 / RPi3 image released (systemd-nspawn, LXDE)

Wed Nov 20, 2019 9:45 am

ShiftPlusOne wrote:
Wed Nov 20, 2019 9:22 am
In most cases, the best thing to do is to rely on the compiler defaults and provide configure flags where appropriate. Then things either just work and cause the least headaches.
Yes, -march=native etc work well nowadays.
The only special flag needed for aarch64 is

-mcmodel=tiny

for programs with executable size less than 1MB, it produces vastly better code!
I don't know why its not the default.

User avatar
Botspot
Posts: 336
Joined: Thu Jan 17, 2019 9:47 pm
Location: Texas

Re: Easily run 64-bit Debian Buster packages on a Raspbian system: new RPi4 / RPi3 image released (systemd-nspawn, LXDE)

Wed Nov 20, 2019 5:34 pm

For a better and more seamless user experience, I suggest that as well as /home/pi being synchronized, /usr/share/themes and /usr/share/icons be synced as well. That way the icons, theme, and mouse pointer will look more familiar, instead of like this:
2019-11-20-112641_1280x1024_scrot.png
2019-11-20-112641_1280x1024_scrot.png (6.17 KiB) Viewed 641 times
Ever wanted to run an .img file before flashing it to an SD card?
Or wished you could run Stretch on a Pi 4?
Or wanted to run two versions of Raspbian on a single Pi simultaneously?
You can do all of that, and more, with my Vdesktop script - https://bit.ly/2GeNuIw

User avatar
MikeDB
Posts: 166
Joined: Sun Oct 12, 2014 8:27 am

Re: Easily run 64-bit Debian Buster packages on a Raspbian system: new RPi4 / RPi3 image released (systemd-nspawn, LXDE)

Wed Nov 27, 2019 11:56 am

davidcoton wrote:
Sat Nov 16, 2019 10:20 am
Remember Pi is a teaching computer, so showing the right way is better than hidden automagic when it comes to tasks that users need to learn.
I doubt teaching is its primary use nowadays so I vote for 'hidden automagic' that just works. I haven't got time to go chasing fixes to problems, just need something that works so I can focus all my time on the application I'm being paid to develop.
Will the forthcoming MIDI-2 spec at last allow us to set the volume to 11 !!

User avatar
Botspot
Posts: 336
Joined: Thu Jan 17, 2019 9:47 pm
Location: Texas

Re: Easily run 64-bit Debian Buster packages on a Raspbian system: new RPi4 / RPi3 image released (systemd-nspawn, LXDE)

Wed Nov 27, 2019 2:38 pm

A couple problems with synchronizing (mounting) /home/pi to the container's /home/pi:
  • .bash_history. It makes sense for the host and the guest to have separate bash histories. That way, there won't be commands listed as if they were ran in the 64-bit terminal, when actually they never were.
  • .config/. Syncing the config directory is usually desirable, but I found one time that it wasn't. Chromium. I have chromium installed in both the host and the guest. I would have liked both to run at once, but due to sharing the same config directory, they can't do that.
    8d0d3cead13ac677aad0a44431973f8b3108ea3d.png
    8d0d3cead13ac677aad0a44431973f8b3108ea3d.png (13.37 KiB) Viewed 515 times
    Then it happened. Chromium (64-bit) got an upgrade. Now two completely different versions of Chromium shared the same config directory. Sure enough, the new chromium version interfered with the older 32-bit one, causing it to forget all my passwords and cookies every time it started. I had to uninstall chromium 64-bit, and then salvage an undamaged config directory from an older SD card.
Sakaki, would it be possible to exclude certain files and directories from being synchronized from host to guest, while allowing the rest of /home/pi to remain synced?
Ever wanted to run an .img file before flashing it to an SD card?
Or wished you could run Stretch on a Pi 4?
Or wanted to run two versions of Raspbian on a single Pi simultaneously?
You can do all of that, and more, with my Vdesktop script - https://bit.ly/2GeNuIw

andrum99
Posts: 988
Joined: Fri Jul 20, 2012 2:41 pm

Re: Easily run 64-bit Debian Buster packages on a Raspbian system: new RPi4 / RPi3 image released (systemd-nspawn, LXDE)

Wed Nov 27, 2019 3:26 pm

Botspot wrote:
Wed Nov 27, 2019 2:38 pm
A couple problems with synchronizing (mounting) /home/pi to the container's /home/pi:
  • .config/. Syncing the config directory is usually desirable, but I found one time that it wasn't. Chromium. I have chromium installed in both the host and the guest. I would have liked both to run at once, but due to sharing the same config directory, they can't do that.
There are two possible solutions as I see it:

1. Go in and edit the configuration of the 64-bit Chromium to look for its profile in a different directory.

2. Separate home directory in the container.

2 would be simpler, although it would still be desirable to have the host's /home tree available somewhere as well. Alternatively, just don't run the same app in the host and container.

User avatar
sakaki
Posts: 459
Joined: Sun Jul 16, 2017 1:11 pm

Re: Easily run 64-bit Debian Buster packages on a Raspbian system: new RPi4 / RPi3 image released (systemd-nspawn, LXDE)

Mon Dec 02, 2019 1:37 am

Botspot wrote:
Wed Nov 27, 2019 2:38 pm
Sakaki, would it be possible to exclude certain files and directories from being synchronized from host to guest, while allowing the rest of /home/pi to remain synced?
Since the container starts in its own mount namespace, it would be possible to bind mount a new .config directory inside the guest container, without this propagating to the host, yes. In fact, this is essentially how the filesystem protection in tools such as firejail works.

Whether or not this should be the default approach (or just worked around for those who are affected by particular apps) is up for discussion.

Best, sakaki

User avatar
Botspot
Posts: 336
Joined: Thu Jan 17, 2019 9:47 pm
Location: Texas

Re: Easily run 64-bit Debian Buster packages on a Raspbian system: new RPi4 / RPi3 image released (systemd-nspawn, LXDE)

Mon Dec 02, 2019 3:00 pm

sakaki wrote:
Mon Dec 02, 2019 1:37 am
Botspot wrote:
Wed Nov 27, 2019 2:38 pm
Sakaki, would it be possible to exclude certain files and directories from being synchronized from host to guest, while allowing the rest of /home/pi to remain synced?
Since the container starts in its own mount namespace, it would be possible to bind mount a new .config directory inside the guest container, without this propagating to the host, yes. In fact, this is essentially how the filesystem protection in tools such as firejail works.

Whether or not this should be the default approach (or just worked around for those who are affected by particular apps) is up for discussion.

Best, sakaki
One example of a file that should not be bound is ~.bash_history. That way users can see which commands they've ran in the 64-bit container, and which ones they've ran in Raspbian, instead of them both being 'mashed together'.

Also, I have had trouble opening chromium-browser after installing libreoffice in the 64-bit container. Attempting to run chromium-browser in the raspbian terminal fails with a segmentation fault. I haven't narrowed down exactly what's causing it, but chromium-browser worked OK again after purging raspbian-nspawn-64 and then deleting the whole ~.config/ folder. I plan to narrow down exactly what is causing this.
Ever wanted to run an .img file before flashing it to an SD card?
Or wished you could run Stretch on a Pi 4?
Or wanted to run two versions of Raspbian on a single Pi simultaneously?
You can do all of that, and more, with my Vdesktop script - https://bit.ly/2GeNuIw

User avatar
sakaki
Posts: 459
Joined: Sun Jul 16, 2017 1:11 pm

Re: Easily run 64-bit Debian Buster packages on a Raspbian system: new RPi4 / RPi3 image released (systemd-nspawn, LXDE)

Sat Dec 14, 2019 6:07 pm

All,

just a friendly reminder that today is the deadline for any feedback on the test raspbian-nspawn-64 deb.

Best, sakaki

Return to “General discussion”