Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Update to new RaspberryPi firware
details: https://anonhg.NetBSD.org/src/rev/c823a1d41586
branches: trunk
changeset: 847268:c823a1d41586
user: skrll <skrll%NetBSD.org@localhost>
date: Mon Dec 16 11:00:30 2019 +0000
description:
Update to new RaspberryPi firware
commit 0c01dbefba45a08c47f8538d5a071a0fba6b7e83
Author: popcornmix <popcornmix%gmail.com@localhost>
Date: Wed Dec 11 15:30:08 2019 +0000
and include firmware for RPI4
Firmware has bee updated to support mainline linux kernels as described in
https://github.com/raspberrypi/linux/issues/3237
diffstat:
distrib/evbarm/instkernel/instkernel/Makefile | 12 +---
distrib/utils/embedded/conf/arm64.conf | 7 +-
distrib/utils/embedded/conf/armv7.conf | 4 +-
distrib/utils/embedded/conf/rpi.conf | 8 +-
distrib/utils/embedded/conf/rpi_inst.conf | 4 +-
external/broadcom/rpi-firmware/dist/bootcode.bin | Bin
external/broadcom/rpi-firmware/dist/fixup.dat | Bin
external/broadcom/rpi-firmware/dist/fixup4.dat | Bin
external/broadcom/rpi-firmware/dist/fixup4cd.dat | Bin
external/broadcom/rpi-firmware/dist/fixup_cd.dat | Bin
external/broadcom/rpi-firmware/dist/start.elf | Bin
external/broadcom/rpi-firmware/dist/start4.elf | Bin
external/broadcom/rpi-firmware/dist/start4cd.elf | Bin
external/broadcom/rpi-firmware/dist/start_cd.elf | Bin
sys/arch/evbarm/compile/rpi-mkknlimg.sh | 61 -----------------------
sys/arch/evbarm/conf/mk.generic | 19 ++----
sys/arch/evbarm/conf/mk.generic64 | 9 +--
sys/arch/evbarm/conf/mk.rpi | 10 +--
18 files changed, 33 insertions(+), 101 deletions(-)
diffs (299 lines):
diff -r 79271a123bb9 -r c823a1d41586 distrib/evbarm/instkernel/instkernel/Makefile
--- a/distrib/evbarm/instkernel/instkernel/Makefile Mon Dec 16 08:50:42 2019 +0000
+++ b/distrib/evbarm/instkernel/instkernel/Makefile Mon Dec 16 11:00:30 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.32 2019/08/12 08:04:28 martin Exp $
+# $NetBSD: Makefile,v 1.33 2019/12/16 11:00:30 skrll Exp $
.include <bsd.own.mk>
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
@@ -14,8 +14,7 @@
.for i in ${BUILD_KERNELS:M*_INSTALL}
.if ${i} == "RPI_INSTALL"
MDSETTARGETS+= ${i} ${SSHRAMDISK} netbsd-${i}
-MDSET_SUFFIXES.netbsd-${i}= bin create-bin img create-img
-MDSET_.RPI_INSTALL.netbsd-RPI_INSTALL.img.deps= netbsd-RPI_INSTALL.bin
+MDSET_SUFFIXES.netbsd-${i}= img create-img
.else
MDSETTARGETS+= ${i} ${RAMDISK} -
.endif
@@ -23,12 +22,9 @@
MDSET_RELEASEDIR= installation/instkernel
-MDSET_SUFFIXES.-= srec create-srec bin create-bin
+MDSET_SUFFIXES.-= srec create-srec img create-img
create-srec= ${OBJCOPY} -O srec ${.TARGET:R} ${.TARGET}
-create-bin= ${OBJCOPY} -O binary ${.TARGET:R} ${.TARGET}
-create-img= \
- ${HOST_SH} ${NETBSDSRCDIR}/sys/arch/evbarm/compile/rpi-mkknlimg.sh \
- ${.TARGET:R}.bin ${.TARGET}
+create-img= ${OBJCOPY} -O binary ${.TARGET:R} ${.TARGET}
.include "${DISTRIBDIR}/common/Makefile.mdset"
diff -r 79271a123bb9 -r c823a1d41586 distrib/utils/embedded/conf/arm64.conf
--- a/distrib/utils/embedded/conf/arm64.conf Mon Dec 16 08:50:42 2019 +0000
+++ b/distrib/utils/embedded/conf/arm64.conf Mon Dec 16 11:00:30 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: arm64.conf,v 1.7 2019/12/16 08:01:20 skrll Exp $
+# $NetBSD: arm64.conf,v 1.8 2019/12/16 11:00:30 skrll Exp $
# ARM64 customization script used by mkimage
#
board=arm64
@@ -67,13 +67,16 @@
populate_rpi() {
firmwaredir="${src}/external/broadcom/rpi-firmware/dist"
- firmwarefiles="LICENCE.broadcom bootcode.bin fixup.dat fixup_cd.dat start.elf start_cd.elf"
+ firmwarefiles="LICENCE.broadcom bootcode.bin fixup4cd.dat fixup4.dat fixup_cd.dat fixup.dat start4cd.elf start4.elf start_cd.elf start.elf"
cat > "${mnt}/boot/cmdline.txt" << EOF
root=ld0a console=${console}
EOF
cat > "${mnt}/boot/config.txt" << EOF
+#
+upstream_kernel=1
+#
arm_64bit=1
kernel=netbsd.img
kernel_address=0x200000
diff -r 79271a123bb9 -r c823a1d41586 distrib/utils/embedded/conf/armv7.conf
--- a/distrib/utils/embedded/conf/armv7.conf Mon Dec 16 08:50:42 2019 +0000
+++ b/distrib/utils/embedded/conf/armv7.conf Mon Dec 16 11:00:30 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: armv7.conf,v 1.39 2019/10/30 21:43:42 jmcneill Exp $
+# $NetBSD: armv7.conf,v 1.40 2019/12/16 11:00:30 skrll Exp $
# ARMv7 customization script used by mkimage
#
board=armv7
@@ -63,6 +63,8 @@
EOF
cat > ${mnt}/boot/config.txt << EOF
+#
+upstream_kernel=1
# Boot options, see https://www.raspberrypi.org/documentation/configuration/config-txt/boot.md
kernel_address=0x01000040
# UART settings, see https://www.raspberrypi.org/documentation/configuration/uart.md
diff -r 79271a123bb9 -r c823a1d41586 distrib/utils/embedded/conf/rpi.conf
--- a/distrib/utils/embedded/conf/rpi.conf Mon Dec 16 08:50:42 2019 +0000
+++ b/distrib/utils/embedded/conf/rpi.conf Mon Dec 16 11:00:30 2019 +0000
@@ -1,10 +1,10 @@
-# $NetBSD: rpi.conf,v 1.34 2017/12/12 21:00:28 jmcneill Exp $
+# $NetBSD: rpi.conf,v 1.35 2019/12/16 11:00:30 skrll Exp $
# Raspberry Pi customization script used by mkimage
#
board=rpi
kerneldir=$src/sys/arch/evbarm/compile/RPI/
-kernel=$kerneldir/netbsd-RPI.img
+kernel=$kerneldir/netbsd-RPI.bin
kernels_rpi="RPI RPI2"
resize=true
@@ -47,7 +47,7 @@
}
populate() {
- rpi2_kernel="$(echo $kernel | sed 's/RPI/RPI2/g')"
+ rpi2_kernel="$(echo $kernel | sed -e 's/RPI/RPI2/g')"
cat > ${mnt}/boot/cmdline.txt << EOF
root=ld0a console=fb
@@ -56,6 +56,8 @@
EOF
cat > ${mnt}/boot/config.txt << EOF
+#
+upstream_kernel=1
# UART settings, see https://www.raspberrypi.org/documentation/configuration/uart.md
enable_uart=1
force_turbo=0
diff -r 79271a123bb9 -r c823a1d41586 distrib/utils/embedded/conf/rpi_inst.conf
--- a/distrib/utils/embedded/conf/rpi_inst.conf Mon Dec 16 08:50:42 2019 +0000
+++ b/distrib/utils/embedded/conf/rpi_inst.conf Mon Dec 16 11:00:30 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: rpi_inst.conf,v 1.11 2017/12/14 06:29:15 skrll Exp $
+# $NetBSD: rpi_inst.conf,v 1.12 2019/12/16 11:00:30 skrll Exp $
# Raspberry Pi customization script used by mkimage
#
@@ -99,9 +99,11 @@
echo "${bar} installing kernel ${bar}"
case ${kernel} in
*.gz)
+ echo " ${kernel} uncompressed to kernel.img"
${GZIP_CMD} -dc ${kernel} > ${mnt}/boot/kernel.img
;;
*)
+ echo " ${kernel} copied"
cp ${kernel} ${mnt}/boot/kernel.img
;;
esac || fail "copy of ${kernel} to ${mnt}/boot/kernel.img failed"
diff -r 79271a123bb9 -r c823a1d41586 external/broadcom/rpi-firmware/dist/bootcode.bin
Binary file external/broadcom/rpi-firmware/dist/bootcode.bin has changed
diff -r 79271a123bb9 -r c823a1d41586 external/broadcom/rpi-firmware/dist/fixup.dat
Binary file external/broadcom/rpi-firmware/dist/fixup.dat has changed
diff -r 79271a123bb9 -r c823a1d41586 external/broadcom/rpi-firmware/dist/fixup4.dat
Binary file external/broadcom/rpi-firmware/dist/fixup4.dat has changed
diff -r 79271a123bb9 -r c823a1d41586 external/broadcom/rpi-firmware/dist/fixup4cd.dat
Binary file external/broadcom/rpi-firmware/dist/fixup4cd.dat has changed
diff -r 79271a123bb9 -r c823a1d41586 external/broadcom/rpi-firmware/dist/fixup_cd.dat
Binary file external/broadcom/rpi-firmware/dist/fixup_cd.dat has changed
diff -r 79271a123bb9 -r c823a1d41586 external/broadcom/rpi-firmware/dist/start.elf
Binary file external/broadcom/rpi-firmware/dist/start.elf has changed
diff -r 79271a123bb9 -r c823a1d41586 external/broadcom/rpi-firmware/dist/start4.elf
Binary file external/broadcom/rpi-firmware/dist/start4.elf has changed
diff -r 79271a123bb9 -r c823a1d41586 external/broadcom/rpi-firmware/dist/start4cd.elf
Binary file external/broadcom/rpi-firmware/dist/start4cd.elf has changed
diff -r 79271a123bb9 -r c823a1d41586 external/broadcom/rpi-firmware/dist/start_cd.elf
Binary file external/broadcom/rpi-firmware/dist/start_cd.elf has changed
diff -r 79271a123bb9 -r c823a1d41586 sys/arch/evbarm/compile/rpi-mkknlimg.sh
--- a/sys/arch/evbarm/compile/rpi-mkknlimg.sh Mon Dec 16 08:50:42 2019 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-#!/bin/sh
-
-# $NetBSD: rpi-mkknlimg.sh,v 1.2 2019/07/14 20:12:22 thorpej Exp $
-#
-# Tag an RPI kernel so the firmware will load device tree
-
-# https://github.com/raspberrypi/linux/commit/5b2523aae9c5beb443315a7814633fc740992d07
-
-magic_rptl=1280594002 # 'RPTL'
-magic_283x=2016622642 # '283x'
-magic_ddtk=1263813700 # 'DDTK'
-magic_dtok=1263490116 # 'DTOK'
-magic_kver=
-
-if [ $# -ne 2 ] ; then
- echo usage: $0 input output 1>&2
- exit 1
-fi
-
-input=$1; shift
-output=$1; shift
-
-enc()
-{
- local _x=$1; shift
- printf $( printf '\\%o' $_x )
-}
-
-le32enc()
-{
- local _x=$1; shift
- enc $(( ( $_x >> 0 ) & 0xff ))
- enc $(( ( $_x >> 8 ) & 0xff ))
- enc $(( ( $_x >> 16 ) & 0xff ))
- enc $(( ( $_x >> 24 ) & 0xff ))
-}
-
-{
- cat ${input}
-
- # marker
- le32enc 0
- le32enc 0
-
- le32enc 1
- le32enc 4
- le32enc $magic_283x
- le32enc 1
- le32enc 4
- le32enc $magic_dtok
- le32enc 1
- le32enc 4
- le32enc $magic_ddtk
-
- # length ( 11 * 4 + 12)
- le32enc 56
- le32enc 4
- le32enc $magic_rptl
-} > ${output}
-
-exit
diff -r 79271a123bb9 -r c823a1d41586 sys/arch/evbarm/conf/mk.generic
--- a/sys/arch/evbarm/conf/mk.generic Mon Dec 16 08:50:42 2019 +0000
+++ b/sys/arch/evbarm/conf/mk.generic Mon Dec 16 11:00:30 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mk.generic,v 1.8 2019/04/14 07:57:51 skrll Exp $
+# $NetBSD: mk.generic,v 1.9 2019/12/16 11:00:30 skrll Exp $
.include "$S/arch/arm/nvidia/tegra_xusb-fw.mk"
@@ -17,16 +17,11 @@
MKUBOOTIMAGEARGS+= -e 0
MKUBOOTIMAGEARGS+= -n "NetBSD/${BOARDTYPE:U${MACHINE_ARCH}} ${_OSRELEASE}"
-MKKNLIMG= ${THISARM}/compile/rpi-mkknlimg.sh
+SYSTEM_LD_TAIL_EXTRA+=; \
+ echo ${OBJCOPY} -S -O binary $@ $@.img; \
+ ${OBJCOPY} -S -O binary $@ $@.img; \
+ echo ${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS} $@.img $@.ub; \
+ ${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS} $@.img $@.ub
-SYSTEM_LD_TAIL_EXTRA+=; \
- echo ${OBJCOPY} -S -O binary $@ $@.bin; \
- ${OBJCOPY} -S -O binary $@ $@.bin; \
- echo ${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS} $@.bin $@.ub; \
- ${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS} $@.bin $@.ub; \
- echo ${MKKNLIMG} $@.bin $@.img; \
- ${HOST_SH} ${MKKNLIMG} $@.bin $@.img;
-
-EXTRA_KERNELS+= ${KERNELS:@.KERNEL.@${.KERNEL.}.bin@}
+EXTRA_KERNELS+= ${KERNELS:@.KERNEL.@${.KERNEL.}.img@}
EXTRA_KERNELS+= ${KERNELS:@.KERNEL.@${.KERNEL.}.ub@}
-EXTRA_KERNELS+= ${KERNELS:@.KERNEL.@${.KERNEL.}.img@}
diff -r 79271a123bb9 -r c823a1d41586 sys/arch/evbarm/conf/mk.generic64
--- a/sys/arch/evbarm/conf/mk.generic64 Mon Dec 16 08:50:42 2019 +0000
+++ b/sys/arch/evbarm/conf/mk.generic64 Mon Dec 16 11:00:30 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mk.generic64,v 1.4 2019/12/04 11:25:04 jmcneill Exp $
+# $NetBSD: mk.generic64,v 1.5 2019/12/16 11:00:30 skrll Exp $
SYSTEM_FIRST_OBJ= start.o
SYSTEM_FIRST_SFILE= ${ARM}/aarch64/start.S
@@ -8,14 +8,11 @@
BOARDTYPE= evbarm64
MKUBOOTIMAGEARGS= -f arm64 -u -a 0x200000
-MKKNLIMG= ${THISARM}/compile/rpi-mkknlimg.sh
SYSTEM_LD_TAIL_EXTRA+= && \
echo ${OBJCOPY} -S -O binary $@ $@.bin && \
${OBJCOPY} -S -O binary $@ $@.bin && \
- echo ${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS} $@.bin $@.ub && \
- ${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS} $@.bin $@.ub && \
- echo ${MKKNLIMG} $@.ub $@.img && \
- ${HOST_SH} ${MKKNLIMG} $@.ub $@.img
+ echo ${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS} $@.bin $@.img && \
+ ${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS} $@.bin $@.img
EXTRA_KERNELS+= ${KERNELS:@.KERNEL.@${.KERNEL.}.img@}
diff -r 79271a123bb9 -r c823a1d41586 sys/arch/evbarm/conf/mk.rpi
--- a/sys/arch/evbarm/conf/mk.rpi Mon Dec 16 08:50:42 2019 +0000
+++ b/sys/arch/evbarm/conf/mk.rpi Mon Dec 16 11:00:30 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mk.rpi,v 1.6 2018/10/18 09:01:54 skrll Exp $
+# $NetBSD: mk.rpi,v 1.7 2019/12/16 11:00:30 skrll Exp $
SYSTEM_FIRST_OBJ= armv6_start.o
SYSTEM_FIRST_SFILE= ${ARM}/arm/armv6_start.S
@@ -8,12 +8,8 @@
KERNEL_BASE_PHYS=0x00008000
KERNEL_BASE_VIRT=0x80008000
-MKKNLIMG= ${THISARM}/compile/rpi-mkknlimg.sh
-
SYSTEM_LD_TAIL_EXTRA+=; \
echo ${OBJCOPY} -S -O binary $@ $@.bin; \
- ${OBJCOPY} -S -O binary $@ $@.bin; \
- echo ${MKKNLIMG} $@.bin $@.img; \
- ${HOST_SH} ${MKKNLIMG} $@.bin $@.img;
+ ${OBJCOPY} -S -O binary $@ $@.bin;
-EXTRA_KERNELS+= ${KERNELS:@.KERNEL.@${.KERNEL.}.img@}
+EXTRA_KERNELS+= ${KERNELS:@.KERNEL.@${.KERNEL.}.bin@}
Home |
Main Index |
Thread Index |
Old Index