Difference between revisions of "User:Banistpw"
From eLinux.org
| (3 intermediate revisions by one user not shown) | |||
| Line 4: | Line 4: | ||
Very familiar but no expert with both Linux and C/C++. I hope to contribute good coding practices and design to a team more familiar with lower level background. | Very familiar but no expert with both Linux and C/C++. I hope to contribute good coding practices and design to a team more familiar with lower level background. | ||
| + | |||
| + | Working on the [[ECE597: MythTV/DSP Pico Projector]] project for ECE597. | ||
[[Category:ECE597]] | [[Category:ECE597]] | ||
| + | |||
| + | == Listings == | ||
| + | |||
| + | {| | ||
| + | ! Number | ||
| + | ! Page | ||
| + | ! Caption | ||
| + | ! Listing | ||
| + | |- | ||
| + | | 2-4 | ||
| + | | 2-21 | ||
| + | | Hello, World Wmbedded Style | ||
| + | | <pre> | ||
| + | #include <stdio.h> | ||
| + | |||
| + | int bss_var; /* Uninitialized global variable */ | ||
| + | |||
| + | int data_var = 1; /* Initialized global variable */ | ||
| + | |||
| + | int main(int argc, char **argv) | ||
| + | { | ||
| + | void *stack_var; /* Local variable on the stack */ | ||
| + | |||
| + | stack_var = (void *)main; /* Don't let the compiler */ | ||
| + | /* optimize it out */ | ||
| + | |||
| + | printf("Hello, World! Main is executing at %p\n", stack_var); | ||
| + | printf("This address (%p) is in our stack frame\n", &stack_var); | ||
| + | |||
| + | /* bss section contains uninitialized data */ | ||
| + | printf("This address (%p) is in our bss section\n", &bss_var); | ||
| + | |||
| + | /* data section contains initializated data */ | ||
| + | printf("This address (%p) is in our data section\n", &data_var); | ||
| + | |||
| + | return 0; | ||
| + | } | ||
| + | </pre> | ||
| + | |- | ||
| + | | 4-3 | ||
| + | | 4-15 | ||
| + | | Kernel Subdirectory | ||
| + | |<pre> | ||
| + | banistpw@Kratos:/dump/hw/oe$ ls -l linux-omap-2.6/arch/arm/mach-ixp4xx/ | ||
| + | total 212 | ||
| + | -rwxrwx--x 1 brian elinux 1977 2010-03-11 23:14 avila-pci.c | ||
| + | -rwxrwx--x 1 brian elinux 4658 2010-03-11 23:14 avila-setup.c | ||
| + | -rwxrwx--x 1 brian elinux 12029 2010-03-11 23:14 common.c | ||
| + | -rwxrwx--x 1 brian elinux 12910 2010-03-11 23:14 common-pci.c | ||
| + | -rwxrwx--x 1 brian elinux 1599 2010-03-11 23:14 coyote-pci.c | ||
| + | -rwxrwx--x 1 brian elinux 3452 2010-03-11 23:14 coyote-setup.c | ||
| + | -rwxrwx--x 1 brian elinux 2034 2010-03-11 23:14 dsmg600-pci.c | ||
| + | -rwxrwx--x 1 brian elinux 7394 2010-03-11 23:14 dsmg600-setup.c | ||
| + | -rwxrwx--x 1 brian elinux 1748 2010-03-11 23:14 fsg-pci.c | ||
| + | -rwxrwx--x 1 brian elinux 6795 2010-03-11 23:14 fsg-setup.c | ||
| + | -rwxrwx--x 1 brian elinux 1490 2010-03-11 23:14 gateway7001-pci.c | ||
| + | -rwxrwx--x 1 brian elinux 2646 2010-03-11 23:14 gateway7001-setup.c | ||
| + | -rwxrwx--x 1 brian elinux 12465 2010-03-11 23:14 goramo_mlr.c | ||
| + | -rwxrwx--x 1 brian elinux 2397 2010-03-11 23:14 gtwx5715-pci.c | ||
| + | -rwxrwx--x 1 brian elinux 4738 2010-03-11 23:14 gtwx5715-setup.c | ||
| + | drwxrwx--x 3 brian elinux 4096 2010-03-11 23:14 include | ||
| + | -rwxrwx--x 1 brian elinux 1892 2010-03-11 23:14 ixdp425-pci.c | ||
| + | -rwxrwx--x 1 brian elinux 7610 2010-03-11 23:14 ixdp425-setup.c | ||
| + | -rwxrwx--x 1 brian elinux 1354 2010-03-11 23:14 ixdpg425-pci.c | ||
| + | -rwxrwx--x 1 brian elinux 21565 2010-03-11 23:14 ixp4xx_npe.c | ||
| + | -rwxrwx--x 1 brian elinux 9350 2010-03-11 23:14 ixp4xx_qmgr.c | ||
| + | -rwxrwx--x 1 brian elinux 6431 2010-03-11 23:14 Kconfig | ||
| + | -rwxrwx--x 1 brian elinux 1319 2010-03-11 23:14 Makefile | ||
| + | -rwxrwx--x 1 brian elinux 57 2010-03-11 23:14 Makefile.boot | ||
| + | -rwxrwx--x 1 brian elinux 1869 2010-03-11 23:14 nas100d-pci.c | ||
| + | -rwxrwx--x 1 brian elinux 8127 2010-03-11 23:14 nas100d-setup.c | ||
| + | -rwxrwx--x 1 brian elinux 1666 2010-03-11 23:14 nslu2-pci.c | ||
| + | -rwxrwx--x 1 brian elinux 7147 2010-03-11 23:14 nslu2-setup.c | ||
| + | -rwxrwx--x 1 brian elinux 1468 2010-03-11 23:14 wg302v2-pci.c | ||
| + | -rwxrwx--x 1 brian elinux 2585 2010-03-11 23:14 wg302v2-setup.c | ||
| + | </pre> | ||
| + | |- | ||
| + | | 4-4 | ||
| + | | 4-17 | ||
| + | | USB in Linux 2.6 .config | ||
| + | |<pre> | ||
| + | banistpw@Kratos:/dump/hw/oe/linux-omap-2.6$ cat .config | grep USB | ||
| + | # CONFIG_USB_ZD1201 is not set | ||
| + | # USB Network Adapters | ||
| + | # CONFIG_USB_CATC is not set | ||
| + | # CONFIG_USB_KAWETH is not set | ||
| + | # CONFIG_USB_PEGASUS is not set | ||
| + | # CONFIG_USB_RTL8150 is not set | ||
| + | # CONFIG_USB_USBNET is not set | ||
| + | # CONFIG_I2C_TINY_USB is not set | ||
| + | CONFIG_USB_SUPPORT=y | ||
| + | CONFIG_USB_ARCH_HAS_HCD=y | ||
| + | CONFIG_USB_ARCH_HAS_OHCI=y | ||
| + | CONFIG_USB_ARCH_HAS_EHCI=y | ||
| + | CONFIG_USB=y | ||
| + | # CONFIG_USB_DEBUG is not set | ||
| + | # CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set | ||
| + | # Miscellaneous USB options | ||
| + | CONFIG_USB_DEVICEFS=y | ||
| + | CONFIG_USB_DEVICE_CLASS=y | ||
| + | # CONFIG_USB_DYNAMIC_MINORS is not set | ||
| + | CONFIG_USB_SUSPEND=y | ||
| + | CONFIG_USB_OTG=y | ||
| + | # CONFIG_USB_OTG_WHITELIST is not set | ||
| + | # CONFIG_USB_OTG_BLACKLIST_HUB is not set | ||
| + | CONFIG_USB_MON=y | ||
| + | # CONFIG_USB_WUSB is not set | ||
| + | # CONFIG_USB_WUSB_CBAF is not set | ||
| + | # USB Host Controller Drivers | ||
| + | # CONFIG_USB_C67X00_HCD is not set | ||
| + | CONFIG_USB_EHCI_HCD=y | ||
| + | CONFIG_USB_EHCI_ROOT_HUB_TT=y | ||
| + | # CONFIG_USB_EHCI_TT_NEWSCHED is not set | ||
| + | # CONFIG_USB_OXU210HP_HCD is not set | ||
| + | # CONFIG_USB_ISP116X_HCD is not set | ||
| + | # CONFIG_USB_ISP1760_HCD is not set | ||
| + | # CONFIG_USB_ISP1362_HCD is not set | ||
| + | # CONFIG_USB_OHCI_HCD is not set | ||
| + | # CONFIG_USB_SL811_HCD is not set | ||
| + | # CONFIG_USB_R8A66597_HCD is not set | ||
| + | # CONFIG_USB_HWA_HCD is not set | ||
| + | CONFIG_USB_MUSB_HDRC=y | ||
| + | CONFIG_USB_MUSB_SOC=y | ||
| + | # OMAP 343x high speed USB support | ||
| + | # CONFIG_USB_MUSB_HOST is not set | ||
| + | # CONFIG_USB_MUSB_PERIPHERAL is not set | ||
| + | CONFIG_USB_MUSB_OTG=y | ||
| + | CONFIG_USB_GADGET_MUSB_HDRC=y | ||
| + | CONFIG_USB_MUSB_HDRC_HCD=y | ||
| + | # CONFIG_MUSB_PIO_ONLY is not set | ||
| + | CONFIG_USB_INVENTRA_DMA=y | ||
| + | # CONFIG_USB_TI_CPPI_DMA is not set | ||
| + | # CONFIG_USB_MUSB_DEBUG is not set | ||
| + | # USB Device Class drivers | ||
| + | # CONFIG_USB_ACM is not set | ||
| + | # CONFIG_USB_PRINTER is not set | ||
| + | # CONFIG_USB_WDM is not set | ||
| + | # CONFIG_USB_TMC is not set | ||
| + | # NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may | ||
| + | # also be needed; see USB_STORAGE Help for more info | ||
| + | # CONFIG_USB_STORAGE is not set | ||
| + | # CONFIG_USB_LIBUSUAL is not set | ||
| + | # USB Imaging devices | ||
| + | # CONFIG_USB_MDC800 is not set | ||
| + | # CONFIG_USB_MICROTEK is not set | ||
| + | # USB port drivers | ||
| + | # CONFIG_USB_SERIAL is not set | ||
| + | # USB Miscellaneous drivers | ||
| + | # CONFIG_USB_EMI62 is not set | ||
| + | # CONFIG_USB_EMI26 is not set | ||
| + | # CONFIG_USB_ADUTUX is not set | ||
| + | # CONFIG_USB_SEVSEG is not set | ||
| + | # CONFIG_USB_RIO500 is not set | ||
| + | # CONFIG_USB_LEGOTOWER is not set | ||
| + | # CONFIG_USB_LCD is not set | ||
| + | # CONFIG_USB_LED is not set | ||
| + | # CONFIG_USB_CYPRESS_CY7C63 is not set | ||
| + | # CONFIG_USB_CYTHERM is not set | ||
| + | # CONFIG_USB_IDMOUSE is not set | ||
| + | # CONFIG_USB_FTDI_ELAN is not set | ||
| + | # CONFIG_USB_APPLEDISPLAY is not set | ||
| + | # CONFIG_USB_SISUSBVGA is not set | ||
| + | # CONFIG_USB_LD is not set | ||
| + | # CONFIG_USB_TRANCEVIBRATOR is not set | ||
| + | # CONFIG_USB_IOWARRIOR is not set | ||
| + | # CONFIG_USB_TEST is not set | ||
| + | # CONFIG_USB_ISIGHTFW is not set | ||
| + | CONFIG_USB_GADGET=y | ||
| + | # CONFIG_USB_GADGET_DEBUG is not set | ||
| + | # CONFIG_USB_GADGET_DEBUG_FILES is not set | ||
| + | CONFIG_USB_GADGET_VBUS_DRAW=2 | ||
| + | CONFIG_USB_GADGET_SELECTED=y | ||
| + | # CONFIG_USB_GADGET_AT91 is not set | ||
| + | # CONFIG_USB_GADGET_ATMEL_USBA is not set | ||
| + | # CONFIG_USB_GADGET_FSL_USB2 is not set | ||
| + | # CONFIG_USB_GADGET_LH7A40X is not set | ||
| + | # CONFIG_USB_GADGET_OMAP is not set | ||
| + | # CONFIG_USB_GADGET_PXA25X is not set | ||
| + | # CONFIG_USB_GADGET_R8A66597 is not set | ||
| + | # CONFIG_USB_GADGET_PXA27X is not set | ||
| + | # CONFIG_USB_GADGET_S3C_HSOTG is not set | ||
| + | # CONFIG_USB_GADGET_IMX is not set | ||
| + | # CONFIG_USB_GADGET_S3C2410 is not set | ||
| + | # CONFIG_USB_GADGET_M66592 is not set | ||
| + | # CONFIG_USB_GADGET_AMD5536UDC is not set | ||
| + | # CONFIG_USB_GADGET_FSL_QE is not set | ||
| + | # CONFIG_USB_GADGET_CI13XXX is not set | ||
| + | # CONFIG_USB_GADGET_NET2280 is not set | ||
| + | # CONFIG_USB_GADGET_GOKU is not set | ||
| + | # CONFIG_USB_GADGET_LANGWELL is not set | ||
| + | # CONFIG_USB_GADGET_DUMMY_HCD is not set | ||
| + | CONFIG_USB_GADGET_DUALSPEED=y | ||
| + | # CONFIG_USB_ZERO is not set | ||
| + | # CONFIG_USB_AUDIO is not set | ||
| + | CONFIG_USB_ETH=m | ||
| + | CONFIG_USB_ETH_RNDIS=y | ||
| + | # CONFIG_USB_ETH_EEM is not set | ||
| + | # CONFIG_USB_GADGETFS is not set | ||
| + | # CONFIG_USB_FILE_STORAGE is not set | ||
| + | # CONFIG_USB_MASS_STORAGE is not set | ||
| + | # CONFIG_USB_G_SERIAL is not set | ||
| + | # CONFIG_USB_MIDI_GADGET is not set | ||
| + | # CONFIG_USB_G_PRINTER is not set | ||
| + | # CONFIG_USB_CDC_COMPOSITE is not set | ||
| + | # CONFIG_USB_G_NOKIA is not set | ||
| + | # CONFIG_USB_G_MULTI is not set | ||
| + | CONFIG_USB_OTG_UTILS=y | ||
| + | # CONFIG_USB_GPIO_VBUS is not set | ||
| + | # CONFIG_USB_ULPI is not set | ||
| + | CONFIG_TWL4030_USB=y | ||
| + | # CONFIG_NOP_USB_XCEIV is not set | ||
| + | </pre> | ||
| + | |- | ||
| + | | 4-5 | ||
| + | | 4-21 | ||
| + | | Linux autoconf.h | ||
| + | |<pre> | ||
| + | banistpw@Kratos:/dump/hw/oe/linux-omap-2.6$ cat include/generated/autoconf.h | grep CONFIG_USB | ||
| + | #define CONFIG_USB_MUSB_HDRC 1 | ||
| + | #define CONFIG_USB_ETH_RNDIS 1 | ||
| + | #define CONFIG_USB_GADGET_MUSB_HDRC 1 | ||
| + | #define CONFIG_USB_ARCH_HAS_EHCI 1 | ||
| + | #define CONFIG_USB_GADGET_VBUS_DRAW 2 | ||
| + | #define CONFIG_USB_OTG_UTILS 1 | ||
| + | #define CONFIG_USB_ARCH_HAS_OHCI 1 | ||
| + | #define CONFIG_USB_ETH_MODULE 1 | ||
| + | #define CONFIG_USB_MUSB_HDRC_HCD 1 | ||
| + | #define CONFIG_USB_MON 1 | ||
| + | #define CONFIG_USB_OTG 1 | ||
| + | #define CONFIG_USB_EHCI_ROOT_HUB_TT 1 | ||
| + | #define CONFIG_USB_SUSPEND 1 | ||
| + | #define CONFIG_USB_SUPPORT 1 | ||
| + | #define CONFIG_USB_EHCI_HCD 1 | ||
| + | #define CONFIG_USB_DEVICEFS 1 | ||
| + | #define CONFIG_USB_GADGET_SELECTED 1 | ||
| + | #define CONFIG_USB_MUSB_SOC 1 | ||
| + | #define CONFIG_USB_MUSB_OTG 1 | ||
| + | #define CONFIG_USB_DEVICE_CLASS 1 | ||
| + | #define CONFIG_USB_ARCH_HAS_HCD 1 | ||
| + | #define CONFIG_USB_INVENTRA_DMA 1 | ||
| + | #define CONFIG_USB 1 | ||
| + | #define CONFIG_USB_GADGET_DUALSPEED 1 | ||
| + | #define CONFIG_USB_GADGET 1 | ||
| + | </pre> | ||
| + | |- | ||
| + | | 4-5 | ||
| + | | 4-22 | ||
| + | | Makefile targets | ||
| + | |<pre> | ||
| + | banistpw@Kratos:/dump/hw/oe/linux-omap-2.6$ make ARCH=arm help | ||
| + | Cleaning targets: | ||
| + | clean - Remove most generated files but keep the config and | ||
| + | enough build support to build external modules | ||
| + | mrproper - Remove all generated files + config + various backup files | ||
| + | distclean - mrproper + remove editor backup and patch files | ||
| + | |||
| + | Configuration targets: | ||
| + | config - Update current config utilising a line-oriented program | ||
| + | menuconfig - Update current config utilising a menu based program | ||
| + | xconfig - Update current config utilising a QT based front-end | ||
| + | gconfig - Update current config utilising a GTK based front-end | ||
| + | oldconfig - Update current config utilising a provided .config as base | ||
| + | localmodconfig - Update current config disabling modules not loaded | ||
| + | localyesconfig - Update current config converting local mods to core | ||
| + | silentoldconfig - Same as oldconfig, but quietly, additionally update deps | ||
| + | randconfig - New config with random answer to all options | ||
| + | defconfig - New config with default answer to all options | ||
| + | allmodconfig - New config selecting modules when possible | ||
| + | allyesconfig - New config where all options are accepted with yes | ||
| + | allnoconfig - New config where all options are answered with no | ||
| + | |||
| + | Other generic targets: | ||
| + | all - Build all targets marked with [*] | ||
| + | * vmlinux - Build the bare kernel | ||
| + | * modules - Build all modules | ||
| + | modules_install - Install all modules to INSTALL_MOD_PATH (default: /) | ||
| + | firmware_install- Install all firmware to INSTALL_FW_PATH | ||
| + | (default: $(INSTALL_MOD_PATH)/lib/firmware) | ||
| + | dir/ - Build all files in dir and below | ||
| + | dir/file.[ois] - Build specified target only | ||
| + | dir/file.ko - Build module including final link | ||
| + | modules_prepare - Set up for building external modules | ||
| + | tags/TAGS - Generate tags file for editors | ||
| + | cscope - Generate cscope index | ||
| + | kernelrelease - Output the release version string | ||
| + | kernelversion - Output the version stored in Makefile | ||
| + | headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH | ||
| + | (default: /dump/hw/oe/linux-omap-2.6/usr) | ||
| + | |||
| + | Static analysers | ||
| + | checkstack - Generate a list of stack hogs | ||
| + | namespacecheck - Name space analysis on compiled kernel | ||
| + | versioncheck - Sanity check on version.h usage | ||
| + | includecheck - Check for duplicate included header files | ||
| + | export_report - List the usages of all exported symbols | ||
| + | headers_check - Sanity check on exported headers | ||
| + | headerdep - Detect inclusion cycles in headers | ||
| + | |||
| + | Kernel packaging: | ||
| + | rpm-pkg - Build both source and binary RPM kernel packages | ||
| + | binrpm-pkg - Build only the binary kernel package | ||
| + | deb-pkg - Build the kernel as an deb package | ||
| + | tar-pkg - Build the kernel as an uncompressed tarball | ||
| + | targz-pkg - Build the kernel as a gzip compressed tarball | ||
| + | tarbz2-pkg - Build the kernel as a bzip2 compressed tarball | ||
| + | |||
| + | Documentation targets: | ||
| + | Linux kernel internal documentation in different formats: | ||
| + | htmldocs - HTML | ||
| + | pdfdocs - PDF | ||
| + | psdocs - Postscript | ||
| + | xmldocs - XML DocBook | ||
| + | mandocs - man pages | ||
| + | installmandocs - install man pages generated by mandocs | ||
| + | cleandocs - clean all generated DocBook files | ||
| + | |||
| + | Architecture specific targets (arm): | ||
| + | * zImage - Compressed kernel image (arch/arm/boot/zImage) | ||
| + | Image - Uncompressed kernel image (arch/arm/boot/Image) | ||
| + | * xipImage - XIP kernel image, if configured (arch/arm/boot/xipImage) | ||
| + | uImage - U-Boot wrapped zImage | ||
| + | bootpImage - Combined zImage and initial RAM disk | ||
| + | (supply initrd image via make variable INITRD=<path>) | ||
| + | install - Install uncompressed kernel | ||
| + | zinstall - Install compressed kernel | ||
| + | Install using (your) ~/bin/installkernel or | ||
| + | (distribution) /sbin/installkernel or | ||
| + | install to $(INSTALL_PATH) and run lilo | ||
| + | |||
| + | acs5k_defconfig - Build for acs5k | ||
| + | acs5k_tiny_defconfig - Build for acs5k_tiny | ||
| + | afeb9260_defconfig - Build for afeb9260 | ||
| + | am200epdkit_defconfig - Build for am200epdkit | ||
| + | am3517_evm_defconfig - Build for am3517_evm | ||
| + | ams_delta_defconfig - Build for ams_delta | ||
| + | assabet_defconfig - Build for assabet | ||
| + | at572d940hfek_defconfig - Build for at572d940hfek | ||
| + | at91cap9adk_defconfig - Build for at91cap9adk | ||
| + | at91rm9200dk_defconfig - Build for at91rm9200dk | ||
| + | at91rm9200ek_defconfig - Build for at91rm9200ek | ||
| + | at91sam9260ek_defconfig - Build for at91sam9260ek | ||
| + | at91sam9261ek_defconfig - Build for at91sam9261ek | ||
| + | at91sam9263ek_defconfig - Build for at91sam9263ek | ||
| + | at91sam9g20ek_defconfig - Build for at91sam9g20ek | ||
| + | at91sam9rlek_defconfig - Build for at91sam9rlek | ||
| + | ateb9200_defconfig - Build for ateb9200 | ||
| + | badge4_defconfig - Build for badge4 | ||
| + | bcmring_defconfig - Build for bcmring | ||
| + | cam60_defconfig - Build for cam60 | ||
| + | carmeva_defconfig - Build for carmeva | ||
| + | cerfcube_defconfig - Build for cerfcube | ||
| + | cm_t35_defconfig - Build for cm_t35 | ||
| + | cm_x2xx_defconfig - Build for cm_x2xx | ||
| + | cm_x300_defconfig - Build for cm_x300 | ||
| + | colibri_pxa270_defconfig - Build for colibri_pxa270 | ||
| + | colibri_pxa300_defconfig - Build for colibri_pxa300 | ||
| + | collie_defconfig - Build for collie | ||
| + | corgi_defconfig - Build for corgi | ||
| + | cpu9260_defconfig - Build for cpu9260 | ||
| + | cpu9g20_defconfig - Build for cpu9g20 | ||
| + | cpuat91_defconfig - Build for cpuat91 | ||
| + | csb337_defconfig - Build for csb337 | ||
| + | csb637_defconfig - Build for csb637 | ||
| + | da8xx_omapl_defconfig - Build for da8xx_omapl | ||
| + | davinci_all_defconfig - Build for davinci_all | ||
| + | devkit8000_defconfig - Build for devkit8000 | ||
| + | dove_defconfig - Build for dove | ||
| + | ebsa110_defconfig - Build for ebsa110 | ||
| + | ecbat91_defconfig - Build for ecbat91 | ||
| + | edb7211_defconfig - Build for edb7211 | ||
| + | em_x270_defconfig - Build for em_x270 | ||
| + | ep93xx_defconfig - Build for ep93xx | ||
| + | eseries_pxa_defconfig - Build for eseries_pxa | ||
| + | ezx_defconfig - Build for ezx | ||
| + | footbridge_defconfig - Build for footbridge | ||
| + | fortunet_defconfig - Build for fortunet | ||
| + | h3600_defconfig - Build for h3600 | ||
| + | h5000_defconfig - Build for h5000 | ||
| + | h7201_defconfig - Build for h7201 | ||
| + | h7202_defconfig - Build for h7202 | ||
| + | hackkit_defconfig - Build for hackkit | ||
| + | htcherald_defconfig - Build for htcherald | ||
| + | igep0020_defconfig - Build for igep0020 | ||
| + | integrator_defconfig - Build for integrator | ||
| + | iop13xx_defconfig - Build for iop13xx | ||
| + | iop32x_defconfig - Build for iop32x | ||
| + | iop33x_defconfig - Build for iop33x | ||
| + | ixp2000_defconfig - Build for ixp2000 | ||
| + | ixp23xx_defconfig - Build for ixp23xx | ||
| + | ixp4xx_defconfig - Build for ixp4xx | ||
| + | jornada720_defconfig - Build for jornada720 | ||
| + | kafa_defconfig - Build for kafa | ||
| + | kb9202_defconfig - Build for kb9202 | ||
| + | kirkwood_defconfig - Build for kirkwood | ||
| + | ks8695_defconfig - Build for ks8695 | ||
| + | lart_defconfig - Build for lart | ||
| + | loki_defconfig - Build for loki | ||
| + | lpd270_defconfig - Build for lpd270 | ||
| + | lpd7a400_defconfig - Build for lpd7a400 | ||
| + | lpd7a404_defconfig - Build for lpd7a404 | ||
| + | lubbock_defconfig - Build for lubbock | ||
| + | lusl7200_defconfig - Build for lusl7200 | ||
| + | magician_defconfig - Build for magician | ||
| + | mainstone_defconfig - Build for mainstone | ||
| + | mini2440_defconfig - Build for mini2440 | ||
| + | msm_defconfig - Build for msm | ||
| + | mv78xx0_defconfig - Build for mv78xx0 | ||
| + | mx1ads_defconfig - Build for mx1ads | ||
| + | mx1_defconfig - Build for mx1 | ||
| + | mx21_defconfig - Build for mx21 | ||
| + | mx27_defconfig - Build for mx27 | ||
| + | mx31pdk_defconfig - Build for mx31pdk | ||
| + | mx3_defconfig - Build for mx3 | ||
| + | n770_defconfig - Build for n770 | ||
| + | n8x0_defconfig - Build for n8x0 | ||
| + | neocore926_defconfig - Build for neocore926 | ||
| + | neponset_defconfig - Build for neponset | ||
| + | netwinder_defconfig - Build for netwinder | ||
| + | netx_defconfig - Build for netx | ||
| + | nhk8815_defconfig - Build for nhk8815 | ||
| + | ns9xxx_defconfig - Build for ns9xxx | ||
| + | nuc910_defconfig - Build for nuc910 | ||
| + | nuc950_defconfig - Build for nuc950 | ||
| + | nuc960_defconfig - Build for nuc960 | ||
| + | omap_2430sdp_defconfig - Build for omap_2430sdp | ||
| + | omap_3430sdp_defconfig - Build for omap_3430sdp | ||
| + | omap_3630sdp_defconfig - Build for omap_3630sdp | ||
| + | omap3_beagle_defconfig - Build for omap3_beagle | ||
| + | omap3_defconfig - Build for omap3 | ||
| + | omap3_evm_defconfig - Build for omap3_evm | ||
| + | omap3_pandora_defconfig - Build for omap3_pandora | ||
| + | omap3_touchbook_defconfig - Build for omap3_touchbook | ||
| + | omap_4430sdp_defconfig - Build for omap_4430sdp | ||
| + | omap_apollon_2420_defconfig - Build for omap_apollon_2420 | ||
| + | omap_generic_1510_defconfig - Build for omap_generic_1510 | ||
| + | omap_generic_1610_defconfig - Build for omap_generic_1610 | ||
| + | omap_generic_1710_defconfig - Build for omap_generic_1710 | ||
| + | omap_generic_2420_defconfig - Build for omap_generic_2420 | ||
| + | omap_h2_1610_defconfig - Build for omap_h2_1610 | ||
| + | omap_h4_2420_defconfig - Build for omap_h4_2420 | ||
| + | omap_innovator_1510_defconfig - Build for omap_innovator_1510 | ||
| + | omap_innovator_1610_defconfig - Build for omap_innovator_1610 | ||
| + | omap_ldp_defconfig - Build for omap_ldp | ||
| + | omap_osk_5912_defconfig - Build for omap_osk_5912 | ||
| + | omap_perseus2_730_defconfig - Build for omap_perseus2_730 | ||
| + | omap_zoom2_defconfig - Build for omap_zoom2 | ||
| + | omap_zoom3_defconfig - Build for omap_zoom3 | ||
| + | onearm_defconfig - Build for onearm | ||
| + | orion5x_defconfig - Build for orion5x | ||
| + | overo_defconfig - Build for overo | ||
| + | palmte_defconfig - Build for palmte | ||
| + | palmtt_defconfig - Build for palmtt | ||
| + | palmz71_defconfig - Build for palmz71 | ||
| + | palmz72_defconfig - Build for palmz72 | ||
| + | pcm027_defconfig - Build for pcm027 | ||
| + | picotux200_defconfig - Build for picotux200 | ||
| + | pleb_defconfig - Build for pleb | ||
| + | pnx4008_defconfig - Build for pnx4008 | ||
| + | pxa168_defconfig - Build for pxa168 | ||
| + | pxa255-idp_defconfig - Build for pxa255-idp | ||
| + | pxa3xx_defconfig - Build for pxa3xx | ||
| + | pxa910_defconfig - Build for pxa910 | ||
| + | qil-a9260_defconfig - Build for qil-a9260 | ||
| + | realview_defconfig - Build for realview | ||
| + | realview-smp_defconfig - Build for realview-smp | ||
| + | rpc_defconfig - Build for rpc | ||
| + | rx51_defconfig - Build for rx51 | ||
| + | s3c2410_defconfig - Build for s3c2410 | ||
| + | s3c6400_defconfig - Build for s3c6400 | ||
| + | s5pc100_defconfig - Build for s5pc100 | ||
| + | sam9_l9260_defconfig - Build for sam9_l9260 | ||
| + | shannon_defconfig - Build for shannon | ||
| + | shark_defconfig - Build for shark | ||
| + | simpad_defconfig - Build for simpad | ||
| + | spitz_defconfig - Build for spitz | ||
| + | stmp378x_defconfig - Build for stmp378x | ||
| + | stmp37xx_defconfig - Build for stmp37xx | ||
| + | sx1_defconfig - Build for sx1 | ||
| + | tct_hammer_defconfig - Build for tct_hammer | ||
| + | trizeps4_defconfig - Build for trizeps4 | ||
| + | u300_defconfig - Build for u300 | ||
| + | u8500_defconfig - Build for u8500 | ||
| + | usb-a9260_defconfig - Build for usb-a9260 | ||
| + | usb-a9263_defconfig - Build for usb-a9263 | ||
| + | versatile_defconfig - Build for versatile | ||
| + | viper_defconfig - Build for viper | ||
| + | xcep_defconfig - Build for xcep | ||
| + | yl9200_defconfig - Build for yl9200 | ||
| + | zeus_defconfig - Build for zeus | ||
| + | |||
| + | make V=0|1 [targets] 0 => quiet build (default), 1 => verbose build | ||
| + | make V=2 [targets] 2 => give reason for rebuild of target | ||
| + | make O=dir [targets] Locate all output files in "dir", including .config | ||
| + | make C=1 [targets] Check all c source with $CHECK (sparse by default) | ||
| + | make C=2 [targets] Force check of all c source with $CHECK | ||
| + | |||
| + | Execute "make" or "make all" to build all targets marked with [*] | ||
| + | For further info see the ./README file | ||
| + | |- | ||
| + | | 4-8 | ||
| + | | 4-30 | ||
| + | | Snippet from .../arch/arm/Konfig | ||
| + | |<pre> | ||
| + | 205 source "init/Kconfig" | ||
| + | 206 | ||
| + | 207 source "kernel/Kconfig.freezer" | ||
| + | 208 | ||
| + | 209 menu "System Type" | ||
| + | 210 | ||
| + | 211 config MMU | ||
| + | 212 bool "MMU-based Paged Memory Management Support" | ||
| + | 213 default y | ||
| + | 214 help | ||
| + | 215 Select if you want MMU-based virtualised addressing space | ||
| + | 216 support by paged memory management. If unsure, say 'Y'. | ||
| + | 217 | ||
| + | 218 choice | ||
| + | 219 prompt "ARM system type" | ||
| + | 220 default ARCH_VERSATILE | ||
| + | 783 source "arch/arm/mach-ixp4xx/Kconfig" | ||
| + | </pre> | ||
| + | |- | ||
| + | | 4-9 | ||
| + | | 4-30 | ||
| + | | Snippet from .../arch/arm/mach-omap1/Konfig | ||
| + | |<pre> | ||
| + | 1 comment "OMAP Core Type" | ||
| + | 2 depends on ARCH_OMAP1 | ||
| + | 3 | ||
| + | 4 config ARCH_OMAP730 | ||
| + | 5 depends on ARCH_OMAP1 | ||
| + | 6 bool "OMAP730 Based System" | ||
| + | 7 select CPU_ARM926T | ||
| + | 8 select ARCH_OMAP_OTG | ||
| + | </pre> | ||
| + | |- | ||
| + | | 4-10 | ||
| + | | 4-32 | ||
| + | | Customized .config file snippet | ||
| + | |<pre> | ||
| + | 257 CONFIG_MACH_OMAP3_BEAGLE=y | ||
| + | </pre> | ||
| + | |- | ||
| + | | 4-11 | ||
| + | | 4-33 | ||
| + | | .../arch/arm/mach-omap1 Kernel subdirectory | ||
| + | |<pre> | ||
| + | # | ||
| + | # Makefile for the linux kernel. | ||
| + | # | ||
| + | |||
| + | # Common support | ||
| + | obj-y := io.o id.o sram.o irq.o mux.o flash.o serial.o devices.o | ||
| + | obj-y += clock.o clock_data.o opp_data.o | ||
| + | |||
| + | obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o | ||
| + | |||
| + | obj-$(CONFIG_OMAP_MPU_TIMER) += time.o | ||
| + | obj-$(CONFIG_OMAP_32K_TIMER) += timer32k.o | ||
| + | |||
| + | # Power Management | ||
| + | obj-$(CONFIG_PM) += pm.o sleep.o | ||
| + | |||
| + | # DSP | ||
| + | obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox_mach.o | ||
| + | mailbox_mach-objs := mailbox.o | ||
| + | |||
| + | i2c-omap-$(CONFIG_I2C_OMAP) := i2c.o | ||
| + | obj-y += $(i2c-omap-m) $(i2c-omap-y) | ||
| + | |||
| + | led-y := leds.o | ||
| + | |||
| + | # Specific board support | ||
| + | obj-$(CONFIG_MACH_OMAP_H2) += board-h2.o board-h2-mmc.o | ||
| + | obj-$(CONFIG_MACH_OMAP_INNOVATOR) += board-innovator.o | ||
| + | obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o | ||
| + | obj-$(CONFIG_MACH_OMAP_PERSEUS2) += board-perseus2.o | ||
| + | obj-$(CONFIG_MACH_OMAP_FSAMPLE) += board-fsample.o | ||
| + | obj-$(CONFIG_MACH_OMAP_OSK) += board-osk.o | ||
| + | obj-$(CONFIG_MACH_OMAP_H3) += board-h3.o board-h3-mmc.o | ||
| + | obj-$(CONFIG_MACH_VOICEBLUE) += board-voiceblue.o | ||
| + | obj-$(CONFIG_MACH_OMAP_PALMTE) += board-palmte.o | ||
| + | obj-$(CONFIG_MACH_OMAP_PALMZ71) += board-palmz71.o | ||
| + | obj-$(CONFIG_MACH_OMAP_PALMTT) += board-palmtt.o | ||
| + | obj-$(CONFIG_MACH_NOKIA770) += board-nokia770.o | ||
| + | obj-$(CONFIG_MACH_AMS_DELTA) += board-ams-delta.o | ||
| + | obj-$(CONFIG_MACH_SX1) += board-sx1.o board-sx1-mmc.o | ||
| + | obj-$(CONFIG_MACH_HERALD) += board-htcherald.o | ||
| + | |||
| + | ifeq ($(CONFIG_ARCH_OMAP15XX),y) | ||
| + | # Innovator-1510 FPGA | ||
| + | obj-$(CONFIG_MACH_OMAP_INNOVATOR) += fpga.o | ||
| + | endif | ||
| + | |||
| + | # LEDs support | ||
| + | led-$(CONFIG_MACH_OMAP_H2) += leds-h2p2-debug.o | ||
| + | led-$(CONFIG_MACH_OMAP_H3) += leds-h2p2-debug.o | ||
| + | led-$(CONFIG_MACH_OMAP_INNOVATOR) += leds-innovator.o | ||
| + | led-$(CONFIG_MACH_OMAP_PERSEUS2) += leds-h2p2-debug.o | ||
| + | led-$(CONFIG_MACH_OMAP_OSK) += leds-osk.o | ||
| + | obj-$(CONFIG_LEDS) += $(led-y) | ||
| + | |||
| + | ifneq ($(CONFIG_FB_OMAP),) | ||
| + | obj-y += lcd_dma.o | ||
| + | endif | ||
| + | </pre> | ||
| + | |- | ||
| + | | 5-5 | ||
| + | | 5-5 | ||
| + | | Assembly file Piggy.S | ||
| + | |<pre> | ||
| + | 1 .section .piggydata,#alloc | ||
| + | 2 .globl input_data | ||
| + | 3 input_data: | ||
| + | 4 .incbin "arch/arm/boot/compressed/piggy.gzip" | ||
| + | 5 .globl input_data_end | ||
| + | 6 input_data_end: | ||
| + | </pre> | ||
| + | |- | ||
| + | | 5-4 | ||
| + | | 5-18 | ||
| + | | Console setup Code Snippet | ||
| + | |<pre> | ||
| + | 837 /* | ||
| + | 838 * Set up a list of consoles. Called from init/main.c | ||
| + | 839 */ | ||
| + | 840 static int __init console_setup(char *str) | ||
| + | 841 { | ||
| + | 842 char buf[sizeof(console_cmdline[0].name) + 4]; /* 4 for index */ | ||
| + | 843 char *s, *options, *brl_options = NULL; | ||
| + | 844 int idx; | ||
| + | 845 | ||
| + | 846 #ifdef CONFIG_A11Y_BRAILLE_CONSOLE | ||
| + | 847 if (!memcmp(str, "brl,", 4)) { | ||
| + | 848 brl_options = ""; | ||
| + | 849 str += 4; | ||
| + | 850 } else if (!memcmp(str, "brl=", 4)) { | ||
| + | 851 brl_options = str + 4; | ||
| + | 852 str = strchr(brl_options, ','); | ||
| + | 853 if (!str) { | ||
| + | 854 printk(KERN_ERR "need port name after brl=\n"); | ||
| + | 855 return 1; | ||
| + | 856 } | ||
| + | 857 *(str++) = 0; | ||
| + | 858 } | ||
| + | 859 #endif | ||
| + | </pre> | ||
| + | |- | ||
| + | | 5-8 | ||
| + | | 5-19 | ||
| + | | Family of __setup macro Definitions from init.h | ||
| + | |<pre> | ||
| + | 224 /* | ||
| + | 225 * Only for really core code. See moduleparam.h for the normal way. | ||
| + | 226 * | ||
| + | 227 * Force the alignment so the compiler doesn't space elements of the | ||
| + | 228 * obs_kernel_param "array" too far apart in .init.setup. | ||
| + | 229 */ | ||
| + | 230 #define __setup_param(str, unique_id, fn, early) \ | ||
| + | 231 static const char __setup_str_##unique_id[] __initconst \ | ||
| + | 232 __aligned(1) = str; \ | ||
| + | 233 static struct obs_kernel_param __setup_##unique_id \ | ||
| + | 234 __used __section(.init.setup) \ | ||
| + | 235 __attribute__((aligned((sizeof(long))))) \ | ||
| + | 236 = { __setup_str_##unique_id, fn, early } | ||
| + | 237 | ||
| + | 238 #define __setup(str, fn) \ | ||
| + | 239 __setup_param(str, fn, fn, 0) | ||
| + | 240 | ||
| + | 241 /* NOTE: fn is as per module_param, not __setup! Emits warning if fn | ||
| + | 242 * returns non-zero. */ | ||
| + | 243 #define early_param(str, fn) \ | ||
| + | 244 __setup_param(str, fn, fn, 1) | ||
| + | </pre> | ||
| + | |- | ||
| + | | 5-6 | ||
| + | | 5-20 | ||
| + | | Kernel Command Line Processing | ||
| + | |<pre> | ||
| + | 204 extern struct obs_kernel_param __setup_start[], __setup_end[]; | ||
| + | 205 | ||
| + | 206 static int __init obsolete_checksetup(char *line) | ||
| + | 207 { | ||
| + | 208 struct obs_kernel_param *p; | ||
| + | 209 int had_early_param = 0; | ||
| + | 210 | ||
| + | 211 p = __setup_start; | ||
| + | 212 do { | ||
| + | 213 int n = strlen(p->str); | ||
| + | 214 if (!strncmp(line, p->str, n)) { | ||
| + | 215 if (p->early) { | ||
| + | 216 /* Already done in parse_early_param? | ||
| + | 217 * (Needs exact match on param part). | ||
| + | 218 * Keep iterating, as we can have early | ||
| + | 219 * params and __setups of same names 8( */ | ||
| + | 220 if (line[n] == '\0' || line[n] == '=') | ||
| + | 221 had_early_param = 1; | ||
| + | 222 } else if (!p->setup_func) { | ||
| + | 223 printk(KERN_WARNING "Parameter %s is obsolete," | ||
| + | 224 " ignored\n", p->str); | ||
| + | 225 return 1; | ||
| + | 226 } else if (p->setup_func(line + n)) | ||
| + | 227 return 1; | ||
| + | 228 } | ||
| + | 229 p++; | ||
| + | 230 } while (p < __setup_end); | ||
| + | 231 | ||
| + | 232 return had_early_param; | ||
| + | 233 } | ||
| + | </pre> | ||
| + | |- | ||
| + | | 5-7 | ||
| + | | 5-23 | ||
| + | | Example Initialization Routine | ||
| + | |<pre> | ||
| + | 369 static struct machine_desc * __init setup_machine(unsigned int nr) | ||
| + | 370 { | ||
| + | 371 struct machine_desc *list; | ||
| + | 372 | ||
| + | 373 /* | ||
| + | 374 * locate machine in the list of supported machines. | ||
| + | 375 */ | ||
| + | 376 list = lookup_machine_type(nr); | ||
| + | 377 if (!list) { | ||
| + | 378 printk("Machine configuration botched (nr %d), unable " | ||
| + | 379 "to continue.\n", nr); | ||
| + | 380 while (1); | ||
| + | 381 } | ||
| + | 382 | ||
| + | 383 printk("Machine: %s\n", list->name); | ||
| + | 384 | ||
| + | 385 return list; | ||
| + | 386 } | ||
| + | </pre> | ||
| + | |- | ||
| + | | 5-8 | ||
| + | | 5-23 | ||
| + | | Initcall Family of Macros | ||
| + | |<pre> | ||
| + | 170 #define __define_initcall(level,fn,id) \ | ||
| + | 171 static initcall_t __initcall_##fn##id __used \ | ||
| + | 172 __attribute__((__section__(".initcall" level ".init"))) = fn | ||
| + | 173 | ||
| + | 174 /* | ||
| + | 175 * Early initcalls run before initializing SMP. | ||
| + | 176 * | ||
| + | 177 * Only for built-in code, not modules. | ||
| + | 178 */ | ||
| + | 179 #define early_initcall(fn) __define_initcall("early",fn,early) | ||
| + | 180 | ||
| + | 181 /* | ||
| + | 182 * A "pure" initcall has no dependencies on anything else, and purely | ||
| + | 183 * initializes variables that couldn't be statically initialized. | ||
| + | 184 * | ||
| + | 185 * This only exists for built-in code, not for modules. | ||
| + | 186 */ | ||
| + | 187 #define pure_initcall(fn) __define_initcall("0",fn,0) | ||
| + | 188 | ||
| + | 189 #define core_initcall(fn) __define_initcall("1",fn,1) | ||
| + | 190 #define core_initcall_sync(fn) __define_initcall("1s",fn,1s) | ||
| + | 191 #define postcore_initcall(fn) __define_initcall("2",fn,2) | ||
| + | 192 #define postcore_initcall_sync(fn) __define_initcall("2s",fn,2s) | ||
| + | 193 #define arch_initcall(fn) __define_initcall("3",fn,3) | ||
| + | 194 #define arch_initcall_sync(fn) __define_initcall("3s",fn,3s) | ||
| + | 195 #define subsys_initcall(fn) __define_initcall("4",fn,4) | ||
| + | 196 #define subsys_initcall_sync(fn) __define_initcall("4s",fn,4s) | ||
| + | 197 #define fs_initcall(fn) __define_initcall("5",fn,5) | ||
| + | 198 #define fs_initcall_sync(fn) __define_initcall("5s",fn,5s) | ||
| + | 199 #define rootfs_initcall(fn) __define_initcall("rootfs",fn,rootfs) | ||
| + | 200 #define device_initcall(fn) __define_initcall("6",fn,6) | ||
| + | 201 #define device_initcall_sync(fn) __define_initcall("6s",fn,6s) | ||
| + | 202 #define late_initcall(fn) __define_initcall("7",fn,7) | ||
| + | 203 #define late_initcall_sync(fn) __define_initcall("7s",fn,7s) | ||
| + | 204 | ||
| + | 205 #define __initcall(fn) device_initcall(fn) | ||
| + | </pre> | ||
| + | |- | ||
| + | | 5-9 | ||
| + | | 5-26 | ||
| + | | Creation of kernel init thread | ||
| + | |<pre> | ||
| + | 424 static noinline void __init_refok rest_init(void) | ||
| + | 425 __releases(kernel_lock) | ||
| + | 426 { | ||
| + | 427 int pid; | ||
| + | 428 | ||
| + | 429 rcu_scheduler_starting(); | ||
| + | 430 kernel_thread(kernel_init, NULL, CLONE_FS | CLONE_SIGHAND); | ||
| + | 431 numa_default_policy(); | ||
| + | 432 pid = kernel_thread(kthreadd, NULL, CLONE_FS | CLONE_FILES); | ||
| + | 433 rcu_read_lock(); | ||
| + | 434 kthreadd_task = find_task_by_pid_ns(pid, &init_pid_ns); | ||
| + | 435 rcu_read_unlock(); | ||
| + | 436 unlock_kernel(); | ||
| + | 437 | ||
| + | 438 /* | ||
| + | 439 * The boot idle thread must execute schedule() | ||
| + | 440 * at least once to get things moving: | ||
| + | 441 */ | ||
| + | 442 init_idle_bootup_task(current); | ||
| + | 443 preempt_enable_no_resched(); | ||
| + | 444 schedule(); | ||
| + | 445 preempt_disable(); | ||
| + | 446 | ||
| + | 447 /* Call into cpu_idle with preempt disabled */ | ||
| + | 448 cpu_idle(); | ||
| + | 449 } | ||
| + | </pre> | ||
| + | |- | ||
| + | | 5-10 | ||
| + | | 5-27 | ||
| + | | Initialization via initcalls | ||
| + | |<pre> | ||
| + | 765 extern initcall_t __initcall_start[], __initcall_end[], __early_initcall_end[]; | ||
| + | 766 | ||
| + | 767 static void __init do_initcalls(void) | ||
| + | 768 { | ||
| + | 769 initcall_t *fn; | ||
| + | 770 | ||
| + | 771 for (fn = __early_initcall_end; fn < __initcall_end; fn++) | ||
| + | 772 do_one_initcall(*fn); | ||
| + | 773 | ||
| + | 774 /* Make sure there is no pending stuff from the initcall sequence */ | ||
| + | 775 flush_scheduled_work(); | ||
| + | 776 } | ||
| + | </pre> | ||
| + | |- | ||
| + | | 5-11 | ||
| + | | 5-28 | ||
| + | | Final Kernel Boot Steps from main.c | ||
| + | |<pre> | ||
| + | 814 static noinline int init_post(void) | ||
| + | 815 __releases(kernel_lock) | ||
| + | 816 { | ||
| + | 817 /* need to finish all async __init code before freeing the memory */ | ||
| + | 818 async_synchronize_full(); | ||
| + | 819 free_initmem(); | ||
| + | 820 unlock_kernel(); | ||
| + | 821 mark_rodata_ro(); | ||
| + | 822 system_state = SYSTEM_RUNNING; | ||
| + | 823 numa_default_policy(); | ||
| + | 824 | ||
| + | 825 | ||
| + | 826 current->signal->flags |= SIGNAL_UNKILLABLE; | ||
| + | 827 | ||
| + | 828 if (ramdisk_execute_command) { | ||
| + | 829 run_init_process(ramdisk_execute_command); | ||
| + | 830 printk(KERN_WARNING "Failed to execute %s\n", | ||
| + | 831 ramdisk_execute_command); | ||
| + | 832 } | ||
| + | 833 | ||
| + | 834 /* | ||
| + | 835 * We try each of these until one succeeds. | ||
| + | 836 * | ||
| + | 837 * The Bourne shell can be used instead of init if we are | ||
| + | 838 * trying to recover a really broken machine. | ||
| + | 839 */ | ||
| + | 840 if (execute_command) { | ||
| + | 841 run_init_process(execute_command); | ||
| + | 842 printk(KERN_WARNING "Failed to execute %s. Attempting " | ||
| + | 843 "defaults...\n", execute_command); | ||
| + | 844 } | ||
| + | 845 run_init_process("/sbin/init"); | ||
| + | 846 run_init_process("/etc/init"); | ||
| + | 847 run_init_process("/bin/init"); | ||
| + | 848 run_init_process("/bin/sh"); | ||
| + | 849 | ||
| + | 850 panic("No init found. Try passing init= option to kernel. " | ||
| + | 851 "See Linux Documentation/init.txt for guidance."); | ||
| + | 852 } | ||
| + | </pre> | ||
| + | |- | ||
| + | | 6-1 | ||
| + | | 6-7 | ||
| + | | Final boot steps from main.c | ||
| + | |<pre> | ||
| + | 840 if (execute_command) { | ||
| + | 841 run_init_process(execute_command); | ||
| + | 842 printk(KERN_WARNING "Failed to execute %s. Attempting " | ||
| + | 843 "defaults...\n", execute_command); | ||
| + | 844 } | ||
| + | 845 run_init_process("/sbin/init"); | ||
| + | 846 run_init_process("/etc/init"); | ||
| + | 847 run_init_process("/bin/init"); | ||
| + | 848 run_init_process("/bin/sh"); | ||
| + | 849 | ||
| + | 850 panic("No init found. Try passing init= option to kernel. " | ||
| + | 851 "See Linux Documentation/init.txt for guidance."); | ||
| + | </pre> | ||
| + | |- | ||
| + | | 6-3 | ||
| + | | 6-12 | ||
| + | | Runlevel Directory Structure | ||
| + | | <pre> | ||
| + | banistpw@ubuntu:~$ ls -d1 /etc/rc* | ||
| + | /etc/rc0.d | ||
| + | /etc/rc1.d | ||
| + | /etc/rc2.d | ||
| + | /etc/rc3.d | ||
| + | /etc/rc4.d | ||
| + | /etc/rc5.d | ||
| + | /etc/rc6.d | ||
| + | /etc/rc.local | ||
| + | /etc/rcS.d | ||
| + | </pre> | ||
| + | |- | ||
| + | | 6-4 | ||
| + | | 6-12 | ||
| + | | Example Runlevel Directory | ||
| + | | <pre> | ||
| + | banistpw@ubuntu:~$ ls -lsa /etc/rc1.d/ | ||
| + | total 20 | ||
| + | 4 drwxr-xr-x 2 root root 4096 2010-03-08 14:14 . | ||
| + | 12 drwxr-xr-x 131 root root 12288 2010-03-26 17:35 .. | ||
| + | 0 lrwxrwxrwx 1 root root 20 2010-03-08 13:39 K15pulseaudio -> ../init.d/pulseaudio | ||
| + | 0 lrwxrwxrwx 1 root root 22 2010-03-08 13:39 K20acpi-support -> ../init.d/acpi-support | ||
| + | 0 lrwxrwxrwx 1 root root 20 2010-03-08 13:39 K20kerneloops -> ../init.d/kerneloops | ||
| + | 0 lrwxrwxrwx 1 root root 15 2010-03-08 13:39 K20rsync -> ../init.d/rsync | ||
| + | 0 lrwxrwxrwx 1 root root 15 2010-03-08 13:39 K20saned -> ../init.d/saned | ||
| + | 0 lrwxrwxrwx 1 root root 27 2010-03-08 13:39 K20speech-dispatcher -> ../init.d/speech-dispatcher | ||
| + | 0 lrwxrwxrwx 1 root root 19 2010-03-08 13:39 K74bluetooth -> ../init.d/bluetooth | ||
| + | 0 lrwxrwxrwx 1 root root 14 2010-03-08 13:39 K80cups -> ../init.d/cups | ||
| + | 0 lrwxrwxrwx 1 root root 21 2010-03-08 13:39 K99laptop-mode -> ../init.d/laptop-mode | ||
| + | 4 -rw-r--r-- 1 root root 369 2009-09-07 14:58 README | ||
| + | 0 lrwxrwxrwx 1 root root 19 2010-03-08 13:39 S30killprocs -> ../init.d/killprocs | ||
| + | 0 lrwxrwxrwx 1 root root 19 2010-03-08 13:39 S70dns-clean -> ../init.d/dns-clean | ||
| + | 0 lrwxrwxrwx 1 root root 18 2010-03-08 13:39 S70pppd-dns -> ../init.d/pppd-dns | ||
| + | 0 lrwxrwxrwx 1 root root 16 2010-03-08 13:39 S90single -> ../init.d/single | ||
| + | </pre> | ||
Latest revision as of 03:39, 27 March 2010
Paul Banister
Senior CS/SE
Very familiar but no expert with both Linux and C/C++. I hope to contribute good coding practices and design to a team more familiar with lower level background.
Working on the ECE597: MythTV/DSP Pico Projector project for ECE597.
Listings
| Number | Page | Caption | Listing |
|---|---|---|---|
| 2-4 | 2-21 | Hello, World Wmbedded Style |
#include <stdio.h>
int bss_var; /* Uninitialized global variable */
int data_var = 1; /* Initialized global variable */
int main(int argc, char **argv)
{
void *stack_var; /* Local variable on the stack */
stack_var = (void *)main; /* Don't let the compiler */
/* optimize it out */
printf("Hello, World! Main is executing at %p\n", stack_var);
printf("This address (%p) is in our stack frame\n", &stack_var);
/* bss section contains uninitialized data */
printf("This address (%p) is in our bss section\n", &bss_var);
/* data section contains initializated data */
printf("This address (%p) is in our data section\n", &data_var);
return 0;
}
|
| 4-3 | 4-15 | Kernel Subdirectory | banistpw@Kratos:/dump/hw/oe$ ls -l linux-omap-2.6/arch/arm/mach-ixp4xx/ total 212 -rwxrwx--x 1 brian elinux 1977 2010-03-11 23:14 avila-pci.c -rwxrwx--x 1 brian elinux 4658 2010-03-11 23:14 avila-setup.c -rwxrwx--x 1 brian elinux 12029 2010-03-11 23:14 common.c -rwxrwx--x 1 brian elinux 12910 2010-03-11 23:14 common-pci.c -rwxrwx--x 1 brian elinux 1599 2010-03-11 23:14 coyote-pci.c -rwxrwx--x 1 brian elinux 3452 2010-03-11 23:14 coyote-setup.c -rwxrwx--x 1 brian elinux 2034 2010-03-11 23:14 dsmg600-pci.c -rwxrwx--x 1 brian elinux 7394 2010-03-11 23:14 dsmg600-setup.c -rwxrwx--x 1 brian elinux 1748 2010-03-11 23:14 fsg-pci.c -rwxrwx--x 1 brian elinux 6795 2010-03-11 23:14 fsg-setup.c -rwxrwx--x 1 brian elinux 1490 2010-03-11 23:14 gateway7001-pci.c -rwxrwx--x 1 brian elinux 2646 2010-03-11 23:14 gateway7001-setup.c -rwxrwx--x 1 brian elinux 12465 2010-03-11 23:14 goramo_mlr.c -rwxrwx--x 1 brian elinux 2397 2010-03-11 23:14 gtwx5715-pci.c -rwxrwx--x 1 brian elinux 4738 2010-03-11 23:14 gtwx5715-setup.c drwxrwx--x 3 brian elinux 4096 2010-03-11 23:14 include -rwxrwx--x 1 brian elinux 1892 2010-03-11 23:14 ixdp425-pci.c -rwxrwx--x 1 brian elinux 7610 2010-03-11 23:14 ixdp425-setup.c -rwxrwx--x 1 brian elinux 1354 2010-03-11 23:14 ixdpg425-pci.c -rwxrwx--x 1 brian elinux 21565 2010-03-11 23:14 ixp4xx_npe.c -rwxrwx--x 1 brian elinux 9350 2010-03-11 23:14 ixp4xx_qmgr.c -rwxrwx--x 1 brian elinux 6431 2010-03-11 23:14 Kconfig -rwxrwx--x 1 brian elinux 1319 2010-03-11 23:14 Makefile -rwxrwx--x 1 brian elinux 57 2010-03-11 23:14 Makefile.boot -rwxrwx--x 1 brian elinux 1869 2010-03-11 23:14 nas100d-pci.c -rwxrwx--x 1 brian elinux 8127 2010-03-11 23:14 nas100d-setup.c -rwxrwx--x 1 brian elinux 1666 2010-03-11 23:14 nslu2-pci.c -rwxrwx--x 1 brian elinux 7147 2010-03-11 23:14 nslu2-setup.c -rwxrwx--x 1 brian elinux 1468 2010-03-11 23:14 wg302v2-pci.c -rwxrwx--x 1 brian elinux 2585 2010-03-11 23:14 wg302v2-setup.c |
| 4-4 | 4-17 | USB in Linux 2.6 .config | banistpw@Kratos:/dump/hw/oe/linux-omap-2.6$ cat .config | grep USB # CONFIG_USB_ZD1201 is not set # USB Network Adapters # CONFIG_USB_CATC is not set # CONFIG_USB_KAWETH is not set # CONFIG_USB_PEGASUS is not set # CONFIG_USB_RTL8150 is not set # CONFIG_USB_USBNET is not set # CONFIG_I2C_TINY_USB is not set CONFIG_USB_SUPPORT=y CONFIG_USB_ARCH_HAS_HCD=y CONFIG_USB_ARCH_HAS_OHCI=y CONFIG_USB_ARCH_HAS_EHCI=y CONFIG_USB=y # CONFIG_USB_DEBUG is not set # CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set # Miscellaneous USB options CONFIG_USB_DEVICEFS=y CONFIG_USB_DEVICE_CLASS=y # CONFIG_USB_DYNAMIC_MINORS is not set CONFIG_USB_SUSPEND=y CONFIG_USB_OTG=y # CONFIG_USB_OTG_WHITELIST is not set # CONFIG_USB_OTG_BLACKLIST_HUB is not set CONFIG_USB_MON=y # CONFIG_USB_WUSB is not set # CONFIG_USB_WUSB_CBAF is not set # USB Host Controller Drivers # CONFIG_USB_C67X00_HCD is not set CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_ROOT_HUB_TT=y # CONFIG_USB_EHCI_TT_NEWSCHED is not set # CONFIG_USB_OXU210HP_HCD is not set # CONFIG_USB_ISP116X_HCD is not set # CONFIG_USB_ISP1760_HCD is not set # CONFIG_USB_ISP1362_HCD is not set # CONFIG_USB_OHCI_HCD is not set # CONFIG_USB_SL811_HCD is not set # CONFIG_USB_R8A66597_HCD is not set # CONFIG_USB_HWA_HCD is not set CONFIG_USB_MUSB_HDRC=y CONFIG_USB_MUSB_SOC=y # OMAP 343x high speed USB support # CONFIG_USB_MUSB_HOST is not set # CONFIG_USB_MUSB_PERIPHERAL is not set CONFIG_USB_MUSB_OTG=y CONFIG_USB_GADGET_MUSB_HDRC=y CONFIG_USB_MUSB_HDRC_HCD=y # CONFIG_MUSB_PIO_ONLY is not set CONFIG_USB_INVENTRA_DMA=y # CONFIG_USB_TI_CPPI_DMA is not set # CONFIG_USB_MUSB_DEBUG is not set # USB Device Class drivers # CONFIG_USB_ACM is not set # CONFIG_USB_PRINTER is not set # CONFIG_USB_WDM is not set # CONFIG_USB_TMC is not set # NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may # also be needed; see USB_STORAGE Help for more info # CONFIG_USB_STORAGE is not set # CONFIG_USB_LIBUSUAL is not set # USB Imaging devices # CONFIG_USB_MDC800 is not set # CONFIG_USB_MICROTEK is not set # USB port drivers # CONFIG_USB_SERIAL is not set # USB Miscellaneous drivers # CONFIG_USB_EMI62 is not set # CONFIG_USB_EMI26 is not set # CONFIG_USB_ADUTUX is not set # CONFIG_USB_SEVSEG is not set # CONFIG_USB_RIO500 is not set # CONFIG_USB_LEGOTOWER is not set # CONFIG_USB_LCD is not set # CONFIG_USB_LED is not set # CONFIG_USB_CYPRESS_CY7C63 is not set # CONFIG_USB_CYTHERM is not set # CONFIG_USB_IDMOUSE is not set # CONFIG_USB_FTDI_ELAN is not set # CONFIG_USB_APPLEDISPLAY is not set # CONFIG_USB_SISUSBVGA is not set # CONFIG_USB_LD is not set # CONFIG_USB_TRANCEVIBRATOR is not set # CONFIG_USB_IOWARRIOR is not set # CONFIG_USB_TEST is not set # CONFIG_USB_ISIGHTFW is not set CONFIG_USB_GADGET=y # CONFIG_USB_GADGET_DEBUG is not set # CONFIG_USB_GADGET_DEBUG_FILES is not set CONFIG_USB_GADGET_VBUS_DRAW=2 CONFIG_USB_GADGET_SELECTED=y # CONFIG_USB_GADGET_AT91 is not set # CONFIG_USB_GADGET_ATMEL_USBA is not set # CONFIG_USB_GADGET_FSL_USB2 is not set # CONFIG_USB_GADGET_LH7A40X is not set # CONFIG_USB_GADGET_OMAP is not set # CONFIG_USB_GADGET_PXA25X is not set # CONFIG_USB_GADGET_R8A66597 is not set # CONFIG_USB_GADGET_PXA27X is not set # CONFIG_USB_GADGET_S3C_HSOTG is not set # CONFIG_USB_GADGET_IMX is not set # CONFIG_USB_GADGET_S3C2410 is not set # CONFIG_USB_GADGET_M66592 is not set # CONFIG_USB_GADGET_AMD5536UDC is not set # CONFIG_USB_GADGET_FSL_QE is not set # CONFIG_USB_GADGET_CI13XXX is not set # CONFIG_USB_GADGET_NET2280 is not set # CONFIG_USB_GADGET_GOKU is not set # CONFIG_USB_GADGET_LANGWELL is not set # CONFIG_USB_GADGET_DUMMY_HCD is not set CONFIG_USB_GADGET_DUALSPEED=y # CONFIG_USB_ZERO is not set # CONFIG_USB_AUDIO is not set CONFIG_USB_ETH=m CONFIG_USB_ETH_RNDIS=y # CONFIG_USB_ETH_EEM is not set # CONFIG_USB_GADGETFS is not set # CONFIG_USB_FILE_STORAGE is not set # CONFIG_USB_MASS_STORAGE is not set # CONFIG_USB_G_SERIAL is not set # CONFIG_USB_MIDI_GADGET is not set # CONFIG_USB_G_PRINTER is not set # CONFIG_USB_CDC_COMPOSITE is not set # CONFIG_USB_G_NOKIA is not set # CONFIG_USB_G_MULTI is not set CONFIG_USB_OTG_UTILS=y # CONFIG_USB_GPIO_VBUS is not set # CONFIG_USB_ULPI is not set CONFIG_TWL4030_USB=y # CONFIG_NOP_USB_XCEIV is not set |
| 4-5 | 4-21 | Linux autoconf.h | banistpw@Kratos:/dump/hw/oe/linux-omap-2.6$ cat include/generated/autoconf.h | grep CONFIG_USB #define CONFIG_USB_MUSB_HDRC 1 #define CONFIG_USB_ETH_RNDIS 1 #define CONFIG_USB_GADGET_MUSB_HDRC 1 #define CONFIG_USB_ARCH_HAS_EHCI 1 #define CONFIG_USB_GADGET_VBUS_DRAW 2 #define CONFIG_USB_OTG_UTILS 1 #define CONFIG_USB_ARCH_HAS_OHCI 1 #define CONFIG_USB_ETH_MODULE 1 #define CONFIG_USB_MUSB_HDRC_HCD 1 #define CONFIG_USB_MON 1 #define CONFIG_USB_OTG 1 #define CONFIG_USB_EHCI_ROOT_HUB_TT 1 #define CONFIG_USB_SUSPEND 1 #define CONFIG_USB_SUPPORT 1 #define CONFIG_USB_EHCI_HCD 1 #define CONFIG_USB_DEVICEFS 1 #define CONFIG_USB_GADGET_SELECTED 1 #define CONFIG_USB_MUSB_SOC 1 #define CONFIG_USB_MUSB_OTG 1 #define CONFIG_USB_DEVICE_CLASS 1 #define CONFIG_USB_ARCH_HAS_HCD 1 #define CONFIG_USB_INVENTRA_DMA 1 #define CONFIG_USB 1 #define CONFIG_USB_GADGET_DUALSPEED 1 #define CONFIG_USB_GADGET 1 |
| 4-5 | 4-22 | Makefile targets |
banistpw@Kratos:/dump/hw/oe/linux-omap-2.6$ make ARCH=arm help
Cleaning targets:
clean - Remove most generated files but keep the config and
enough build support to build external modules
mrproper - Remove all generated files + config + various backup files
distclean - mrproper + remove editor backup and patch files
Configuration targets:
config - Update current config utilising a line-oriented program
menuconfig - Update current config utilising a menu based program
xconfig - Update current config utilising a QT based front-end
gconfig - Update current config utilising a GTK based front-end
oldconfig - Update current config utilising a provided .config as base
localmodconfig - Update current config disabling modules not loaded
localyesconfig - Update current config converting local mods to core
silentoldconfig - Same as oldconfig, but quietly, additionally update deps
randconfig - New config with random answer to all options
defconfig - New config with default answer to all options
allmodconfig - New config selecting modules when possible
allyesconfig - New config where all options are accepted with yes
allnoconfig - New config where all options are answered with no
Other generic targets:
all - Build all targets marked with [*]
* vmlinux - Build the bare kernel
* modules - Build all modules
modules_install - Install all modules to INSTALL_MOD_PATH (default: /)
firmware_install- Install all firmware to INSTALL_FW_PATH
(default: $(INSTALL_MOD_PATH)/lib/firmware)
dir/ - Build all files in dir and below
dir/file.[ois] - Build specified target only
dir/file.ko - Build module including final link
modules_prepare - Set up for building external modules
tags/TAGS - Generate tags file for editors
cscope - Generate cscope index
kernelrelease - Output the release version string
kernelversion - Output the version stored in Makefile
headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH
(default: /dump/hw/oe/linux-omap-2.6/usr)
Static analysers
checkstack - Generate a list of stack hogs
namespacecheck - Name space analysis on compiled kernel
versioncheck - Sanity check on version.h usage
includecheck - Check for duplicate included header files
export_report - List the usages of all exported symbols
headers_check - Sanity check on exported headers
headerdep - Detect inclusion cycles in headers
Kernel packaging:
rpm-pkg - Build both source and binary RPM kernel packages
binrpm-pkg - Build only the binary kernel package
deb-pkg - Build the kernel as an deb package
tar-pkg - Build the kernel as an uncompressed tarball
targz-pkg - Build the kernel as a gzip compressed tarball
tarbz2-pkg - Build the kernel as a bzip2 compressed tarball
Documentation targets:
Linux kernel internal documentation in different formats:
htmldocs - HTML
pdfdocs - PDF
psdocs - Postscript
xmldocs - XML DocBook
mandocs - man pages
installmandocs - install man pages generated by mandocs
cleandocs - clean all generated DocBook files
Architecture specific targets (arm):
* zImage - Compressed kernel image (arch/arm/boot/zImage)
Image - Uncompressed kernel image (arch/arm/boot/Image)
* xipImage - XIP kernel image, if configured (arch/arm/boot/xipImage)
uImage - U-Boot wrapped zImage
bootpImage - Combined zImage and initial RAM disk
(supply initrd image via make variable INITRD=<path>)
install - Install uncompressed kernel
zinstall - Install compressed kernel
Install using (your) ~/bin/installkernel or
(distribution) /sbin/installkernel or
install to $(INSTALL_PATH) and run lilo
acs5k_defconfig - Build for acs5k
acs5k_tiny_defconfig - Build for acs5k_tiny
afeb9260_defconfig - Build for afeb9260
am200epdkit_defconfig - Build for am200epdkit
am3517_evm_defconfig - Build for am3517_evm
ams_delta_defconfig - Build for ams_delta
assabet_defconfig - Build for assabet
at572d940hfek_defconfig - Build for at572d940hfek
at91cap9adk_defconfig - Build for at91cap9adk
at91rm9200dk_defconfig - Build for at91rm9200dk
at91rm9200ek_defconfig - Build for at91rm9200ek
at91sam9260ek_defconfig - Build for at91sam9260ek
at91sam9261ek_defconfig - Build for at91sam9261ek
at91sam9263ek_defconfig - Build for at91sam9263ek
at91sam9g20ek_defconfig - Build for at91sam9g20ek
at91sam9rlek_defconfig - Build for at91sam9rlek
ateb9200_defconfig - Build for ateb9200
badge4_defconfig - Build for badge4
bcmring_defconfig - Build for bcmring
cam60_defconfig - Build for cam60
carmeva_defconfig - Build for carmeva
cerfcube_defconfig - Build for cerfcube
cm_t35_defconfig - Build for cm_t35
cm_x2xx_defconfig - Build for cm_x2xx
cm_x300_defconfig - Build for cm_x300
colibri_pxa270_defconfig - Build for colibri_pxa270
colibri_pxa300_defconfig - Build for colibri_pxa300
collie_defconfig - Build for collie
corgi_defconfig - Build for corgi
cpu9260_defconfig - Build for cpu9260
cpu9g20_defconfig - Build for cpu9g20
cpuat91_defconfig - Build for cpuat91
csb337_defconfig - Build for csb337
csb637_defconfig - Build for csb637
da8xx_omapl_defconfig - Build for da8xx_omapl
davinci_all_defconfig - Build for davinci_all
devkit8000_defconfig - Build for devkit8000
dove_defconfig - Build for dove
ebsa110_defconfig - Build for ebsa110
ecbat91_defconfig - Build for ecbat91
edb7211_defconfig - Build for edb7211
em_x270_defconfig - Build for em_x270
ep93xx_defconfig - Build for ep93xx
eseries_pxa_defconfig - Build for eseries_pxa
ezx_defconfig - Build for ezx
footbridge_defconfig - Build for footbridge
fortunet_defconfig - Build for fortunet
h3600_defconfig - Build for h3600
h5000_defconfig - Build for h5000
h7201_defconfig - Build for h7201
h7202_defconfig - Build for h7202
hackkit_defconfig - Build for hackkit
htcherald_defconfig - Build for htcherald
igep0020_defconfig - Build for igep0020
integrator_defconfig - Build for integrator
iop13xx_defconfig - Build for iop13xx
iop32x_defconfig - Build for iop32x
iop33x_defconfig - Build for iop33x
ixp2000_defconfig - Build for ixp2000
ixp23xx_defconfig - Build for ixp23xx
ixp4xx_defconfig - Build for ixp4xx
jornada720_defconfig - Build for jornada720
kafa_defconfig - Build for kafa
kb9202_defconfig - Build for kb9202
kirkwood_defconfig - Build for kirkwood
ks8695_defconfig - Build for ks8695
lart_defconfig - Build for lart
loki_defconfig - Build for loki
lpd270_defconfig - Build for lpd270
lpd7a400_defconfig - Build for lpd7a400
lpd7a404_defconfig - Build for lpd7a404
lubbock_defconfig - Build for lubbock
lusl7200_defconfig - Build for lusl7200
magician_defconfig - Build for magician
mainstone_defconfig - Build for mainstone
mini2440_defconfig - Build for mini2440
msm_defconfig - Build for msm
mv78xx0_defconfig - Build for mv78xx0
mx1ads_defconfig - Build for mx1ads
mx1_defconfig - Build for mx1
mx21_defconfig - Build for mx21
mx27_defconfig - Build for mx27
mx31pdk_defconfig - Build for mx31pdk
mx3_defconfig - Build for mx3
n770_defconfig - Build for n770
n8x0_defconfig - Build for n8x0
neocore926_defconfig - Build for neocore926
neponset_defconfig - Build for neponset
netwinder_defconfig - Build for netwinder
netx_defconfig - Build for netx
nhk8815_defconfig - Build for nhk8815
ns9xxx_defconfig - Build for ns9xxx
nuc910_defconfig - Build for nuc910
nuc950_defconfig - Build for nuc950
nuc960_defconfig - Build for nuc960
omap_2430sdp_defconfig - Build for omap_2430sdp
omap_3430sdp_defconfig - Build for omap_3430sdp
omap_3630sdp_defconfig - Build for omap_3630sdp
omap3_beagle_defconfig - Build for omap3_beagle
omap3_defconfig - Build for omap3
omap3_evm_defconfig - Build for omap3_evm
omap3_pandora_defconfig - Build for omap3_pandora
omap3_touchbook_defconfig - Build for omap3_touchbook
omap_4430sdp_defconfig - Build for omap_4430sdp
omap_apollon_2420_defconfig - Build for omap_apollon_2420
omap_generic_1510_defconfig - Build for omap_generic_1510
omap_generic_1610_defconfig - Build for omap_generic_1610
omap_generic_1710_defconfig - Build for omap_generic_1710
omap_generic_2420_defconfig - Build for omap_generic_2420
omap_h2_1610_defconfig - Build for omap_h2_1610
omap_h4_2420_defconfig - Build for omap_h4_2420
omap_innovator_1510_defconfig - Build for omap_innovator_1510
omap_innovator_1610_defconfig - Build for omap_innovator_1610
omap_ldp_defconfig - Build for omap_ldp
omap_osk_5912_defconfig - Build for omap_osk_5912
omap_perseus2_730_defconfig - Build for omap_perseus2_730
omap_zoom2_defconfig - Build for omap_zoom2
omap_zoom3_defconfig - Build for omap_zoom3
onearm_defconfig - Build for onearm
orion5x_defconfig - Build for orion5x
overo_defconfig - Build for overo
palmte_defconfig - Build for palmte
palmtt_defconfig - Build for palmtt
palmz71_defconfig - Build for palmz71
palmz72_defconfig - Build for palmz72
pcm027_defconfig - Build for pcm027
picotux200_defconfig - Build for picotux200
pleb_defconfig - Build for pleb
pnx4008_defconfig - Build for pnx4008
pxa168_defconfig - Build for pxa168
pxa255-idp_defconfig - Build for pxa255-idp
pxa3xx_defconfig - Build for pxa3xx
pxa910_defconfig - Build for pxa910
qil-a9260_defconfig - Build for qil-a9260
realview_defconfig - Build for realview
realview-smp_defconfig - Build for realview-smp
rpc_defconfig - Build for rpc
rx51_defconfig - Build for rx51
s3c2410_defconfig - Build for s3c2410
s3c6400_defconfig - Build for s3c6400
s5pc100_defconfig - Build for s5pc100
sam9_l9260_defconfig - Build for sam9_l9260
shannon_defconfig - Build for shannon
shark_defconfig - Build for shark
simpad_defconfig - Build for simpad
spitz_defconfig - Build for spitz
stmp378x_defconfig - Build for stmp378x
stmp37xx_defconfig - Build for stmp37xx
sx1_defconfig - Build for sx1
tct_hammer_defconfig - Build for tct_hammer
trizeps4_defconfig - Build for trizeps4
u300_defconfig - Build for u300
u8500_defconfig - Build for u8500
usb-a9260_defconfig - Build for usb-a9260
usb-a9263_defconfig - Build for usb-a9263
versatile_defconfig - Build for versatile
viper_defconfig - Build for viper
xcep_defconfig - Build for xcep
yl9200_defconfig - Build for yl9200
zeus_defconfig - Build for zeus
make V=0|1 [targets] 0 => quiet build (default), 1 => verbose build
make V=2 [targets] 2 => give reason for rebuild of target
make O=dir [targets] Locate all output files in "dir", including .config
make C=1 [targets] Check all c source with $CHECK (sparse by default)
make C=2 [targets] Force check of all c source with $CHECK
Execute "make" or "make all" to build all targets marked with [*]
For further info see the ./README file
|-
| 4-8
| 4-30
| Snippet from .../arch/arm/Konfig
|<pre>
205 source "init/Kconfig"
206
207 source "kernel/Kconfig.freezer"
208
209 menu "System Type"
210
211 config MMU
212 bool "MMU-based Paged Memory Management Support"
213 default y
214 help
215 Select if you want MMU-based virtualised addressing space
216 support by paged memory management. If unsure, say 'Y'.
217
218 choice
219 prompt "ARM system type"
220 default ARCH_VERSATILE
783 source "arch/arm/mach-ixp4xx/Kconfig"
|
| 4-9 | 4-30 | Snippet from .../arch/arm/mach-omap1/Konfig |
1 comment "OMAP Core Type"
2 depends on ARCH_OMAP1
3
4 config ARCH_OMAP730
5 depends on ARCH_OMAP1
6 bool "OMAP730 Based System"
7 select CPU_ARM926T
8 select ARCH_OMAP_OTG
|
| 4-10 | 4-32 | Customized .config file snippet | 257 CONFIG_MACH_OMAP3_BEAGLE=y |
| 4-11 | 4-33 | .../arch/arm/mach-omap1 Kernel subdirectory | # # Makefile for the linux kernel. # # Common support obj-y := io.o id.o sram.o irq.o mux.o flash.o serial.o devices.o obj-y += clock.o clock_data.o opp_data.o obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o obj-$(CONFIG_OMAP_MPU_TIMER) += time.o obj-$(CONFIG_OMAP_32K_TIMER) += timer32k.o # Power Management obj-$(CONFIG_PM) += pm.o sleep.o # DSP obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox_mach.o mailbox_mach-objs := mailbox.o i2c-omap-$(CONFIG_I2C_OMAP) := i2c.o obj-y += $(i2c-omap-m) $(i2c-omap-y) led-y := leds.o # Specific board support obj-$(CONFIG_MACH_OMAP_H2) += board-h2.o board-h2-mmc.o obj-$(CONFIG_MACH_OMAP_INNOVATOR) += board-innovator.o obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o obj-$(CONFIG_MACH_OMAP_PERSEUS2) += board-perseus2.o obj-$(CONFIG_MACH_OMAP_FSAMPLE) += board-fsample.o obj-$(CONFIG_MACH_OMAP_OSK) += board-osk.o obj-$(CONFIG_MACH_OMAP_H3) += board-h3.o board-h3-mmc.o obj-$(CONFIG_MACH_VOICEBLUE) += board-voiceblue.o obj-$(CONFIG_MACH_OMAP_PALMTE) += board-palmte.o obj-$(CONFIG_MACH_OMAP_PALMZ71) += board-palmz71.o obj-$(CONFIG_MACH_OMAP_PALMTT) += board-palmtt.o obj-$(CONFIG_MACH_NOKIA770) += board-nokia770.o obj-$(CONFIG_MACH_AMS_DELTA) += board-ams-delta.o obj-$(CONFIG_MACH_SX1) += board-sx1.o board-sx1-mmc.o obj-$(CONFIG_MACH_HERALD) += board-htcherald.o ifeq ($(CONFIG_ARCH_OMAP15XX),y) # Innovator-1510 FPGA obj-$(CONFIG_MACH_OMAP_INNOVATOR) += fpga.o endif # LEDs support led-$(CONFIG_MACH_OMAP_H2) += leds-h2p2-debug.o led-$(CONFIG_MACH_OMAP_H3) += leds-h2p2-debug.o led-$(CONFIG_MACH_OMAP_INNOVATOR) += leds-innovator.o led-$(CONFIG_MACH_OMAP_PERSEUS2) += leds-h2p2-debug.o led-$(CONFIG_MACH_OMAP_OSK) += leds-osk.o obj-$(CONFIG_LEDS) += $(led-y) ifneq ($(CONFIG_FB_OMAP),) obj-y += lcd_dma.o endif |
| 5-5 | 5-5 | Assembly file Piggy.S |
1 .section .piggydata,#alloc
2 .globl input_data
3 input_data:
4 .incbin "arch/arm/boot/compressed/piggy.gzip"
5 .globl input_data_end
6 input_data_end:
|
| 5-4 | 5-18 | Console setup Code Snippet |
837 /*
838 * Set up a list of consoles. Called from init/main.c
839 */
840 static int __init console_setup(char *str)
841 {
842 char buf[sizeof(console_cmdline[0].name) + 4]; /* 4 for index */
843 char *s, *options, *brl_options = NULL;
844 int idx;
845
846 #ifdef CONFIG_A11Y_BRAILLE_CONSOLE
847 if (!memcmp(str, "brl,", 4)) {
848 brl_options = "";
849 str += 4;
850 } else if (!memcmp(str, "brl=", 4)) {
851 brl_options = str + 4;
852 str = strchr(brl_options, ',');
853 if (!str) {
854 printk(KERN_ERR "need port name after brl=\n");
855 return 1;
856 }
857 *(str++) = 0;
858 }
859 #endif
|
| 5-8 | 5-19 | Family of __setup macro Definitions from init.h |
224 /*
225 * Only for really core code. See moduleparam.h for the normal way.
226 *
227 * Force the alignment so the compiler doesn't space elements of the
228 * obs_kernel_param "array" too far apart in .init.setup.
229 */
230 #define __setup_param(str, unique_id, fn, early) \
231 static const char __setup_str_##unique_id[] __initconst \
232 __aligned(1) = str; \
233 static struct obs_kernel_param __setup_##unique_id \
234 __used __section(.init.setup) \
235 __attribute__((aligned((sizeof(long))))) \
236 = { __setup_str_##unique_id, fn, early }
237
238 #define __setup(str, fn) \
239 __setup_param(str, fn, fn, 0)
240
241 /* NOTE: fn is as per module_param, not __setup! Emits warning if fn
242 * returns non-zero. */
243 #define early_param(str, fn) \
244 __setup_param(str, fn, fn, 1)
|
| 5-6 | 5-20 | Kernel Command Line Processing |
204 extern struct obs_kernel_param __setup_start[], __setup_end[];
205
206 static int __init obsolete_checksetup(char *line)
207 {
208 struct obs_kernel_param *p;
209 int had_early_param = 0;
210
211 p = __setup_start;
212 do {
213 int n = strlen(p->str);
214 if (!strncmp(line, p->str, n)) {
215 if (p->early) {
216 /* Already done in parse_early_param?
217 * (Needs exact match on param part).
218 * Keep iterating, as we can have early
219 * params and __setups of same names 8( */
220 if (line[n] == '\0' || line[n] == '=')
221 had_early_param = 1;
222 } else if (!p->setup_func) {
223 printk(KERN_WARNING "Parameter %s is obsolete,"
224 " ignored\n", p->str);
225 return 1;
226 } else if (p->setup_func(line + n))
227 return 1;
228 }
229 p++;
230 } while (p < __setup_end);
231
232 return had_early_param;
233 }
|
| 5-7 | 5-23 | Example Initialization Routine |
369 static struct machine_desc * __init setup_machine(unsigned int nr)
370 {
371 struct machine_desc *list;
372
373 /*
374 * locate machine in the list of supported machines.
375 */
376 list = lookup_machine_type(nr);
377 if (!list) {
378 printk("Machine configuration botched (nr %d), unable "
379 "to continue.\n", nr);
380 while (1);
381 }
382
383 printk("Machine: %s\n", list->name);
384
385 return list;
386 }
|
| 5-8 | 5-23 | Initcall Family of Macros |
170 #define __define_initcall(level,fn,id) \
171 static initcall_t __initcall_##fn##id __used \
172 __attribute__((__section__(".initcall" level ".init"))) = fn
173
174 /*
175 * Early initcalls run before initializing SMP.
176 *
177 * Only for built-in code, not modules.
178 */
179 #define early_initcall(fn) __define_initcall("early",fn,early)
180
181 /*
182 * A "pure" initcall has no dependencies on anything else, and purely
183 * initializes variables that couldn't be statically initialized.
184 *
185 * This only exists for built-in code, not for modules.
186 */
187 #define pure_initcall(fn) __define_initcall("0",fn,0)
188
189 #define core_initcall(fn) __define_initcall("1",fn,1)
190 #define core_initcall_sync(fn) __define_initcall("1s",fn,1s)
191 #define postcore_initcall(fn) __define_initcall("2",fn,2)
192 #define postcore_initcall_sync(fn) __define_initcall("2s",fn,2s)
193 #define arch_initcall(fn) __define_initcall("3",fn,3)
194 #define arch_initcall_sync(fn) __define_initcall("3s",fn,3s)
195 #define subsys_initcall(fn) __define_initcall("4",fn,4)
196 #define subsys_initcall_sync(fn) __define_initcall("4s",fn,4s)
197 #define fs_initcall(fn) __define_initcall("5",fn,5)
198 #define fs_initcall_sync(fn) __define_initcall("5s",fn,5s)
199 #define rootfs_initcall(fn) __define_initcall("rootfs",fn,rootfs)
200 #define device_initcall(fn) __define_initcall("6",fn,6)
201 #define device_initcall_sync(fn) __define_initcall("6s",fn,6s)
202 #define late_initcall(fn) __define_initcall("7",fn,7)
203 #define late_initcall_sync(fn) __define_initcall("7s",fn,7s)
204
205 #define __initcall(fn) device_initcall(fn)
|
| 5-9 | 5-26 | Creation of kernel init thread |
424 static noinline void __init_refok rest_init(void)
425 __releases(kernel_lock)
426 {
427 int pid;
428
429 rcu_scheduler_starting();
430 kernel_thread(kernel_init, NULL, CLONE_FS | CLONE_SIGHAND);
431 numa_default_policy();
432 pid = kernel_thread(kthreadd, NULL, CLONE_FS | CLONE_FILES);
433 rcu_read_lock();
434 kthreadd_task = find_task_by_pid_ns(pid, &init_pid_ns);
435 rcu_read_unlock();
436 unlock_kernel();
437
438 /*
439 * The boot idle thread must execute schedule()
440 * at least once to get things moving:
441 */
442 init_idle_bootup_task(current);
443 preempt_enable_no_resched();
444 schedule();
445 preempt_disable();
446
447 /* Call into cpu_idle with preempt disabled */
448 cpu_idle();
449 }
|
| 5-10 | 5-27 | Initialization via initcalls |
765 extern initcall_t __initcall_start[], __initcall_end[], __early_initcall_end[];
766
767 static void __init do_initcalls(void)
768 {
769 initcall_t *fn;
770
771 for (fn = __early_initcall_end; fn < __initcall_end; fn++)
772 do_one_initcall(*fn);
773
774 /* Make sure there is no pending stuff from the initcall sequence */
775 flush_scheduled_work();
776 }
|
| 5-11 | 5-28 | Final Kernel Boot Steps from main.c |
814 static noinline int init_post(void)
815 __releases(kernel_lock)
816 {
817 /* need to finish all async __init code before freeing the memory */
818 async_synchronize_full();
819 free_initmem();
820 unlock_kernel();
821 mark_rodata_ro();
822 system_state = SYSTEM_RUNNING;
823 numa_default_policy();
824
825
826 current->signal->flags |= SIGNAL_UNKILLABLE;
827
828 if (ramdisk_execute_command) {
829 run_init_process(ramdisk_execute_command);
830 printk(KERN_WARNING "Failed to execute %s\n",
831 ramdisk_execute_command);
832 }
833
834 /*
835 * We try each of these until one succeeds.
836 *
837 * The Bourne shell can be used instead of init if we are
838 * trying to recover a really broken machine.
839 */
840 if (execute_command) {
841 run_init_process(execute_command);
842 printk(KERN_WARNING "Failed to execute %s. Attempting "
843 "defaults...\n", execute_command);
844 }
845 run_init_process("/sbin/init");
846 run_init_process("/etc/init");
847 run_init_process("/bin/init");
848 run_init_process("/bin/sh");
849
850 panic("No init found. Try passing init= option to kernel. "
851 "See Linux Documentation/init.txt for guidance.");
852 }
|
| 6-1 | 6-7 | Final boot steps from main.c |
840 if (execute_command) {
841 run_init_process(execute_command);
842 printk(KERN_WARNING "Failed to execute %s. Attempting "
843 "defaults...\n", execute_command);
844 }
845 run_init_process("/sbin/init");
846 run_init_process("/etc/init");
847 run_init_process("/bin/init");
848 run_init_process("/bin/sh");
849
850 panic("No init found. Try passing init= option to kernel. "
851 "See Linux Documentation/init.txt for guidance.");
|
| 6-3 | 6-12 | Runlevel Directory Structure | banistpw@ubuntu:~$ ls -d1 /etc/rc* /etc/rc0.d /etc/rc1.d /etc/rc2.d /etc/rc3.d /etc/rc4.d /etc/rc5.d /etc/rc6.d /etc/rc.local /etc/rcS.d |
| 6-4 | 6-12 | Example Runlevel Directory | banistpw@ubuntu:~$ ls -lsa /etc/rc1.d/ total 20 4 drwxr-xr-x 2 root root 4096 2010-03-08 14:14 . 12 drwxr-xr-x 131 root root 12288 2010-03-26 17:35 .. 0 lrwxrwxrwx 1 root root 20 2010-03-08 13:39 K15pulseaudio -> ../init.d/pulseaudio 0 lrwxrwxrwx 1 root root 22 2010-03-08 13:39 K20acpi-support -> ../init.d/acpi-support 0 lrwxrwxrwx 1 root root 20 2010-03-08 13:39 K20kerneloops -> ../init.d/kerneloops 0 lrwxrwxrwx 1 root root 15 2010-03-08 13:39 K20rsync -> ../init.d/rsync 0 lrwxrwxrwx 1 root root 15 2010-03-08 13:39 K20saned -> ../init.d/saned 0 lrwxrwxrwx 1 root root 27 2010-03-08 13:39 K20speech-dispatcher -> ../init.d/speech-dispatcher 0 lrwxrwxrwx 1 root root 19 2010-03-08 13:39 K74bluetooth -> ../init.d/bluetooth 0 lrwxrwxrwx 1 root root 14 2010-03-08 13:39 K80cups -> ../init.d/cups 0 lrwxrwxrwx 1 root root 21 2010-03-08 13:39 K99laptop-mode -> ../init.d/laptop-mode 4 -rw-r--r-- 1 root root 369 2009-09-07 14:58 README 0 lrwxrwxrwx 1 root root 19 2010-03-08 13:39 S30killprocs -> ../init.d/killprocs 0 lrwxrwxrwx 1 root root 19 2010-03-08 13:39 S70dns-clean -> ../init.d/dns-clean 0 lrwxrwxrwx 1 root root 18 2010-03-08 13:39 S70pppd-dns -> ../init.d/pppd-dns 0 lrwxrwxrwx 1 root root 16 2010-03-08 13:39 S90single -> ../init.d/single |