ChasTech
Posts: 21
Joined: Mon Oct 21, 2019 5:01 am

Debian64Pi - image builder and images of 64-bit Debian for the Pi 3 and 4

Sun Jan 05, 2020 8:26 pm

I am proud to announce my new three stages, semi-automated Debian ARM64 image generator for the Pi 3 and 4, Debian64Pi.

It is three scripts, sure there is some user interaction, and you do have to create and mount the image manually beforehand, but this project is still in early development and hopefully some issues will be ironed out in the future.

There is one major issue, however, and it impacts greatly if you want to switch SD cards from one Pi model to another: the images are not universally compatible with the other Pi generation. So a Pi 3 image will not run on the Pi 4 and vice versa. By default, the script sets up the image for the Pi 4, but tweaking stage1.sh you could change to a Pi 3 image instead. The Pi 3 image works on all Pi 3 models (3B, 3B+, 3A+) but not on the 4. I am looking for a fix for this.

On the GitHub releases page for this project are two images made with this script, both complete with a basic Debian installation and most stuff working, including WiFi. There is no desktop environment, but one can easily be installed. The stage2 script has commented out a line to install the XFCE desktop with preloaded software, which can be uncommented or changed to install another DE.

Turns out the Pi 4 image won't boot without renaming the kernel8-rp4.img to just kernel8.img, will be fixed in next image release, will update script soon to incorporate this fix. However, with the modification the image will work perfectly, much smoother than on the Pi 3. With fake_kms enabled in config.txt, the Pi 4 gives a smooth Debian experience with graphics acceleration.

Anyways you can find the GitHub page here and the releases section here. Enjoy! 8-) 8-)

Username is debian, password also debian.

PS: Credit to sakaki- for her prebuilt kernels used in the script and image. (Link 1) (Link 2)
Last edited by ChasTech on Mon Jan 06, 2020 7:50 pm, edited 1 time in total.
If apples give you apple pie, bananas give you banana pie, pears give you pear pie, and cherries give you cherry pie, then what do raspberries give you?

A Raspberry Pi :lol:

User avatar
Gavinmc42
Posts: 4528
Joined: Wed Aug 28, 2013 3:31 am

Re: Debian64Pi - image builder and images of 64-bit Debian for the Pi 3 and 4

Mon Jan 06, 2020 2:31 am

Cool, another 64bit OS for Pi4.
I am expecting a flood of them this year.

I use Sakaki's Gentoo64 as my main development OS and Pi4's as my home desktop PC's now.
Will these scripts run on Gentoo64 and make the Debian64 image?

Sakaki has a wiki on how to add a Desktop to her Lite version, it is a lot of fun to play with.
Openbox was a great place to start.
I learned more about x11 and windows managers in a few weeks than just using them for decades.

Perhaps you could do a similar wiki on Desktop adding?
As it is Debian, will the same instructions that put Desktops on Raspbian Lite work?
https://www.raspberrypi.org/forums/view ... 6&t=133691

Login/password is debian/debian ?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
Gavinmc42
Posts: 4528
Joined: Wed Aug 28, 2013 3:31 am

Re: Debian64Pi - image builder and images of 64-bit Debian for the Pi 3 and 4

Mon Jan 06, 2020 11:56 am

Yippee x11 running openbox.
Few little things to sort out, Debian is not Gentoo64.
Apart from the xorg.openbox install/emerge differences the .xintrc setup from Sakaki's wiki means my Lite Debain64 looks like my Lite Gentoo64.

Just a quick play but no major issues yet.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

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

Re: Debian64Pi - image builder and images of 64-bit Debian for the Pi 3 and 4

Mon Jan 06, 2020 5:33 pm

Nice work. We're getting closer to a full official Raspbian 64-bit build on Pi :D

I'm guessing the fact you have a separate image for Pi 3 versus Pi 4 is down to some sort of device tree issue?

ChasTech
Posts: 21
Joined: Mon Oct 21, 2019 5:01 am

Re: Debian64Pi - image builder and images of 64-bit Debian for the Pi 3 and 4

Mon Jan 06, 2020 7:48 pm

andrum99 wrote:
Mon Jan 06, 2020 5:33 pm
Nice work. We're getting closer to a full official Raspbian 64-bit build on Pi :D

I'm guessing the fact you have a separate image for Pi 3 versus Pi 4 is down to some sort of device tree issue?
A kernel incompatibility actually.
If apples give you apple pie, bananas give you banana pie, pears give you pear pie, and cherries give you cherry pie, then what do raspberries give you?

A Raspberry Pi :lol:

ChasTech
Posts: 21
Joined: Mon Oct 21, 2019 5:01 am

Re: Debian64Pi - image builder and images of 64-bit Debian for the Pi 3 and 4

Mon Jan 06, 2020 7:56 pm

Gavinmc42 wrote:
Mon Jan 06, 2020 2:31 am
Cool, another 64bit OS for Pi4.
I am expecting a flood of them this year.

I use Sakaki's Gentoo64 as my main development OS and Pi4's as my home desktop PC's now.
Will these scripts run on Gentoo64 and make the Debian64 image?
It should do, just change qemu-debootstrap to just debootstrap in stage1.sh.
Sakaki has a wiki on how to add a Desktop to her Lite version, it is a lot of fun to play with.
Openbox was a great place to start.
I learned more about x11 and windows managers in a few weeks than just using them for decades.
Yeah, you can probably use any DE, maybe even GNOME on the 4GB Pi 4.
Perhaps you could do a similar wiki on Desktop adding?
As it is Debian, will the same instructions that put Desktops on Raspbian Lite work?
https://www.raspberrypi.org/forums/view ... 6&t=133691
Yes, I am planning on a wiki soon for information about D64Pi.
Login/password is debian/debian ?
Yes, sorry I appear to have forgotten to include that info, I’ve added it now though.
If apples give you apple pie, bananas give you banana pie, pears give you pear pie, and cherries give you cherry pie, then what do raspberries give you?

A Raspberry Pi :lol:

User avatar
Gavinmc42
Posts: 4528
Joined: Wed Aug 28, 2013 3:31 am

Re: Debian64Pi - image builder and images of 64-bit Debian for the Pi 3 and 4

Tue Jan 07, 2020 1:43 am

Yes, sorry I appear to have forgotten to include that info, I’ve added it now though.
No probs, experts forget what noobies need.

Never really got into x11, Window and Desktop managers in Linux before now.
Learning the x11 way first before trying to do Wayland.
It is nice to know what I learned on one Linux distribution can be applied to another without much hassle.
MC(Midnight Commander), Geany, Pcmanfm are the first things I installed and that's enough to turn a Pi4 into a development PC.

Do you know how to use Wayland on Debian?
Google time ;)
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

ChasTech
Posts: 21
Joined: Mon Oct 21, 2019 5:01 am

Re: Debian64Pi - image builder and images of 64-bit Debian for the Pi 3 and 4

Wed Jan 08, 2020 5:56 pm

I'm going to be building a GNOME image exclusively for the Pi 4 to test, see how well it runs with the FKMS driver and 4GB RAM. There won't be a Pi 3 image though and I don't even know if it'll run on the Pi 4 to be honest! And if it does don't expect it to play nice with 1GB and 2GB RAM variants as GNOME is a memory and CPU eater.
If apples give you apple pie, bananas give you banana pie, pears give you pear pie, and cherries give you cherry pie, then what do raspberries give you?

A Raspberry Pi :lol:

ChasTech
Posts: 21
Joined: Mon Oct 21, 2019 5:01 am

Re: Debian64Pi - image builder and images of 64-bit Debian for the Pi 3 and 4

Wed Jan 08, 2020 5:57 pm

Gavinmc42 wrote:
Tue Jan 07, 2020 1:43 am
Yes, sorry I appear to have forgotten to include that info, I’ve added it now though.
No probs, experts forget what noobies need.

Never really got into x11, Window and Desktop managers in Linux before now.
Learning the x11 way first before trying to do Wayland.
It is nice to know what I learned on one Linux distribution can be applied to another without much hassle.
MC(Midnight Commander), Geany, Pcmanfm are the first things I installed and that's enough to turn a Pi4 into a development PC.

Do you know how to use Wayland on Debian?
Google time ;)
https://wiki.debian.org/Wayland#Supported_environments

Wayland should work with GNOME, KDE, and a couple other DEs, Won't work on MATE and XFCE though, but if Debian for Pi 4 with GNOME is a success you could look at using it with that.
If apples give you apple pie, bananas give you banana pie, pears give you pear pie, and cherries give you cherry pie, then what do raspberries give you?

A Raspberry Pi :lol:

User avatar
Gavinmc42
Posts: 4528
Joined: Wed Aug 28, 2013 3:31 am

Re: Debian64Pi - image builder and images of 64-bit Debian for the Pi 3 and 4

Thu Jan 09, 2020 12:36 am

but if Debian for Pi 4 with GNOME is a success you could look at using it with that.
Could be a stepping stone but I might try Enlightenment as that is new to me.
Learning something new is my aim and Wayland, Weston, Mutter etc is all that.

Did not know Enlightenment did Tizen and wearables plus there is an IDE.
EFL looks like it has a bunch of stuff for theming etc.

Thanks, I think you have pointed me in path that will take a few years to travel.
Or keep me busy on weekends at least.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

ChasTech
Posts: 21
Joined: Mon Oct 21, 2019 5:01 am

Re: Debian64Pi - image builder and images of 64-bit Debian for the Pi 3 and 4

Thu Jan 09, 2020 7:23 am

Got GNOME up and running though with the FKMS driver on 4GB Pi 4!

However, it's horribly slow, I'm talking slow, as in stuttering everywhere, taking ten minutes to launch app slow. I doubt I'll be releasing an image for it other than in an experimental stage. Icons for programs take forever to render, programs take forever to launch. It's an overall mess. Tried increasing gpu_men to 512 to no avail and it still stutters.
If apples give you apple pie, bananas give you banana pie, pears give you pear pie, and cherries give you cherry pie, then what do raspberries give you?

A Raspberry Pi :lol:

User avatar
procount
Posts: 2211
Joined: Thu Jun 27, 2013 12:32 pm
Location: UK

Re: Debian64Pi - image builder and images of 64-bit Debian for the Pi 3 and 4

Thu Jan 09, 2020 7:10 pm

Hi @chastech
I just tried converting your 2 images for installation with PINN.
The pi3 version worked fine, but the pi4 version didn't.
So I flashed your native pi4 image directly and that didn't boot either.
I noticed the kernel was called kernel8-p4.img. Renaming it to kernel8.img allowed it to boot, so I'll have a go at converting the pi4 version again.
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574

ChasTech
Posts: 21
Joined: Mon Oct 21, 2019 5:01 am

Re: Debian64Pi - image builder and images of 64-bit Debian for the Pi 3 and 4

Thu Jan 09, 2020 9:08 pm

procount wrote:
Thu Jan 09, 2020 7:10 pm
Hi @chastech
I just tried converting your 2 images for installation with PINN.
The pi3 version worked fine, but the pi4 version didn't.
So I flashed your native pi4 image directly and that didn't boot either.
I noticed the kernel was called kernel8-p4.img. Renaming it to kernel8.img allowed it to boot, so I'll have a go at converting the pi4 version again.
Yeah sorry about that, I've added a fix in the stage1 script for building images and will soon release a new Pi 4 image with this fix incorporated.
If apples give you apple pie, bananas give you banana pie, pears give you pear pie, and cherries give you cherry pie, then what do raspberries give you?

A Raspberry Pi :lol:

User avatar
procount
Posts: 2211
Joined: Thu Jun 27, 2013 12:32 pm
Location: UK

Re: Debian64Pi - image builder and images of 64-bit Debian for the Pi 3 and 4

Fri Jan 10, 2020 6:12 pm

I've added these Debian64Pi images to the list installed by PINN.
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574

ChasTech
Posts: 21
Joined: Mon Oct 21, 2019 5:01 am

Re: Debian64Pi - image builder and images of 64-bit Debian for the Pi 3 and 4

Fri Jan 10, 2020 6:36 pm

procount wrote:
Fri Jan 10, 2020 6:12 pm
I've added these Debian64Pi images to the list installed by PINN.
Thanks.
If apples give you apple pie, bananas give you banana pie, pears give you pear pie, and cherries give you cherry pie, then what do raspberries give you?

A Raspberry Pi :lol:

ChasTech
Posts: 21
Joined: Mon Oct 21, 2019 5:01 am

Re: Debian64Pi - image builder and images of 64-bit Debian for the Pi 3 and 4

Sun Jan 12, 2020 8:22 am

I've fixed the issue in the Pi 4 image. There should be a new image in the releases section of the page now which has the kernel issue fixed.
If apples give you apple pie, bananas give you banana pie, pears give you pear pie, and cherries give you cherry pie, then what do raspberries give you?

A Raspberry Pi :lol:

ChasTech
Posts: 21
Joined: Mon Oct 21, 2019 5:01 am

Re: Debian64Pi - image builder and images of 64-bit Debian for the Pi 3 and 4

Sat Jan 18, 2020 10:25 am

Development on the GNOME image has been cancelled. I will be releasing MATE and XFCE images at some point though.
If apples give you apple pie, bananas give you banana pie, pears give you pear pie, and cherries give you cherry pie, then what do raspberries give you?

A Raspberry Pi :lol:

washran
Posts: 7
Joined: Sun Dec 22, 2019 5:38 am
Location: US Southwest

Re: Debian64Pi - image builder and images of 64-bit Debian for the Pi 3 and 4

Sun Jan 26, 2020 7:13 am

I am currently testing PINN debian64pi4 on my raspberry pi 4. It seems to be working great. It is missing some raspbian stuff though. Thanks for making the image available. The arm64 OS functions faster than the armhf system.

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

Re: Debian64Pi - image builder and images of 64-bit Debian for the Pi 3 and 4

Mon Jan 27, 2020 7:24 pm

[I'm having trouble with the latest Pi 4 image (https://github.com/ChasTechProjects/Deb ... 110.tar.xz). BalenaEtcher complains the image is "not supported", and attempting to connect from Linux on my laptop I am unable to detect a partition table. Trying to boot a Pi 4B 4GB with it results in a few flashes of the activity light, then it goes to the "four flashes" pattern, indicating it cannot load start.elf. Is there a problem with this image?]

Edit: Never mind - it seems 7zip (on Windows 10) doesn't handle the file correctly - I copied it over to another Pi 4B and used Raspbian to extract it, and it seems to be OK. As you were.

washran
Posts: 7
Joined: Sun Dec 22, 2019 5:38 am
Location: US Southwest

Re: Debian64Pi - image builder and images of 64-bit Debian for the Pi 3 and 4

Wed Feb 05, 2020 7:51 pm

@chastech Your script and minimal install image works good. The Sakaka kernel needs a script for the installed OS. The Raspbian people should use the arm64 package you created with new raspbian features. It just works. I originally used PINN but I prefer freedom setting up the image on sdcard and doing modifications.

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

Re: Debian64Pi - image builder and images of 64-bit Debian for the Pi 3 and 4

Wed Feb 05, 2020 10:28 pm

Where can I download the source for the kernel the current image is using? I'm looking to build ZFS as an out-of-tree module.


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

Re: Debian64Pi - image builder and images of 64-bit Debian for the Pi 3 and 4

Thu Feb 06, 2020 8:13 pm

SummerRainbowz wrote:
Thu Feb 06, 2020 7:16 am
@andrum99 https://github.com/raspberrypi/linux (branch rpi-4.19.y, should be the default one)
By looking in the stage1.sh script I figured out the kernel is from sakaki's kernel build at https://github.com/sakaki-/bcm2711-kern ... 3.20200107

SummerRainbowz
Posts: 5
Joined: Wed Dec 18, 2019 4:49 pm

Re: Debian64Pi - image builder and images of 64-bit Debian for the Pi 3 and 4

Thu Feb 06, 2020 8:43 pm

Nevermind, forgot that I was using a different version on my build. Sorry for being misleading.

ChasTech
Posts: 21
Joined: Mon Oct 21, 2019 5:01 am

Re: Debian64Pi - image builder and images of 64-bit Debian for the Pi 3 and 4

Tue Mar 24, 2020 5:02 pm

Hey everyone, sorry for my inactivity lately.

I will answer all your questions and queries shortly.
If apples give you apple pie, bananas give you banana pie, pears give you pear pie, and cherries give you cherry pie, then what do raspberries give you?

A Raspberry Pi :lol:

Return to “Debian”