Skip to content

Commit

Permalink
Update 03.09.04-FW21
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Brandt <[email protected]>
  • Loading branch information
Thomas-Brandt committed Mar 15, 2022
1 parent f63bcf5 commit 2193b67
Show file tree
Hide file tree
Showing 857 changed files with 111,374 additions and 59,344 deletions.
28 changes: 28 additions & 0 deletions Changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
Firmware Release 03.09.04 (99)

System:
[NEW] Improved robustness of application control with operating mode switch and
additional detection of invalid states.
[NEW] Libcurl update to version 7.81.0
[NEW] Bootloader update to version 2021.10.0
[FIXED] Sender of SNMP "Informs" could be changed
[FIXED] deactivate Multicast Snooping by default
[FIXED] Security-Fix in config-tool print_log.
[FIXED] Network bridges discard their IP address when all associated network
ports are disconnected.
[FIXED] “Dirty Pipe" enables root privileges CVE-2022-0847

Fieldbus Interface & Protocols:
-CAN
[FIXED] CAN interface goes into BusOff by TxOverflow
-Cloud Connectivity
[NEW] Proxy configuration for MS Azure + Wago Cloud in WBM configurable

Functional change:
[DEPRECATED] Config tool function get_telecontrol_state will be removed in
future re-leases. The config tool was used to determine whether
a device is a telecontrol. Since telecontrol services can be
added by dynamic licensing, the tool is no longer needed.

################################################################################

Firmware Release 03.08.08 (99)

System:
Expand Down
67 changes: 54 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#######################################################################################################################
#######################################################################################################################
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
Expand All @@ -24,7 +24,6 @@ BUILDTYPE ?= development
IMAGE_DIR ?= $(PLATFORMDIR)/images
OUT_DIR ?= $(IMAGE_DIR)
PLATFORM ?= $(shell echo $(PTXCONF_PLATFORM))
SELECTED_PTXCONFIG ?= $(shell basename `readlink selected_ptxconfig`)
SD_ACTIVATED = $(shell echo "$(PTXCONF_IMAGE_SD)$(PTXCONF_IMAGE_SRC_SD)" | grep --only-matching y)
ifeq ($(PLATFORM),wago-pfc-adv)
PRODUCTION_ACTIVATED = $(shell echo "$(PTXCONF_IMAGE_PRODUCTION)")
Expand Down Expand Up @@ -53,19 +52,28 @@ FIRMWARE_SVNREVISION := $(shell cat $(TARGETROOT)/etc/SVNREVISION | head -n1 | c

# Map platform/project names to more user friendly target names
ifeq ($(PLATFORM),wago-pfcXXX)
ifeq ($(SELECTED_PTXCONFIG),ptxconfig_pfc_g2)
ifdef PTXCONF_PFC_200_G2
FIRMWARE_PLATFORM ?= PFC-G2-Linux
else
FIRMWARE_PLATFORM ?= PFC-Linux
endif
else ifeq ($(PLATFORM),wago-pfc-adv)
FIRMWARE_PLATFORM ?= PFC_ADV-Linux
else ifeq ($(PLATFORM),wago-pfcXXX-hardened)
FIRMWARE_PLATFORM ?= PFC_Hardened-Linux
ifdef PTXCONF_PFC_200_G2
FIRMWARE_PLATFORM ?= PFC-G2-Linux-hardened
else
FIRMWARE_PLATFORM ?= PFC-Linux-hardened
endif
else ifeq ($(PLATFORM),vtp-ctp)
FIRMWARE_PLATFORM ?= TP-Linux
else ifeq ($(PLATFORM),cc100)
FIRMWARE_PLATFORM ?= CC100-Linux
fsbl := stm32mp1-tf-a-stm32mp151-cc100.stm32
DIST_TARGETS += $(OUT_DIR)/$(fsbl)
$(OUT_DIR)/$(fsbl): $(IMAGE_DIR)/$(fsbl) | $(OUT_DIR)
@echo "Create cc100 fsbl $(fsbl) by copy: $<"
cp $< $@
else
FIRMWARE_PLATFORM ?= $(PLATFORM)_$(PROJECT)
endif
Expand Down Expand Up @@ -118,18 +126,25 @@ RAUC_DISTINCT_KEYRING = $(RAUC_CERTIFICATE)
# Lazy packages to build
ADDITIONAL_PACKAGES ?= $(shell ptxdist print LAZY_PACKAGES-y | sed 's/host-[^ ]*//g' | sed 's/cross-[^ ]*//g')

# Downgrade images
# genimage configs
GENIMAGE_CONFIGS := $(addprefix $(OUT_DIR)/,$(notdir $(wildcard $(IMAGE_DIR)/*.config)))

# Specific downgrade and production images
ifeq ($(PLATFORM),$(filter $(PLATFORM),wago-pfcXXX wago-pfcXXX-hardened))
ifdef PTXCONF_PFC_200_G2
PRODUCTION_IMAGES += $(OUT_DIR)/emmc-wago-production-pfc200v3_$(IMAGE_ID).img
PRODUCTION_IMAGES += $(OUT_DIR)/emmc-commission-pfc200v3_$(IMAGE_ID).img
else
DOWNGRADE_IMAGES += $(OUT_DIR)/sd-downgrade-firmware-02-pfc200_$(IMAGE_ID).img
DOWNGRADE_IMAGES += $(OUT_DIR)/sd-downgrade-firmware-03-pfc200_$(IMAGE_ID).img
DOWNGRADE_IMAGES += $(OUT_DIR)/sd-downgrade-firmware-04-pfc200_$(IMAGE_ID).img

# Production images
ifneq ($(PLATFORM),wago-pfc-adv)
PRODUCTION_IMAGES += $(OUT_DIR)/nand-wago-production-pfc100_$(IMAGE_ID).ubi
PRODUCTION_IMAGES += $(OUT_DIR)/nand-wago-production-pfc200_$(IMAGE_ID).img
PRODUCTION_IMAGES += $(OUT_DIR)/nand-wago-production-pfc200v2_$(IMAGE_ID).ubi
PRODUCTION_IMAGES += $(OUT_DIR)/emmc-wago-production-pfc200v3_$(IMAGE_ID).img
PRODUCTION_IMAGES += $(OUT_DIR)/emmc-commission-pfc200v3_$(IMAGE_ID).img
endif
endif

ifneq ($(PLATFORM),wago-pfc-adv)
PRODUCTION_IMAGES += $(OUT_DIR)/firmware_$(IMAGE_ID).hex
else
PRODUCTION_IMAGES += $(OUT_DIR)/production_$(IMAGE_ID).zip
Expand All @@ -145,7 +160,12 @@ FW_DESC_FILES += $(OUT_DIR)/REVISIONS
IMAGES_ARCHIVE += $(OUT_DIR)/images_$(IMAGE_ID).tar.gz
ROOT_DEBUG_ARCHIVE += $(OUT_DIR)/root-debug_$(IMAGE_ID).tar.gz

INDEX ?= $(OUT_DIR)/index.json
INDEX_GENERATOR ?= shared_public/build/create_index.sh

# Select default dist targets
DIST_TARGETS += $(OUT_DIR)/root.tgz
DIST_TARGETS += $(GENIMAGE_CONFIGS)
DIST_TARGETS ?=
DIST_TARGETS += $(FW_DESC_FILES)
ifeq ($(SD_ACTIVATED),y)
Expand All @@ -164,10 +184,10 @@ DIST_TARGETS += $(WUP)
endif
ifneq ($(IMAGE_DIR),$(OUT_DIR))
# Don't create archives when executed locally
DIST_TARGETS += $(IMAGES_ARCHIVE)
#DIST_TARGETS += $(IMAGES_ARCHIVE)
DIST_TARGETS += $(ROOT_DEBUG_ARCHIVE)
endif

#DIST_TARGETS += $(INDEX)

.PHONY: default
default: dist
Expand All @@ -180,7 +200,7 @@ default: dist

# Main targets
#######################################################################################################################
.PHONY: dist distclean sdcard wup updatefile updatepack production_images downgrade_images additional_packages fw_desc_files
.PHONY: dist distclean sdcard wup updatefile updatepack production_images downgrade_images additional_packages fw_desc_files index


dist: $(DIST_TARGETS) additional_packages
Expand All @@ -200,6 +220,8 @@ fw_desc_files: $(FW_DESC_FILES)
additional_packages:
ptxdist targetinstall $(ADDITIONAL_PACKAGES)

index: $(INDEX)

distclean:
rm -f $(DIST_TARGETS) \
&& rm -f $(OUT_DIR)/ptxdist.images.stage
Expand Down Expand Up @@ -247,6 +269,14 @@ $(OUT_DIR)/production_$(IMAGE_ID).zip: $(IMAGE_DIR)/production.zip | $(OUT_DIR)
@echo "Create versioned production image by copy: $<"
cp $< $@

$(OUT_DIR)/%.config: $(IMAGE_DIR)/%.config | $(OUT_DIR)
@echo "Create image configs by copy: $<"
cp $< $@

$(OUT_DIR)/root.tgz: $(IMAGE_DIR)/root.tgz | $(OUT_DIR)
@echo "Create versioned root.tgz and image configs by copy: $<"
cp $< $@

$(IMAGES_ARCHIVE): $(OUT_DIR)/ptxdist.images.stage | $(OUT_DIR)
@echo "Create image archive"
tar -cvzf $@ -C $(IMAGE_DIR) .
Expand Down Expand Up @@ -285,6 +315,17 @@ $(WUP_CONTROLFILE): $(WUP_CONTROLFILE_SCHEMA) $(WUP_CONTROLFILE_GENERATOR) $(RAU
$(FIRMWARE_PLATFORM)\
&& $(XMLSTARLET) validate --xsd $< $@

$(INDEX): $(INDEX_GENERATOR) Makefile | $(OUT_DIR)
$(INDEX_GENERATOR) $@ $(FIRMWARE_PLATFORM)\
$(FIRMWARE_REVISION_MAJOR)\
$(FIRMWARE_REVISION_MINOR)\
$(FIRMWARE_REVISION_BUGFIX)\
$(FIRMWARE_RELEASE_INDEX)\
$(FIRMWARE_SVNREVISION) \
$(SD_IMAGE) \
$(RAUC_UPDATEFILE)\
$(WUP)\

$(OUT_DIR):
mkdir -p $@

Expand Down
17 changes: 6 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ Therefore WAGO recommends familiarity with the following topics for the future e
Helpful when heard about:
- Realtime operating systems
- PTXdist,
- Eclipse-CDT
- ARM architecture
- Bootloader

Expand Down Expand Up @@ -438,16 +437,12 @@ As usual, you can:
>opkg install <pkg-name>.ipk
```
- Utilize Web-Based-Management(WBM) feature "Software-Upload" to upload and apply "<pkg-name>.ipk".
- Use Eclipse-CDT for remote debugging

**CAUTION:\
Every binary or installation package(.ipk) is generated for a specific firmware version,
do not mix up different versions.**

### 10.1) For larger projects/packages we recommend using an Integrated-Development-Environment(IDE)
We recommend ECLIPSE-CDT, see "HowTo_UtilizeEclipseCDT".

### 10.2) Small projects/packages can be managed from command line interface as follows:
### 10.1) Projects/packages can be managed from command line interface as follows:
Open 4 shell sessions on your development host(Ubuntu16.04).
- First shell used to open source code files within an editor like vim or gedit
```
Expand Down Expand Up @@ -483,22 +478,22 @@ For the next round trip:
7. Switch to the fourth shell and use the cursor-up-key to call the last command…
8. Start executable on PFC

### 10.3) Using Web-Based-Management(WBM) feature "Software-Upload" for upload and applying IPK packages
### 10.2) Using Web-Based-Management(WBM) feature "Software-Upload" for upload and applying IPK packages
Tool "ptxdist" automatically generates an ".ipk" file for each package during build process.
#### 10.3.1) Start your local browser, and navigate to PFC200's default homepage(WBM)
#### 10.2.1) Start your local browser, and navigate to PFC200's default homepage(WBM)
```
https://ip.address.assigned.by.dhcp
```
Ignore Cert-Warning ...
#### 10.3.2) Select "Software-Upload" in left hand "Navigation" pane, You will be requested to authenticate!
#### 10.2.2) Select "Software-Upload" in left hand "Navigation" pane, You will be requested to authenticate!
```
Login as "admin" with password "wago" (default)
```
#### 10.3.3) Click on button [Browse...] and open the local file dialog.
#### 10.2.3) Click on button [Browse...] and open the local file dialog.
Browse to folder "~/wago/ptxproj/platform-wago-pfcXXX/packages/"\
Select package to install or update, here "kbusdemo_0.3_arm.ipk".

#### 10.3.4) Click on button [Start Upload].
#### 10.2.4) Click on button [Start Upload].
Transfers selected file into PFC file system and show button [Activate].

#### 10.3.5) In newly shown section "Activate new software", click on button [Activate] install package.
Expand Down
59 changes: 54 additions & 5 deletions config/qt5/linux-ptx-g++/qmake.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,66 @@ include(../common/linux.conf)
include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)

#EGLFS_PLATFORM_HOOKS_SOURCES = $$PWD/qeglfshooks_imx6.cpp

SYSROOT_DIR = USER_SYSROOT_DIR
CROSS = CROSS_PREFIX

# settings for hardfloat
DISTRO_OPTS += "hard-float"
#QMAKE_CXXFLAGS += -O3 -march=armv7-a -mtune=cortex-a9 -mfpu=neon -mfloat-abi=hard -DLINUX=1 -DEGL_API_FB=1 --sysroot=/opt/OSELAS.Toolchain-2014.12.2/arm-v7a-linux-gnueabihf/gcc-4.9.2-glibc-2.20-binutils-2.24-kernel-3.16-sanitized/sysroot-arm-v7a-linux-gnueabihf -L/opt/OSELAS.Toolchain-2014.12.2/arm-v7a-linux-gnueabihf/gcc-4.9.2-glibc-2.20-binutils-2.24-kernel-3.16-sanitized/sysroot-arm-v7a-linux-gnueabihf/usr/lib
#QMAKE_CFLAGS += -O3 -march=armv7-a -mtune=cortex-a9 -mfpu=neon -mfloat-abi=hard -DLINUX=1 -DEGL_API_FB=1 --sysroot=/opt/OSELAS.Toolchain-2014.12.2/arm-v7a-linux-gnueabihf/gcc-4.9.2-glibc-2.20-binutils-2.24-kernel-3.16-sanitized/sysroot-arm-v7a-linux-gnueabihf -L/opt/OSELAS.Toolchain-2014.12.2/arm-v7a-linux-gnueabihf/gcc-4.9.2-glibc-2.20-binutils-2.24-kernel-3.16-sanitized/sysroot-arm-v7a-linux-gnueabihf/usr/lib
#QMAKE_CXXFLAGS += -O3 -march=armv7-a -mtune=cortex-a9 -mfpu=vfpv3 -mfloat-abi=hard -DLINUX=1 -DEGL_API_FB=1 --sysroot=/opt/OSELAS.Toolchain-2014.12.2/arm-v7a-linux-gnueabihf/gcc-4.9.2-glibc-2.20-binutils-2.24-kernel-3.16-sanitized/sysroot-arm-v7a-linux-gnueabihf -L/opt/OSELAS.Toolchain-2014.12.2/arm-v7a-linux-gnueabihf/gcc-4.9.2-glibc-2.20-binutils-2.24-kernel-3.16-sanitized/sysroot-arm-v7a-linux-gnueabihf/usr/lib
#QMAKE_CFLAGS += -O3 -march=armv7-a -mtune=cortex-a9 -mfpu=vfpv3 -mfloat-abi=hard -DLINUX=1 -DEGL_API_FB=1 --sysroot=/opt/OSELAS.Toolchain-2014.12.2/arm-v7a-linux-gnueabihf/gcc-4.9.2-glibc-2.20-binutils-2.24-kernel-3.16-sanitized/sysroot-arm-v7a-linux-gnueabihf -L/opt/OSELAS.Toolchain-2014.12.2/arm-v7a-linux-gnueabihf/gcc-4.9.2-glibc-2.20-binutils-2.24-kernel-3.16-sanitized/sysroot-arm-v7a-linux-gnueabihf/usr/lib
QMAKE_CXXFLAGS += -O3 -march=armv7-a -mtune=cortex-a9 -mfpu=vfpv3 -mfloat-abi=hard -DLINUX=1 -DEGL_API_FB=1 -DXCB_USE_EGL -DXCB_USE_GLX
QMAKE_CFLAGS += -O3 -march=armv7-a -mtune=cortex-a9 -mfpu=vfpv3 -mfloat-abi=hard -DLINUX=1 -DEGL_API_FB=1 -DXCB_USE_EGL -DXCB_USE_GLX

#./configure CFLAGS=--sysroot=/ LDFLAGS=--sysroot=/ --disable-qt --disable-gtk --build i686-pc-linux-gnu --host arm-linux-gnueabi

#settings for softfloat
#QMAKE_CXXFLAGS += -O3 -march=armv7-a -mtune=cortex-a9 -mfpu=neon -mfloat-abi=softfp -DLINUX=1 -DEGL_API_FB=1 --sysroot=/opt/OSELAS.Toolchain-2014.12.2/arm-v7a-linux-gnueabi/gcc-4.9.2-glibc-2.20-binutils-2.24-kernel-3.16-sanitized/sysroot-arm-v7a-linux-gnueabi -L/opt/OSELAS.Toolchain-2014.12.2/arm-v7a-linux-gnueabi/gcc-4.9.2-glibc-2.20-binutils-2.24-kernel-3.16-sanitized/sysroot-arm-v7a-linux-gnueabi/usr/lib
#QMAKE_CFLAGS += -O3 -march=armv7-a -mtune=cortex-a9 -mfpu=neon -mfloat-abi=softfp -DLINUX=1 -DEGL_API_FB=1 --sysroot=/opt/OSELAS.Toolchain-2014.12.2/arm-v7a-linux-gnueabi/gcc-4.9.2-glibc-2.20-binutils-2.24-kernel-3.16-sanitized/sysroot-arm-v7a-linux-gnueabi -L/opt/OSELAS.Toolchain-2014.12.2/arm-v7a-linux-gnueabi/gcc-4.9.2-glibc-2.20-binutils-2.24-kernel-3.16-sanitized/sysroot-arm-v7a-linux-gnueabi/usr/lib

# modifications to g++-base.conf
QMAKE_CC = @COMPILER_PREFIX@gcc
QMAKE_CC = $${CROSS}gcc
QMAKE_LINK_C = $$QMAKE_CC
QMAKE_LINK_C_SHLIB = $$QMAKE_CC
QMAKE_CXX = @COMPILER_PREFIX@g++
QMAKE_CXX = $${CROSS}g++
QMAKE_LINK = $$QMAKE_CXX
QMAKE_LINK_SHLIB = $$QMAKE_CXX

# modifications to linux.conf
QMAKE_AR = @COMPILER_PREFIX@ar cqs
QMAKE_OBJCOPY = @COMPILER_PREFIX@objcopy
QMAKE_NM = @COMPILER_PREFIX@nm -P
QMAKE_AR = $${CROSS}ar cqs
QMAKE_OBJCOPY = $${CROSS}objcopy
QMAKE_NM = $${CROSS}nm -P

QMAKE_INCDIR_OPENGL_ES2 = $${SYSROOT_DIR}/usr/include
QMAKE_INCDIR_OPENGL_ES2 += $${SYSROOT_DIR}/usr/include/libdrm
QMAKE_LIBDIR_OPENGL_ES2 = $${SYSROOT_DIR}/usr/lib
QMAKE_LIBS_OPENGL_ES2 = -lEGL -lGLESv2

QMAKE_INCDIR_EGL = $${QMAKE_INCDIR_OPENGL_ES2}
QMAKE_LIBDIR_EGL = $${QMAKE_LIBDIR_OPENGL_ES2}
QMAKE_LIBDIR = $${QMAKE_LIBDIR_OPENGL_ES2}

QMAKE_LIBS_EGL = $${QMAKE_LIBS_OPENGL_ES2}
QMAKE_LIBS +="-L$${SYSROOT_DIR}/usr/lib -L$$SYSROOT_DIR/lib"
QMAKE_LIBS +=-lrt -lpthread -ldl -lm -lc
QMAKE_LFLAGS += -Wl,-rpath-link,$${SYSROOT_DIR}/lib \
-Wl,-rpath-link,$${SYSROOT_DIR}/usr/lib

QMAKE_INCDIR += $${QMAKE_INCDIR_OPENGL_ES2}
QMAKE_INCDIR += $${SYSROOT_DIR}/usr/include/freetype2
QMAKE_INCDIR += $${SYSROOT_DIR}/usr/include/dbus-1.0
QMAKE_INCDIR += $${SYSROOT_DIR}/usr/include/glib-2.0
QMAKE_INCDIR += $${SYSROOT_DIR}/usr/include/gstreamer-1.0
QMAKE_INCDIR += $${SYSROOT_DIR}/usr/include/libxml2
QMAKE_INCDIR += $${SYSROOT_DIR}/usr/include/openssl

#PKG_CONFIG_SYSROOT_DIR = $${SYSROOT_DIR}
#PKG_CONFIG = $${SYSROOT_DIR}/../sysroot-cross/bin/pkg-config

QT_QPA_DEFAULT_PLATFORM = xcb
QT_XCB_GL_INTEGRATION = xcb_egl

load(qt_config)
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
image @IMAGE@ {
vfat {
extraargs="-n BOOT -i 7761676F"
file mlo.pfc100 { image = "MLO.am33xx-pfc-750-810x"}
file mlo.pfc200 { image = "MLO.am35xx-pfc-750-820x"}
file mlo.pfc200v2 { image = "MLO.am33xx-pfc-750-8208"}
file mlo.pfc200v3 { image = "MLO.am33xx-pfc-750-821x"}
file barebox.bin.pfc100 { image = "barebox.bin.am33xx-pfc-750-810x" }
file barebox.bin.pfc200 { image = "barebox.bin.am35xx-pfc-750-820x" }
file barebox.bin.pfc200v2 { image = "barebox.bin.am33xx-pfc-750-8208" }
file barebox.bin.pfc200v3 { image = "barebox.bin.am33xx-pfc-750-821x" }
file mlo.pfc100 { image = "barebox-am33xx-pfc-750-810x-mlo.img"}
file mlo.pfc200 { image = "barebox-am35xx-pfc-750-820x-mlo.img"}
file mlo.pfc200v2 { image = "barebox-am33xx-pfc-750-8208-mlo.img"}
file mlo.pfc200v3 { image = "barebox-am33xx-pfc-750-821x-mlo.img"}
file barebox.bin.pfc100 { image = "barebox-am33xx-pfc-750-810x.img" }
file barebox.bin.pfc200 { image = "barebox-am35xx-pfc-750-820x.img" }
file barebox.bin.pfc200v2 { image = "barebox-am33xx-pfc-750-8208.img" }
file barebox.bin.pfc200v3 { image = "barebox-am33xx-pfc-750-821x.img" }
file uImage { image = "uImage" }
}
name = boot-mlo
Expand Down
4 changes: 2 additions & 2 deletions configs/wago-pfcXXX/config/images/data-ubi_g2.config
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ image @IMAGE@ {

image ubi_rootfs.ubifs {
ubifs {}
# size is 800 in LEBs
size = 100800k
# size is 1000 in LEBs (which are 126)
size = 126000k
mountpoint = "/"
}

Expand Down
Loading

0 comments on commit 2193b67

Please sign in to comment.