PinePhone Build Environment
#1
Question 
I am interested in setting up a build environment for pinephone. I plan on using Manjaro/Arch. I'm thinking it would be nice to be able to build packages either from AUR or just source on a faster CPU.

I'm not sure the best way to set this up. I was thinking qemu but i have had no luck getting qemu-system-aarch64 to boot anything. Obviously i'm doing something wrong. What's a good guide on running say Arch arm using qemu?

I've tried just issuing this command

sudo qemu-system-aarch64 -machine virt -machine type=virt -m 2048 -cpu cortex-a57 Manjaro-ARM-plasma-mobile-pinephone-alpha2.img

is there another machine/type/cpu i should specify. All i get is a black screen with a qemu prompt. Maybe i need to specify other devices? Maybe i need to extract the image somehow and specify the kernel separately?

The other thing i thought of was using a chroot but that would not work since the host and target do not share the same architecture correct?

any help/kick in the right direction would be appreciated.
#2
You can't emulate a PinePhone completely with qemu, so the released PinePhone images won't run. If you want to build aarch64 packages in qemu for Arch/Manjaro you should probably run a standard Alarm image in qemu.
#3
So here is what I came up with.

https://blog.marcg.pizza/pinephone-arm-b...ment-setup
#4
If you want to have an aarch64 build environment that's a generic phone and not the pinephone specifically you can use the qemu stuff in postmarketOS.

Code:
pmbootstrap init # Select the "qemu" manufacturer and then the "aarch64" device, further options are the UI's you want
pmbootstrap install --add vim,nano,emacs # Generate a rootfs and install packages you want
pmbootstrap qemu # Start a qemu VM with the generated rootfs
#5
Any updates on this front? Can one develop an app for PinePhone without owning one?
Today, the forces which make the rich richer and poor poorer have their roots in computer security. Never has it been more important to work towards abolishing the power of the powerful.

Let's use hyperbola or other libre OSes and strive towards stateless hardware (Rutkowska 2015). Let's use GNU/Linux phones and shun Android. Let's make our data available to everyone or else absolutely no one.
#6
It depends on what you're trying to do - most of the software running on the PinePhone is generic linux software that was never aimed at the PinePhone. If you're doing something generic than you should be able to develop much as you would any other linux app so long as you take care about how it'll fit on the screen. The VM stuff and the environment set up by pmbootstrap should help. If you're doing something that interacts with the hardware then you'll need an actual PinePhone for testing since so far as I know there isn't a VM that emulates all the hardware interfaces. For hardware that's abstracted (modem behind ModemManager or oFono for example) you may be able to get away with not having the hardware.


Possibly Related Threads…
Thread Author Replies Views Last Post
  eSIM on PinePhone just_a_q 8 4,697 11-05-2024, 11:10 AM
Last Post: zetabeta
  Want to buy second hand PinePhone 3G version rudi.timmermans 0 179 11-01-2024, 09:58 AM
Last Post: rudi.timmermans
  Can use PlayStation on Pinephone? willharper 6 5,684 10-30-2024, 08:07 AM
Last Post: biketool
  Ordered PinePhone till today have no info or confirmation about order hennadiyt 1 367 10-05-2024, 02:20 PM
Last Post: KC9UDX
  US Mobile, via T-Mobile, won't support Pinephone Pro - SOLVED, SIMPLY jovval 11 5,769 07-28-2024, 03:42 PM
Last Post: dchang0
  How can I record video on a Pinephone? kk22 18 7,219 07-22-2024, 05:18 PM
Last Post: baptx
  Pinephone not booting, always vibrating alexander12 8 6,888 07-19-2024, 07:50 PM
Last Post: Blackheart
  PinePhone Pro P. Siera 2 829 07-17-2024, 12:41 AM
Last Post: P. Siera
  PinePhone Boots but only Shows Black Screen with Backlight danyeaw 1 691 06-30-2024, 10:18 AM
Last Post: danyeaw
  Pinephone won't boot. spha 13 5,906 05-15-2024, 10:31 PM
Last Post: Richy_T

Forum Jump:


Users browsing this thread: 1 Guest(s)