I am planning to convert my firmware which runs on my device into a commercial library which is to be ported to my customer's firmware and device. However, I am concerning about security issues. Is there any way to prevent reverse engineering on my firmware library and protect my IP. What kind of agreement should I make with the customer? Should I get a license fee per copy or should it be royality free?