Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bamarni64 not supported by Pi 3 b+ #75

Open
Crazyhead90 opened this issue Mar 17, 2018 · 99 comments
Open

Bamarni64 not supported by Pi 3 b+ #75

Crazyhead90 opened this issue Mar 17, 2018 · 99 comments

Comments

@Crazyhead90
Copy link

The current Bamarni 64 OS is not supported by the new Pi 3b+, when you try to load it after flashing it, it will hang on the rainbowscreen.

Would it be possible to update this so it gets supported?

@ThomasKaiser
Copy link

You need at least

  • new kernel with LAN7800 driver and correct device-tree contents
  • new 'firmware' with support for the new hardware (this is the proprietary stuff on the /boot partition, the closed source RTOS controlling your Pi needs especially to know about the new PMIC and how to control it)

Solving the firmware part is somewhat easy (exchange the relevant stuff on the /boot partition with what you find on latest Raspbian Stretch image) but for kernel/driver support I would assume you need to do a little bit more :)

@ThomasKaiser
Copy link

Just realized that everything should work as expected by building pi64 from source. Though I would switch to branch linux-4.14 since most recent LTS branch and already supporting EEE (energy efficient ethernet) which can make a difference of over 400mW with the new USB Ethernet) https://github.com/bamarni/pi64/blob/cc3bfd245b8799efd23b8ea73c977ba487dd34d8/README.md

@ThomasKaiser
Copy link

See also #76 -- might work or not. Not tested since I lack the hardware.

@Crazyhead90
Copy link
Author

Crazyhead90 commented Mar 21, 2018

Ah, that would be an easy solve. I will test it when i get home in about 11 hours from now and give an update if i managed to do so (I'm still quite new to Linux, so no promises, haha)

Switching to 4.14 is easily done by just sending the command "sudo pi64-update" once its installed, right?

@ThomasKaiser
Copy link

Switching to 4.14 is easily done by just sending the command "sudo pi64-update" once its installed, right?

Don't think so. You need to check out branch linux-4.14 before you let the image build in Docker. Check git documentation.

@Crazyhead90
Copy link
Author

Crazyhead90 commented Mar 21, 2018

@ThomasKaiser do i have to compile the bamarni 64bit on a 64 bit os? I'm getting an error message when i try to build it on raspbian 32bit, this is what i get:

root@raspberrypi:/home/pi/Downloads/pi64-master# docker build -t pi64 .
Sending build context to Docker daemon 116.2 kB
Step 0 : FROM ubuntu:17.04
17.04: Pulling from library/ubuntu
1b3d7384fd40: Pull complete 
f9dcbbfaf1e9: Pull complete 
638a15e5eb12: Pull complete 
412eb9786954: Pull complete 
3c59bc4b5f14: Pull complete 
5a4ebf075c62: Pull complete 
Digest: sha256:92685bb08a498cf6229cd4a81a76763172020dab18a1a12b3b00fd008f9663db
Status: Downloaded newer image for ubuntu:17.04
 ---> 5a4ebf075c62
Step 1 : ENV GOPATH /go PATH /go/bin:/usr/lib/go-1.8/bin:$PATH
 ---> Running in cb366ce4d887
 ---> 2e736d57c419
Removing intermediate container cb366ce4d887
Step 2 : RUN apt-get update     && apt-get -y install         bc         build-essential         cmake         device-tree-compiler         gcc-aarch64-linux-gnu         g++-aarch64-linux-gnu         git         unzip         qemu-user-static         multistrap         zip         wget         dosfstools         kpartx         golang-1.8-go     && apt-get clean     && rm -rf /var/lib/apt/lists/*     && go get         github.com/aktau/github-release         github.com/cheggaaa/pb         golang.org/x/crypto/openpgp
 ---> Running in a1349699f50e
exec format error
[8] System error: exec format error
root@raspberrypi:/home/pi/Downloads/pi64-master#

@ThomasKaiser
Copy link

do i have to compile the bamarni 64bit on a 64 bit os?

Sure, cross-compiling on a 64-bit x86 (x64) machine:

git clone --depth=1 -b linux-4.14 https://github.com/bamarni/pi64 pi64
cd pi64
docker build -t pi64 .

@Crazyhead90
Copy link
Author

Crazyhead90 commented Mar 21, 2018

@ThomasKaiser I get exactly the same error message
https://pastebin.com/TV1xubYU

Are you sure that i can compile that 64bit OS on my 32bit raspbian now?

@ThomasKaiser
Copy link

@Brewfasa you need to cross-compile on a PC. Either using a 'native' Ubuntu (I would assume 16.04 will already do it) or there using Docker pulling a more recent Ubuntu in.

The reason why: https://devsidestory.com/build-a-64-bit-kernel-for-your-raspberry-pi-3/

@Crazyhead90
Copy link
Author

Alright, i got that point now, but for the:

Solving the firmware part is somewhat easy (exchange the relevant stuff on the /boot partition with what you find on latest Raspbian Stretch image)

Is it possible for a noob like me to figure out which ones i have to copy and which ones i should keep? Like the noob i am, i tried copying the entire boot partition from raspbian to bamarni and it gives (kinda as expected) an error message during the boot.

I did notice that the raspbian boot files had something with kernal8 and bamarni kernal7, not sure if thats a problem

@michalszymura
Copy link

after running docker run -it --privileged -v $PWD:/root/pi64 -v /opt/vc:/opt/vc -w /root/pi64
pi64 make build/pi64-lite.img

i run into problem:

+ cp -R firmware/boot/COPYING.linux firmware/boot/LICENCE.broadcom firmware/boot/bootcode.bin firmware/boot/fixup.dat firmware/boot/fixup_cd.dat firmware/boot/fixup_db.dat firmware/boot/fixup_x.dat firmware/boot/overlays firmware/boot/start.elf firmware/boot/start_cd.elf firmware/boot/start_db.elf firmware/boot/start_x.elf linux/boot
touch build/linux # otherwise make will rebuild that target everytime (as build/linux-src gets altered by make/linux)
pi64-build -build-dir ./build -version lite
Creating build directory...
Creating image...
   Mapping partitions...
   Creating filesystems...
   Mounting filesystems...
Installing Debian...
   Running multistrap...
exit status 25
Makefile:12: recipe for target 'build/pi64-lite.img' failed
make: *** [build/pi64-lite.img] Error 1

@ThomasKaiser
Copy link

Without these commits from few hours ago building a 64-bit kernel with support for the new hardware wasn't working anyway: raspberrypi/linux@74b4a1d

@ArthurWebers
Copy link

I would also appreciate very much if pi64 wouldsupport the raspberry 3B+.

@Crazyhead90
Copy link
Author

Maybe @ThomasKaiser could fork and update bamarni once the required up to date files are available.
He seems to be one of the few people who actually knows what he's talking about, unlike me, haha

@ThomasKaiser
Copy link

Sorry, I already forked the project and commited the outstanding PR (untested). Now it's up to people who own the hardware to test. I don't have an RPi 3 B+ and I will never buy one since the hardware is sooooooo limited and slow compared to tons of other good SBC. And the under-voltage issues the majority of users is running into simply sucks.

The only reason I went through these annoying steps (mostly related to the proprietary and closed source crap on the /boot partition) is outlined here: https://forum.openmediavault.org/index.php/Thread/18991-New-approach-for-Raspberry-Pi-OMV-images/?postID=170817#post170817

@Crazyhead90
Copy link
Author

Do we also have to do anything with raspberrypi/linux@74b4a1d ?

Like i said, i'm a noob in this

@ThomasKaiser
Copy link

Do we also have to do anything with raspberrypi/linux@74b4a1d ?

Nope. If you now build a new pi64 image the kernel gets checked out with those commits from yesterday so 3+ support should be there. Still missing is the wireless firmware but that's just copying a few files to a specific directory: #76 (comment)

@Crazyhead90
Copy link
Author

Crazyhead90 commented Mar 27, 2018

@ThomasKaiser I tried to follow these steps on my ubuntu 64b in VMware. I cloned the linux 4.14 kernal, edited the finish.go file and went to the pi64 location.
git clone --depth=1 -b linux-4.14 https://github.com/bamarni/pi64 pi64

Edit finish.go to:
62e3286

cd pi64
docker build -t pi64 .

Then i run the docker build command and it starts downloading things from ubuntu and at the end i end up with the following error message:

https://i.imgur.com/3Oqk9zm.png

Reading package lists...
W: The repository 'http://security.ubuntu.com/ubuntu zesty-security Release' does not have a Release file.
W: The repository 'http://archive.ubuntu.com/ubuntu zesty Release' does not have a Release file.
W: The repository 'http://archive.ubuntu.com/ubuntu zesty-updates Release' does not have a Release file.
W: The repository 'http://archive.ubuntu.com/ubuntu zesty-backports Release' does not have a Release file.
E: Failed to fetch http://security.ubuntu.com/ubuntu/dists/zesty-security/universe/source/Sources  404  Not Found [IP: 91.189.88.152 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/zesty/universe/source/Sources  404  Not Found [IP: 91.189.88.162 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/zesty-updates/universe/source/Sources  404  Not Found [IP: 91.189.88.162 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/zesty-backports/main/binary-amd64/Packages  404  Not Found [IP: 91.189.88.162 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
The command '/bin/sh -c apt-get update     && apt-get -y install         bc         build-essential         cmake         device-tree-compiler         gcc-aarch64-linux-gnu         g++-aarch64-linux-gnu         git         unzip         qemu-user-static         multistrap         zip         wget         dosfstools         kpartx         golang-1.8-go     && apt-get clean     && rm -rf /var/lib/apt/lists/*     && go get         github.com/aktau/github-release         github.com/cheggaaa/pb         golang.org/x/crypto/openpgp' returned a non-zero code: 100
root@ubuntu:/home/crazyhead/pi64#

The zesty distro seems to be removed..(http://security.ubuntu.com/ubuntu/dists/)
However i did find it back here:
http://old-releases.ubuntu.com/ubuntu/dists/zesty-security/
I have no clue where i have to update those urls to make it download it there though.. Or do i have to change zesty to a other distro?

@ThomasKaiser
Copy link

No idea why you try this on an unsupported Ubuntu release. Zesty is EOL since months: https://wiki.ubuntu.com/Releases

@ThomasKaiser
Copy link

I only use Ubuntu LTS releases (that's 16.04 at the moment, 18.04 is not ready yet)

@ThomasKaiser
Copy link

Ah, now I get it. The Docker file still references Ubuntu 17.04. A simple change like this #65 should be sufficient.

No idea why @bamarni didn't merge the PR but maybe he's busy with real life or something more important than RPi :)

@bamarni
Copy link
Owner

bamarni commented Mar 27, 2018

Sorry guys indeed I haven't updated this repo for some time, there might be some stuff which don't work anymore, I plan to get back to this soon.

@Crazyhead90
Copy link
Author

Crazyhead90 commented Mar 27, 2018

I downloaded, edited and build the kernal with docker but when i tried to create the desktop image using

docker run -it --privileged -v $PWD:/root/pi64 -v /opt/vc:/opt/vc -w /root/pi64
pi64 make build/pi64-desktop.img

I got this error:

  INSTALL include/video (3 files)
  INSTALL include/xen (4 files)
  INSTALL include/asm (35 files)
make[1]: Leaving directory '/root/pi64/build/linux-src'
++ make -s kernelversion
+ kernelversion=4.14.30-pi64+
+ hdr_dir=linux-headers-4.14.30-pi64+
+ echo ./.config
+ find . -name 'Makefile*' -o -name 'Kconfig*' -o -name '*.pl'
+ find arch/arm64/include include scripts -type f
+ find arch/arm64 -name module.lds -o -name Kbuild.platforms -o -name Platform
++ find arch/arm64 -name include -o -name scripts -type d
+ find arch/arm64/include -type f
+ grep -q '^CONFIG_STACK_VALIDATION=y' .config
+ find arch/arm64/include Module.symvers include scripts -type f
+ grep -q '^CONFIG_GCC_PLUGINS=y' .config
+ mkdir -p ../linux/usr/src/linux-headers-4.14.30-pi64+
+ ln -snf /usr/src/linux-headers-4.14.30-pi64+ ../linux/lib/modules/4.14.30-pi64+/build
+ unlink ../linux/lib/modules/4.14.30-pi64+/source
+ rsync -a --files-from=../hdr_files ./ ../linux/usr/src/linux-headers-4.14.30-pi64+
make/linux: line 37: rsync: command not found
Makefile:24: recipe for target 'build/linux' failed
make: *** [build/linux] Error 127
root@ubuntu:/home/crazyhead/pi64# 

Any idea what went wrong?

@ThomasKaiser
Copy link

rsync: command not found

This is missing: 8692e0a

Seems you did not update the repo today? When you already did modifications to your local copy maybe best idea is to delete the pi64 directory and start over with a freshly checked out linux-4.14 branch as explained above

@Crazyhead90
Copy link
Author

Crazyhead90 commented Mar 27, 2018

It seems like the "master" repo is updated with the rsync command, but the "kernal 4.14" docker file hasn't, i guess thats the problem
Changed: https://github.com/bamarni/pi64/pull/78/files

@Crazyhead90
Copy link
Author

Crazyhead90 commented Mar 27, 2018

Tried again to compile it with the rsync added to the kernel 4.14 Dockerfile. It went fine till where it started to create the .img and then it came with the following error:

pi64-build -build-dir ./build -version desktop
Creating build directory...
Creating image...
   Mapping partitions...
   Creating filesystems...
   Mounting filesystems...
Installing Debian...
   Running multistrap...
exit status 25
Makefile:15: recipe for target 'build/pi64-desktop.img' failed
make: *** [build/pi64-desktop.img] Error 1
root@ubuntu:/home/crazyhead/pi64# 

It doesn't really say what went wrong

@michalszymura
Copy link

michalszymura commented Mar 27, 2018

same here, though i'm trying to build lite version

@Crazyhead90
Copy link
Author

Any idea what this could be @ThomasKaiser (just tell me if i'm asking to much of you all the time, but you seem like someone who's willing to help and know quite a lot, haha) & @bamarni

@Crazyhead90
Copy link
Author

Crazyhead90 commented Mar 28, 2018

I found this code in install.go
Here you see the "Installing Debian", "Running multistrap" part, but before it hits the "Cleaning APT" it already printed the error message. So i guess its something in that part where the error lays.

https://i.imgur.com/T4sGbOo.png
https://github.com/bamarni/pi64/blob/master/cmd/pi64-build/install.go

@mentaluproar
Copy link

mentaluproar commented Apr 19, 2018

USB boot does not work. Otherwise, good so far.
EDIT: 9 minutes in and we're still on configuring packages, so maybe something's up.
EDITEDIT: 17 minutes later, its done. phwew!

@Crazyhead90
Copy link
Author

@mentaluproar yea the package configuration is pretty much installing the OS

@Crazyhead90
Copy link
Author

Crazyhead90 commented Apr 20, 2018

@ScorrMorr
That is weird.. I'm also using the Bamrani desktop and for me its working fine (just not sure if the wifi doesn't work, of if its just me)

Could you try to just download the zip and to flash the zip on your sd card using etcher.


Wait during what are you getting that error? During the boot process right?

@ScorrMorr
Copy link

@Crazyhead90 yes i get that error during the boot process. I'll try with etcher and let you know.

@ScorrMorr
Copy link

@Crazyhead90 with etcher booting works and i am able to login, thanks!

@satmandu
Copy link

@Crazyhead90 Would updating the barmani image to bionic just require a change to your dockerfile? Any chance of respinning those for a barmani lite bionic image?

@Crazyhead90
Copy link
Author

@satmandu No, Bamarni is based on debian not on ubuntu

@satmandu
Copy link

Ah I misunderstood. The environment in docker for building the image is ubuntu.

@Crazyhead90
Copy link
Author

Ah yea, i guess it just downloads some packages from there.

I also didnt make the images with the docker script, i downloaded the last release image of him and manually updated the kernel in it by mounting the boot partition etc to make it 4.14 and rpi3b+ compatible.

@satmandu
Copy link

That seems like the easiest way to do it. I wonder if anybody has had any luck with getting one of these debian based arm64 builds working with the uboot bootloader the bionic stock arm64 images want to use, as per this: https://wiki.ubuntu.com/ARM/RaspberryPi

(Apparently you can use the bionic arm64 image with no modification with the pi 3b, as long as you have the right 64 bit uboot built and installed. But I wasn't able to easily get that updated for the 3b+)

@dushyantbangal
Copy link

dushyantbangal commented May 5, 2018

@Crazyhead90 do you have a compiled image uploaded somewhere that we can use?
If not, can you tell what steps to follow to get this running on rpi3 b+?

@satmandu
Copy link

satmandu commented May 5, 2018

@dushyantbangal See https://github.com/Crazyhead90/pi64/releases/tag/2018-04-17

@dushyantbangal
Copy link

@satmandu thanks. Not sure how I missed it when I was going through his fork. Just noticed its even posted two other times in this thread itself

@G-UK
Copy link

G-UK commented Jun 15, 2018

@Crazyhead90 is there any way of upgrading to your updated build from the original Bamarni release. I really don't fancy having to re-setup all my Pi's from scratch if I can avoid it.

@bamarni Would it be possible to merge these changes so we can use Pi64-update to update the kernal please.

@satmandu
Copy link

satmandu commented Jun 15, 2018

@G-UK See what I did here to update the kernel to a current version in lieu of using pi64-update to update the kernel (for 3b+):

#86 (comment)

@G-UK
Copy link

G-UK commented Jun 15, 2018

@satmandu Thank You, I'll give that a try on one of my headless Pi's first. If manage to do it ok I'll do the others as well.

@satmandu
Copy link

@G-UK Please let me know if it works for you!

@satmandu
Copy link

For what it's worth it just worked for me with the 4.17 kernel tree:

Linux host 4.17.1-v8+ #1 SMP PREEMPT Fri Jun 15 17:28:12 EDT 2018 aarch64 GNU/Linux

@G-UK
Copy link

G-UK commented Jun 16, 2018

Seems to be working although I've not fully tested it. Thanks Again

I did make a few changes as I built it on the Pi itself so didn't have to cross-compile.

sudo aptitude update && sudo aptitude upgrade
sudo aptitude install -y bc build-essential git unzip subversion
mkdir rpi ; cd rpi
git clone --depth=1  https://github.com/raspberrypi/linux.git
svn export https://github.com/raspberrypi/firmware/trunk/boot
rm boot/config.txt
rm boot/kernel*
cd linux
make bcmrpi3_defconfig
make -j`nproc` deb-pkg
cp arch/arm64/boot/Image ../boot/kernel8.img
cp arch/arm64/boot/dts/broadcom/*.dtb ../boot/
cd ..
echo "kernel=kernel8.img" >> boot/config.txt
sudo dpkg -i linux-headers-4.14.49-v8+_4.14.49-v8+-1_arm64.deb linux-image-4.14.49-v8+_4.14.49-v8+-1_arm64.deb linux-libc-dev_4.14.49-v8+-1_arm64.deb
sudo cp -r boot /
sudo reboot
sudo aptitude update && sudo aptitude upgrade

@bamarni
Copy link
Owner

bamarni commented Jul 10, 2018

Hey folks, unfortunately I didn't got into this project yet... Would any of you be interested in becoming a collaborator on the repo?

@satmandu
Copy link

Thanks @bamarni but unfortunately I'm not going to have much time to spend on these projects moving forward either.

@mpvmpv
Copy link

mpvmpv commented Nov 18, 2018

@Crazyhead90

Now i'm at the part where the no_pubkey error happens which is weird because i added these keys to the trusted key chain: https://i.gyazo.com/9d93ee31b4186674ef2bb935e8f596d4.png
NO_PUBKEY 8B48AD6246925553
NO_PUBKEY 7638D0442B90D010
NO_PUBKEY EF0F382A1A7B6500

Just wanted to add my 2 cents. Apparently there is a problem/bug in multistrap 2.2.9 which gets installed in ubuntu via apt. A workaround patch for it is available here: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=881146

After applying the patch the image build process works again.

@4R7I5T
Copy link

4R7I5T commented Feb 14, 2019

Almost a year later and still no solution to the rainbow screen issue?

@satmandu
Copy link

There are plenty of ways to properly boot Linux in 64 bit mode on the 3b+ now. Ubuntu should have proper support as well in several months.

@justinstander
Copy link

justinstander commented Jun 6, 2019

Downloaded the full lite image 👌 lookin' good on my B+
https://github.com/Crazyhead90/pi64/releases/download/2018-04-17/Bamarni-lite-full64bit-pi3bplus-V2.zip

@satmandu
Copy link

satmandu commented Jun 7, 2019

Worth noting that the current Ubuntu server images work just fine on the 3b+.

The arm64 images here have been booting just fine:

http://cdimage.ubuntu.com/ubuntu-server/daily-preinstalled/current/

@small32
Copy link

small32 commented Aug 15, 2019

Downloaded the full lite image 👌 lookin' good on my B+
https://github.com/Crazyhead90/pi64/releases/download/2018-04-17/Bamarni-lite-full64bit-pi3bplus-V2.zip

@Crazyhead90

this image not supported by Google BBR!

@mohakshah
Copy link

I am a Pi 3B user who just wanted to run the latest kernel in the pi64 builds. I was able to fix the docker build issue in the commit mohakshah/pi64@cd12a122. The issue was being caused due to a Multistrap bug. I was able to circumvent it by first downloading the Debian keyring package and extracting it inside the chroot and then running Multistrap. A side effect of this approach is, I believe, that the bootstrap process is now more secure than before.

For anyone trying to build newer kernels, I have created 2 new branches in my fork - linux-4.14-2019 and linux-4.19. I also have a buster branch which generates a Debian buster image with kernel 4.19. Unfortunately, since I don't own a PI 3b+, I haven't been able to add support for that model in any of these branches. Nevertheless, I hope that someone finds these branches helpful. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests