Pinephone first steps
scattered-thoughts.net
scattered-thoughts.net
A few days ago I've published my custom bootloader for PinePhone: https://megous.com/git/p-boot/about/
It's the one I use for a quick booting to Linux: https://www.youtube.com/watch?v=kxqdF7H_It8
Something to try if you have a pinephone and want to experience sub-second boot times.
Anyway, if you like bringing up new hardware, or optimizing things, this is as good an opportunity as it gets to get pinephone and have fun. There are lots and lots of areas that can be optimized and improved in usersapce and in the kernel and you can do whatever you fancy or want to learn about. It's all being developed by random people on the internet. ;)
ATM, p-boot uses its own filesystem format optimized for quick and simple loading of data from storage during boot.
So you'd have to either use some spare partition (for example if you have swap partition on eMMC) or replace the existing boot partition contents with this filesystem. (It must be a MBR style primary partition, not GPT)
Then it's just a question of writing p-boot.bin somewhere (preferably uSD card, so you can go back to your original bootloader easily) And writing a boot partition using the p-boot-conf command as is described in the README, with a single boot config file like (that you'd have to modify this to match your OS):
no=0
name=Arch Linux 5.7 (eMMC)
atf=fw.bin
linux=Image
dtb=board.dtb
bootargs=console=ttyS0,115200 console=tty1 root=/dev/mmcblk2p2 rootfstype=f2fs rootflags=fastboot rootwait rw panic=3 cma=256M
initramfs=initramfs.img
Actually, p-boot will search for the boot partition also on the uSD card if it doesn't find it on eMMC, so if you have your OS on eMMC, you can try p-boot without touching your eMMC OS installation at all. You'd just place p-boot.bin and its custom boot partition on SD card. You'll lose some boot speed this way, since uSD card read speed is 24MiB/s but eMMC is typically 84-88MiB/sSo in short:
- find a space for p-boot boot filesystem partition
- figure out a config file for your system's boot configuration
- format the boot partition using p-boot-conf tool
- dd the p-boot.bin to the boot location on SD or eMMC (or both)
- (you can do all this with just a spare SD card, while the booted OS is on eMMC, and roll-back by just removing the SD card)
You can see all of their pinephone related work here: http://xnux.eu/devices/pine64-pinephone.html
It's still kinda crazy to me that you can just now finally buy a phone that you can just... install a bunch of different OSes on, and not encumbered out of the box by Android. It's an exciting future for phones again for the first time in nearly a decade.
We may be about to enter an era more reminiscent of the PC clone era, which was more boring from an aesthetic point of view but far more exciting in terms of innovation and opportunity.
New platforms usually start closed and then open over time.
I think a similar transformation is slowly building in the cloud space, but it's very quiet and nowhere near critical mass. I'd keep an eye on cheap bare metal hosts like packet.net and OVH, things that make it really easy to self-host and self-manage K8S clusters, and truly RAIN (redundant array of inexpensive nodes) ready databases like CockroachDB. Pretty soon you'll be able to combine those things and host at roughly 1/10th the cost of AWS or less, with absolutely zero lock-in. At the very least it will kick off a price war in conventional cloud.
Alternately if Starlink brings much faster connectivity to the edge while simultaneously kicking terrestrial broadband in the butt to offer competitive offerings, we could see a move of some hosting back to the edge where 99.9%+ uptime is not really needed. That could include batch processing, model training, analytics, and other stuff that doesn't directly power real-time customer API or UI interactions.
The old excuse that the hardware was too limited to support that kind of functionality is long since over. There is really no excuse anymore.
But beneath this, one of the root issues at least in mobile devices is the system on chip nature of the design meaning you're at the mercy of the chipmaker to maintain appropriate drivers. These are invariably very very closed source on phones, as some areas like imaging and camera support were (and are now still, I guess) being bought in as super expensive IP blocks with serious NDAs and restrictions on what can be made available.
One reason Android is as fragmented as it was, was that they kept changing the system HAL, and chipset makers weren't providing upgraded drivers to support the new HAL as, from their perspective, the chip was end-of-life, old news, last year's model not making them any more money. I assume it isn't quite as bad on server, but single board computers running mainline Linux without patches, and with all peripheral and SoC component support are very rare, and noteworthy when they are found. Most still have pretty closed GPUs.
But when it's all on one chip, and you don't have any hardware discovery process, or even a standard way to boot the CPU, it's hard to see much of a generic future, as much as one would be great!
https://en.wikipedia.org/wiki/Server_Base_System_Architectur...
They were more open than an iPhone, but they were not particularly open to anyone with less than a CE/EE level of computer and electronics expertise. They certainly were not designed to be modular and open like the clone PCs that came later.
I'm worried mobile phones are reducing the expectation that the average consumer has of being able to modify, upgrade, and repair their devices, and computer manufacturers are poised to take advantage of this, rather than the other way around.
Ive been an iOS dev for 5 years and I'm now looking to move into web dev for a few reasons;
* making any mobile app is by default harder and more frustrating than making a web based equivalent.
* You can’t easily ‘remix’ an app, Inspect Element style learning is impossible.
* Native doesn’t really give you much in perf over web anymore (navigation and state refresh is still bad on web - but you can work to make it passable).
* SwiftUI is a huge step in the wrong direction. Its a poor mix between React and standard HTML, without the benefits of a styling markup.
* I am a rookie web dev, but a senior iOS dev and I find making web apps easier than a similar native app. After 5 years. Now sure this could say something about me - but I don’t think so as there is so much evidence based on the current state of adoption for the corresponding technologies. I have skin in the game when it comes to native and I have no doubts when I say it’s easier to make products with web tech.
* Xcode is tragically poor to then point where it is a consideration for me to stop working in the ecosystem, it is simply appallingly bad.
This is a bit of a rant, sorry about that, but I feel like there is a general mood in the spaces I dwell in the native has lost its appeal. Year to year the SDK updates become less relevant (you could argue last years SwiftUI is the biggest change in years but its not ready yet, it doesn’t make the ecosystem any nicer to work in given how long it takes to get from farm to fork with a mobile app, and anecdotally 100% of the devs I’ve talked to that have made an app in it have given up on it for their next idea for the time being)
Note quite, it's possible to inject FLEX into other apps and see what is going on:
https://github.com/Flipboard/FLEX
It isn't as easy as right clicking and inspecting element but it's not impossible.
Unfortunately, Kai OS is such a huge departure in terms of interface so it doesn't really hit the sweet spot in terms of developer ease and user desires.
https://store.pine64.org/?product=pinephone-community-editio...
It seems to be some Ubuports related edition of the Pine Phone & that's seems to be the only Pine Phone in their store.
Still the price matches (~150$) and while I don't have much interest in UbuPorts, I guess nothing should prevent me from flashing the Sailfish OS port, Fedora port or something else I'm interested in on the device.
And the UbuPorts logo on the back can be fixed by the ~5$ plain back cover (or a Sailfish OS or Fedora sticker).:)
Looking forward to leaving gps, camera, and microphone switches in the permanently off position and retiring the existing phone lacking such switches.
Everybody test various things : youtube, browser, camera, consoles, various OS'es, etc.
But does this pinephone can actually make phone calls (and receive phone calls) in a reliable way ? That's the only thing that prevents me from buying one.
(if you look on the web, you'll find a handful of comments about actually receiving phone calls and they are worrying at best)
Though if you just want a phone for calling, you can get a dumbphone. I have that and it beats any smartphone anytime, including pinephone. "Charge and forget about for a month" is an unbeatable feature for people who don't call much or receive many calls.
I also developed a routing configuration for pinephone audio https://xnux.eu/devices/feature/audio-pp.html#toc-voice-call... that will eventually make this a very fascinating device and allow features (https://xnux.eu/ui/voice-calls-app.html) that no iPhone or Android will ever give you. So PinePhone has a potential to be a much more interesting phone device.
How is the pinephone software development coordinated and how did you get into it?
And there are distribution/userspace efforts which I don't have much insight into, because I'm more focussed on the Linux kernel side of things. But from the edges it looks like a fairly small group of people pushing things forward.
I got originally interested in Linux kernel programming through various Xunlong Orange Pi boards (probably since Linux 4.6 times), Allwinner tablets, etc. I spent some years on it, and got to know a good bunch of Allwinner SoCs, and Linux driver development quite well. So when PinePhone got announced with Allwinner A64 in it, I was immediately interested. Pine64 community founder then offered me the developer unit, after noticing my interest. That was the start of it. ;)
The PinePhone has a lot of potential IMHO. It's nowhere near ready to be your primary phone, but it's neat and at $150 it's a fun little toy.
IME, Fedora worked the best out of the box. I had issues with the battery not being recognized by postmarketOS (along with a few other things) though from what I've heard from others in chat rooms that's atypical (usually pmOS works great).
I'm super impressed with the PinePhone hardware wise. It looks and feels like a decent phone, and it's easy to remove the back and tinker or flip the hardware switches. You can tell they put a lot of thought and attention to getting it right. My only hope is that once things are working, I can buy one with specs comparable to the OnePlus 8 Pro (with similar price tag of course).
May I ask why? I was about to look into the project and potentially purchase one.
And oh yeah, I'm totally planning to buy a PinePhone because because it's cool as hell.
I still have to measure it a bit and play with it more. I've made a fake battery recently to measure power consumption in suspend independently: https://megous.com/dl/tmp/IMG_0047.JPG
So I'd say it can be used as a daily driver, unless you have strict requirements on app compatibility.
Speaking of which, I wonder how an emulated Android device (or even a real one) streaming video on my pinephone trough LTE would fare :)
Yeah, I keep meaning to glue together scrcpy+xvfb+x11vnc+guacamole when I get the time and motivation. Should be fun:)
Even with that, most of them do not have a lot of basic features of what a vanilla smartphone would have either.
That isn't to say it will stay that way. I try out a few of the OSes about once a month or so, and the difference from when I first got it to now is astounding. I think (hope) that by the end of the year that I can use a Pinephone as my daily driver.
If security (which is necessary for ensuring privacy) is of value to you, get a Pixel 3a, possibly with GrapheneOS.
Get both to support free software, the idea of free hardware, but don't compromise your phone security model just yet.
And upon reboot, a proper verified boot, as well as Auditor &or Attestation, lets you know, with cryptographic proof, whether your phone's firmware has been compromised by such a piece of hardware.
In the context of a proprietary phone, secure boot and all of that is the new tivoization.
A64 can do secure boot, I'm sure. So if anyone will have interest in implementing it and locking down their device, it's possible.
Personally, it seems like too much trouble, for little benefit at this point in time.
That said, go ahead and get one. They're cheap enough that they are fun toys, and it's a way to vote with some dollars. Even tho it's not ready for daily driving, I think it will be in a few months, or sooner given how fast things are moving in the community now that there's real hardware people can buy. You can help with development by reporting bugs and such. Also you get to be a part of history!
It sounds like the most important issues (i.e. battery life/suspend, camera support etc.) is getting resolved fairly quickly while sanding down the rough edges on the UI will probably take time. So it's usable, just not rock solid or feature complete from a software standpoint.
Tangent - Sheboygan has excellent brats
https://play.google.com/store/apps/details?id=com.blogspot.n...
But, this would still help protect against the simplest way to steal your location data, which is what a lot of services do
If you're talking about tower based location, there is no way to significantly spoof your location since you can only connect to local cell towers.
To mitigate the latter, what you actually want is a phone with smarter software that will communicate over Wifi most of the time (rotating macaddr of course), perhaps with the option to turn on a cell radio in case you really need to communicate out of wifi connectivity. Hopefully the freshly built software stack inspired by new platforms will end up being conducive to this usage.
Offhand (and I'm very far from an expert) the only situation I can think of that spoofing GPS might have legal ramifications is when using E911. In general, it's probably better to spoof a "I don't see enough satellites to get a fix, sorry" status than to spoof a "I'm definitely in Sheboygan" status.
Sure. But if the cellular radio is a separate device, that information isn't necessarily available to the OS.
If you use WiFi, that must also be a separate device, to prevent the OS from knowing what APs are available, and doing geolocation based on that.
It would be excellent to review the source code but its intractable to review everything.
An idea: how feasible would it be to either use static analysis or some kind of call tracing on this platform?
For a simple task like “boot phone”, one could reduce the source code down to the bare minimum needed to review for individual actions.
One could just delete code at will I suppose to make something that boots and does nothing else but I suspect getting it to compile would be very difficult. Tracing execution feels a bit more doable.
buildInputs = [
hostPkgs.pkg-config
hostPkgs.patchelf
targetPkgs.libGL.all
targetPkgs.SDL2.all
];
should be nativeBuildInputs = [
hostPkgs.pkg-config
hostPkgs.patchelf
];
buildInputs = [
targetPkgs.libGL.all
targetPkgs.SDL2.all
];
Also just was doing some overdue cross cleanups with pkg-config https://github.com/NixOS/nixpkgs/pull/87705https://github.com/Icenowy/rtl8723cs/blob/master/core/rtw_io...
"Even tho it's not ready for daily driving, I think it will be in a few months" sounds like something I've heard before. Not gonna hold my breath.
In the Specification section here: https://wiki.pine64.org/index.php/PinePhone there's a list of supported bands and standards.
Why Pine? Like the email client?