Merge pull request #269 from Gottox/master
Provide packages needed to make Odroid U2 boot from SD card
This commit is contained in:
commit
9a04df03da
|
@ -0,0 +1,48 @@
|
|||
#!/bin/bash
|
||||
|
||||
usage() {
|
||||
cat >&2 <<EOF
|
||||
usage: $0 [enable|disable]
|
||||
EOF
|
||||
exit 1;
|
||||
}
|
||||
|
||||
die() {
|
||||
echo $@ >&2
|
||||
exit 1;
|
||||
}
|
||||
|
||||
LED=/sys/class/leds/led1/brightness
|
||||
MAXLED=/sys/class/leds/led1/max_brightness
|
||||
|
||||
|
||||
|
||||
if [ $# -eq 1 ]; then
|
||||
[ -z "$1" ] && usage
|
||||
behavior=$1
|
||||
elif [ $# -gt 1 ]; then
|
||||
usage;
|
||||
elif [ -f /etc/default/odroid-led ]; then
|
||||
. /etc/default/odroid-led
|
||||
behavior=$LED_BOOT_BEHAVIOR
|
||||
auto_config=1
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
case "$behavior" in
|
||||
enable)
|
||||
[ -f $LED -a -f $MAXLED ] || die "LED control file can not be found"
|
||||
echo 0 > $LED
|
||||
cat $MAXLED > $LED
|
||||
;;
|
||||
disable)
|
||||
[ -f $LED ] || die "LED control file can not be found"
|
||||
echo 0 > $LED
|
||||
;;
|
||||
*)
|
||||
[ "$auto_config" ] || usage
|
||||
exit 0;
|
||||
;;
|
||||
esac
|
|
@ -0,0 +1,5 @@
|
|||
# LED_BOOT_BEHAVIOR: Control the behavior of the blue LED on boot
|
||||
# enable: turn LED on
|
||||
# disable: turn LED off
|
||||
# auto: do nothing (LED will blink)
|
||||
LED_BOOT_BEHAVIOR=enable
|
|
@ -0,0 +1,9 @@
|
|||
[Unit]
|
||||
Description=Sets Odroids LED on boot
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/sbin/odroid-led
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -1,6 +1,6 @@
|
|||
# Template file for 'odroid-u2-base'
|
||||
pkgname=odroid-u2-base
|
||||
version=1.5
|
||||
version=1.6
|
||||
revision=1
|
||||
build_style=meta
|
||||
homepage="http://www.voidlinux.eu"
|
||||
|
@ -9,7 +9,7 @@ maintainer="Enno Boland <eb@s01.de>"
|
|||
license="Public Domain"
|
||||
|
||||
only_for_archs="armv7l"
|
||||
makedepends="ntp?ntp-daemon dhcpcd openssh-server odroid-u2-kernel"
|
||||
makedepends="ntp?ntp-daemon dhcpcd openssh-server odroid-u2-kernel odroid-u2-uboot odroid-u2-boot-fw"
|
||||
depends="${makedepends}"
|
||||
hostmakedepends="uboot-mkimage"
|
||||
|
||||
|
@ -21,26 +21,11 @@ replaces="odroid-u2-ubootcfg>=0"
|
|||
|
||||
_default_scr="boot-auto_edid.scr"
|
||||
|
||||
do_build() {
|
||||
# Building uboot scr's
|
||||
for source in ${FILESDIR}/*.ini; do
|
||||
name=$(basename ${source%.ini})
|
||||
mkimage -A arm -T script -C none -n "${name}" -d $source ${name}.scr
|
||||
done
|
||||
cp ${_default_scr} boot.scr
|
||||
}
|
||||
|
||||
do_install() {
|
||||
# Set proper perms to some devices.
|
||||
vmkdir usr/lib/udev/rules.d
|
||||
echo 'KERNEL=="disp|cedar_dev|mali|ump", MODE="0660", GROUP="video"' > ${DESTDIR}/usr/lib/udev/rules.d/50-odroid-u2.rules
|
||||
|
||||
# Install uboot scr's
|
||||
for scr in *.scr; do
|
||||
echo $scr
|
||||
vinstall $scr 600 boot
|
||||
done
|
||||
|
||||
# Install LED utilities
|
||||
vinstall ${FILESDIR}/odroid-led 744 /usr/sbin
|
||||
vinstall ${FILESDIR}/odroid-led.default 744 /etc/default odroid-led
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
# Template file for 'odroid-u2-uboot'
|
||||
pkgname=odroid-u2-boot-fw
|
||||
version=1.0
|
||||
revision=1
|
||||
build_style=meta
|
||||
wrksrc="boot"
|
||||
short_desc="Odroid U2 proprietary boot files"
|
||||
maintainer="Enno Boland <eb@s01.de>"
|
||||
license="proprietary"
|
||||
homepage="http://dev.odroid.com/projects/4412boot/wiki/FrontPage"
|
||||
distfiles="http://dev.odroid.com/projects/4412boot/wiki/FrontPage?action=download&value=boot.tar.gz"
|
||||
checksum="e0db737d9e49f937425e4778b0ab892623bcc389d7c26329ba2e97ae7bb475c4"
|
||||
|
||||
create_srcdir=yes
|
||||
only_for_archs="armv7l"
|
||||
|
||||
do_install() {
|
||||
vinstall E4412_S.bl1.HardKernel.bin 600 boot
|
||||
vinstall bl2.signed.bin 600 boot
|
||||
vinstall E4412_S.tzsw.signed.bin 600 boot
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
diff --git a/arch/arm/cpu/armv7/config.mk b/arch/arm/cpu/armv7/config.mk
|
||||
index 7f9b171..788caaa 100644
|
||||
--- a/arch/arm/cpu/armv7/config.mk
|
||||
+++ b/arch/arm/cpu/armv7/config.mk
|
||||
@@ -20,7 +20,7 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
# MA 02111-1307 USA
|
||||
#
|
||||
-PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float
|
||||
+PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -mfloat-abi=hard -mfpu=vfpv3
|
||||
|
||||
# Make ARMv5 to allow more compilers to work, even though its v7a.
|
||||
PLATFORM_CPPFLAGS += -march=armv7-a
|
|
@ -0,0 +1,52 @@
|
|||
# Template file for 'odroid-u2-uboot'
|
||||
_githash=89f2ab95e7304fe02e5267f1282fbc178550d528
|
||||
pkgname=odroid-u2-uboot
|
||||
version=v2010.12
|
||||
revision=1
|
||||
wrksrc="u-boot-${_githash}"
|
||||
hostmakedepends="uboot-mkimage"
|
||||
short_desc="Odroid U2 U-Boot files for SD booting"
|
||||
maintainer="Enno Boland <eb@s01.de>"
|
||||
license="GPL-2"
|
||||
homepage="https://github.com/hardkernel/u-boot"
|
||||
distfiles="https://github.com/hardkernel/u-boot/archive/${_githash}.tar.gz"
|
||||
checksum="29593e636a0d908230910522aab74c09a35b92fee71b165d088f561e85ba3e1d"
|
||||
|
||||
create_srcdir=yes
|
||||
only_for_archs="armv7l"
|
||||
|
||||
_default_scr="boot-auto_edid.scr"
|
||||
|
||||
do_configure() {
|
||||
make mrproper
|
||||
patch -p1 < ${FILESDIR}/config.patch
|
||||
make smdk4412_config
|
||||
}
|
||||
|
||||
do_build() {
|
||||
unset CFLAGS CXXFLAGS LDFLAGS
|
||||
|
||||
if [ "$CROSS_BUILD" ]; then
|
||||
make ARCH=arm CROSS_COMPILE=${XBPS_CROSS_TRIPLET}-
|
||||
else
|
||||
make ARCH=arm
|
||||
fi
|
||||
|
||||
# Building uboot scr's
|
||||
for source in ${FILESDIR}/*.ini; do
|
||||
name=$(basename ${source%.ini})
|
||||
mkimage -A arm -T script -C none -n "${name}" -d $source ${name}.scr
|
||||
done
|
||||
|
||||
cp ${_default_scr} boot.scr
|
||||
}
|
||||
|
||||
do_install() {
|
||||
vinstall u-boot.bin 600 boot
|
||||
|
||||
# Install uboot scr's
|
||||
for scr in *.scr; do
|
||||
echo $scr
|
||||
vinstall $scr 600 boot
|
||||
done
|
||||
}
|
Loading…
Reference in New Issue