TamaTamaGoGo
Posts: 52
Joined: Tue Dec 24, 2019 5:54 am
Location: Japan
Contact: Website Twitter

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

Sat Mar 07, 2020 1:59 pm

Thanks for issue! ><
🙇
I will make video of how to using this 64bit!
I will reply something when I tried that command.

Have a great times! ,TamaTamaGoGo

P.S. I am making video now!
Rendering takes some minutes! (8minutes video needs 12:30minutes) :roll:
Last edited by TamaTamaGoGo on Tue Mar 10, 2020 11:59 pm, edited 3 times in total.
Hello!
I am TamaTama.
I am Japanese, so I am not good at English. :|
Check my raspi site. :D
https://tamatechraspi.tech.blog
I am making a script of Minecraft for rasbian buster.
Search “MCPi” at forums!

JumpZero
Posts: 1141
Joined: Thu Mar 28, 2013 7:35 pm
Location: 127.0.0.1

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

Mon Mar 09, 2020 1:46 pm

Hello Sakaki,
That’s awesome! Wonderful job.
Thanks for giving us this 64-bit Debian buster.

I do have a little problem with Chromium-64 (Firefox ESR(64bit) runs fine): the Chromium window is blank, nothing inside, a white window without any button, just the title bar. I’ve tried several things, I list them here:
First try: on an already used but upgraded to latest Raspbian, I installed raspbian-nspawn-64 from official Raspbian repo as in your post here. Then as per your instructions within a 64 bit terminal I installed chromium. Running it from the launcher (GUI internet menu) or from terminal gave the same result a blank chromium window. Chromium 32 bit was running fine.
Second try: On new SD fresh Raspbian upgraded to latest, installed raspbian-nspawn-64 from official Raspbian repo, within a 64 bit terminal installed chromium. I didn’t launch chromium-32 and noticed I don’t have any existing ~/.config/chromium folder. I launched chromium-64 but also get a blank screen. After that the ~/.config/chromium folder was created.
Third try: as you suggested I created a ~/.config/chromium-debian-buster-64 folder but same result a blank window. Chromium-32 still running fine, Firefox ESR-64 as well.

here is an output of console messages:

Code: Select all

pi@debian-buster-64:~ $ chromium
[402:421:0309/143133.033241:ERROR:address_tracker_linux.cc(171)] Could not bind NETLINK socket: Address already in use (98)
[435:435:0309/143133.934417:ERROR:sandbox_linux.cc(372)] InitializeSandbox() called with multiple threads in process gpu-process.
[449:1:0309/143134.499897:ERROR:child_process_sandbox_support_impl_linux.cc(79)] FontService unique font name matching request did not receive a response.
[449:1:0309/143134.500812:ERROR:child_process_sandbox_support_impl_linux.cc(79)] FontService unique font name matching request did not receive a response.
[402:446:0309/143135.748487:ERROR:udev_watcher.cc(94)] Failed to begin udev enumeration.
^Cpi@debian-buster-64:~ $ 
pi@debian-buster-64:~ $ chromium
[719:719:0309/143221.321621:ERROR:sandbox_linux.cc(372)] InitializeSandbox() called with multiple threads in process gpu-process.
[732:7:0309/143221.427185:ERROR:command_buffer_proxy_impl.cc(124)] ContextResult::kTransientFailure: Failed to send GpuChannelMsg_CreateCommandBuffer.
[732:1:0309/143221.863778:ERROR:child_process_sandbox_support_impl_linux.cc(79)] FontService unique font name matching request did not receive a response.
[732:1:0309/143221.865047:ERROR:child_process_sandbox_support_impl_linux.cc(79)] FontService unique font name matching request did not receive a response.
[685:728:0309/143227.105923:ERROR:udev_watcher.cc(94)] Failed to begin udev enumeration.
Any help or guidance on this would be appreciated. Something obvious I have missed?
Thanks again for raspbian-nspawn-64.
--
Jmp0

JumpZero
Posts: 1141
Joined: Thu Mar 28, 2013 7:35 pm
Location: 127.0.0.1

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

Tue Mar 10, 2020 12:18 pm

Hi!
Sorry I did a typo on my here above post:
Third try: I created a ~/.config-debian-buster-64 ~/.config/chromium-debian-buster-64
And also I forgot to mention the Pi model is Pi4 4GB
Thanks

User avatar
sakaki
Posts: 554
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)

Tue Mar 10, 2020 12:23 pm

Hi JumpZero,

it seems there are a few regressions affecting chromium 79 and 80 when run in a container (or when using a remote X server). See e.g.:

https://bugs.chromium.org/p/chromium/is ... id=1048186

and

https://bugs.chromium.org/p/chromium/is ... id=1035803

Since the current aarch64 Debian Buster chromium version is 79 (if memory serves), does the browser start correctly if you issue (from the container shell):

Code: Select all

pi@debian-buster-64:~ $ chromium --ignore-gpu-blacklist &
(you may be prompted to unlock the profile, if not shadowing ~/.config)?

Best, sakaki

JumpZero
Posts: 1141
Joined: Thu Mar 28, 2013 7:35 pm
Location: 127.0.0.1

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

Tue Mar 10, 2020 1:25 pm

Hi Sakaki,

Yes

Code: Select all

pi@debian-buster-64:~ $ chromium --ignore-gpu-blacklist &
works!!! :D :D :D
Thanks a lot you are the best!
--
Jmp0

TamaTamaGoGo
Posts: 52
Joined: Tue Dec 24, 2019 5:54 am
Location: Japan
Contact: Website Twitter

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

Tue Mar 10, 2020 11:01 pm

Problems at debian-buster-64

Hello, everyone!
I found problems with using raspbian-nspawn-64!
I list it


  • Big? problems
    • snapd (No GUI and GUI too)

      After running
      [code]sudo apt-get install snapd[/code]
      , I did
      [code]sudo snapd install ~~~[/code]
      but it doesn’t work!
      I could see the log, so snap is already installed completely...
      I reinstall snap but it doesn’t work too!
      Um........
  • generally problems
    • SimpleScreenRecorder
      I installed it with
      [code]sudo apt-get install simplescreenrecorder[/code].
      I could boot it, but the Garbled!
      I start record my desktop, but error.....
  • Little problems
    • kdenlive
      I installed like simplescreenrecorder, but error.
Have a great times! ,TamaTamaGoGo
Last edited by TamaTamaGoGo on Thu Mar 12, 2020 1:49 am, edited 12 times in total.
Hello!
I am TamaTama.
I am Japanese, so I am not good at English. :|
Check my raspi site. :D
https://tamatechraspi.tech.blog
I am making a script of Minecraft for rasbian buster.
Search “MCPi” at forums!


TamaTamaGoGo
Posts: 52
Joined: Tue Dec 24, 2019 5:54 am
Location: Japan
Contact: Website Twitter

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

Tue Mar 10, 2020 11:58 pm

bmscmoreira wrote:
Tue Mar 10, 2020 11:47 pm
Try

Code: Select all

sudo apt update

Code: Select all

sudo apt install snapd
yeah, I tried it.
But I don’t have any update or upgrade.
I reinstalled too!
I will bring log to this forum...

Have a great times! ,TamaTamaGoGo
Hello!
I am TamaTama.
I am Japanese, so I am not good at English. :|
Check my raspi site. :D
https://tamatechraspi.tech.blog
I am making a script of Minecraft for rasbian buster.
Search “MCPi” at forums!

User avatar
sakaki
Posts: 554
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)

Wed Mar 11, 2020 11:04 pm

TamaTamaGoGo wrote:
Tue Mar 10, 2020 11:01 pm
Problems at debian-buster-64
  • Big? problems
    • snapd

      After running[code]sudo apt-get install snapd[/code], I did [code]sudo snapd install ~~~[/code]
      but it doesn’t work!
      I could see the log, so snap is already installed completely...
      I reinstall snap but it doesn’t work too!
      Um........
Please remember that systemd-nspawn-64 runs your Debian Buster 64-bit O/S inside a container. This means that certain functions are, by default, prohibited for security. Installing packages in the container using the native package manager apt is generally fine, however, if you want to use e.g., snapd, which is a secondary packaging system, then some changes need to be made to the container environment to permit this (just as for Docker).

OK, to run non-GUI snaps, do as follows.

First (working as your regular pi user at a normal 32-bit terminal), modify the container configuration, so the cgroup namespace is accessible and the FUSE device is visible (both changes will somewhat increase the attack surface of course):

Code: Select all

pi@raspberrypi:~ $ sudo nano -w /etc/systemd/nspawn/debian-buster-64.nspawn
and modify that file so it reads:

Code: Select all

[Exec]
PrivateUsers=no
Capability=CAP_NET_ADMIN

[Files]
Bind=/home
Bind=/run/user:/run/host-user/
BindReadOnly=/etc/resolv.conf
# required for snapd
Bind=/dev/fuse
Bind=/sys/fs/cgroup

[Network]
Private=no
VirtualEthernet=no
Save, and exit nano.

Next, create an additional drop-in snippet for the container service, thus:

Code: Select all

pi@raspberrypi:~ $ sudo systemctl edit systemd-nspawn@debian-buster-64
and in the new file that opens, enter:

Code: Select all

[Service]
DeviceAllow=char-misc rwm
Environment=SYSTEMD_NSPAWN_USE_CGNS=0
Save, and exit the editor.

Now restart the container to have the changes 'take':

Code: Select all

pi@raspberrypi:~ $ ds64-stop && ds64-start
OK, now enter the container and install snapd. You'll also need to install squashfuse and fuse in the container for snapd:

Code: Select all

pi@raspberrypi:~ $ ds64-shell
pi@debian-buster-64:~ $ sudo apt-get update
pi@debian-buster-64:~ $ sudo apt-get install squashfuse fuse
pi@debian-buster-64:~ $ sudo apt-get install snapd
OK you now you should have a valid snapd running. To try it out, let's install e.g. nextcloud:

Code: Select all

pi@debian-buster-64:~ $ sudo snap install nextcloud
This may fail to complete at the final step (due to udev issues); if so, just retry it:

Code: Select all

pi@debian-buster-64:~ $ sudo snap install nextcloud
You should now have a nextcloud server running from the snap inside the 64-bit container.

Open a browser on your main desktop, and connect to 127.0.0.1 to view its login page.

To get snaps to run with a GUI from within an nspawn container requires rather more involved "wiring", but is possible. Let me know if you'd like me to expand on this point.

I'll have a look at your other issues this weekend.

Thanks again for trying raspbian-nspawn-64!

Best, sakaki

blee0518
Posts: 28
Joined: Tue Mar 10, 2020 2:18 am

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

Tue Mar 17, 2020 6:26 pm

sakaki wrote:
Tue Jan 29, 2019 1:35 am
Hello,

12 September 2019: an updated, v1.3.0 release of the bootable image is now available, which adds RPi4 compatibility, uses a Raspbian Buster host OS, and runs under the official 64-bit kernel; please see here for further details.

4 March 2020: and now, thanks to ShiftPlusOne, raspbian-nspawn-64 can be installed from the official Raspbian repo, just like any other regular package, using apt - so no need for a custom bootable image! For more details, please see this post.

as maintainer of the gentoo-on-rpi3-64bit image, I not infrequently receive email requests from users who:
  • don't want to give up on their familiar Raspbian desktop, repos, and tools;
  • don't want to have to build packages from source (during setup or maintenance);
  • would like to retain the ability to easily upgrade their Raspbian system going forward;
  • but still need to run a few (possibly GUI-based) 64-bit-only packages on their RPi3.
Edit: fix minor typo
Would you say running nspawn on Raspbian or multiarch on Ubuntu (unsure if they are interchangable) would yield a higher performance while maintaining a lower pull on resources?
I am trying to create a RPi 4 as mini server and gateway router for cellular services, meaning I would install openWRT in a container environment(container might not be the word to use, isolated) Would one of these setups give me this capability ?
I intend on using openWRT as there are no really instruction for setting up another linux distro to maintain traffic and load balance 2 4G services.

User avatar
sakaki
Posts: 554
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)

Fri Mar 20, 2020 8:02 pm

Hi blee0518,

Why not boot the OpenWRT system natively on your RPi, it comes with its own kernel and bootfs does it not?

If you do need to isolate it (*), then yes a container should work to some extent (see e.g. here), but what is the threat vector you are trying to protect against?

As to getting it working, raspbian-nspawn-64 does not virtualize the network interfaces in its container, for simplicity, so the host's network adaptors will be visible inside the container (good), but you may need to bind mount some other /dev nodes, and change some permissions, to get full functionality. You will also, in this case, be relying on Raspbian's 64-bit kernel having all the necessary features from OpenWRT's kernel (which, in such a case, you won't be using). It may or may not do so.

hth, sakaki

* multiarch is not relevant as it refers to the ability to hold 32-bit and 64-bit apps and libraries within a common directory structure in a single userspace without clashes; but by construction, you'll be running 2 distinct userspaces here.

User avatar
sakaki
Posts: 554
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 Mar 28, 2020 12:32 am

Hello,

if you are using raspbian-nspawn-64, and would like to be able to access host system devices (such as /dev/i2c-1) from within the 64-bit container, you may be interested to read the short tutorial I've posted about this, on the project's open wiki (here).

This article covers the case of allowing the container access to specific devices (e.g., /dev/i2c-1) which are present when the container is started. There's a slightly different procedure required to allow access to devices on a hotplug bus (e.g. USB), as the device nodes for these get dynamically created on device insertion, and so may not exist at container boot. I'll write up the variant process for that case shortly.

hth, sakaki

User avatar
sakaki
Posts: 554
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)

Tue Mar 31, 2020 11:48 pm

Hello,

If you would like to run aarch64 Docker images inside raspbian-nspawn-64, I have posted full instructions for doing so (expanded from my post above) on the project's open wiki, here.

Screenshot:

Image

Best, sakaki

bmscmoreira
Posts: 32
Joined: Sat Feb 22, 2020 8:09 pm

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

Wed Apr 08, 2020 6:15 pm

Can you tell me how can I mount an external flash drive (or hdd / sdd) onto the guest OS? If I plug the drive into to pi, I can access it with the normal 32bit terminal at /media, as it is mounted there; but in the 64 bit terminal there is a media folder, but with nothing inside. Can I access external drives from this 64bit terminal?

(the intended use is to try and run docker from the external drive - also I don't know if its possible too).

Thank you!

User avatar
sakaki
Posts: 554
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)

Wed Apr 08, 2020 9:04 pm

bmscmoreira wrote:
Wed Apr 08, 2020 6:15 pm
Can you tell me how can I mount an external flash drive (or hdd / sdd) onto the guest OS? If I plug the drive into to pi, I can access it with the normal 32bit terminal at /media, as it is mounted there; but in the 64 bit terminal there is a media folder, but with nothing inside. Can I access external drives from this 64bit terminal?
Yes, you can easily have the automounts visible inside the container (they are not, by default, for security).

To do so, simply open a (32-bit) terminal, and issue:

Code: Select all

pi@raspberrypi:~ $ sudo nano -w /etc/systemd/nspawn/debian-buster-64.nspawn
And then, in that file, append the following line to the [Files] section:

Code: Select all

Bind=/media
Leave the rest of the file as-is. Save, and exit nano. Now restart the container:

Code: Select all

pi@raspberrypi:~ $ ds64-stop && ds64-start
That's it! You should now find that automounted volumes are visible within the 64-bit container (with the same privileges for the pi user as outside).
bmscmoreira wrote:
Wed Apr 08, 2020 6:15 pm
(the intended use is to try and run docker from the external drive - also I don't know if its possible too).
I'm not quite sure what you mean by running it 'from' the external drive... but it is certainly possible to run Docker within the container, and to have it access files etc. on automounted external drives. Instructions for using Docker in the 64-bit container may be found here.

hth, sakaki

bmscmoreira
Posts: 32
Joined: Sat Feb 22, 2020 8:09 pm

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

Wed Apr 08, 2020 9:29 pm

Thanks once again for your detailed response. I was actually reading "Accessing Devices (e.g. I2C) from Inside the Container" from your github at https://github.com/sakaki-/raspbian-nsp ... -Container and found the section on the mount points. Tried with "Bind=/dev/sda" but did not work (now I now why, obviously) - it's the media that should be mounted.
Sorry for not being clear, but the intended use is as you say: "(...) run Docker within the container, and to have it access files etc. on automounted external drives". I've already setup docker with your instructions. THANKS!

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

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

Thu May 14, 2020 5:19 pm

I've got a bit of a problem here...
Did an apt update and an apt upgrade, noticed that chromium is now v80, and now when it launches it just shows a white screen.

Yes, I did try adding --ignore-gpu-blacklist to the chromium command, it made no difference.
Ever wished you could "open" a RaspiOS .img file? Well now you can! I've developed Pi-Power-Tools, the only RaspiOS img editor on the planet.
https://github.com/Botspot/Pi-Power-Tools
Want to try it out?

Code: Select all

wget -O - https://raw.githubusercontent.com/Botspot/Pi-Power-Tools/master/update | bash

User avatar
sakaki
Posts: 554
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)

Thu May 14, 2020 9:40 pm

Botspot wrote:
Thu May 14, 2020 5:19 pm
I've got a bit of a problem here...
Did an apt update and an apt upgrade, noticed that chromium is now v80, and now when it launches it just shows a white screen.

Yes, I did try adding --ignore-gpu-blacklist to the chromium command, it made no difference.
The workaround (issue affects using the v80 browser under X11-forwarding too) is noted in Chromium issue #1048186. Basically do:

Code: Select all

pi@debian-buster-64:~ $ export QT_X11_NO_MITSHM=1
pi@debian-buster-64:~ $ export _X11_NO_MITSHM=1
pi@debian-buster-64:~ $ export _MITSHM=0
pi@debian-buster-64:~ $ chromium
and it should now start OK. Screenshot:

Image

hth, sakaki

Highlander88
Posts: 23
Joined: Fri Aug 22, 2014 4:20 pm

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

Tue May 19, 2020 10:05 am

Hello, I've setup the container on my Pi4, I have Raspbian Lite with OMV and I was using docker to run nextcloud and other container to run web serices, but I was having issues with big files and wanted to move to 64 bit, so I deployed nextcloud inside the container. I've binded the mountpoint used by OMV for the drive to have it accessible from the container and recreated everything from scratch, all the containers are working with good performance, but nextcloud + mariadb are working terribly slow. This can be due to nextcloud running inside the container?

User avatar
sakaki
Posts: 554
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)

Tue May 19, 2020 11:57 pm

Highlander88,

the use of an nspawn container should not affect performance unduly. The code executed is native aarch64 (in both the (official) 64-bit kernel, and the Debian Buster userland); the only overhead involved is in the kernel-level process namespacing and other security features of the nspawn setup. Others have run e.g. benchmarks successfully inside this type of container (and I have an nspawn system running BOINC with no material degradation vs 'raw') so if you are experiencing >10% slowdowns (e.g.) it is unlikely to be the container at issue.

Check the logs (using journalctl) to ensure that nothing untoward is being complained about by nextcloud or mariadb.

Another sanity check, if you have time, would be to write a stock 64-bit OS image (e.g. Gentoo, Ubuntu etc.) on a spare micro-SD card, boot your Pi4 with it, install Docker there, replicate your current nextcloud setup and compare the performance.

hth, sakaki

Highlander88
Posts: 23
Joined: Fri Aug 22, 2014 4:20 pm

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

Sun May 24, 2020 2:05 pm

sakaki wrote:
Tue May 19, 2020 11:57 pm
Highlander88,

the use of an nspawn container should not affect performance unduly. The code executed is native aarch64 (in both the (official) 64-bit kernel, and the Debian Buster userland); the only overhead involved is in the kernel-level process namespacing and other security features of the nspawn setup. Others have run e.g. benchmarks successfully inside this type of container (and I have an nspawn system running BOINC with no material degradation vs 'raw') so if you are experiencing >10% slowdowns (e.g.) it is unlikely to be the container at issue.

Check the logs (using journalctl) to ensure that nothing untoward is being complained about by nextcloud or mariadb.

Another sanity check, if you have time, would be to write a stock 64-bit OS image (e.g. Gentoo, Ubuntu etc.) on a spare micro-SD card, boot your Pi4 with it, install Docker there, replicate your current nextcloud setup and compare the performance.

hth, sakaki
Thank you for the answer, I've looked at the logs and about every minute I receive these errors that I have in this picture (except for next cloud other docker containers work fine)

If I Issue:

Code: Select all

sudo machinectl stop debian-buster-64
and then

Code: Select all

sudo machinectl start debian-buster-64
the errors stop appearing...

I underline that I am using Raspbian Lite
Attachments
Schermata 2020-05-24 alle 15.36.42.png
Schermata 2020-05-24 alle 15.36.42.png (98.86 KiB) Viewed 996 times

dony71
Posts: 21
Joined: Wed Feb 05, 2014 8:39 pm

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

Mon Jun 15, 2020 12:40 am

is it possible to compile aarch64 module or kernel in ds-64-shelll terminal?
I'm trying to compile module which needs kernel header
But "apt install raspberrypi-kernel-headers" only install
linux-headers-4.19.118+
linux-headers-4.19.118-v7+
linux-headers-4.19.118-v7l+

uname -a shows
Linux raspberrypi 4.19.118-v8+ #1311 SMP PREEMPT Mon Apr 27 14:32:38 BST 2020 aarch64 GNU/Linux

how to get linux-headers-4.19.118-v8+ ??

dony71
Posts: 21
Joined: Wed Feb 05, 2014 8:39 pm

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

Tue Jun 16, 2020 1:52 am

how to get linux-headers-4.19.118-v8+ ??
I'm following this guideline below
https://github.com/notro/rpi-source/wiki

However happens error "unrecognized command line option ‘-mgeneral-regs-only"
Somebody replies to avoid this error, needs to run in 64 bit userland
https://github.com/notro/rpi-source/issues/50

Now I'm stucked .....
Anybody has idea ?

User avatar
DougieLawson
Posts: 39602
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

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

Tue Jun 16, 2020 7:02 am

On my RPi3B running a 64-bit kernel and 32-bit userland it fails

Code: Select all

gcc: error: unrecognized command line option ‘-mgeneral-regs-only’
make[1]: *** [scripts/Makefile.build:266: scripts/mod/empty.o] Error 1
make: *** [Makefile:1118: prepare0] Error 2
That's not a bug in rpi-source, that's a bug in ../linux/arch/arm64/Makefile versus gcc 8.3

I can't, yet, find a way to get the aarch64-linux-gnu version of gcc to work on Raspbian.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

dony71
Posts: 21
Joined: Wed Feb 05, 2014 8:39 pm

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

Tue Jun 16, 2020 9:33 pm

I follow link below and manage to get cross-compiler aarch64-linux-gnu-xxx
https://andrei.gherzan.ro/linux/raspbian-rpi-64/

However when I try cross-compile modules/kernel, get error below
Any idea what could be wrong??

pi@raspberrypi:/usr/src/linux $ sudo make O=./kernel-build/ ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- modules
make[1]: Entering directory '/usr/src/linux-raspberrypi-kernel_1.20200601-arm64-1/kernel-build'
GEN Makefile
HOSTCC scripts/dtc/dtc.o
HOSTCC scripts/dtc/flattree.o
HOSTCC scripts/dtc/fstree.o
HOSTCC scripts/dtc/data.o
HOSTCC scripts/dtc/livetree.o
HOSTCC scripts/dtc/treesource.o
HOSTCC scripts/dtc/srcpos.o
HOSTCC scripts/dtc/checks.o
HOSTCC scripts/dtc/util.o
LEX scripts/dtc/dtc-lexer.lex.c
YACC scripts/dtc/dtc-parser.tab.[ch]
HOSTCC scripts/dtc/dtc-lexer.lex.o
HOSTCC scripts/dtc/dtc-parser.tab.o
HOSTLD scripts/dtc/dtc
HOSTCC scripts/genksyms/genksyms.o
YACC scripts/genksyms/parse.tab.[ch]
HOSTCC scripts/genksyms/parse.tab.o
LEX scripts/genksyms/lex.lex.c
HOSTCC scripts/genksyms/lex.lex.o
HOSTLD scripts/genksyms/genksyms
HOSTCC scripts/kallsyms
HOSTCC scripts/pnmtologo
HOSTCC scripts/conmakehash
HOSTCC scripts/recordmcount
HOSTCC scripts/sortextable
HOSTCC scripts/asn1_compiler
HOSTCC scripts/extract-cert
WRAP arch/arm64/include/generated/uapi/asm/kvm_para.h
WRAP arch/arm64/include/generated/uapi/asm/errno.h
WRAP arch/arm64/include/generated/uapi/asm/ioctl.h
WRAP arch/arm64/include/generated/uapi/asm/ioctls.h
WRAP arch/arm64/include/generated/uapi/asm/ipcbuf.h
WRAP arch/arm64/include/generated/uapi/asm/mman.h
WRAP arch/arm64/include/generated/uapi/asm/msgbuf.h
WRAP arch/arm64/include/generated/uapi/asm/poll.h
WRAP arch/arm64/include/generated/uapi/asm/resource.h
WRAP arch/arm64/include/generated/uapi/asm/sembuf.h
WRAP arch/arm64/include/generated/uapi/asm/shmbuf.h
WRAP arch/arm64/include/generated/uapi/asm/siginfo.h
WRAP arch/arm64/include/generated/uapi/asm/socket.h
WRAP arch/arm64/include/generated/uapi/asm/sockios.h
WRAP arch/arm64/include/generated/uapi/asm/stat.h
WRAP arch/arm64/include/generated/uapi/asm/swab.h
WRAP arch/arm64/include/generated/uapi/asm/termbits.h
WRAP arch/arm64/include/generated/uapi/asm/termios.h
WRAP arch/arm64/include/generated/uapi/asm/types.h
WRAP arch/arm64/include/generated/asm/bugs.h
WRAP arch/arm64/include/generated/asm/delay.h
WRAP arch/arm64/include/generated/asm/div64.h
WRAP arch/arm64/include/generated/asm/dma.h
WRAP arch/arm64/include/generated/asm/dma-contiguous.h
WRAP arch/arm64/include/generated/asm/dma-mapping.h
WRAP arch/arm64/include/generated/asm/early_ioremap.h
WRAP arch/arm64/include/generated/asm/emergency-restart.h
WRAP arch/arm64/include/generated/asm/hw_irq.h
WRAP arch/arm64/include/generated/asm/irq_regs.h
WRAP arch/arm64/include/generated/asm/kdebug.h
WRAP arch/arm64/include/generated/asm/kmap_types.h
WRAP arch/arm64/include/generated/asm/local.h
WRAP arch/arm64/include/generated/asm/local64.h
WRAP arch/arm64/include/generated/asm/mcs_spinlock.h
WRAP arch/arm64/include/generated/asm/mm-arch-hooks.h
WRAP arch/arm64/include/generated/asm/mmiowb.h
WRAP arch/arm64/include/generated/asm/msi.h
WRAP arch/arm64/include/generated/asm/qrwlock.h
WRAP arch/arm64/include/generated/asm/qspinlock.h
WRAP arch/arm64/include/generated/asm/serial.h
WRAP arch/arm64/include/generated/asm/set_memory.h
WRAP arch/arm64/include/generated/asm/switch_to.h
WRAP arch/arm64/include/generated/asm/trace_clock.h
WRAP arch/arm64/include/generated/asm/unaligned.h
WRAP arch/arm64/include/generated/asm/user.h
WRAP arch/arm64/include/generated/asm/vga.h
UPD include/config/kernel.release
UPD include/generated/uapi/linux/version.h
UPD include/generated/utsrelease.h
CC scripts/mod/empty.o
/tmp/ccyg9tcS.s: Assembler messages:
/tmp/ccyg9tcS.s:5: Error: junk at end of line, first unrecognized character is `,'
make[2]: *** [../scripts/Makefile.build:266: scripts/mod/empty.o] Error 1
make[1]: *** [/usr/src/linux-raspberrypi-kernel_1.20200601-arm64-1/Makefile:1118: prepare0] Error 2
make[1]: Leaving directory '/usr/src/linux-raspberrypi-kernel_1.20200601-arm64-1/kernel-build'
make: *** [Makefile:179: sub-make] Error 2

Return to “General discussion”