# # Copyright (C) 2006-2010 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. # HWMON_MENU:=Hardware Monitoring Support define KernelPackage/hwmon-core SUBMENU:=$(HWMON_MENU) TITLE:=Hardware monitoring support KCONFIG:= \ CONFIG_HWMON \ CONFIG_HWMON_DEBUG_CHIP=n FILES:= \ $(LINUX_DIR)/drivers/hwmon/hwmon.ko endef define KernelPackage/hwmon-core/description Kernel modules for hardware monitoring endef $(eval $(call KernelPackage,hwmon-core)) define AddDepends/hwmon SUBMENU:=$(HWMON_MENU) DEPENDS:=kmod-hwmon-core $(1) endef define KernelPackage/hwmon-vid TITLE:=VID/VRM/VRD voltage conversion module. KCONFIG:=CONFIG_HWMON_VID FILES:=$(LINUX_DIR)/drivers/hwmon/hwmon-vid.ko AUTOLOAD:=$(call AutoLoad,41,hwmon-vid) $(call AddDepends/hwmon,) endef define KernelPackage/hwmon-vid/description VID/VRM/VRD voltage conversion module for hardware monitoring endef $(eval $(call KernelPackage,hwmon-vid)) define KernelPackage/hwmon-adt7475 TITLE:=ADT7473/7475/7476/7490 monitoring support KCONFIG:=CONFIG_SENSORS_ADT7475 FILES:=$(LINUX_DIR)/drivers/hwmon/adt7475.ko AUTOLOAD:=$(call AutoProbe,adt7475) $(call AddDepends/hwmon,+kmod-i2c-core +kmod-hwmon-vid) endef define KernelPackage/hwmon-adt7475/description Kernel module for ADT7473/7475/7476/7490 thermal monitor chip endef $(eval $(call KernelPackage,hwmon-adt7475)) define KernelPackage/hwmon-ina2xx TITLE:=INA2XX monitoring support KCONFIG:=CONFIG_SENSORS_INA2XX FILES:=$(LINUX_DIR)/drivers/hwmon/ina2xx.ko AUTOLOAD:=$(call AutoProbe,ina2xx) $(call AddDepends/hwmon,+kmod-i2c-core) endef define KernelPackage/hwmon-ina2xx/description Kernel module for ina2xx dc current monitor chips endef $(eval $(call KernelPackage,hwmon-ina2xx)) define KernelPackage/hwmon-lm63 TITLE:=LM63/64 monitoring support KCONFIG:=CONFIG_SENSORS_LM63 FILES:=$(LINUX_DIR)/drivers/hwmon/lm63.ko AUTOLOAD:=$(call AutoProbe,lm63) $(call AddDepends/hwmon,+kmod-i2c-core) endef define KernelPackage/hwmon-lm63/description Kernel module for lm63 and lm64 thermal monitor chip endef $(eval $(call KernelPackage,hwmon-lm63)) define KernelPackage/hwmon-lm75 TITLE:=LM75 monitoring support KCONFIG:=CONFIG_SENSORS_LM75 FILES:=$(LINUX_DIR)/drivers/hwmon/lm75.ko AUTOLOAD:=$(call AutoProbe,lm75) $(call AddDepends/hwmon,+kmod-i2c-core) endef define KernelPackage/hwmon-lm75/description Kernel module for lm75 thermal monitor chip endef $(eval $(call KernelPackage,hwmon-lm75)) define KernelPackage/hwmon-lm77 TITLE:=LM77 monitoring support KCONFIG:=CONFIG_SENSORS_LM77 FILES:=$(LINUX_DIR)/drivers/hwmon/lm77.ko AUTOLOAD:=$(call AutoProbe,lm77) $(call AddDepends/hwmon,+kmod-i2c-core) endef define KernelPackage/hwmon-lm77/description Kernel module for LM77 thermal monitor chip endef $(eval $(call KernelPackage,hwmon-lm77)) define KernelPackage/hwmon-lm85 TITLE:=LM85 monitoring support KCONFIG:=CONFIG_SENSORS_LM85 FILES:=$(LINUX_DIR)/drivers/hwmon/lm85.ko AUTOLOAD:=$(call AutoProbe,lm85) $(call AddDepends/hwmon,+kmod-i2c-core +kmod-hwmon-vid) endef define KernelPackage/hwmon-lm85/description Kernel module for LM85 thermal monitor chip endef $(eval $(call KernelPackage,hwmon-lm85)) define KernelPackage/hwmon-lm90 TITLE:=LM90 monitoring support KCONFIG:=CONFIG_SENSORS_LM90 FILES:=$(LINUX_DIR)/drivers/hwmon/lm90.ko AUTOLOAD:=$(call AutoProbe,lm90) $(call AddDepends/hwmon,+kmod-i2c-core) endef define KernelPackage/hwmon-lm90/description Kernel module for LM90 thermal monitor chip endef $(eval $(call KernelPackage,hwmon-lm90)) define KernelPackage/hwmon-lm92 TITLE:=LM92 monitoring support KCONFIG:=CONFIG_SENSORS_LM92 FILES:=$(LINUX_DIR)/drivers/hwmon/lm92.ko AUTOLOAD:=$(call AutoProbe,lm92) $(call AddDepends/hwmon,+kmod-i2c-core) endef define KernelPackage/hwmon-lm92/description Kernel module for LM92 thermal monitor chip endef $(eval $(call KernelPackage,hwmon-lm92)) define KernelPackage/hwmon-lm95241 TITLE:=LM95241 monitoring support KCONFIG:=CONFIG_SENSORS_LM95241 FILES:=$(LINUX_DIR)/drivers/hwmon/lm95241.ko AUTOLOAD:=$(call AutoProbe,lm95241) $(call AddDepends/hwmon,+kmod-i2c-core) endef define KernelPackage/hwmon-lm95241/description Kernel module for LM95241 thermal monitor chip endef $(eval $(call KernelPackage,hwmon-lm95241)) define KernelPackage/hwmon-sht21 TITLE:=Sensiron SHT21 and compat. monitoring support KCONFIG:=CONFIG_SENSORS_SHT21 FILES:=$(LINUX_DIR)/drivers/hwmon/sht21.ko AUTOLOAD:=$(call AutoProbe,sht21) $(call AddDepends/hwmon,+kmod-i2c-core) endef define KernelPackage/hwmon-sht21/description Kernel module for Sensirion SHT21 and SHT25 temperature and humidity sensors chip endef $(eval $(call KernelPackage,hwmon-sht21)) define KernelPackage/hwmon-pc87360 TITLE:=PC87360 monitoring support KCONFIG:=CONFIG_SENSORS_PC87360 FILES:=$(LINUX_DIR)/drivers/hwmon/pc87360.ko AUTOLOAD:=$(call AutoProbe,pc87360) $(call AddDepends/hwmon,@TARGET_x86 +kmod-hwmon-vid) endef define KernelPackage/hwmon-pc87360/description Kernel modules for PC87360 chips endef $(eval $(call KernelPackage,hwmon-pc87360)) define KernelPackage/hwmon-w83627hf TITLE:=Winbond W83627HF monitoring support KCONFIG:=CONFIG_SENSORS_W83627HF FILES:=$(LINUX_DIR)/drivers/hwmon/w83627hf.ko AUTOLOAD:=$(call AutoLoad,50,w83627hf) $(call AddDepends/hwmon,@TARGET_rdc||TARGET_x86 +kmod-hwmon-vid) endef define KernelPacakge/hwmon-w83627hf/description Kernel module for the Winbond W83627HF chips. endef $(eval $(call KernelPackage,hwmon-w83627hf)) define KernelPackage/hwmon-gsc TITLE:=Gateworks GSC monitoring support KCONFIG:=CONFIG_SENSORS_GSC FILES:=$(LINUX_DIR)/drivers/hwmon/gsc.ko AUTOLOAD:=$(call AutoLoad,60,gsc) $(call AddDepends/hwmon,+kmod-i2c-core) endef define KernelPacakge/hwmon-gsc/description Kernel module for the Gateworks System Controller chips. endef $(eval $(call KernelPackage,hwmon-gsc)) { 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 */
ARG IMAGE="python:3-slim-buster"

#---

FROM $IMAGE AS base

RUN apt-get update -qq \
 && DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends \
    ca-certificates \
    clang \
    curl \
    libffi-dev \
    libreadline-dev \
    tcl-dev \
    graphviz \
    xdot \
 && apt-get autoclean && apt-get clean && apt-get -y autoremove \
 && update-ca-certificates \
 && rm -rf /var/lib/apt/lists

#---

FROM base AS build

RUN apt-get update -qq \
 && DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends \
    bison \
    flex \
    gawk \
    gcc \
    git \
    iverilog \
    pkg-config \
 && apt-get autoclean && apt-get clean && apt-get -y autoremove \
 && rm -rf /var/lib/apt/lists

COPY . /yosys

ENV PREFIX /opt/yosys

RUN cd /yosys \
 && make \
 && make install \
 && make test

#---

FROM base

COPY --from=build /opt/yosys /opt/yosys

ENV PATH /opt/yosys/bin:$PATH

RUN useradd -m yosys
USER yosys

CMD ["yosys"]