Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
5b6dc335df | ||
|
7cf605d60e | ||
|
92ae22013b | ||
|
9bb028c044 |
@ -1,5 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# set -x
|
||||||
|
|
||||||
COMMAND="$1"
|
COMMAND="$1"
|
||||||
KERNEL_VERSION="$2"
|
KERNEL_VERSION="$2"
|
||||||
#BOOT_DIR_ABS="$3"
|
#BOOT_DIR_ABS="$3"
|
||||||
@ -17,33 +19,39 @@ KERNEL_VERSION="$2"
|
|||||||
# device progresses, it should never make backward incompatible changes.
|
# device progresses, it should never make backward incompatible changes.
|
||||||
# So it should always be safe to use a newer dtb with an older kernel.
|
# So it should always be safe to use a newer dtb with an older kernel.
|
||||||
|
|
||||||
list_dtb_versions() {
|
if [[ "$(uname -m)" == arm* || "$(uname -m)" == aarch64 ]]
|
||||||
excluded_version="$1"
|
then
|
||||||
for dtbdir in /boot/dtb-*; do
|
list_dtb_versions() {
|
||||||
dtbver=${dtbdir#*-}
|
excluded_version="$1"
|
||||||
if [ "$dtbver" != "$excluded_version" ]; then
|
for dtbdir in /boot/dtb-*; do
|
||||||
echo $dtbver
|
dtbver=${dtbdir#*-}
|
||||||
fi
|
if [ "$dtbver" != "$excluded_version" ]; then
|
||||||
done
|
echo $dtbver
|
||||||
}
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
setup_dtb_link() {
|
setup_dtb_link() {
|
||||||
ver=`list_dtb_versions $1 | sort -r --sort=version | head -1`
|
ver=`list_dtb_versions $1 | sort -r --sort=version | head -1`
|
||||||
if [ -h /boot/dtb ]; then
|
if [ -h /boot/dtb ]; then
|
||||||
rm -f /boot/dtb
|
rm -f /boot/dtb
|
||||||
fi
|
fi
|
||||||
ln -s dtb-$ver /boot/dtb
|
ln -s dtb-$ver /boot/dtb
|
||||||
}
|
}
|
||||||
|
|
||||||
ret=0
|
ret=0
|
||||||
case "$COMMAND" in
|
case "$COMMAND" in
|
||||||
add)
|
add)
|
||||||
setup_dtb_link
|
setup_dtb_link
|
||||||
ret=$?
|
ret=$?
|
||||||
;;
|
;;
|
||||||
remove)
|
remove)
|
||||||
setup_dtb_link $KERNEL_VERSION
|
setup_dtb_link $KERNEL_VERSION
|
||||||
ret=$?
|
ret=$?
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
exit $ret
|
exit $ret
|
||||||
|
else
|
||||||
|
# Just exit on non ARM
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
68
efi_loader-initialise-partition_signature-memory.patch
Normal file
68
efi_loader-initialise-partition_signature-memory.patch
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
From patchwork Wed Nov 22 03:18:59 2017
|
||||||
|
Content-Type: text/plain; charset="utf-8"
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Transfer-Encoding: 7bit
|
||||||
|
Subject: [U-Boot,v2] efi_loader: initialise partition_signature memory
|
||||||
|
X-Patchwork-Submitter: Jonathan Gray <jsg@jsg.id.au>
|
||||||
|
X-Patchwork-Id: 840248
|
||||||
|
Message-Id: <20171122031859.12600-1-jsg@jsg.id.au>
|
||||||
|
To: u-boot@lists.denx.de
|
||||||
|
Cc: kettenis@openbsd.org, agraf@suse.de
|
||||||
|
Date: Wed, 22 Nov 2017 14:18:59 +1100
|
||||||
|
From: Jonathan Gray <jsg@jsg.id.au>
|
||||||
|
List-Id: U-Boot discussion <u-boot.lists.denx.de>
|
||||||
|
|
||||||
|
Zero partition_signature in the efi_device_path_hard_drive_path
|
||||||
|
structure when signature_type is 0 (no signature) as required by the
|
||||||
|
UEFI specification.
|
||||||
|
|
||||||
|
This is required so that efi_dp_match() will work as expected
|
||||||
|
when doing memcmp() comparisons. Previously uninitialised memory
|
||||||
|
would cause it not match nodes when it should have when the signature
|
||||||
|
type was not GUID.
|
||||||
|
|
||||||
|
Corrects a problem where the loaded image protocol would not return a
|
||||||
|
device path with MEDIA_DEVICE causing the OpenBSD bootloader to fail
|
||||||
|
on rpi_3 and other targets.
|
||||||
|
|
||||||
|
v2: Also handle signature_type 1 (MBR) as described in the specification
|
||||||
|
|
||||||
|
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
|
||||||
|
---
|
||||||
|
lib/efi_loader/efi_device_path.c | 21 +++++++++++++++++++--
|
||||||
|
1 file changed, 19 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c
|
||||||
|
index f6e368e029..12a81d311c 100644
|
||||||
|
--- a/lib/efi_loader/efi_device_path.c
|
||||||
|
+++ b/lib/efi_loader/efi_device_path.c
|
||||||
|
@@ -427,10 +427,27 @@ static void *dp_part_fill(void *buf, struct blk_desc *desc, int part)
|
||||||
|
hddp->partmap_type = 2;
|
||||||
|
else
|
||||||
|
hddp->partmap_type = 1;
|
||||||
|
- hddp->signature_type = desc->sig_type;
|
||||||
|
- if (hddp->signature_type != 0)
|
||||||
|
+
|
||||||
|
+ switch (desc->sig_type) {
|
||||||
|
+ case SIG_TYPE_NONE:
|
||||||
|
+ default:
|
||||||
|
+ hddp->signature_type = 0;
|
||||||
|
+ memset(hddp->partition_signature, 0,
|
||||||
|
+ sizeof(hddp->partition_signature));
|
||||||
|
+ break;
|
||||||
|
+ case SIG_TYPE_MBR:
|
||||||
|
+ hddp->signature_type = 1;
|
||||||
|
+ memset(hddp->partition_signature, 0,
|
||||||
|
+ sizeof(hddp->partition_signature));
|
||||||
|
+ memcpy(hddp->partition_signature, &desc->mbr_sig,
|
||||||
|
+ sizeof(desc->mbr_sig));
|
||||||
|
+ break;
|
||||||
|
+ case SIG_TYPE_GUID:
|
||||||
|
+ hddp->signature_type = 2;
|
||||||
|
memcpy(hddp->partition_signature, &desc->guid_sig,
|
||||||
|
sizeof(hddp->partition_signature));
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
buf = &hddp[1];
|
||||||
|
}
|
34
omap2-set-the-ethaddr-as-well-as-the-usbethaddr-env-.patch
Normal file
34
omap2-set-the-ethaddr-as-well-as-the-usbethaddr-env-.patch
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
From 7c704eb7a615e35fe74bc8ff4ff2e5c71f1473b3 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Peter Robinson <pbrobinson@gmail.com>
|
||||||
|
Date: Thu, 23 Nov 2017 12:44:51 +0000
|
||||||
|
Subject: [PATCH] omap2: set the ethaddr as well as the usbethaddr env var to
|
||||||
|
ensure static MAC
|
||||||
|
|
||||||
|
The kernel gets the ethernet MAC from the ethaddr variable, the omap boards for
|
||||||
|
devices with USB based eth adapters just set the usbethaddr which doesn't appear
|
||||||
|
to get passed to the kernel. The same Raspberry Pi code sets both ethaddr and
|
||||||
|
usbethaddr so lets do that so linux (tested 4.13 and 4.14) get a static rather
|
||||||
|
than a random MAC address, while not regressing users of usbethaddr.
|
||||||
|
|
||||||
|
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
|
||||||
|
---
|
||||||
|
arch/arm/mach-omap2/utils.c | 3 +++
|
||||||
|
1 file changed, 3 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/arch/arm/mach-omap2/utils.c b/arch/arm/mach-omap2/utils.c
|
||||||
|
index 2e8778043b..95f168fee3 100644
|
||||||
|
--- a/arch/arm/mach-omap2/utils.c
|
||||||
|
+++ b/arch/arm/mach-omap2/utils.c
|
||||||
|
@@ -215,6 +215,9 @@ void omap_die_id_usbethaddr(void)
|
||||||
|
mac[5] = (die_id[0] >> 8) & 0xff;
|
||||||
|
|
||||||
|
eth_env_set_enetaddr("usbethaddr", mac);
|
||||||
|
+
|
||||||
|
+ if (!env_get("ethaddr"))
|
||||||
|
+ eth_env_set_enetaddr("ethaddr", mac);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.14.3
|
||||||
|
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Name: uboot-tools
|
Name: uboot-tools
|
||||||
Version: 2017.09
|
Version: 2017.09
|
||||||
Release: 4%{?candidate:.%{candidate}}%{?dist}
|
Release: 5%{?candidate:.%{candidate}}%{?dist}
|
||||||
Summary: U-Boot utilities
|
Summary: U-Boot utilities
|
||||||
License: GPLv2+ BSD LGPL-2.1+ LGPL-2.0+
|
License: GPLv2+ BSD LGPL-2.1+ LGPL-2.0+
|
||||||
URL: http://www.denx.de/wiki/U-Boot
|
URL: http://www.denx.de/wiki/U-Boot
|
||||||
@ -24,13 +24,15 @@ Patch6: usb-kbd-fixes.patch
|
|||||||
Patch7: disk-part_dos-Use-the-original-allocation-scheme-for-the-SPL-case.patch
|
Patch7: disk-part_dos-Use-the-original-allocation-scheme-for-the-SPL-case.patch
|
||||||
Patch8: uefi-distro-load-FDT-from-any-partition-on-boot-device.patch
|
Patch8: uefi-distro-load-FDT-from-any-partition-on-boot-device.patch
|
||||||
Patch9: uefi-efi_loader-Fix-disk-dp-s-for-pre-DM-legacy-devices.patch
|
Patch9: uefi-efi_loader-Fix-disk-dp-s-for-pre-DM-legacy-devices.patch
|
||||||
|
Patch10: efi_loader-initialise-partition_signature-memory.patch
|
||||||
|
|
||||||
# Board fixes and enablement
|
# Board fixes and enablement
|
||||||
Patch10: dragonboard-fixes.patch
|
Patch11: dragonboard-fixes.patch
|
||||||
Patch11: qemu-machine-virt-ARM.patch
|
|
||||||
Patch12: sti-STiH410-B2260-support.patch
|
Patch12: sti-STiH410-B2260-support.patch
|
||||||
Patch13: bcm283x-device-tree-sources-to-Linux-4.14-state.patch
|
Patch13: bcm283x-device-tree-sources-to-Linux-4.14-state.patch
|
||||||
Patch14: sunxi-A83T-improvements.patch
|
Patch14: sunxi-A83T-improvements.patch
|
||||||
|
Patch15: qemu-machine-virt-ARM.patch
|
||||||
|
Patch16: omap2-set-the-ethaddr-as-well-as-the-usbethaddr-env-.patch
|
||||||
# Patch14: mvebu-enable-generic-distro-boot-config.patch
|
# Patch14: mvebu-enable-generic-distro-boot-config.patch
|
||||||
# Patch15: mx6-Initial-Hummingboard-2-support.patch
|
# Patch15: mx6-Initial-Hummingboard-2-support.patch
|
||||||
|
|
||||||
@ -290,6 +292,11 @@ cp -p board/warp7/README builds/docs/README.warp7
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Nov 28 2017 Peter Robinson <pbrobinson@fedoraproject.org> 2017.09-5
|
||||||
|
- Devicetree script should just exit on non DT platforms
|
||||||
|
- Fix MAC address on OMAP Platforms to be static
|
||||||
|
- Minor uEFI fix
|
||||||
|
|
||||||
* Tue Oct 10 2017 Peter Robinson <pbrobinson@fedoraproject.org> 2017.09-4
|
* Tue Oct 10 2017 Peter Robinson <pbrobinson@fedoraproject.org> 2017.09-4
|
||||||
- Improve uEFI partition detection for some devices
|
- Improve uEFI partition detection for some devices
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user