Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebased bsp update #88

Draft
wants to merge 20 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
7975e84
layers/meta-fsl-bsp-release: Remove submodule
vicgal Oct 22, 2021
1615a13
layers/meta-freescale-3rdparty: Add submodule
vicgal Oct 22, 2021
620e2ce
layers/meta-freescale-distro: Add submodule
vicgal Oct 22, 2021
98dcb36
layers/meta-imx: Add submodule
vicgal Oct 22, 2021
a525317
layers/meta-python2: Add submodule
vicgal Oct 22, 2021
6c18a58
layers/meta-compulab: Add submodule
vicgal Oct 22, 2021
24c3a2a
layers/meta-compulab-bsp: Add submodule
vicgal Oct 22, 2021
5847a3a
conf: Switch from warrior to dunfell
vicgal Oct 22, 2021
5117920
Switch to zeus bsp provided by compulab
vicgal Oct 22, 2021
33ab43d
meta-freescale: Switch to compatible BSP version
vicgal Oct 22, 2021
73ac002
meta-openembedded: Switch to compatible BSP version
vicgal Oct 22, 2021
1f697ad
meta-rust: Switch to compatible BSP version
vicgal Oct 22, 2021
e767fff
poky: Switch to compatible BSP version
vicgal Oct 22, 2021
2afb51e
coffee: Update cl-som-imx8 and etcher-pro yocto version
vicgal Oct 22, 2021
f9824ed
recipes-bs/imx-atf: Remove 1.5 and 2.0 recipes
vicgal Oct 22, 2021
8f89029
recipes-bsp/u-boot: Integration with new BSP (meta-bsp-imx8mq)
vicgal Oct 22, 2021
4c22a68
recipes-kernel/linux-imx: Integration with new BSP (meta-bsp-imx8mq)
vicgal Oct 22, 2021
67789b6
recipes-graphics: Add mesa and imx-gpu-viv dependencies
vicgal Oct 22, 2021
41fabaf
recipes-core: Increase IMAGE_ROOTFS_MAXSIZE to 40960
vicgal Oct 22, 2021
ccd79cb
recipes-core: Override do_image_create_sdcard_symlink method
vicgal Oct 25, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,27 @@
[submodule "layers/meta-bsp-imx8mq"]
path = layers/meta-bsp-imx8mq
url = https://github.com/compulab-yokneam/meta-bsp-imx8mq.git
[submodule "layers/meta-fsl-bsp-release"]
path = layers/meta-fsl-bsp-release
url = https://source.codeaurora.org/external/imx/meta-fsl-bsp-release
[submodule "layers/meta-openembedded"]
path = layers/meta-openembedded
url = https://github.com/openembedded/meta-openembedded.git
[submodule "layers/poky"]
path = layers/poky
url = https://github.com/balena-os/poky
[submodule "layers/meta-freescale-3rdparty"]
path = layers/meta-freescale-3rdparty
url = git://github.com/Freescale/meta-freescale-3rdparty
[submodule "layers/meta-freescale-distro"]
path = layers/meta-freescale-distro
url = git://github.com/Freescale/meta-freescale-distro
[submodule "layers/meta-imx"]
path = layers/meta-imx
url = https://source.codeaurora.org/external/imx/meta-imx
[submodule "layers/meta-python2"]
path = layers/meta-python2
url = git://git.openembedded.org/meta-python2
[submodule "layers/meta-compulab"]
path = layers/meta-compulab
url = https://github.com/compulab-yokneam/meta-compulab
[submodule "layers/meta-compulab-bsp"]
path = layers/meta-compulab-bsp
url = https://github.com/compulab-yokneam/meta-compulab-bsp
2 changes: 1 addition & 1 deletion cl-som-imx8.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module.exports =
machine: 'cl-som-imx8'
image: 'balena-image-flasher'
fstype: 'balenaos-img'
version: 'yocto-sumo'
version: 'yocto-dunfell'
deployArtifact: 'balena-image-flasher-cl-som-imx8.balenaos-img'
compressed: true

Expand Down
2 changes: 1 addition & 1 deletion etcher-pro.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ module.exports =
machine: 'etcher-pro'
image: 'balena-image-flasher'
fstype: 'balenaos-img'
version: 'yocto-sumo'
version: 'yocto-dunfell'
deployArtifact: 'balena-image-flasher-etcher-pro.balenaos-img'
compressed: true

Expand Down
29 changes: 21 additions & 8 deletions layers/meta-balena-compulab/conf/layer.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,27 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
BBFILE_COLLECTIONS += "balena-compulab"
BBFILE_PATTERN_balena-compulab := "^${LAYERDIR}/"
BBFILE_PRIORITY_balena-compulab = "1337"
LAYERSERIES_COMPAT_balena-compulab = "warrior"
LAYERSERIES_COMPAT_balena-compulab = "dunfell"

SERIAL_CONSOLES_cl-som-imx8 = "115200;ttymxc2"

BBMASK += "gstreamer*/*"
BBMASK += "wayland*/*"
BBMASK += "compulab-qt5-build-env.bb"
BBMASK += "chromium/chromium_%.bbappend"
BBMASK += "firmware-imx/firmware-imx_7.5.bb"
BBMASK += "chromium/chromium-ozone-wayland_%.bbappend"
BBMASK += "imx/meta-bsp/recipes-connectivity/openssl/openssl_1.1.1b.bbappend"
BBMASK += "imx/meta-bsp/recipes-kernel/linux-firmware/linux-firmware_git.bbappend"
BBMASK += "imx/meta-bsp/recipes-bsp/imx-atf/imx-atf_2.0.bb"
BBMASK += "imx/meta-bsp/recipes-bsp/imx-mkimage/*"
BBMASK += "nfs-utils/nfs-utils_2.4.1.bbappend"
BBMASK += "sysvinit/sysvinit_2.88dsf.bbappend"
BBMASK += "recipes-graphics/vulkan/assimp_4.1.0.bbappend"
BBMASK += "recipes-multimedia/dvb-apps/dvb-apps_%.bbappend"
BBMASK += "pulseaudio/pulseaudio_12.2.bbappend"
BBMASK += "kernel-module-imx-gpu-viv_6.4.0.p1.0.bbappend"
BBMASK += "meta-freescale/recipes-graphics/cairo/*"

SERIAL_CONSOLES_cl-som-imx8 = "115200;ttymxc2"
LAYERSERIES_COMPAT_compulab-bsp-imx8mq_append = " dunfell"
LAYERSERIES_COMPAT_freescale-layer_append = " dunfell"
LAYERSERIES_COMPAT_fsl-bsp-release_append = " dunfell"
LAYERSERIES_COMPAT_fsl-arm-extra_append = " dunfell"
LAYERSERIES_COMPAT_fsl-demos_append = " dunfell"
LAYERSERIES_COMPAT_rust-layer_append = " dunfell"
LAYERSERIES_COMPAT_fsl-sdk-release_append = " dunfell"
LAYERSERIES_COMPAT_meta-ml_append = " dunfell"
12 changes: 5 additions & 7 deletions layers/meta-balena-compulab/conf/machine/etcher-pro.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@
MACHINEOVERRIDES = "cl-som-imx8:${MACHINE}"
include conf/machine/cl-som-imx8.conf

PREFERRED_PROVIDER_virtual/bootloader = "u-boot-imx"
PREFERRED_VERSION_u-boot-imx = "2018.03"

PREFERRED_PROVIDER_virtual/kernel = "linux-imx"
PREFERRED_VERSION_linux-imx = "4.14.98"

KERNEL_DEVICETREE = "compulab/sbc-imx8-no-wp.dtb"

MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "gov-switch watchdog-config "
MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "gov-switch watchdog-config mesa "

SERIAL_CONSOLES = "115200;ttymxc2"

CONNECTIVITY_FIRMWARES_remove = " \
linux-firmware-bcm43143 \
"
17 changes: 15 additions & 2 deletions layers/meta-balena-compulab/conf/samples/bblayers.conf.sample
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,23 @@ BBLAYERS ?= " \
${TOPDIR}/../layers/meta-openembedded/meta-networking \
${TOPDIR}/../layers/meta-openembedded/meta-python \
${TOPDIR}/../layers/meta-freescale \
${TOPDIR}/../layers/meta-fsl-bsp-release/imx/meta-bsp \
${TOPDIR}/../layers/meta-freescale-3rdparty \
${TOPDIR}/../layers/meta-freescale-distro \
${TOPDIR}/../layers/meta-bsp-imx8mq \
${TOPDIR}/../layers/meta-balena/meta-balena-common \
${TOPDIR}/../layers/meta-balena/meta-balena-warrior \
${TOPDIR}/../layers/meta-balena/meta-balena-dunfell \
${TOPDIR}/../layers/meta-balena-compulab \
${TOPDIR}/../layers/meta-rust \
"

# i.MX Yocto Project Release layers
BBLAYERS += " ${TOPDIR}/../layers/meta-imx/meta-bsp "
BBLAYERS += " ${TOPDIR}/../layers/meta-imx/meta-sdk "
BBLAYERS += " ${TOPDIR}/../layers/meta-imx/meta-ml "

BBLAYERS += " ${TOPDIR}/../layers/meta-python2 "

BBLAYERS += " \
${TOPDIR}/../layers/meta-compulab \
${TOPDIR}/../layers/meta-compulab-bsp/meta-bsp \
"

This file was deleted.

This file was deleted.

82 changes: 0 additions & 82 deletions layers/meta-balena-compulab/recipes-bsp/imx-atf/imx-atf_2.0.bb

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
From 39a759494f734c4cdc3e2b919671bfb3134b41ae Mon Sep 17 00:00:00 2001
From: Paul Emge <[email protected]>
Date: Mon, 8 Jul 2019 16:37:03 -0700
Subject: [PATCH 1/9] CVE-2019-13103: disk: stop infinite recursion in DOS
Partitions

part_get_info_extended and print_partition_extended can recurse infinitely
while parsing a self-referential filesystem or one with a silly number of
extended partitions. This patch adds a limit to the number of recursive
partitions.

Signed-off-by: Paul Emge <[email protected]>

Upstream-Status: Backport[http://git.denx.de/?p=u-boot.git;a=commit;
h=232e2f4fd9a24bf08215ddc8c53ccadffc841fb5]

CVE: CVE-2019-13103

Signed-off-by: Meng Li <[email protected]>
---
disk/part_dos.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)

diff --git a/disk/part_dos.c b/disk/part_dos.c
index 936cee0d36..aae9d95906 100644
--- a/disk/part_dos.c
+++ b/disk/part_dos.c
@@ -23,6 +23,10 @@

#define DOS_PART_DEFAULT_SECTOR 512

+/* should this be configurable? It looks like it's not very common at all
+ * to use large numbers of partitions */
+#define MAX_EXT_PARTS 256
+
/* Convert char[4] in little endian format to the host format integer
*/
static inline unsigned int le32_to_int(unsigned char *le32)
@@ -126,6 +130,13 @@ static void print_partition_extended(struct blk_desc *dev_desc,
dos_partition_t *pt;
int i;

+ /* set a maximum recursion level */
+ if (part_num > MAX_EXT_PARTS)
+ {
+ printf("** Nested DOS partitions detected, stopping **\n");
+ return;
+ }
+
if (blk_dread(dev_desc, ext_part_sector, 1, (ulong *)buffer) != 1) {
printf ("** Can't read partition table on %d:" LBAFU " **\n",
dev_desc->devnum, ext_part_sector);
@@ -191,6 +202,13 @@ static int part_get_info_extended(struct blk_desc *dev_desc,
int i;
int dos_type;

+ /* set a maximum recursion level */
+ if (part_num > MAX_EXT_PARTS)
+ {
+ printf("** Nested DOS partitions detected, stopping **\n");
+ return -1;
+ }
+
if (blk_dread(dev_desc, ext_part_sector, 1, (ulong *)buffer) != 1) {
printf ("** Can't read partition table on %d:" LBAFU " **\n",
dev_desc->devnum, ext_part_sector);
--
2.17.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
From 1d36545e43003f4b1bb3a303a3b468abd482fa2f Mon Sep 17 00:00:00 2001
From: Paul Emge <[email protected]>
Date: Mon, 8 Jul 2019 16:37:05 -0700
Subject: [PATCH 2/9] CVE-2019-13104: ext4: check for underflow in
ext4fs_read_file

in ext4fs_read_file, it is possible for a broken/malicious file
system to cause a memcpy of a negative number of bytes, which
overflows all memory. This patch fixes the issue by checking for
a negative length.

Signed-off-by: Paul Emge <[email protected]>

Upstream-Status: Backport[http://git.denx.de/?p=u-boot.git;a=commit;
h=878269dbe74229005dd7f27aca66c554e31dad8e]

CVE: CVE-2019-13104

Signed-off-by: Meng Li <[email protected]>
---
fs/ext4/ext4fs.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/fs/ext4/ext4fs.c b/fs/ext4/ext4fs.c
index 26db677a1f..c8c8655ed8 100644
--- a/fs/ext4/ext4fs.c
+++ b/fs/ext4/ext4fs.c
@@ -66,13 +66,15 @@ int ext4fs_read_file(struct ext2fs_node *node, loff_t pos,

ext_cache_init(&cache);

- if (blocksize <= 0)
- return -1;
-
/* Adjust len so it we can't read past the end of the file. */
if (len + pos > filesize)
len = (filesize - pos);

+ if (blocksize <= 0 || len <= 0) {
+ ext_cache_fini(&cache);
+ return -1;
+ }
+
blockcnt = lldiv(((len + pos) + blocksize - 1), blocksize);

for (i = lldiv(pos, blocksize); i < blockcnt; i++) {
--
2.17.1

Loading