mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
added alarm/uboot-raspberrypi
This commit is contained in:
parent
1698f02d3b
commit
aa99431aae
4 changed files with 109 additions and 0 deletions
|
@ -0,0 +1,25 @@
|
|||
From bd799e156242713c39ad2b68a5e5ef7053f37acb Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
Date: Fri, 19 Feb 2016 21:40:56 -0700
|
||||
Subject: [PATCH] arch linux arm modifications
|
||||
|
||||
---
|
||||
include/config_distro_defaults.h | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/include/config_distro_defaults.h b/include/config_distro_defaults.h
|
||||
index 0f85cd0..8d6c9e9 100644
|
||||
--- a/include/config_distro_defaults.h
|
||||
+++ b/include/config_distro_defaults.h
|
||||
@@ -7,6 +7,8 @@
|
||||
#ifndef _CONFIG_CMD_DISTRO_DEFAULTS_H
|
||||
#define _CONFIG_CMD_DISTRO_DEFAULTS_H
|
||||
|
||||
+#define CONFIG_IDENT_STRING " Arch Linux ARM"
|
||||
+
|
||||
/*
|
||||
* List of all commands and options that when defined enables support for
|
||||
* features required by distros to support boards in a standardised and
|
||||
--
|
||||
2.7.0
|
||||
|
53
alarm/uboot-raspberrypi/PKGBUILD
Normal file
53
alarm/uboot-raspberrypi/PKGBUILD
Normal file
|
@ -0,0 +1,53 @@
|
|||
# U-Boot: Raspberry Pi
|
||||
# Maintainer: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
|
||||
buildarch=4
|
||||
|
||||
pkgname=uboot-raspberrypi
|
||||
pkgver=2016.03rc2
|
||||
pkgrel=1
|
||||
_pkgver=${pkgver/rc/-rc}
|
||||
pkgdesc="U-Boot for Raspberry Pi"
|
||||
arch=('armv7h')
|
||||
url='http://www.denx.de/wiki/U-Boot/WebHome'
|
||||
license=('GPL')
|
||||
backup=('boot/boot.txt' 'boot/boot.scr')
|
||||
makedepends=('bc' 'dtc' 'git')
|
||||
conflicts=('linux-raspberrypi')
|
||||
source=("ftp://ftp.denx.de/pub/u-boot/u-boot-${_pkgver}.tar.bz2"
|
||||
'0001-arch-linux-arm-modifications.patch'
|
||||
'boot.txt'
|
||||
'mkscr')
|
||||
md5sums=('0f0068341f8124ffab0f966808ba6236'
|
||||
'2fc5fdd1fb48545336a2f534772d7477'
|
||||
'3631f52fb2a0e940bbcc04ea80701d9a'
|
||||
'021623a04afd29ac3f368977140cfbfd')
|
||||
|
||||
prepare() {
|
||||
cd u-boot-${_pkgver}
|
||||
|
||||
git apply ../0001-arch-linux-arm-modifications.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
cd u-boot-${_pkgver}
|
||||
|
||||
unset CFLAGS
|
||||
unset CXXFLAGS
|
||||
unset CPPFLAGS
|
||||
|
||||
make distclean
|
||||
make rpi_2_config
|
||||
make EXTRAVERSION=-${pkgrel}
|
||||
}
|
||||
|
||||
package() {
|
||||
cd u-boot-${_pkgver}
|
||||
|
||||
mkdir -p "${pkgdir}"/boot
|
||||
|
||||
cp u-boot.bin ${pkgdir}/boot/kernel7.img
|
||||
|
||||
tools/mkimage -A arm -O linux -T script -C none -n "U-Boot boot script" -d ../boot.txt "${pkgdir}"/boot/boot.scr
|
||||
cp ../{boot.txt,mkscr} "${pkgdir}"/boot
|
||||
}
|
22
alarm/uboot-raspberrypi/boot.txt
Normal file
22
alarm/uboot-raspberrypi/boot.txt
Normal file
|
@ -0,0 +1,22 @@
|
|||
# After modifying, run ./mkscr
|
||||
|
||||
# MAC address configuration
|
||||
#setenv macaddr "b8:27:eb:fc:c8:c2"
|
||||
|
||||
# Device tree
|
||||
setenv fdtfile "bcm2836-rpi-2-b.dtb"
|
||||
|
||||
# Set root partition to the second partition of boot device
|
||||
part uuid ${devtype} ${devnum}:2 uuid
|
||||
|
||||
setenv bootargs "console=ttyAMA0,115200 root=PARTUUID=${uuid} rw rootwait smsc95xx.macaddr=${macaddr}"
|
||||
|
||||
if load ${devtype} ${devnum}:${bootpart} ${kernel_addr_r} /zImage; then
|
||||
if load ${devtype} ${devnum}:${bootpart} ${fdt_addr_r} /dtbs/${fdtfile}; then
|
||||
if load ${devtype} ${devnum}:${bootpart} ${ramdisk_addr_r} /initramfs-linux.img; then
|
||||
bootz ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r};
|
||||
else
|
||||
bootz ${kernel_addr_r} - ${fdt_addr_r};
|
||||
fi;
|
||||
fi;
|
||||
fi
|
9
alarm/uboot-raspberrypi/mkscr
Executable file
9
alarm/uboot-raspberrypi/mkscr
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [[ ! -x /usr/bin/mkimage ]]; then
|
||||
echo "mkimage not found. Please install uboot-tools:"
|
||||
echo " pacman -S uboot-tools"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkimage -A arm -O linux -T script -C none -n "U-Boot boot script" -d boot.txt boot.scr
|
Loading…
Reference in a new issue