Update to new RaspberryPi firware
commit 0c01dbefba45a08c47f8538d5a071a0fba6b7e83 Author: popcornmix <popcornmix@gmail.com> 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
This commit is contained in:
parent
04c6a7c814
commit
817923ee4d
|
@ -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 @@ MDSETTARGETS=
|
|||
.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 @@ MDSETTARGETS+= ${i} ${RAMDISK} -
|
|||
|
||||
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"
|
||||
|
||||
|
|
|
@ -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_rockchip() {
|
|||
|
||||
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
|
||||
|
|
|
@ -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 @@ root=ld0a console=${console}
|
|||
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
|
||||
|
|
|
@ -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 @@ EOF
|
|||
}
|
||||
|
||||
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 @@ root=ld0a console=fb
|
|||
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
|
||||
|
|
|
@ -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 @@ EOF
|
|||
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"
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -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
|
|
@ -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= -A arm -T kernel_noload -O linux -C none
|
|||
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 $@ $@.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;
|
||||
echo ${OBJCOPY} -S -O binary $@ $@.img; \
|
||||
${OBJCOPY} -S -O binary $@ $@.img; \
|
||||
echo ${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS} $@.img $@.ub; \
|
||||
${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS} $@.img $@.ub
|
||||
|
||||
EXTRA_KERNELS+= ${KERNELS:@.KERNEL.@${.KERNEL.}.bin@}
|
||||
EXTRA_KERNELS+= ${KERNELS:@.KERNEL.@${.KERNEL.}.ub@}
|
||||
EXTRA_KERNELS+= ${KERNELS:@.KERNEL.@${.KERNEL.}.img@}
|
||||
EXTRA_KERNELS+= ${KERNELS:@.KERNEL.@${.KERNEL.}.ub@}
|
||||
|
|
|
@ -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 @@ _OSRELEASE!= ${HOST_SH} $S/conf/osrelease.sh
|
|||
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@}
|
||||
|
|
|
@ -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 @@ _OSRELEASE!= ${HOST_SH} $S/conf/osrelease.sh
|
|||
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@}
|
||||
|
|
Loading…
Reference in New Issue