Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| docs:techref:image.makefile [2018/02/20 18:51] – ↷ Page moved from doc:techref:image.makefile to docs:techref:image.makefile bobafetthotmail | docs:techref:image.makefile [2020/02/26 22:16] (current) – [image/Makefile] mwarning | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ===== image/ | + | ====== image/ |
| - | FIXME | + | {{page> |
| - | This section is new and deliberately not linked too by other pages yet. once a person of some experience has a chance to look over this they may then choose to add it. | + | |
| - | I think its(this page) needed to clarify the intent, preferred style and function of the image/ | + | * I think its(this page) needed to clarify the intent, preferred style and function of the image/ |
| + | * I believe one of the following should be placed here: | ||
| + | * Adding a new platform (new buildroot howto section?) | ||
| + | * OpenWrt Buildroot - new platform (new page/how-to on adding platform support to the buildroot system) | ||
| - | I believe it should be placed here: | ||
| - | * Adding a new platform (new buildroot howto section?)\\ OR | ||
| - | * OpenWrt Buildroot - new platform (new page/how-to on adding platform support to the buildroot system) | ||
| - | | ||
| ===== image/ | ===== image/ | ||
| Inside your platform directory you will need to create a file to tell the buildroot system how to process the results of a compiled kernel. Most of the work is done automatically by image.mk but different platforms and individual devices will need specific work for images to be useful. | Inside your platform directory you will need to create a file to tell the buildroot system how to process the results of a compiled kernel. Most of the work is done automatically by image.mk but different platforms and individual devices will need specific work for images to be useful. | ||
| ===== Basic Function ===== | ===== Basic Function ===== | ||
| - | see example. | + | See example. |
| ==== Image/ | ==== Image/ | ||
| - | can be used to append data to image but often used simply to move to another directory such as $(KDIR) | + | Can be used to append data to image but often used simply to move to another directory such as $(KDIR) |
| - | for example: | + | Example: |
| cat $(LINUX_DIR)/ | cat $(LINUX_DIR)/ | ||
| + | |||
| ==== Image/ | ==== Image/ | ||
| This section allows automated modification of the elf file before loading onto the device. | This section allows automated modification of the elf file before loading onto the device. | ||
| Line 36: | Line 36: | ||
| to call a define for each use: | to call a define for each use: | ||
| $(call Image/ | $(call Image/ | ||
| - | |||
| ===== Example ===== | ===== Example ===== | ||
| - | |||
| Example of: **trunk/ | Example of: **trunk/ | ||
| Line 57: | Line 55: | ||
| define Image/ | define Image/ | ||
| - | |||
| $(BIN_DIR)/ | $(BIN_DIR)/ | ||
| - | |||
| endef | endef | ||
| Line 76: | Line 72: | ||
| define Image/ | define Image/ | ||
| $(call prepare_generic_squashfs, | $(call prepare_generic_squashfs, | ||
| - | |||
| endef | endef | ||
| Line 87: | Line 82: | ||
| have a look at your copy of **trunk/ | have a look at your copy of **trunk/ | ||
| - | {{tag>wip}} --- //david_ausengineer 2012/05/15 03:10// | + | ====== Platform/ |
| + | ===== config-4.x ===== | ||
| + | Kernel options required by the platform + kernel version. | ||
| + | |||
| + | <code make> | ||
| + | CONFIG_QCOM_PM=y | ||
| + | CONFIG_QCOM_QFPROM=y | ||
| + | CONFIG_QCOM_RPMCC=y | ||
| + | </code> | ||
| + | |||
| + | ===== files-4.x ===== | ||
| + | Kernel specific device source. Primarily the location of device DTS files. You will need to add a new device dts here and reference in image/ | ||
| + | |||
| + | ===== patches-4.x ===== | ||
| + | Kernel source additions. No changes for basic device additions. | ||
| + | |||
| + | ===== Makefile ===== | ||
| + | Platform wide device definition and common package set. Generally does not require modification when adding additional platform devices. | ||
| + | |||
| + | <code make> | ||
| + | include $(TOPDIR)/ | ||
| + | |||
| + | ARCH:=arm | ||
| + | BOARD: | ||
| + | BOARDNAME: | ||
| + | FEATURES: | ||
| + | CPU_TYPE: | ||
| + | CPU_SUBTYPE: | ||
| + | MAINTAINER: | ||
| + | |||
| + | KERNEL_PATCHVER: | ||
| + | |||
| + | KERNELNAME: | ||
| + | |||
| + | include $(INCLUDE_DIR)/target.mk | ||
| + | DEFAULT_PACKAGES += \ | ||
| + | kmod-leds-gpio kmod-gpio-button-hotplug swconfig \ | ||
| + | kmod-ata-core kmod-ata-ahci kmod-ata-ahci-platform \ | ||
| + | kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport \ | ||
| + | kmod-usb3 kmod-usb-dwc3-of-simple kmod-usb-phy-qcom-dwc3 \ | ||
| + | kmod-ath10k-ct wpad-basic \ | ||
| + | uboot-envtools | ||
| + | |||
| + | $(eval $(call BuildTarget)) | ||
| + | </code> | ||
| + | |||
| + | ===== image/Makefile ===== | ||
| + | Device specific image creation parameters and image generation functions. | ||
| + | |||
| + | <code make> | ||
| + | define Device/zyxel_nbg6817 | ||
| + | DEVICE_DTS | ||
| + | KERNEL_SIZE := 4096k | ||
| + | BLOCKSIZE := 64k | ||
| + | BOARD_NAME := nbg6817 | ||
| + | RAS_BOARD := NBG6817 | ||
| + | RAS_ROOTFS_SIZE := 20934k | ||
| + | RAS_VERSION := " | ||
| + | SUPPORTED_DEVICES += nbg6817 | ||
| + | DEVICE_VENDOR := ZyXEL | ||
| + | DEVICE_MODEL := NBG6817 | ||
| + | DEVICE_PACKAGES := ath10k-firmware-qca9984-ct e2fsprogs kmod-fs-ext4 losetup | ||
| + | $(call Device/ZyXELImage) | ||
| + | endef | ||
| + | TARGET_DEVICES += zyxel_nbg6817 | ||
| + | </code> | ||
| + | |||
| + | ===== base-files ===== | ||
| + | Initialization scripts. Instantiation of LED, wifi and upgrade/ | ||
| + | |||
| + | ===== profiles/ | ||
| + | Board core firmware. | ||