Difference between revisions of "Creating an app bin"
(Created page with 'When creating a custom app.bin you should follow these guidelines: * binaries should be placed in bin/ or sbin/ and '''not''' in usr/bin and usr/sbin * libraries should be placed…')
Revision as of 16:58, 22 February 2010
When creating a custom app.bin you should follow these guidelines:
- binaries should be placed in bin/ or sbin/ and not in usr/bin and usr/sbin
- libraries should be placed in lib/ and not in usr/lib
- modules should be placed in lib/modules/220.127.116.11-19-4
- lib/modules/18.104.22.168-19-4 can contain a modules.dep file which will be added to /lib/modules/22.214.171.124-19-4/modules.dep for modprobe insertion of app.bin modules
- etc/init.d/ contains the init scripts that will be called when the system boots and when /sbin/resume is executed
- init.d scripts should contain at the minimum start and stop cases
- only SXX scripts are executed during rcS
For example, I have test-app.app.bin containing the following structure:
- The README file contains ancillary information and whatever required details/etc.
- version contains the version of the app.bin
After test-app.app.bin is mounted by /bin/crazymount at /apps/test-app/ the following things happen:
- /apps/test-app/bin and /apps/test-app/sbin are added to PATH
- /apps/test-app/lib is added to ld.so.conf
- ldconfig is refreshed
- /apps/test-app/lib/modules/126.96.36.199-19-4 is scanned for modules and any found are symlinked into /lib/modules/188.8.131.52-19-4
- /apps/test-app/lib/modules/184.108.40.206-19-4/modules.dep is cat'd onto the end of /lib/modules/220.127.116.11-19-4/modules.dep
- /apps/test-app/etc/init.d/S10test-app-init is symlinked into /tmp/init.d for execution by rcS/suspend/resume
Now /apps/test-app/usr/bin and /apps/test-app/usr/sbin both contain binaries...but those two locations are not scanned, therefore binaries in both locations will not be available without full path.
I included two kernel modules inside of test-app.app.bin, here is the contents of /apps/test-app/lib/modules/18.104.22.168-19-4/modules.dep:
This means that test-module.ko depends on test-dep.ko and therefore when test-module.ko is modprobe'd test-dep.ko will be inserted first by the system. Take note that the modules.dep file contains locations that are inside of /lib/modules/22.214.171.124-19-4 and not /apps/test-app/lib/modules/126.96.36.199-19.