New package: odroid-c2-uboot-v2015.01

This commit is contained in:
Christian Neukirchen 2016-05-04 19:15:49 +02:00
parent 4c035183ea
commit 1282084372
4 changed files with 196 additions and 0 deletions

View file

@ -0,0 +1,85 @@
ODROIDC2-UBOOT-CONFIG
# Possible screen resolutions
# Uncomment only a single Line! The line with setenv written.
# At least one mode must be selected.
# 480 Lines (720x480)
# setenv m "480i60hz" # Interlaced 60Hz
# setenv m "480i_rpt" # Interlaced for Rear Projection Televisions 60Hz
# setenv m "480p60hz" # 480 Progressive 60Hz
# setenv m "480p_rpt" # 480 Progressive for Rear Projection Televisions 60Hz
# 576 Lines (720x576)
# setenv m "576i50hz" # Interlaced 50Hz
# setenv m "576i_rpt" # Interlaced for Rear Projection Televisions 50Hz
# setenv m "576p50hz" # Progressive 50Hz
# setenv m "576p_rpt" # Progressive for Rear Projection Televisions 50Hz
# 720 Lines (1280x720)
# setenv m "720p50hz" # 50Hz
# setenv m "720p60hz" # 60Hz
# 1080 Lines (1920x1080)
# setenv m "1080i60hz" # Interlaced 60Hz
setenv m "1080p60hz" # Progressive 60Hz
# setenv m "1080i50hz" # Interlaced 50Hz
# setenv m "1080p50hz" # Progressive 50Hz
# setenv m "1080p24hz" # Progressive 24Hz
# 4K (3840x2160)
# setenv m "2160p30hz" # Progressive 30Hz
# setenv m "2160p25hz" # Progressive 25Hz
# setenv m "2160p24hz" # Progressive 24Hz
# setenv m "smpte24hz" # Progressive 24Hz SMPTE
# setenv m "2160p50hz" # Progressive 50Hz
# setenv m "2160p60hz" # Progressive 60Hz
# setenv m "2160p50hz420" # Progressive 50Hz with YCbCr 4:2:0 (Requires TV/Monitor that supports it)
# setenv m "2160p60hz420" # Progressive 60Hz with YCbCr 4:2:0 (Requires TV/Monitor that supports it)
### VESA modes ###
# setenv m "640x480p60hz"
# setenv m "800x480p60hz"
# setenv m "800x600p60hz"
# setenv m "1024x600p60hz"
# setenv m "1024x768p60hz"
# setenv m "1280x800p60hz"
# setenv m "1280x1024p60hz"
# setenv m "1360x768p60hz"
# setenv m "1440x900p60hz"
# setenv m "1600x900p60hz"
# setenv m "1680x1050p60hz"
# setenv m "1920x1200p60hz"
# HDMI BPP Mode
setenv m_bpp "32"
# setenv m_bpp "24"
# setenv m_bpp "16"
# HDMI DVI/VGA modes
# Uncomment only a single Line! The line with setenv written.
# At least one mode must be selected.
# setenv vout "dvi"
# setenv vout "vga"
# Default Console Device Setting
setenv condev "console=ttyS0,115200n8 console=tty0" # on both
###########################################
# Boot Arguments
setenv bootargs "root=/dev/mmcblk0p1 rootwait rw ${condev} no_console_suspend hdmimode=${m} m_bpp=${m_bpp} vout=${vout}"
# Booting
setenv loadaddr "0x11000000"
setenv dtb_loadaddr "0x1000000"
setenv initrd_loadaddr "0x13000000"
load mmc 0:1 ${loadaddr} /boot/Image
load mmc 0:1 ${dtb_loadaddr} /boot/dtbs/meson64_odroidc2.dtb
#load mmc 0:1 ${initrd_loadaddr} /boot/initramfs-linux.img
#booti ${loadaddr} ${initrd_loadaddr}:${filesize} ${dtb_loadaddr}
booti ${loadaddr} - ${dtb_loadaddr}

View file

@ -0,0 +1,41 @@
From 12983d91742d4b981d032b94a5349427670b2cc9 Mon Sep 17 00:00:00 2001
From: Kevin Mihelich <kevin@archlinuxarm.org>
Date: Wed, 3 Feb 2016 20:59:26 -0700
Subject: [PATCH 2/4] sd_fusing tweaks
---
sd_fuse/sd_fusing.sh | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
--- sd_fuse/sd_fusing.sh
+++ sd_fuse/sd_fusing.sh
@@ -15,20 +15,19 @@ if [ -z $1 ]; then
fi
if [ ! -f $BL1 ]; then
- echo "error: $BL1 is not exist"
+ echo "error: $BL1 does not exist"
exit 1
fi
if [ ! -f $UBOOT ]; then
- echo "error: $UBOOT is not exist"
+ echo "error: $UBOOT does not exist"
exit 1
fi
-sudo dd if=$BL1 of=$1 conv=fsync bs=1 count=442
-sudo dd if=$BL1 of=$1 conv=fsync bs=512 skip=1 seek=1
-sudo dd if=$UBOOT of=$1 conv=fsync bs=512 seek=97
+dd if=$BL1 of=$1 conv=fsync bs=1 count=442
+dd if=$BL1 of=$1 conv=fsync bs=512 skip=1 seek=1
+dd if=$UBOOT of=$1 conv=fsync bs=512 seek=97
sync
-sudo eject $1
-echo Finished.
+echo "Successfully wrote U-Boot to $1"
--
2.7.1

View file

@ -0,0 +1,30 @@
--- common/cmd_cfgload.c
+++ common/cmd_cfgload.c
@@ -52,7 +52,7 @@ static char* read_cfgload(void)
setenv("filesize", "0");
- sprintf(cmd, "fatload mmc 0:1 0x%p boot.ini", (void *)p);
+ sprintf(cmd, "load mmc 0:1 0x%p /boot/boot.ini", (void *)p);
run_command(cmd, 0);
filesize = getenv_ulong("filesize", 16, 0);
--- include/configs/odroidc2.h
+++ include/configs/odroidc2.h
@@ -75,6 +75,13 @@
#define CONFIG_BOOTDELAY 1 // Seconds
#define CONFIG_ABORTBOOT_WITH_ENTERKEY
+/* Void */
+#define CONFIG_CMD_FS_GENERIC
+#define CONFIG_SUPPORT_RAW_INITRD
+#define CONFIG_IDENT_STRING " Void Linux"
+#define CONFIG_CMD_PART
+#define CONFIG_PARTITION_UUIDS
+
/* args/envs */
#define CONFIG_SYS_MAXARGS 64
--
2.7.1

View file

@ -0,0 +1,40 @@
# Template file for 'odroid-c2-uboot'
pkgname=odroid-c2-uboot
version=v2015.01
revision=1
_githash=f416a769454b89c39d5b217d28bd3c9f5d1594df
wrksrc="u-boot-${_githash}"
only_for_archs="aarch64 aarch64-musl"
conf_files="/boot/boot.ini"
short_desc="Odroid C2 U-Boot files for SD booting"
maintainer="Christian Neukirchen <chneukirchen@gmail.com>"
license="GPL-2"
homepage="https://github.com/hardkernel/u-boot"
distfiles="https://github.com/hardkernel/u-boot/archive/${_githash}.tar.gz"
checksum=da7ca9e6abdfedaa65ac4e0bd378155002bf5d0ccea663ddf03fa839dceb3724
post_extract() {
touch include/stddef.h # musl hack
}
do_configure() {
unset CFLAGS CXXFLAGS LDFLAGS
make distclean CROSS_COMPILE=${XBPS_CROSS_TRIPLET}-
make odroidc2_config CROSS_COMPILE=${XBPS_CROSS_TRIPLET}-
}
do_build() {
unset CFLAGS CXXFLAGS LDFLAGS
if [ "$CROSS_BUILD" ]; then
make ARCH=arm CROSS_COMPILE=${XBPS_CROSS_TRIPLET}-
else
make ARCH=arm
fi
}
do_install() {
vmkdir boot
vinstall sd_fuse/bl1.bin.hardkernel 644 boot
vinstall sd_fuse/u-boot.bin 644 boot
vinstall sd_fuse/sd_fusing.sh 755 boot
vinstall ${FILESDIR}/boot.ini 644 boot
}