Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
docs:techref:image.makefile [2019/08/05 16:25] someothertimedocs:techref:image.makefile [2020/02/26 22:16] (current) – [image/Makefile] mwarning
Line 1: Line 1:
 ====== image/Makefile Details ====== ====== image/Makefile Details ======
 +{{page>meta:infobox:wip&noheader&nofooter&noeditbtn}}
  
-FIXME +  * I think its(this page) needed to clarify the intent, preferred style and function of the image/Makefile. 
-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 believe one of the following should be placed here: 
- +    * Adding a new platform (new buildroot howto section?) 
-I think its(this page) needed to clarify the intent, preferred style and function of the image/Makefile. +    * 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/Makefile from scratch or modify ===== ===== image/Makefile from scratch or modify =====
Line 14: Line 11:
  
 ===== Basic Function ===== ===== Basic Function =====
-see example.+See example. 
 ==== Image/Prepare ==== ==== Image/Prepare ====
-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)/arch/arm/boot/zImage >> $(KDIR)/$(call zimage_name,$(1))   cat $(LINUX_DIR)/arch/arm/boot/zImage >> $(KDIR)/$(call zimage_name,$(1))
 +
 ==== Image/Build/Initramfs ==== ==== Image/Build/Initramfs ====
 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 37: Line 36:
 to call a define for each use: to call a define for each use:
   $(call Image/Build/$(1),$(1))   $(call Image/Build/$(1),$(1))
- 
  
 ===== Example ===== ===== Example =====
- 
 Example of: **trunk/target/linux///platform///image/Makefile** Example of: **trunk/target/linux///platform///image/Makefile**
  
Line 58: Line 55:
  
 define Image/Build/Initramfs define Image/Build/Initramfs
-  
  $(BIN_DIR)/$(IMG_PREFIX)-vmlinux.elf  $(BIN_DIR)/$(IMG_PREFIX)-vmlinux.elf
-  
 endef endef
  
Line 77: Line 72:
 define Image/Build/squashfs define Image/Build/squashfs
  $(call prepare_generic_squashfs,$(KDIR)/root.squashfs)  $(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
- 
 endef endef
  
Line 89: Line 83:
  
 ====== Platform/Device configuration files ====== ====== Platform/Device configuration files ======
- 
 ===== config-4.x ===== ===== config-4.x =====
- 
 Kernel options required by the platform + kernel version. Kernel options required by the platform + kernel version.
  
-  CONFIG_QCOM_PM=y +<code make> 
-  CONFIG_QCOM_QFPROM=y +CONFIG_QCOM_PM=y 
-  CONFIG_QCOM_RPMCC=y+CONFIG_QCOM_QFPROM=y 
 +CONFIG_QCOM_RPMCC=y 
 +</code>
  
 ===== files-4.x ===== ===== 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/Makefile under DEVICE_DTS. 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/Makefile under DEVICE_DTS.
  
 ===== patches-4.x ===== ===== patches-4.x =====
- 
 Kernel source additions. No changes for basic device additions. Kernel source additions. No changes for basic device additions.
  
 ===== Makefile ===== ===== Makefile =====
- 
 Platform wide device definition and common package set. Generally does not require modification when adding additional platform devices. Platform wide device definition and common package set. Generally does not require modification when adding additional platform devices.
  
-  include $(TOPDIR)/rules.mk +<code make> 
-   +include $(TOPDIR)/rules.mk 
-  ARCH:=arm + 
-  BOARD:=ipq806x +ARCH:=arm 
-  BOARDNAME:=Qualcomm Atheros IPQ806X +BOARD:=ipq806x 
-  FEATURES:=squashfs nand fpu ramdisk +BOARDNAME:=Qualcomm Atheros IPQ806X 
-  CPU_TYPE:=cortex-a15 +FEATURES:=squashfs nand fpu ramdisk 
-  CPU_SUBTYPE:=neon-vfpv4 +CPU_TYPE:=cortex-a15 
-  MAINTAINER:=John Crispin <john@phrozen.org> +CPU_SUBTYPE:=neon-vfpv4 
-   +MAINTAINER:=John Crispin <john@phrozen.org> 
-  KERNEL_PATCHVER:=4.14 + 
-   +KERNEL_PATCHVER:=4.14 
-  KERNELNAME:=zImage Image dtbs + 
-     +KERNELNAME:=zImage Image dtbs 
-  include $(INCLUDE_DIR)/target.mk + 
-  DEFAULT_PACKAGES += \ +include $(INCLUDE_DIR)/target.mk 
-   kmod-leds-gpio kmod-gpio-button-hotplug swconfig \ +DEFAULT_PACKAGES += \ 
-   kmod-ata-core kmod-ata-ahci kmod-ata-ahci-platform \ + kmod-leds-gpio kmod-gpio-button-hotplug swconfig \ 
-   kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport \ + kmod-ata-core kmod-ata-ahci kmod-ata-ahci-platform \ 
-   kmod-usb3 kmod-usb-dwc3-of-simple kmod-usb-phy-qcom-dwc3 \ + kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport \ 
-   kmod-ath10k-ct wpad-basic \ + kmod-usb3 kmod-usb-dwc3-of-simple kmod-usb-phy-qcom-dwc3 \ 
-   uboot-envtools + kmod-ath10k-ct wpad-basic \ 
-   + uboot-envtools 
-  $(eval $(call BuildTarget))+ 
 +$(eval $(call BuildTarget)) 
 +</code>
  
 ===== image/Makefile ===== ===== image/Makefile =====
- 
 Device specific image creation parameters and image generation functions. Device specific image creation parameters and image generation functions.
  
-  define Device/zyxel_nbg6817 +<code make> 
-   DEVICE_DTS := qcom-ipq8065-nbg6817 +define Device/zyxel_nbg6817 
-   KERNEL_SIZE := 4096k + DEVICE_DTS := qcom-ipq8065-nbg6817 
-   BLOCKSIZE := 64k + KERNEL_SIZE := 4096k 
-   BOARD_NAME := nbg6817 + BLOCKSIZE := 64k 
-   RAS_BOARD := NBG6817 + BOARD_NAME := nbg6817 
-   RAS_ROOTFS_SIZE := 20934k + RAS_BOARD := NBG6817 
-   RAS_VERSION := "V1.99(OWRT.9999)C0" + RAS_ROOTFS_SIZE := 20934k 
-   SUPPORTED_DEVICES += nbg6817 + RAS_VERSION := "V1.99(OWRT.9999)C0" 
-   DEVICE_TITLE := ZyXEL NBG6817 + SUPPORTED_DEVICES += nbg6817 
-   DEVICE_PACKAGES := ath10k-firmware-qca9984-ct e2fsprogs kmod-fs-ext4 losetup + DEVICE_VENDOR := ZyXEL 
-   $(call Device/ZyXELImage) + DEVICE_MODEL := NBG6817 
-  endef + DEVICE_PACKAGES := ath10k-firmware-qca9984-ct e2fsprogs kmod-fs-ext4 losetup 
-  TARGET_DEVICES += zyxel_nbg6817+ $(call Device/ZyXELImage) 
 +endef 
 +TARGET_DEVICES += zyxel_nbg6817 
 +</code>
  
 ===== base-files ===== ===== base-files =====
- 
 Initialization scripts. Instantiation of LED, wifi and upgrade/install routines. etc. Many changes needed to add new device. Initialization scripts. Instantiation of LED, wifi and upgrade/install routines. etc. Many changes needed to add new device.
- 
  
 ===== profiles/00-default.mk ===== ===== profiles/00-default.mk =====
- 
 Board core firmware. Board core firmware.
  
- 
-{{tag>wip}} --- //david_ausengineer 2012/05/15 03:10// 
-{{tag>wip}} --- //wulfy23 2019/07/15 03:10// 
  • Last modified: 2019/08/05 16:25
  • by someothertime