From 23e0d69dda334d3dcea816570e39575c3478c9ff Mon Sep 17 00:00:00 2001 From: Jernej Skrabec Date: Mon, 1 Mar 2021 22:57:26 +0100 Subject: [PATCH 1/2] Allwinner: Fix memory issues on 32-bit SoCs --- projects/Allwinner/devices/H3/options | 3 +++ projects/Allwinner/devices/R40/options | 3 +++ projects/Allwinner/linux/linux.arm.conf | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/projects/Allwinner/devices/H3/options b/projects/Allwinner/devices/H3/options index 236844cb3f..f193528da5 100644 --- a/projects/Allwinner/devices/H3/options +++ b/projects/Allwinner/devices/H3/options @@ -51,3 +51,6 @@ # set the addon project ADDON_PROJECT="ARMv7" + + # additional kernel parameters + EXTRA_CMDLINE="$EXTRA_CMDLINE vmalloc=320M" diff --git a/projects/Allwinner/devices/R40/options b/projects/Allwinner/devices/R40/options index 0b2e10dbb4..979bb72b37 100644 --- a/projects/Allwinner/devices/R40/options +++ b/projects/Allwinner/devices/R40/options @@ -48,3 +48,6 @@ # set the addon project ADDON_PROJECT="ARMv7" + + # additional kernel parameters + EXTRA_CMDLINE="$EXTRA_CMDLINE vmalloc=320M" diff --git a/projects/Allwinner/linux/linux.arm.conf b/projects/Allwinner/linux/linux.arm.conf index ae0f7351ab..bb26fea8c7 100644 --- a/projects/Allwinner/linux/linux.arm.conf +++ b/projects/Allwinner/linux/linux.arm.conf @@ -5939,7 +5939,7 @@ CONFIG_DMA_CMA=y # # Default contiguous memory area size: # -CONFIG_CMA_SIZE_MBYTES=256 +CONFIG_CMA_SIZE_MBYTES=320 CONFIG_CMA_SIZE_SEL_MBYTES=y # CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set # CONFIG_CMA_SIZE_SEL_MIN is not set From feed0c53ee08d19810211cd8351d9725d2946f62 Mon Sep 17 00:00:00 2001 From: Jernej Skrabec Date: Mon, 1 Mar 2021 22:58:19 +0100 Subject: [PATCH 2/2] Allwinner: Add workaround to install script Not all builds provide bootloader binary. Copy U-Boot from running system instead. --- projects/Allwinner/filesystem/usr/bin/install2emmc | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/projects/Allwinner/filesystem/usr/bin/install2emmc b/projects/Allwinner/filesystem/usr/bin/install2emmc index b2c3b3d6de..84959c5b6f 100755 --- a/projects/Allwinner/filesystem/usr/bin/install2emmc +++ b/projects/Allwinner/filesystem/usr/bin/install2emmc @@ -11,11 +11,6 @@ UUID_STORAGE="$(uuidgen)" BOOT=$(grep /flash /proc/mounts | awk '{print $1}' | sed 's/p[012]//g') DISK="" -if [ ! -f /usr/share/bootloader/u-boot-sunxi-with-spl.bin ]; then - echo "U-Boot not found. Please update current installation with board specific update or image first." - exit 1 -fi - for TYPE in /sys/class/block/mmcblk*/device/type; do if grep -q "MMC" "${TYPE}"; then DISK="/dev/$(echo "${TYPE}" | awk -F/ '{print $5}')" @@ -77,7 +72,7 @@ mkfs.ext4 -L STORAGE -U ${UUID_STORAGE} ${DISK}p2 > /dev/null 2>&1 sync echo "Installing bootloader" -dd if=/usr/share/bootloader/u-boot-sunxi-with-spl.bin of="${DISK}" bs=1k seek=8 conv=fsync > /dev/null 2>&1 +dd if="${BOOT}" skip=8 of="${DISK}" bs=1k seek=8 count=768 conv=fsync > /dev/null 2>&1 echo "Copying system files"