Skip to content

Commit

Permalink
fix s812
Browse files Browse the repository at this point in the history
  • Loading branch information
150balbes committed Mar 30, 2018
1 parent dfd0169 commit 6be23ad
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 0 deletions.
31 changes: 31 additions & 0 deletions s812/etc/fw_env.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Configuration file for fw_(printenv/setenv) utility.
# Up to two entries are valid, in this case the redundant
# environment sector is assumed present.
# Notice, that the "Number of sectors" is not required on NOR and SPI-dataflash.
# Futhermore, if the Flash sector size is ommitted, this value is assumed to
# be the same as the Environment size, which is valid for NOR and SPI-dataflash

# NOR example
# MTD device name Device offset Env. size Flash sector size Number of sectors
#/dev/mtd1 0x0000 0x4000 0x4000
#/dev/mtd2 0x0000 0x4000 0x4000

# MTD SPI-dataflash example
# MTD device name Device offset Env. size Flash sector size Number of sectors
#/dev/mtd5 0x4200 0x4200
#/dev/mtd6 0x4200 0x4200

# NAND example
#/dev/mtd0 0x4000 0x4000 0x20000 2

# Block device example
#/dev/mmcblk0 0xc0000 0x20000

# VFAT example
#/boot/uboot.env 0x0000 0x4000

# Amlogic NAND
/dev/nand_env 0x000000 0x10000 0x10000

# Amlogic eMMC
/dev/env 0x000000 0x10000 0x10000
36 changes: 36 additions & 0 deletions s812/etc/hdmi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,39 @@ echo 1 > /sys/class/graphics/fb1/blank

#su -c 'hciattach /dev/ttyS1 any'

sleep 1

#bpp=32
bpp=24

mode=1080p
#mode=720p

echo "$mode" > /sys/class/display/mode

# Disable framebuffer scaling
echo 0 > /sys/class/ppmgr/ppscaler
echo 0 > /sys/class/graphics/fb0/free_scale
echo 1 > /sys/class/graphics/fb0/freescale_mode
echo 0 > /sys/class/graphics/fb1/free_scale

# Set framebuffer geometry to match the resolution
case $mode in
720*)
fbset -fb /dev/fb0 -g 1280 720 1280 1440 $bpp
;;
1080*)
fbset -fb /dev/fb0 -g 1920 1080 1920 2160 $bpp
;;
esac

# Enable framebuffer device
echo 0 > /sys/class/graphics/fb0/blank

# Blank fb1 to prevent static noise
echo 1 > /sys/class/graphics/fb1/blank

#echo 0 > /sys/devices/virtual/graphics/fbcon/cursor_blink

#su -c 'hciattach /dev/ttyS1 any'

Binary file added s812/usr/bin/fbset
Binary file not shown.
Binary file added s812/usr/bin/fw_printenv
Binary file not shown.
1 change: 1 addition & 0 deletions s812/usr/bin/fw_setenv

0 comments on commit 6be23ad

Please sign in to comment.