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

Kernel wont boot #2

Open
EndlessEden opened this issue Dec 25, 2020 · 6 comments
Open

Kernel wont boot #2

EndlessEden opened this issue Dec 25, 2020 · 6 comments

Comments

@EndlessEden
Copy link

EndlessEden commented Dec 25, 2020

After figuring out the readme (Please update, it fails to mention needing qemu to run the binaries)
cp /usr/bin/qemu-aarch64-static root/bin arch-chroot $OPIMOUNT /bin/qemu-aarch64-static /bin/pacman -U /home/alarm/uboot-orangepi-rk3399-2019.10-1-aarch64.pkg.tar.zst arch-chroot $OPIMOUNT /bin/qemu-aarch64-static /bin/dd if=/boot/idbloader.img of=/dev/sdx seek=64 conv=notrunc arch-chroot $OPIMOUNT /bin/qemu-aarch64-static /bin/dd if=/boot/uboot.img of=/dev/sdx seek=16384 conv=notrunc arch-chroot $OPIMOUNT /bin/qemu-aarch64-static /bin/dd if=/boot/trust.img of=/dev/sdx seek=24576 conv=notrunc

it fails to boot beyond kernel launch (with no errors i can see)
Log Below

OPI4_UART.log

@jakogut
Copy link
Owner

jakogut commented Dec 30, 2020

After figuring out the readme (Please update, it fails to mention needing qemu to run the binaries)

@EndlessEden Pull requests are welcome. It looks like you don't have binfmt setup for that arch, which I forgot was necessary when I wrote this. On Arch Linux, installing binfmt-qemu-static from the AUR should suffice.

Are you booting the Orange Pi RK3399, or the Orange Pi 4?

@EndlessEden
Copy link
Author

@jakogut

  1. I will look into updating when i have some free time.

  2. ok, im not super familiar with all of this though. any articles on how binfmt and qemu works in this context. im assuming from basic understanding binfmt is registering elf translations with the kernel, to run arm executable's on x86 under qemu? (or am i way off?) - I also assume you mean on the host system and not the target filesystem. this is a first for me.

  3. Orange Pi 4; (non-emmc model).

-Side note, is there any recommended Qemu settings for emulating the RK3399(OPi4)? I wanted to do package building in emulation.

@jakogut
Copy link
Owner

jakogut commented Dec 31, 2020

@EndlessEden For binfmt, you are correct. The host kernel has handlers registered for different architectures which actually run the binary. In this case, QEMU is doing the emulation. I'd refer you to the Debian documentation. Additionally, this article goes into some pretty good detail.

Being that you're using the Orange Pi 4, did you try the orangepi-rk3399 branch, or the orangepi4 branch?

@EndlessEden
Copy link
Author

EndlessEden commented Jan 2, 2021

@jakogut Sorry, i didnt notice there was a orangepi4 branch. will build and test, thank you.
As per (identical) instructions, I cannot get your release version to work (2019.10-1), it seems to be only for rk3399 (i assume) and not OPi4.

UPDATE1: ive tried cross-compiling, and compiling in qemu-aarch64. I just cannot get this to build with gcc(aarch64-linux-gnu-gcc[10 or 8.2 from 2019/01/31])+arm-none-eabi(10[from archlinux-community repo - x86_64 only] or bin-82 or bin-92[from aur, both x86_64 and aarch64]). All fail with .pmusram will not fit in region PMUSRAM at linking in bl31.elf (as mentioned in this issue: ARM-software/tf-issues#650)

UPDATE2: After speaking with a few others and lots of messing with cross-compiling(using the 8.2-201901 toolchain from arm), and editing the PKGBUILD. i managed to compile the package. Going to test and refine, if it works ill make a pull request with a updated PKGBUILD and readme for your review at your leisure.

UPDATE3: Kernel boots, everything seems ok. Will test updated PKGBUILD on device.

@jakogut
Copy link
Owner

jakogut commented Jan 22, 2021

@EndlessEden I've updated this PKGBUILD to U-boot 2021.01. I see that you've made a PR fixing some issues, would you mind rebasing that?

@EndlessEden
Copy link
Author

@jakogut Had a derp moment rebasing, so i nuked my repo, reforked it, and uploaded just my updated pkgbuild. | please review Pull Request #4

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

2 participants