mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 06:33:50 +02:00
New package: pinebookpro-uboot-20200212
This commit is contained in:
parent
fe8096c1e9
commit
794ef5ad4c
2 changed files with 104 additions and 0 deletions
28
srcpkgs/pinebookpro-uboot/files/kernel.d/uboot
Executable file
28
srcpkgs/pinebookpro-uboot/files/kernel.d/uboot
Executable file
|
@ -0,0 +1,28 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
kver=${2}
|
||||||
|
|
||||||
|
cat > /boot/boot.txt <<EOF
|
||||||
|
# MAC address (use spaces instead of colons)
|
||||||
|
setenv macaddr da 19 c8 7a 6d f4
|
||||||
|
|
||||||
|
part uuid \${devtype} \${devnum}:\${bootpart} uuid
|
||||||
|
setenv bootargs console=ttyS2,1500000n8 root=PARTUUID=\${uuid} rw rootwait append video=eDP-1:1920x1080@60
|
||||||
|
setenv fdtfile rockchip/rk3399-pinebook-pro.dtb
|
||||||
|
|
||||||
|
if load \${devtype} \${devnum}:\${bootpart} \${kernel_addr_r} /boot/vmlinux-${kver}; then
|
||||||
|
if load \${devtype} \${devnum}:\${bootpart} \${fdt_addr_r} /boot/dtbs/dtbs-${kver}/\${fdtfile}; then
|
||||||
|
fdt addr \${fdt_addr_r}
|
||||||
|
fdt resize
|
||||||
|
fdt set /ethernet@fe300000 local-mac-address "[\${macaddr}]"
|
||||||
|
if load \${devtype} \${devnum}:\${bootpart} \${ramdisk_addr_r} /boot/initramfs-${kver}.img; then
|
||||||
|
# This upstream Uboot doesn't support compresses cpio initrd, use kernel option to
|
||||||
|
# load initramfs
|
||||||
|
setenv bootargs \${bootargs} initrd=\${ramdisk_addr_r},20M ramdisk_size=10M
|
||||||
|
fi;
|
||||||
|
booti \${kernel_addr_r} - \${fdt_addr_r};
|
||||||
|
fi;
|
||||||
|
fi
|
||||||
|
EOF
|
||||||
|
|
||||||
|
exec mkimage -A arm -O linux -T script -C none -n "U-Boot boot script" -d /boot/boot.txt /boot/boot.scr
|
76
srcpkgs/pinebookpro-uboot/template
Normal file
76
srcpkgs/pinebookpro-uboot/template
Normal file
|
@ -0,0 +1,76 @@
|
||||||
|
# Template file for 'pinebookpro-uboot'
|
||||||
|
pkgname=pinebookpro-uboot
|
||||||
|
version=20200212
|
||||||
|
revision=1
|
||||||
|
_commit_uboot=365495a329c8e92ca4c134562d091df71b75845e
|
||||||
|
_commit_atf=22d12c4148c373932a7a81e5d1c59a767e143ac2
|
||||||
|
archs="aarch64*"
|
||||||
|
hostmakedepends="git flex cross-arm-none-eabi dtc python3"
|
||||||
|
depends="u-boot-tools"
|
||||||
|
short_desc="U-Boot for Pinebook Pro"
|
||||||
|
maintainer="Renato Aguiar <renato@renatoaguiar.net>"
|
||||||
|
license="GPL-2.0-only, BSD-3-Clause"
|
||||||
|
homepage="https://git.eno.space/pbp-uboot"
|
||||||
|
|
||||||
|
case "${XBPS_TARGET_MACHINE}" in
|
||||||
|
*-musl) broken="fatal error: stddef.h: No such file or directory" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
do_fetch() {
|
||||||
|
mkdir -p "${wrksrc}"
|
||||||
|
|
||||||
|
cd "${wrksrc}"
|
||||||
|
git clone https://git.eno.space/pbp-uboot.git
|
||||||
|
cd pbp-uboot
|
||||||
|
git reset --hard ${_commit_uboot}
|
||||||
|
|
||||||
|
cd "${wrksrc}"
|
||||||
|
git clone https://github.com/ARM-software/arm-trusted-firmware.git
|
||||||
|
cd arm-trusted-firmware
|
||||||
|
git reset --hard ${_commit_atf}
|
||||||
|
}
|
||||||
|
|
||||||
|
do_configure() {
|
||||||
|
unset CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
|
||||||
|
|
||||||
|
cd pbp-uboot
|
||||||
|
make ${makejobs} pinebook_pro-rk3399_defconfig
|
||||||
|
echo 'CONFIG_IDENT_STRING=" Voidlinux"' >> .config
|
||||||
|
}
|
||||||
|
|
||||||
|
do_build() {
|
||||||
|
unset CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
|
||||||
|
if [ "$CROSS_BUILD" ]; then
|
||||||
|
export CROSS_COMPILE=${XBPS_CROSS_TRIPLET}-
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd arm-trusted-firmware
|
||||||
|
make ${makejobs} PLAT=rk3399
|
||||||
|
|
||||||
|
cd ../pbp-uboot
|
||||||
|
make ${makejobs} EXTRAVERSION=-${revision} \
|
||||||
|
BL31=../arm-trusted-firmware/build/rk3399/release/bl31/bl31.elf
|
||||||
|
}
|
||||||
|
|
||||||
|
do_install() {
|
||||||
|
cd pbp-uboot
|
||||||
|
vmkdir boot
|
||||||
|
vinstall idbloader.img 0644 boot
|
||||||
|
vinstall u-boot.itb 0644 boot
|
||||||
|
vinstall "${FILESDIR}/kernel.d/uboot" 750 \
|
||||||
|
etc/kernel.d/post-install 60-uboot
|
||||||
|
|
||||||
|
vlicense Licenses/Exceptions
|
||||||
|
vlicense Licenses/OFL.txt
|
||||||
|
vlicense Licenses/README
|
||||||
|
vlicense Licenses/bsd-2-clause.txt
|
||||||
|
vlicense Licenses/bsd-3-clause.txt
|
||||||
|
vlicense Licenses/eCos-2.0.txt
|
||||||
|
vlicense Licenses/gpl-2.0.txt
|
||||||
|
vlicense Licenses/ibm-pibs.txt
|
||||||
|
vlicense Licenses/isc.txt
|
||||||
|
vlicense Licenses/lgpl-2.0.txt
|
||||||
|
vlicense Licenses/lgpl-2.1.txt
|
||||||
|
vlicense Licenses/r8a779x_usb3.txt
|
||||||
|
vlicense Licenses/x11.txt
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue