odroid-u2-base: splitting in odroid-u2-base and odroid-u2-uboot
This commit is contained in:
parent
036571eaf1
commit
35091282d4
|
@ -1,6 +1,6 @@
|
||||||
# Template file for 'odroid-u2-base'
|
# Template file for 'odroid-u2-base'
|
||||||
pkgname=odroid-u2-base
|
pkgname=odroid-u2-base
|
||||||
version=1.5
|
version=1.6
|
||||||
revision=1
|
revision=1
|
||||||
build_style=meta
|
build_style=meta
|
||||||
homepage="http://www.voidlinux.eu"
|
homepage="http://www.voidlinux.eu"
|
||||||
|
@ -9,7 +9,7 @@ maintainer="Enno Boland <eb@s01.de>"
|
||||||
license="Public Domain"
|
license="Public Domain"
|
||||||
|
|
||||||
only_for_archs="armv7l"
|
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"
|
||||||
depends="${makedepends}"
|
depends="${makedepends}"
|
||||||
hostmakedepends="uboot-mkimage"
|
hostmakedepends="uboot-mkimage"
|
||||||
|
|
||||||
|
@ -21,26 +21,11 @@ replaces="odroid-u2-ubootcfg>=0"
|
||||||
|
|
||||||
_default_scr="boot-auto_edid.scr"
|
_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() {
|
do_install() {
|
||||||
# Set proper perms to some devices.
|
# Set proper perms to some devices.
|
||||||
vmkdir usr/lib/udev/rules.d
|
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
|
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
|
# Install LED utilities
|
||||||
vinstall ${FILESDIR}/odroid-led 744 /usr/sbin
|
vinstall ${FILESDIR}/odroid-led 744 /usr/sbin
|
||||||
vinstall ${FILESDIR}/odroid-led.default 744 /etc/default odroid-led
|
vinstall ${FILESDIR}/odroid-led.default 744 /etc/default odroid-led
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
diff --git a/arch/arm/cpu/armv7/config.mk b/arch/arm/cpu/armv7/config.mk
|
||||||
|
index 560c084..03a1fb9 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
|
||||||
|
|
||||||
|
# If armv7-a is not supported by GCC fall-back to armv5, which is
|
||||||
|
# supported by more tool-chains
|
|
@ -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
|
|
@ -0,0 +1,20 @@
|
||||||
|
diff --git a/board/samsung/smdk4x12/smc.c b/board/samsung/smdk4x12/smc.c
|
||||||
|
index fe3c1ed..b278193 100644
|
||||||
|
--- a/board/samsung/smdk4x12/smc.c
|
||||||
|
+++ b/board/samsung/smdk4x12/smc.c
|
||||||
|
@@ -22,6 +22,7 @@ static inline u32 exynos_smc(u32 cmd, u32 arg1, u32 arg2, u32 arg3)
|
||||||
|
register u32 reg3 __asm__("r3") = arg3;
|
||||||
|
|
||||||
|
__asm__ volatile (
|
||||||
|
+ ".arch_extension sec\n"
|
||||||
|
"smc 0\n"
|
||||||
|
: "+r"(reg0), "+r"(reg1), "+r"(reg2), "+r"(reg3)
|
||||||
|
|
||||||
|
@@ -36,6 +37,7 @@ static inline u32 exynos_smc_read(u32 cmd)
|
||||||
|
register u32 reg1 __asm__("r1") = 0;
|
||||||
|
|
||||||
|
__asm__ volatile (
|
||||||
|
+ ".arch_extension sec\n"
|
||||||
|
"smc 0\n"
|
||||||
|
: "+r"(reg0), "+r"(reg1)
|
||||||
|
|
|
@ -0,0 +1,57 @@
|
||||||
|
# Template file for 'odroid-u2-uboot'
|
||||||
|
_githash=50140a35514f845a574bb21a8db04076c505bb42
|
||||||
|
pkgname=odroid-u2-uboot
|
||||||
|
version=v2012.07
|
||||||
|
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
|
||||||
|
http://dev.odroid.com/projects/4412boot/wiki/FrontPage?action=download&value=boot.tar.gz"
|
||||||
|
checksum="6478856a6c694f0718fe45dc4c1dc01d5cd1cfaca417ce047fc0619ccb0c0332
|
||||||
|
e0db737d9e49f937425e4778b0ab892623bcc389d7c26329ba2e97ae7bb475c4"
|
||||||
|
|
||||||
|
create_srcdir=yes
|
||||||
|
only_for_archs="armv7l"
|
||||||
|
|
||||||
|
_default_scr="boot-auto_edid.scr"
|
||||||
|
|
||||||
|
do_configure() {
|
||||||
|
patch -p1 < ${FILESDIR}/smc.patch
|
||||||
|
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 ${XBPS_BUILDDIR}/boot/E4412_S.bl1.HardKernel.bin 600 boot
|
||||||
|
vinstall ${XBPS_BUILDDIR}/boot/bl2.signed.bin 600 boot
|
||||||
|
vinstall ${XBPS_BUILDDIR}/boot/E4412_S.tzsw.signed.bin 600 boot
|
||||||
|
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