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
  pinephone virtual keyboard aular 4 292 04-10-2024, 03:45 PM
Last Post: aular
  PinePhone Doesn't Boot LED Doesn't Show Any Signs When Charging dorkydev 1 195 04-02-2024, 11:50 AM
Last Post: Kevin Kofler
  PinePhone - boot from microSD laserpyramid 5 462 03-06-2024, 06:37 PM
Last Post: aular
  Are you using the Pinephone as your daily driver? jro 157 107,908 02-18-2024, 11:33 PM
Last Post: aular
  2020 PinePhone Manjaro CE EU for sale, name your price astrojuanlu 7 1,703 02-14-2024, 04:51 PM
Last Post: astrojuanlu
  pinephone is not bootble for the box. ijij 1 571 01-19-2024, 01:29 PM
Last Post: fxc
  Multiple issues with the Pinephone MTXP 12 2,253 12-28-2023, 07:55 AM
Last Post: MTXP
  pinephone repair shop shengchieh 0 471 12-26-2023, 02:42 PM
Last Post: shengchieh
  sudo nano file saving pinephone beta edition CharlesGnarley 4 1,630 12-22-2023, 03:44 PM
Last Post: Kevin Kofler
  Can't get Mobian on PinePhone to recognise USB-C docking bar duncan_bayne 9 6,833 12-04-2023, 02:14 AM
Last Post: Peter Gamma

Forum Jump:


Users browsing this thread: 1 Guest(s)