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/Makefile.
I believe it 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)
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.
can be used to append data to image but often used simply to move to another directory such as $(KDIR)
cat $(LINUX_DIR)/arch/arm/boot/zImage >> $(KDIR)/$(call zimage_name,$(1))
This section allows automated modification of the elf file before loading onto the device. The file can be found with this line
Appears to be used to call the other build defines (squashfs, jffs2-64k, jffs2-128k, etc) after they were processed and their resulting files were placed into $(TARGET_DIR)
to call a define for each use:
Example of: trunk/target/linux/platform/image/Makefile
# # Copyright (C) 2010 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. # include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk define Image/Prepare endef define Image/Build/Initramfs $(BIN_DIR)/$(IMG_PREFIX)-vmlinux.elf endef define Image/BuildKernel endef define Image/Build/jffs2-64k dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-$(1).img bs=65536 conv=sync endef define Image/Build/jffs2-128k dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-$(1).img bs=131072 conv=sync endef define Image/Build/squashfs $(call prepare_generic_squashfs,$(KDIR)/root.squashfs) endef define Image/Build $(call Image/Build/$(1),$(1)) endef
have a look at your copy of trunk/include/image.mk
— david_ausengineer 2012/05/15 03:10
doc/techref/image.makefile.txt · Last modified: 2012/05/15 05:27 by david_ausengineer