Commit 24990d35 authored by Josua Mayer's avatar Josua Mayer

u-boot: change ramdisk load address to support large initrd

Also fix buildroot compile error when running as root, and allow using a
local mirror.
Signed-off-by: default avatarJosua Mayer <josua@solid-run.com>
parent 93536f42
From 030b8666f0ed5a4aa9c56487b9b3cebfa83328e6 Mon Sep 17 00:00:00 2001
From: Josua Mayer <josua@solid-run.com>
Date: Thu, 28 Apr 2022 13:44:12 +0300
Subject: [PATCH] lx2160a_common: change ramdisk_addr_r to after kernel_addr_r
To allow for larger ramdisks, change the load address from
0x09000000 to 0x85100000 - which is exactly 64MB after kernel_addr_r.
This solves errors when loading a large ramdisk, such as:
Found /extlinux/extlinux.conf
Retrieving file: /extlinux/extlinux.conf
144 bytes read in 3 ms (46.9 KiB/s)
1: Debian-Installer
Retrieving file: /initrd.gz
** Reading file would overwrite reserved memory **
Signed-off-by: Josua Mayer <josua@solid-run.com>
---
include/configs/lx2160a_common.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/configs/lx2160a_common.h b/include/configs/lx2160a_common.h
index 2f3b12a575..dc428c6f49 100644
--- a/include/configs/lx2160a_common.h
+++ b/include/configs/lx2160a_common.h
@@ -240,8 +240,8 @@ int select_i2c_ch_pca9547_sec(unsigned char ch);
#define EXTRA_ENV_SETTINGS \
"hwconfig=fsl_ddr:bank_intlv=auto\0" \
- "ramdisk_addr=0x9000000\0" \
- "ramdisk_addr_r=0x9000000\0" \
+ "ramdisk_addr=0x85100000\0" \
+ "ramdisk_addr_r=0x85100000\0" \
"ramdisk_size=0x2000000\0" \
"fdt_high=0xa0000000\0" \
"initrd_high=0xffffffffffffffff\0" \
--
2.34.1
...@@ -20,6 +20,7 @@ BUILDROOT_VERSION=2020.02.1 ...@@ -20,6 +20,7 @@ BUILDROOT_VERSION=2020.02.1
: ${SECURE:=false} : ${SECURE:=false}
: ${ATF_DEBUG:=false} : ${ATF_DEBUG:=false}
: ${DISTRO:=ubuntu} : ${DISTRO:=ubuntu}
: ${BR2_PRIMARY_SITE:=} # custom buildroot mirror
if [ "x$SHALLOW" == "xtrue" ]; then if [ "x$SHALLOW" == "xtrue" ]; then
SHALLOW_FLAG="--depth 1" SHALLOW_FLAG="--depth 1"
...@@ -215,7 +216,11 @@ if [[ ! -f $ROOTDIR/build/ubuntu-core.ext4 ]] && [ "x$DISTRO" == "xubuntu" ]; th ...@@ -215,7 +216,11 @@ if [[ ! -f $ROOTDIR/build/ubuntu-core.ext4 ]] && [ "x$DISTRO" == "xubuntu" ]; th
git clone $SHALLOW_FLAG https://github.com/buildroot/buildroot -b $BUILDROOT_VERSION git clone $SHALLOW_FLAG https://github.com/buildroot/buildroot -b $BUILDROOT_VERSION
fi fi
cd buildroot cd buildroot
if [ $UID -eq 0 ]; then
export FORCE_UNSAFE_CONFIGURE=1
fi
cp $ROOTDIR/configs/buildroot/lx2160acex7_defconfig configs/ cp $ROOTDIR/configs/buildroot/lx2160acex7_defconfig configs/
printf 'BR2_PRIMARY_SITE="%s"\n' "${BR2_PRIMARY_SITE}" >> configs/lx2160acex7_defconfig
make lx2160acex7_defconfig make lx2160acex7_defconfig
mkdir -p overlay/etc/init.d/ mkdir -p overlay/etc/init.d/
cat > overlay/etc/init.d/S99bootstrap-ubuntu.sh << EOF cat > overlay/etc/init.d/S99bootstrap-ubuntu.sh << EOF
...@@ -267,7 +272,11 @@ if [[ ! -f $ROOTDIR/build/debian-bullseye.ext4 ]] && [ "x$DISTRO" == "xdebian" ] ...@@ -267,7 +272,11 @@ if [[ ! -f $ROOTDIR/build/debian-bullseye.ext4 ]] && [ "x$DISTRO" == "xdebian" ]
git clone $SHALLOW_FLAG https://github.com/buildroot/buildroot -b $BUILDROOT_VERSION git clone $SHALLOW_FLAG https://github.com/buildroot/buildroot -b $BUILDROOT_VERSION
fi fi
cd buildroot cd buildroot
if [ $UID -eq 0 ]; then
export FORCE_UNSAFE_CONFIGURE=1
fi
cp $ROOTDIR/configs/buildroot/lx2160acex7_defconfig configs/ cp $ROOTDIR/configs/buildroot/lx2160acex7_defconfig configs/
printf 'BR2_PRIMARY_SITE="%s"\n' "${BR2_PRIMARY_SITE}" >> configs/lx2160acex7_defconfig
make lx2160acex7_defconfig make lx2160acex7_defconfig
mkdir -p overlay/etc/init.d/ mkdir -p overlay/etc/init.d/
cat > overlay/etc/init.d/S99bootstrap-debian.sh << EOF cat > overlay/etc/init.d/S99bootstrap-debian.sh << EOF
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment