I have a
Qt App which is running on a raspberry pi (Debian Wheezy).
The raspberry image is autogenerated via a python script:
- Get the latest version of the generic custom-raspi-image - Mount the image - Copy project specific program data into place - Setup systemd services for automatic setup - Unmount the image - Write the image to a sd card
On first boot, the disk size is expanded and some startup settings are set. Now on this startup routine, I would like to "brand" my app into the sd card. So that no one can just copy the sd card and use it in another raspberry. I must have an automatism.
The idea is compiling a c++ dll (on startup routine) which has the internal CPU id as a constant. Afterwards delete the "create c++ dll" script and move the dll into the app folder. The app is calling a function in the dll file and submit the internal CPU Id. Depend on true or false, the app is starting or not.
Is this the right way or do you have a better solution?