This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs. |
The following buildfile shows you how to add the adaptive partitioning module to procnto. It also includes commented-out commands to create partitions, start a program in the partition, and set the security level.
In a real buildfile, you can't use a backslash (\) to break a long line into shorter pieces, but we've done that here, just to make the buildfile easier to read. |
# # The build file for QNX Neutrino booting on a PC # [virtual=x86,bios +compress] boot = { # Reserve 64k of video memory to handle multiple video cards startup-bios -s64k # PATH is the *safe* path for executables (confstr(_CS_PATH...)) # LD_LIBRARY_PATH is the *safe* path for libraries # (confstr(_CS_LIBPATH)) # i.e. This is the path searched for libs in setuid/setgid # executables. # The module=aps enables the adaptive partitioning scheduler [module=aps] PATH=/proc/boot:/bin:/usr/bin:/opt/bin \ LD_LIBRARY_PATH=/proc/boot:/lib:/usr/lib:/lib/dll:/opt/lib \ procnto-instr } [+script] startup-script = { # To save memory make everyone use the libc in the boot image! # For speed (less symbolic lookups) we point to libc.so.2 instead # of libc.so procmgr_symlink ../../proc/boot/libc.so.2 /usr/lib/ldqnx.so.2 # Default user programs to priority 10, other scheduler (pri=10o) # Tell "diskboot" this is a hard disk boot (-b1) # Tell "diskboot" to use DMA on IDE drives (-D1) # Start 4 text consoles buy passing "-n4" to "devc-con" (-o) # By adding "-e" linux ext2 filesystem will be mounted as well. [pri=10o] PATH=/proc/boot diskboot -b1 -D1 -odevc-con,-n4 # Create an adaptive partition named "Debugging" with a budget # of 20%: #sched_aps Debugging 20 # Start qconn in the Debugging partition: #[sched_aps=Debugging]/usr/sbin/qconn # Use the recommended security level for the partitions: #aps modify -s recommended } # Include the current "libc.so". It will be created as a real file # using its internal "SONAME", with "libc.so" being a symlink to it. # The symlink will point to the last "libc.so.*" so if an earlier # libc is needed (e.g. libc.so.1) add it before the this line. libc.so # Include all the files for the default filesystems libcam.so io-blk.so cam-disk.so fs-qnx4.so fs-dos.so fs-ext2.so cam-cdrom.so fs-cd.so # These programs only need to be run once from the boot image. # "data=uip" will waste less memory as the ram from the boot # image will be used directly without making a copy of the data # (i.e. as the default "data=cpy" does). When they have been # run once, they will be unlinked from /proc/boot. [data=copy] seedres pci-bios devb-eide devb-amd devb-aha2 devb-aha4 devb-aha7 devb-aha8 devb-adpu320 devb-ncr8 diskboot slogger fesh devc-con
A sample buildfile is installed on your system as /boot/build/qnxbasedmaaps.build when you install the Adaptive Partitioning TDK.