mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
added alarm/uboot-odroid-c1
This commit is contained in:
parent
eec3355f4e
commit
698337c51a
6 changed files with 6012 additions and 0 deletions
5827
alarm/uboot-odroid-c1/0001-add-ext4-support.patch
Normal file
5827
alarm/uboot-odroid-c1/0001-add-ext4-support.patch
Normal file
File diff suppressed because it is too large
Load diff
36
alarm/uboot-odroid-c1/0002-remove-cross-compiling.patch
Normal file
36
alarm/uboot-odroid-c1/0002-remove-cross-compiling.patch
Normal file
|
@ -0,0 +1,36 @@
|
|||
From 26b9caa2359554bca862fba7298cde0d393eaee1 Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
Date: Sun, 21 Dec 2014 18:04:05 -0700
|
||||
Subject: [PATCH 2/3] remove cross-compiling
|
||||
|
||||
---
|
||||
arch/arm/config.mk | 2 +-
|
||||
arch/arm/cpu/aml_meson/config.mk | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/config.mk b/arch/arm/config.mk
|
||||
index 0f9bffe..ecd547a 100755
|
||||
--- a/arch/arm/config.mk
|
||||
+++ b/arch/arm/config.mk
|
||||
@@ -21,7 +21,7 @@
|
||||
# MA 02111-1307 USA
|
||||
#
|
||||
|
||||
-CROSS_COMPILE ?= arm-none-eabi-
|
||||
+#CROSS_COMPILE ?= arm-none-eabi-
|
||||
#arm-linux-
|
||||
|
||||
ifeq ($(BOARD),omap2420h4)
|
||||
diff --git a/arch/arm/cpu/aml_meson/config.mk b/arch/arm/cpu/aml_meson/config.mk
|
||||
index cdf0bbc..07bd9a0 100755
|
||||
--- a/arch/arm/cpu/aml_meson/config.mk
|
||||
+++ b/arch/arm/cpu/aml_meson/config.mk
|
||||
@@ -1,4 +1,4 @@
|
||||
-CROSS_COMPILE=arm-none-eabi-
|
||||
+#CROSS_COMPILE=arm-none-eabi-
|
||||
ARM_CPU=cortex-a9
|
||||
PLATFORM_CPPFLAGS += $(call cc-option,-mcpu=cortex-a9 -ffixed-r8 -mno-long-calls -Wall -fPIC )
|
||||
#USE_PRIVATE_LIBGCC=yes
|
||||
--
|
||||
2.2.1
|
||||
|
41
alarm/uboot-odroid-c1/0003-sd_fusing-tweaks.patch
Normal file
41
alarm/uboot-odroid-c1/0003-sd_fusing-tweaks.patch
Normal file
|
@ -0,0 +1,41 @@
|
|||
From 4dd3392b9a0642fdbbfb9c00cf094f46c32cb210 Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
Date: Mon, 22 Dec 2014 09:55:32 -0700
|
||||
Subject: [PATCH 3/3] sd_fusing tweaks
|
||||
|
||||
---
|
||||
sd_fuse/sd_fusing.sh | 13 ++++++-------
|
||||
1 file changed, 6 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/sd_fuse/sd_fusing.sh b/sd_fuse/sd_fusing.sh
|
||||
index f0ce95a..f65980a 100755
|
||||
--- a/sd_fuse/sd_fusing.sh
|
||||
+++ b/sd_fuse/sd_fusing.sh
|
||||
@@ -12,18 +12,17 @@ if [ -z $1 ]; then
|
||||
fi
|
||||
|
||||
if [ ! -f $BL1 ]; then
|
||||
- echo "Error: $BL1 is not exist."
|
||||
+ echo "Error: $BL1 does not exist."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ ! -f $UBOOT ]; then
|
||||
- echo "Error: $UBOOT is not exist."
|
||||
+ echo "Error: $UBOOT does not exist."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
-sudo dd if=$BL1 of=$1 bs=1 count=442
|
||||
-sudo dd if=$BL1 of=$1 bs=512 skip=1 seek=1
|
||||
-sudo dd if=$UBOOT of=$1 bs=512 seek=64
|
||||
+dd if=$BL1 of=$1 bs=1 count=442
|
||||
+dd if=$BL1 of=$1 bs=512 skip=1 seek=1
|
||||
+dd if=$UBOOT of=$1 bs=512 seek=64
|
||||
sync
|
||||
-sudo eject $1
|
||||
-echo FINISH
|
||||
+echo "Successfully wrote U-Boot to $1"
|
||||
--
|
||||
2.2.1
|
||||
|
51
alarm/uboot-odroid-c1/PKGBUILD
Normal file
51
alarm/uboot-odroid-c1/PKGBUILD
Normal file
|
@ -0,0 +1,51 @@
|
|||
# U-Boot: ODROID-C1
|
||||
# Maintainer: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
|
||||
buildarch=4
|
||||
|
||||
pkgname=uboot-odroid-c1
|
||||
pkgver=2011.03
|
||||
pkgrel=1
|
||||
pkgdesc="U-Boot for ODROID-C1"
|
||||
arch=('armv7h')
|
||||
url="https://github.com/hardkernel/u-boot"
|
||||
license=('GPL')
|
||||
makedepends=('git' 'bc')
|
||||
backup=('boot/boot.ini')
|
||||
_commit=388b4ae60f25e5e1a7a625b2253a66d05ab725d0
|
||||
source=("https://github.com/hardkernel/u-boot/archive/${_commit}.tar.gz"
|
||||
'boot.ini'
|
||||
'0001-add-ext4-support.patch'
|
||||
'0002-remove-cross-compiling.patch'
|
||||
'0003-sd_fusing-tweaks.patch')
|
||||
md5sums=('b8b66d02d1fab2a4745a7b769bff4b0c'
|
||||
'4b96ce4971e9724fbf5197f29742ca17'
|
||||
'c8d1d5911a15ed995cf7fd57ef86b8fe'
|
||||
'127c91d5af47a6dd78fdaf19a77a5263'
|
||||
'645b00a999368d95c36d6cb5ef2f1076')
|
||||
|
||||
prepare() {
|
||||
cd u-boot-${_commit}
|
||||
|
||||
git apply ../0001-add-ext4-support.patch
|
||||
git apply ../0002-remove-cross-compiling.patch
|
||||
git apply ../0003-sd_fusing-tweaks.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
cd u-boot-${_commit}
|
||||
|
||||
unset CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
|
||||
|
||||
make distclean
|
||||
make odroidc_config
|
||||
make EXTRAVERSION=-${pkgrel}
|
||||
}
|
||||
|
||||
package() {
|
||||
cd u-boot-${_commit}/sd_fuse
|
||||
|
||||
mkdir -p "${pkgdir}"/boot
|
||||
cp bl1.bin.hardkernel sd_fusing.sh u-boot.bin "${pkgdir}"/boot
|
||||
cp "${srcdir}"/boot.ini "${pkgdir}"/boot
|
||||
}
|
25
alarm/uboot-odroid-c1/boot.ini
Normal file
25
alarm/uboot-odroid-c1/boot.ini
Normal file
|
@ -0,0 +1,25 @@
|
|||
ODROIDC-UBOOT-CONFIG
|
||||
|
||||
# Possible screen resolutions
|
||||
# Uncomment only a single Line! The line with setenv written.
|
||||
# At least one mode must be selected.
|
||||
|
||||
# setenv m "vga" # VGA 640x480
|
||||
# setenv m "480p" # 480p 720x480
|
||||
# setenv m "576p" # 576p 720x576
|
||||
# setenv m "800x480p60hz" # WVGA 800x480
|
||||
# setenv m "svga" # Super VGA 800x600
|
||||
# setenv m "xga" # XGA 1024x768
|
||||
setenv m "720p" # 720p 1280x720
|
||||
# setenv m "800p" # 800p(WXGA) 1280x800
|
||||
# setenv m "sxga" # SXGA 1280x1024
|
||||
# setenv m "1080p" # 1080P 1920x1080
|
||||
# setenv m "1920x1200" # 1920x1200
|
||||
|
||||
# HDMI BPP Mode
|
||||
# setenv m_bpp "32"
|
||||
setenv m_bpp "16"
|
||||
|
||||
setenv bootargs "console=ttyS0,115200n8 root=/dev/mmcblk0p1 rootwait rw no_console_suspend vdaccfg=0xa000 logo=osd1,loaded,0x7900000,720p,full dmfc=3 cvbsmode=576cvbs hdmimode=${m} m_bpp=${m_bpp} mac=${ethaddr}"
|
||||
setenv bootcmd "ext4load mmc 0:1 0x21000000 /boot/uImage; ext4load mmc 0:1 0x21800000 /boot/dtbs/meson8b_odroidc.dtb; bootm 0x21000000 - 0x21800000"
|
||||
run bootcmd
|
32
alarm/uboot-odroid-c1/uboot-odroid-c1.install
Normal file
32
alarm/uboot-odroid-c1/uboot-odroid-c1.install
Normal file
|
@ -0,0 +1,32 @@
|
|||
sd_fuse() {
|
||||
if [ ! -b /dev/mmcblk0 ]; then
|
||||
echo "No MMC device to flash, exiting."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "BL1 fusing"
|
||||
dd if=/boot/bl1.bin.hardkernel of=/dev/mmcblk0 bs=1 count=442
|
||||
dd if=/boot/bl1.bin.hardkernel of=/dev/mmcblk0 bs=512 skip=1 seek=1
|
||||
echo "u-boot fusing"
|
||||
dd if=/boot/u-boot.bin of=/dev/mmcblk0 bs=512 seek=64
|
||||
}
|
||||
|
||||
flash_uboot() {
|
||||
echo "A new U-Boot version needs to be flashed onto /dev/mmcblk0."
|
||||
echo "Do you want to do this now? [y|N]"
|
||||
read -r shouldwe
|
||||
if [[ $shouldwe =~ ^([yY][eE][sS]|[yY])$ ]]; then
|
||||
sd_fuse
|
||||
else
|
||||
echo "You can do this later by running:"
|
||||
echo "# cd /boot; ./sd_fusing.sh /dev/mmcblk0"
|
||||
fi
|
||||
}
|
||||
|
||||
post_install() {
|
||||
flash_uboot
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
flash_uboot
|
||||
}
|
Loading…
Reference in a new issue