aboutsummaryrefslogtreecommitdiffstats
path: root/doc/index.rst
blob: d309a039e0b9acf82b3ccf9d8bb068628ea66947 (plain)
1
2
3
4
5
6
7
8
9
10
11
.. flashrom documentation master file, created by
   sphinx-quickstart on Mon Jan 30 17:34:19 2023.
   You can adapt this file completely to your liking, but it should at least
   contain the root `toctree` directive.

.. toctree::
  :hidden:

  classic_cli_manpage

.. include:: ../README
ghlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
INSTALL			= install
INSTALL_DATA		= $(INSTALL) -m0644
INSTALL_DIR		= $(INSTALL) -d -m0755

# This is the correct place to edit the build version.
# All other places this is stored (eg. compile.h) should be autogenerated.
export XEN_VERSION       = 3
export XEN_SUBVERSION    = 0
export XEN_EXTRAVERSION  = -devel
export XEN_FULLVERSION   = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)

export BASEDIR          := $(CURDIR)

include Rules.mk

default: build
$(TARGET).gz: $(TARGET)
	gzip -f -9 < $< > $@.new
	mv $@.new $@

debug:	
	objdump -D -S $(TARGET)-syms > $(TARGET).s

dist: install

build: $(TARGET).gz

install: $(TARGET).gz
	[ -d $(DESTDIR)/boot ] || $(INSTALL_DIR) $(DESTDIR)/boot
	$(INSTALL_DATA) $(TARGET).gz $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_FULLVERSION).gz
	ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION).gz $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION).$(XEN_SUBVERSION).gz
	ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION).gz $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION).gz
	ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION).gz $(DESTDIR)/boot/$(notdir $(TARGET)).gz
	$(INSTALL_DATA) $(TARGET)-syms $(DESTDIR)/boot/$(notdir $(TARGET))-syms-$(XEN_FULLVERSION)
	[ -d $(DESTDIR)/usr/include/xen/io ] || \
		$(INSTALL_DIR) $(DESTDIR)/usr/include/xen/io
	$(INSTALL_DATA) include/public/*.h $(DESTDIR)/usr/include/xen
	$(INSTALL_DATA) include/public/io/*.h $(DESTDIR)/usr/include/xen/io
	$(INSTALL_DATA) include/public/COPYING $(DESTDIR)/usr/include/xen

clean: delete-unfresh-files
	$(MAKE) -C tools clean
	$(MAKE) -C common clean
	$(MAKE) -C drivers clean
	$(MAKE) -C acm clean
	$(MAKE) -C arch/$(TARGET_ARCH) clean
	rm -f include/asm *.o $(TARGET)* *~ core
	rm -f include/asm-*/asm-offsets.h
	rm -f include/xen/acm_policy.h

$(TARGET): delete-unfresh-files
	$(MAKE) -C tools
	$(MAKE) include/xen/compile.h
	$(MAKE) include/xen/acm_policy.h
	[ -e include/asm ] || ln -sf asm-$(TARGET_ARCH) include/asm
	$(MAKE) -C arch/$(TARGET_ARCH) asm-offsets.s
	$(MAKE) include/asm-$(TARGET_ARCH)/asm-offsets.h
	$(MAKE) -C common
	$(MAKE) -C drivers
ifneq ($(ACM_USE_SECURITY_POLICY),ACM_NULL_POLICY)
	$(MAKE) -C acm
endif
	$(MAKE) -C arch/$(TARGET_ARCH)

# drivers/char/console.o contains static banner/compile info. Blow it away.
# Don't refresh these files during e.g., 'sudo make install'
delete-unfresh-files:
	@if [ ! -r include/xen/compile.h -o -O include/xen/compile.h ]; then \
		rm -f include/xen/{banner,compile}.h; \
	fi

# acm_policy.h contains security policy for Xen
include/xen/acm_policy.h:
	@(set -e; \
	  echo "/*"; \
	  echo " * DO NOT MODIFY."; \
	  echo " *"; \
	  echo " * This file was auto-generated by xen/Makefile $<"; \
	  echo " *"; \
	  echo " */"; \
	  echo ""; \
	  echo "#ifndef ACM_USE_SECURITY_POLICY"; \
	  echo "#define ACM_USE_SECURITY_POLICY $(ACM_USE_SECURITY_POLICY)"; \
	  echo "#endif") >$@

# compile.h contains dynamic build info. Rebuilt on every 'make' invocation.
include/xen/compile.h: LANG=C
include/xen/compile.h: include/xen/compile.h.in include/xen/banner.h
	@sed -e 's/@@date@@/$(shell date)/g' \
	    -e 's/@@time@@/$(shell date +%T)/g' \
	    -e 's/@@whoami@@/$(shell whoami)/g' \
	    -e 's/@@domain@@/$(shell ([ -x /bin/dnsdomainname ] && /bin/dnsdomainname) || ([ -x /bin/domainname ] && /bin/domainname || echo [unknown]))/g' \
	    -e 's/@@hostname@@/$(shell hostname)/g' \
	    -e 's/@@compiler@@/$(shell $(CC) $(CFLAGS) -v 2>&1 | tail -n 1)/g' \
	    -e 's/@@version@@/$(XEN_VERSION)/g' \
	    -e 's/@@subversion@@/$(XEN_SUBVERSION)/g' \
	    -e 's/@@extraversion@@/$(XEN_EXTRAVERSION)/g' \
	    -e 's!@@changeset@@!$(shell ((hg parents || head -n 7 ../ChangeLog || echo date: unavailable) | awk '{FS="changeset:[ ]+"}/^changeset/{CS=$$2};{FS="date:[ ]+"}/^date/{D=$$2}; END {print D, CS}') 2>/dev/null)!g' \
	    < include/xen/compile.h.in > $@.new
	@cat include/xen/banner.h >> $@.new
	@mv -f $@.new $@

include/xen/banner.h:
	tools/figlet/figlet -d tools/figlet Xen $(XEN_FULLVERSION) > $@.new
	@mv -f $@.new $@

include/asm-$(TARGET_ARCH)/asm-offsets.h: arch/$(TARGET_ARCH)/asm-offsets.s
	@(set -e; \
	  echo "/*"; \
	  echo " * DO NOT MODIFY."; \
	  echo " *"; \
	  echo " * This file was auto-generated from $<"; \
	  echo " *"; \
	  echo " */"; \
	  echo ""; \
	  echo "#ifndef __ASM_OFFSETS_H__"; \
	  echo "#define __ASM_OFFSETS_H__"; \
	  echo ""; \
	  sed -ne "/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}"; \
	  echo ""; \
	  echo "#endif") <$< >$@

.PHONY: default debug install dist clean delete-unfresh-files TAGS tags

SUBDIRS = acm arch/$(TARGET_ARCH) common drivers 
define all_sources
    ( find include/asm-$(TARGET_ARCH) -name SCCS -prune -o -name '*.h' -print; \
      find include -type d -name SCCS -prune -o \( -name "asm-*" -o \
            -name config \) -prune -o -name '*.h' -print; \
      find $(SUBDIRS) -name SCCS -prune -o -name '*.[chS]' -print )
endef
TAGS: 
	$(all_sources) | etags -
tags: 
	$(all_sources) | xargs ctags
cscope: 
	$(all_sources) > cscope.files
	cscope -k -b -q
MAP:
	$(NM) $(TARGET) | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map