The whole thing gets quite complicated here.
Basically, the retail discs have encrypted sectors which are decrypted through the lv2 kernel. The key to decrypt those sectors differ from finalized (retail) discs to master discs. (masterdiscs only work on debug consoles anyway)
Then you have on retail disc something called the secure authentication, once this step is validated and the sectors are being decrypted (on the fly through AES), encrypted (secure/finalized) EBOOT.BIN files will be able to run. (those files wont run unless the secure authentication is passed)
To run the EBOOT.BIN has (on retail consoles) to be signed, so you wont be able to run your own code there unless you bypass the signature checks)
The selfs have two types of signature, one for authenticated bluray (and other medias on debug consoles), and one for hdd (npdrm signature) This makes it that an EBOOT.BIN signed for bluray will only run from /dev_bdvd (only authenticated media) while one signed for hdd will only run from (/dev_hdd0), there are different flags for both type of selfs and possibly even different signature keys.
Those "signatures" are even enforced on debug consoles by adding a fake header to the elfs (so they become "fake self") those are different from one another and a file with a npdrm header wont run on any other device than /dev_hdd0) (not that a self needs to actually be finalized/signed to run on retail as more restrictions are enforced on those consoles)
So to run your own code from your own bluray disc, you would have to somehow bypass, fake or replicate the secure authentication process of the disc (this is by the way no easy task), then you would have to encrypt the disc sectors with the retail AES key and finally (the hardest task of all) you would have to bypass the binary signature check performed by the kernel.
This is of course no easy task and you cannot use the debug masterdiscs to run them on retail consoles because of the few differences I mentioned earlier (begining with the fact that the disc sectors aren't even encrypted with the same key), also the disc auth is performed differently (the master discs use a masterdisc sector, while the retail discs go through the secure authentication)
I hope this was informative enough for you, feel free to ask any question should you need to.