The GetDPI Photography Forum

Great to see you here. Join our insightful photographic forum today and start tapping into a huge wealth of photographic knowledge. Completing our simple registration process will allow you to gain access to exclusive content, add your own topics and posts, share your work and connect with other members through your own private inbox! And don’t forget to say hi!

Phase One IQ4 Linux Source Code

buildbot

Well-known member
Phase One will have read the license. Justin isn't paid to understand the nuances of it, as great a support person as he is. You're making a lot of suppositions :) . If they give you the linux code, are you thinking they're going to give you all of the FPGA code too that they wrote themselves which is their IP? The Sony libraries for the sensor (assuming there are some)? Do you have a legal team ready to take on Phase to get code you may or may not be able to work with? I totally get that it would be cool to write custom code for the camera. I don't think the linux kernel is going to get you where you want to go though. And yep, there are ways to separate out proprietary code from the linux code so it's not technically a derivative.
They certainly won't give up the FPGA code, that is alright with me. Or the binary firmware blob for the sensor itself, just like most wifi devices and GPUs in Linux. But the linux distro must be shared!

Edit: And to be clear, Justin is great and has been very helpful to me before and I am being polite to them. But at the same time, I have fairly strong beliefs (that may very well be wrong!) about this.
 
Last edited:

buildbot

Well-known member
I think GPL is an honour system. After all, think about all those Wordpress plugin developers that have plug-ins that need serial numbers. That's against GPL, but there's a whole market out there.
Respectfully, it is not:
.

You absolutely can sell GPL code: https://opensource.stackexchange.com/questions/7490/selling-gpl-derived-source-code
That's all okay. You just have to share the source code that others own the copywrite to. Phase One is infringing on Linux's copywrite if they do not share the source code to the GPL binaries they distribute.
 

JeffK

Well-known member
Phase One is infringing on Linux's copywrite if they do not share the source code to the GPL binaries they distribute.
So noting that it's possible you are correct, is that a sword you're willing to die on? Or is this an exercise in discovery? Is there an endgame to the thread and your research?
 

buildbot

Well-known member
So noting that it's possible you are correct, is that a sword you're willing to die on? Or is this an exercise in discovery? Is there an endgame to the thread and your research?
In the end all I can do is tell the people who enforce the Linux license, FSF.

I guess the endgame to the thread is to inform and encourage respecting copyright, wether a photograph or code.

And one day I will own an IQ4, and would love to do simple things like SSH to it. So that’s the personal reason.
 

Ray Harrison

Well-known member
Well I'll leave you to it @buildbot - as Jeff says, this seems to be the sword you want to die on :) . Knock yourself out. I own an IQ4 and I'm a hardcore software developer. I love Open Source software. That said, there isn't a chance in hell I'll ever want to do anything that will brick the back. SSHing to it may or may not be that interesting. I do wish Phase had a more open beta program but I'm sure they don't want more bricked backs. At the end of the day, I want people who know what they're doing writing the code for it. Do I want perhaps more people writing more code faster? Sure! But it's the "knowing what they're doing" part I really care about :D.
 

buildbot

Well-known member
Dumping the IQ4 firmware file, they have busy box, gzip, and more :( These are all individually GPL licensed, besides linux itself:
Screen Shot 2022-09-07 at 11.22.21 AM.png
P1Linux_6.03.21.bin: ELF 64-bit LSB executable, ARM aarch64, version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0

Hopefully they honor the licensing.
 

Ray Harrison

Well-known member
Dumping the IQ4 firmware file, they have busy box, gzip, and more :( These are all individually GPL licensed, besides linux itself:
View attachment 196517
P1Linux_6.03.21.bin: ELF 64-bit LSB executable, ARM aarch64, version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0

Hopefully they honor the licensing.
Sounds like you're an expert on the nuances (there are many) of GPL, Phase's code base and their licensing structures and that you're sure they're guilty of some malfeasance. You're ready to sick lawyers on them :D . This is touching on a crusade for you . Best of luck and I hope you get whatever it is that you're after.
 

buildbot

Well-known member
Sounds like you're an expert on the nuances (there are many) of GPL, Phase's code base and their licensing structures and that you're sure they're guilty of some malfeasance. You're ready to sick lawyers on them :D . This is touching on a crusade for you . Best of luck and I hope you get whatever it is that you're after.
I am not an expert and I don't appreciate the snark. I would rather they just keep their obligations.

And experts such as the CTO I mentioned before, have some interesting claims about people who REDISTRIBUTE GPL even:
"That's problematic.... technically redistributors of binaries inherits the obligation to provide the source code. The car vendor obligations would typically extend 3 years after the last redistribution on their side or less (see the GPL). In practice a used car buyer would more likely go back to the manufacturer but that's the seller that may/could be on the hook in some cases. Therefore, always keep an archive of your car's source code when it is available ;)
Philippe Ombredanne Apr 29, 2020 at 13:41"
This person is an expert.
 
Last edited:

JeffK

Well-known member
reminder... I'm not a developer... but I do work with them. (I actually run a Martech stack-Marketo/SFDC – for a Saas company)

If the they use Linux as the OS for the Infinity platform, and build applications (eg: everything to run the IQ4)on top of Linux. Is that the same as any software vendor building their app on any OS? ig: Word on Windows or Word on MacOS?

If Linux is just the platform they're building on, wouldn't their software remain proprietary? Especially if they're not changing the core? They're only leveraging the OS framework and calling libraries as needed?

Also noticed the ARM reference in there. Are we talking A12, A13 etc... or something along that path? Could that mean the equivalent of an M1, M2 etc... could end up powering Infinity 2.0 with 128gb/ram - leading to real time display of Frame Averaging in progress? eg: 150mp video from a digital back??

edit: added

This looks interesting. https://www.instana.com/blog/the-future-is-now-arms-aarch64-on-the-rise-with-instana/

"With companies like Facebook testing massive AARCH64 based server deployments and Apple moving to their own Apple Silicon branded M1 processors"

"That said, if you already use one of the new Apple machines, there is a good chance you already work on an AARCH64 architecture on a day-by-day basis."

 
Last edited:

buildbot

Well-known member
If Linux is just the platform they're building on, wouldn't their software remain proprietary? Especially if they're not changing the core? They're only leveraging the OS framework and calling libraries as needed?

Also noticed the ARM reference in there. Are we talking A12, A13 etc... or something along that path? Could that mean the equivalent of an M1, M2 etc... could end up powering Infinity 2.0 with 128gb/ram - leading to real time display of Frame Averaging in progress? eg: 150mp video from a digital back??
My limited understanding as a developer (not a lawyer) is that if you developed applications on say ubuntu, and then shipped a computer with ubuntu, all you would have to say is "we use stock ubuntu, this kernel, you can get it from here (including the source)". This I believe even applies to kernel modules, such as the obviously closed source Nvidia Drivers. They use the module system to avoid having to open source the Nvidia components. But for example, Nvidia has to share the source code to their custom version of linux for the Tegra devices: https://elinux.org/Jetson/L4T_BSP_development_tips

Phase one is instead doing something else - they made their own version of linux, as you can see from the name "P1Linux_6.03.21.bin" in the extracted firmware dump, just as canonical did with Ubuntu, and Red Hat with Red Hat Linux. To my understanding, this means that they need to at least provide the sources for their modifications to linux itself.

Within the P1Linux_6.03.21.bin, there is some copyright notices and other information that tells us more:
Code:
DECIMAL       HEXADECIMAL     DESCRIPTION
--------------------------------------------------------------------------------
0             0x0             ELF, 64-bit LSB executable, version 1 (GNU/Linux)
6227223       0x5F0517        Unix path: /etc/init.d/mount-qspi-partitions.sh start"
6227640       0x5F06B8        Unix path: /sys/devices/platform/amba/ff030000.i2c/
6229160       0x5F0CA8        Unix path: /dev/ffs-iqp/ep0
6229624       0x5F0E78        Unix path: /dev/ffs-iqp/ep2
6242016       0x5F3EE0        Unix path: /sys/class/fpga_manager/fpga0/firmware
6242480       0x5F40B0        Unix path: /sys/devices/platform/amba/ff030000.i2c/
6246192       0x5F4F30        Unix path: /sys/bus/platform/drivers/sdhci-arasan/unbind
6248368       0x5F57B0        Unix path: /dev/ffs-iqp/ep0
6249616       0x5F5C90        Unix path: /dev/ffs-iqp/ep2
7843304       0x77ADE8        Unix path: /sys/block/mmcblk_
7940698       0x792A5A        Copyright string: "CopyrightKeyboardValidator"
7940754       0x792A92        Copyright string: "CopyrightValidator"
8455839       0x81069F        mcrypt 2.2 encrypted data, algorithm: blowfish-448, mode: CBC, keymode: 8bit
8476435       0x815713        Unix path: /etc/init.d/dropbear start;/etc/init.d/inetd.busybox start".
8477776       0x815C50        Unix path: /var/volatile/ftp/boot.bin
8478172       0x815DDC        Unix path: /var/volatile/ftp/boot.bin" is used
8478492       0x815F1C        Unix path: /var/volatile/ftp/boot_dump.bin" is used
8499624       0x81B1A8        Unix path: /var/volatile/ftp/firmwareupdate.fwr
8657096       0x8418C8        Unix path: /var/run/mdnsd.pid
8659224       0x842118        Unix path: /var/run/10g.diagnostics
8659256       0x842138        Executable script, shebang: "/bin/sh"
8680616       0x8474A8        Unix path: /sys/devices/platform/pcap/fpga_manager/fpga0/state
9976624       0x983B30        Unix path: /var/ftp/imgXX.bmp
9983492       0x985604        Copyright string: "Copyright, 2)"
10000080      0x9896D0        Base64 standard index table
10001776      0x989D70        HTML document header
10002265      0x989F59        HTML document footer
10002280      0x989F68        HTML document header
10002695      0x98A107        HTML document footer
10003592      0x98A488        HTML document header
10003717      0x98A505        HTML document footer
10003872      0x98A5A0        HTML document header
10004333      0x98A76D        HTML document footer
10005248      0x98AB00        Unix path: /sys/class/net/%s/operstate
10008560      0x98B7F0        Unix path: /var/run/wpa_supplicant_bind_%d
10008624      0x98B830        Unix path: /var/run/wpa_supplicant/%s
10009047      0x98B9D7        Unix path: /var/run/wpa_supplicant
10009256      0x98BAA8        Unix path: /sys/bus/platform/drivers/sdhci-arasan/ff160000.mmc/uevent
10009368      0x98BB18        Unix path: /sys/bus/platform/drivers/sdhci-arasan/bind
10009706      0x98BC6A        Unix path: /usr/sbin/wpa_supplicant -iuap0 -c /tmp/wpa.conf -Dnl80211 -B
10009928      0x98BD48        Unix path: /sys/bus/platform/drivers/sdhci-arasan/unbind
10009992      0x98BD88        Executable script, shebang: "/bin/sh"
10077944      0x99C6F8        Unix path: /var/ftp/XShutter.bin
10222960      0x9BFD70        Unix path: /sys/kernel/config/usb_gadget/g1/UDC
10223136      0x9BFE20        Unix path: /sys/kernel/config/usb_gadget/g1/functions
10223216      0x9BFE70        Unix path: /sys/kernel/config/usb_gadget/g1/strings/0x409
10223504      0x9BFF90        Unix path: /sys/kernel/config/usb_gadget/g1/bDeviceClass
10225232      0x9C0650        Unix path: /sys/devices/platform/amba/ff9d0000.usb0/fe200000.dwc3/udc/fe200000.dwc3/current_speed
10226550      0x9C0B76        Unix path: /sys/kernel/config/usb_gadget/g1/functions/mass_storage.pcie
10237344      0x9C35A0        Unix path: /sys/devices/virtual/block/XQD_0.1.0.0/queue/max_sectors_kb
10239144      0x9C3CA8        Unix path: /sys/kernel/debug/zynqmp-firmware/pm
10239536      0x9C3E30        Unix path: /sys/bus/pci/rescan
10239712      0x9C3EE0        Unix path: /sys/bus/pci/devices/0000:00:00.0/remove
10239888      0x9C3F90        Unix path: /sys/class/block/XQD_0.1.0.0
10272472      0x9CBED8        XML document, version: "1.0"
10272912      0x9CC090        XML document, version: "1.0"
10273072      0x9CC130        XML document, version: "1.0"
10273536      0x9CC300        XML document, version: "1.0"
10274216      0x9CC5A8        XML document, version: "1.0"
10274656      0x9CC760        XML document, version: "1.0"
10284672      0x9CEE80        XML document, version: "1.0"
10295400      0x9D1868        Copyright string: "Copyright (C) 1991-2017 The libjpeg-turbo Project and many others"
10317735      0x9D6FA7        Copyright string: "Copyright 1995-2005 Jean-loup Gailly "
10323455      0x9D85FF        Copyright string: "Copyright 1995-2005 Mark Adler "
10326388      0x9D9174        Copyright string: "Copyright 1998-2004 Gilles Vollant - http://www.winimage.com/zLibDll"
10326482      0x9D91D2        Copyright string: "Copyright 1998-2004 Gilles Vollant - http://www.winimage.com/zLibDll"
10331744      0x9DA660        AES S-Box
10332000      0x9DA760        AES Inverse S-Box
11712993      0xB2B9E1        Intel x86 or x64 microcode, sig 0x00000450, pf_mask 0xe00001d4, 1D9B-14-01, rev 0x-1000000, size 1
11813887      0xB443FF        mcrypt 2.2 encrypted data, algorithm: blowfish-448, mode: CBC, keymode: 8bit
11824544      0xB46DA0        CRC32 polynomial table, little endian

It is indeed AARCH64 - I was messing around for a bit trying to launch the binaries on my M1Max with QEMU, but the kind of boot loader hacking I would need to do to make it work is a bit beyond me.

Based on this line: " /sys/kernel/debug/zynqmp-firmware/pm" from the dump of the most recent firmware, the IQ4 appears to use a Xilinx (Now AMD) Zync FPGA+ARM SoC. These are pretty neat chips that combine a medium size FPGA with 2-4 Cortex-A53 ARM64 cores: https://www.xilinx.com/products/silicon-devices/soc/zynq-ultrascale-mpsoc.html
As far as I know Cortex-A53 are quite a bit slower than an M1, but still pretty decent. A future back with a much stronger ARM core would certainly be able to display frame averaging in real time, though 150MP video is probably impossible without active cooling given how even 8K video seems like a stretch for many mirrorless bodies currently out there.

I would like to note that from this dump, we can see the following GPL software (besides linux itself):

Busybox - https://www.busybox.net/license.html

From their page:
"
BusyBox's copyrights are enforced by Software Freedom Conservancy (you can contact them at <[email protected]>), which "accepts primary responsibility for enforcement of US copyrights on the software... and coordinates international copyright enforcement efforts for such works as necessary." If you distribute BusyBox in a way that doesn't comply with the terms of the license BusyBox is distributed under, expect to hear from Conservancy. Their entire reason for existing is to advance the public's access to Free and Open Source Software projects, which includes ensuring that the GPL is upheld for projects that pick GPL as its license. We used to list people who violate the BusyBox license in The Hall of Shame, but these days we find it much more effective to hand them over to our enforcement agent.

Our enforcement efforts are aimed at bringing people into compliance with the BusyBox license. Open source software is under a different license from proprietary software, but if you violate that license you're still infringing copyright and the law gives the copyright holder the right to enforce our copyrights. We don't seek monetary awards, injunctions, or to generate bad PR for a company, unless that's the only way to get somebody that repeatedly ignores us to comply with the license on our code.
"

Currently digging deeper to see what other GPL code they are distributing. Maybe I am "crusading" or what not, but this seems like a very large problem. If you distribute IQ4 backs, you are distributing linux and therefore GPL code...
 

Attachments

buildbot

Well-known member
I extracted the latest version of the IQ4 firmware available from phase one, and found many more GPL utilities in use. Also, sorta a bad look to have this in your comments...
1662761960534.png
 

BFD

Active member
Linux is licensed with GPL v2, which unless I am mistaken, requires that source code and utilities to build a fully valid image be made available upon request. Has anyone tried to contact Phase One for the source code?

edit -
"If this source code is already publicly available, you are obliged to identify the publicly available version you used and confirm that you didn't modify it. If it's not publicly available (usually because you made in-house modifications, creating a derived work of an existing GPLv2-licensed program), you must provide the modified source code upon request." From http://www.landley.net/kdocs/pending/gplv2-howto.html
Based on how the IQ4 has gone in the last few years, I would imagine that not even Phase One fully knows how their source code works.
 

buildbot

Well-known member
Phase one knows they need to display certain licenses in their firmware, but they leave out all of the linux GPL licenses...
1662858103132.png

It appears that Phase One calls their Linux NoctiLinux, as the name does not exist anywhere else I can find:
1662858503125.png
And in the latest firmware, they have 159 licenses in their version of linux with GPL:
1662859383187.png

Oh, and if you want to enable SSH on you IQ4 back, place a file named "debug" on your XQD card (I think, would love for someone to test this!)
The password on old versions of the firmware for root was just root, but I am not sure that is the case now.
Edit: it is still just "root" in latest firmware.
1662859887756.png
 
Last edited:

buildbot

Well-known member
Looks like someone from Phase One even submitted a few patches upstream due to USB issues (Not posting the link because it has a Phase One developers name/email in it).

Anyway, hopefully I hear back from Phase One Legal on getting the legally required source files for the linux they are distributing.

Fun Fact: Some versions of IQ4 firmware have Python 2.7 included!

Not so fun fact: The IXM series of backs also seem to be violating Linux's GPL license, as they ship with a different version of Phase One's Linux.

This is a great guide for anyone curious: https://www.linuxfoundation.org/wp-content/uploads/Practical_GPL_Compliance_Digital.pdf
 
Last edited:

Paul Spinnler

Well-known member
Buildbot - this is cool!

Let's say you get the source code of what they are obliged to share - what do you think it would enable you to do, in layman's terms?

Because without detailed knowledge of the hardware and documentation relating to it you cannot really to crazy hacks, or?

Or are there people who can then dissect this?

On the hardware you mentioned, the ARM SoC - is there a newer version out there these days and can one quantify how much more horsepower this would have so to say?

I am curious to see what an IQ5 system could do ... can you quantify their chips in percent vs. the latest? Ie is the latest 300% more powerful?

Thanks a lot
Paul
 

buildbot

Well-known member
Buildbot - this is cool!

Let's say you get the source code of what they are obliged to share - what do you think it would enable you to do, in layman's terms?

Because without detailed knowledge of the hardware and documentation relating to it you cannot really to crazy hacks, or?

Or are there people who can then dissect this?

On the hardware you mentioned, the ARM SoC - is there a newer version out there these days and can one quantify how much more horsepower this would have so to say?

I am curious to see what an IQ5 system could do ... can you quantify their chips in percent vs. the latest? Ie is the latest 300% more powerful?

Thanks a lot
Paul
Thank you!!

Now that I have done more investigation into how the IQ4 firmware works, I could probably modify their pre-built linux distro's included set of utilities already, change the root password to something more secure, etc. The backs might check the signature of the image though which would prevent running modified firmware (which would I think, also violate the GPL license).

Having the source code itself would allow you to build the version of linux P1 is using and customize it, or patch new security bugs in the kernel or utilities, even if Phase One stops supporting their back. Or say, adding software to control 3rd party lenses/shutters!

In my experience, even the very best software has bugs and possible improvements that more eyes can catch. I am not particularly adapt at reverse engineering, given that the firmware is unencrypted, someone with more experience could probably figure out _exactly_ how everything works already. I would say a P1 back is less complex than an M1 GPU and there's a single person reverse engineering that: https://rosenzweig.io/blog/asahi-gpu-part-1.html

I am not sure what P1 is really afraid of, most of their intellectual property is built into the binary called P1Linux, which is run by the linux firmware on boot, and that would not be subject to GPL I think (unless is uses a GPL library statically linked, this is where things get funky sometimes). Edit: Jury is (literally?) still out on this: https://opensource.stackexchange.co...ink-a-gpl-licensed-library-for-commercial-use

I am pretty confident that the source code will have to be released, Busybox and uBoot for example are very aggressive about pursing these cases if the license continues to be violated against much larger companies than Phase One or Digital Transitions - I believe they helped build the IXH backs, which have linux on them as well! I could be wrong here though and it is all Phase One... There is also GPL code by HP and Xilinx (AMD) in their image.

On the hardware, it is pretty exciting! Xilinx has a newer chip than the one I think they currently use, the Versal ACAP. It has less cores but each core is ~110% faster than the A53 cores that might be in the IQ4. The ACAP line is 7NM instead of 16NM, so more battery life! Depending on which chip you select, they can have ~400% more configurable logic for the FPGA side of things, 210% more DSP cores (for bulk math calculations), and have AI specific accelerators with multiple teraflops of compute. They could if they wanted to switch to any arm64 chip though, for example I have their firmware unpacked and "running" via fake root on my Nvidia Jetson board, though the P1linux app won't start as it tries to talk to a bunch of hardware that is not there like the FPGA and QSPI interfaces. Phase One could really lean into open source and build a medium format AI camera platform that would absolutely be the best in the world if they wanted to.
 
Last edited:

Ray Harrison

Well-known member
P


Oh, and if you want to enable SSH on you IQ4 back, place a file named "debug" on your XQD card (I think, would love for someone to test this!)
The password on old versions of the firmware for root was just root, but I am not sure that is the case now.
Edit: it is still just "root" in latest firmware.
View attachment 196597
Just FYI - I tried this (empty debug file) and was not able to get it to work (at the root level and in the DCIM folder). The port itself was not opened so it probably never started dropbear. I only tried it via the access point IP though.
 

buildbot

Well-known member
Just FYI - I tried this (empty debug file) and was not able to get it to work (at the root level and in the DCIM folder). The port itself was not opened so it probably never started dropbear. I only tried it via the access point IP though.
Thank you for trying that out!
Looks like enabling SSH will be a bit trickier than I though haha.
 
Top