Where to download firmware source code?

Malvineous

Getting the hang of it
Joined
Jan 7, 2023
Messages
35
Reaction score
33
Location
Brisbane, Australia
Hi all,

Please correct me if I'm wrong but it seems most Dahua cameras are running Linux internally. This means that the firmware source code must be made available, as this is a legal licensing requirement for using Linux in a commercial product. However I am not having any luck finding where I can download the source so I can build my own firmware for the camera. (There are a few bugs in the released firmware I'd like to fix.)

Does anyone know where to find the firmware source code?
 

IAmATeaf

Known around here
Joined
Jan 13, 2019
Messages
3,308
Reaction score
3,293
Location
United Kingdom
I thought you only had to publish the source code if you were actually modifying actual open source code to create a new version or derivative.

If you just use the libraries and features then there is no obligation.
 

Malvineous

Getting the hang of it
Joined
Jan 7, 2023
Messages
35
Reaction score
33
Location
Brisbane, Australia
You're always obliged to distribute the sources, even if unmodified, as per the licence agreement. You can read the full text if you go into the camera's web interface and click on the links to the legal information.

Some companies work around this by just pointing you to the unmodified sources supplied by each project, but this only meets part of the requirements. The GPL not only requires you to make the sources available, but to allow anyone else to modify the code as well (just as you were allowed to do the same when designing your product). This means you need enough information to be able to run your modified code on the device (i.e. build a firmware image that can be flashed), otherwise there is no point in having the code if you cannot run your changes! There have been some significant legal disputes about this over the years, with a few companies being forced to appoint a full-time staff member to ensure future licence conformance.

So even if Dahua didn't modify say the Linux kernel source, the licence agreement says that I must be allowed to modify it and run my modified version on the device myself if I want to, otherwise Dahua are in breach of the licence conditions. They don't need to provide any kind of support, just document a process that builds a flashable firmware image from the source code and that's where their responsibility stops.

What they don't have to do is release the source code for anything that's entirely their own (e.g. the web interface) however they may have to provide binaries/compiled versions if it is needed in order to allow any modified GPL software to be installed on the device, e.g. if it is required for the firmware to actually work.
 

IAmATeaf

Known around here
Joined
Jan 13, 2019
Messages
3,308
Reaction score
3,293
Location
United Kingdom
What you are referring to applies to the actual GPL code, so if it’s used then references to the licensing and their terms must be made available. If any of the GPL code is modified then this must be made clear and the source code for the modification(s) must be made public to help keep the code open source.
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,963
Reaction score
6,794
Location
Scotland
What they don't have to do is release the source code for anything that's entirely their own
Which in reality is the bulk of the code that provides the camera functionality.
The kernel, though important, is almost secondary in terms of the camera functionality.

they may have to provide binaries/compiled versions if it is needed in order to allow any modified GPL software to be installed on the device, e.g. if it is required for the firmware to actually work.
Arguably all those binaries and other files are provided within the openly published firmware.
 
Top