Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
ayufan committed Apr 30, 2017
2 parents 94aa068 + 9cdee8e commit 15f7980
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 5 deletions.
Binary file modified blobs/boot0book.bin
Binary file not shown.
14 changes: 13 additions & 1 deletion blobs/pinebook.dts → blobs/pine64pinebook.dts
Original file line number Diff line number Diff line change
Expand Up @@ -2154,7 +2154,7 @@
screen0_output_type = <0x1>;
screen0_output_mode = <0x4>;
screen1_output_type = <0x3>;
screen1_output_mode = <0x5>;
screen1_output_mode = <0xa>;
fb0_format = <0x0>;
fb0_width = <0x0>;
fb0_height = <0x0>;
Expand Down Expand Up @@ -2213,6 +2213,8 @@
lcd_power2 = "vcc-hsic-12";
lcd_gpio_0 = <0x30 0x3 0x18 0x1 0x0 0xffffffff 0x0>;
lcd_gpio_1 = <0x30 0x7 0x6 0x1 0x0 0xffffffff 0x1>;
lcd_gpio_2 = <0x30 0x0 0x8 0x0 0x1 0xffffffff 0x0>;
lcd_gpio_3 = <0x30 0x0 0x9 0x0 0x1 0xffffffff 0x0>;
pinctrl-0 = <0xac>;
lcd_pin_power = "vcc-pd";
pinctrl-1 = <0xad>;
Expand Down Expand Up @@ -2892,6 +2894,16 @@
card_line = <0x8>;
pinctrl-0 = <0x9a>;
sdc_ex_dly_used = <0x2>;
tm4_smx_fx_0 = <0x0>;
tm4_smx_fx_1 = <0x0>;
tm4_smx_fx_2 = <0x2fffff>;
tm4_smx_fx_3 = <0x0>;
tm4_smx_fx_4 = <0xdffff>;
tm4_smx_fx_5 = <0x0>;
tm4_smx_fx_6 = <0xd2fffff>;
tm4_smx_fx_7 = <0xb2d>;
tm4_smx_fx_8 = <0x0>;
tm4_smx_fx_9 = <0x0>;
};

twi_para {
Expand Down
2 changes: 2 additions & 0 deletions kernel/install_kernel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ else
dtc -Odtb -o "$DEST/$SUBFOLDER/sun50i-a64-pine64.dtb" "$BLOBS/${basename}noplus.dts"
echo "Compiling device tree from $BLOBS/${basename}so.dts"
dtc -Odtb -o "$DEST/$SUBFOLDER/sun50i-a64-pine64-so.dtb" "$BLOBS/${basename}so.dts"
echo "Compiling device tree from $BLOBS/${basename}pinebook.dts"
dtc -Odtb -o "$DEST/$SUBFOLDER/sun50i-a64-pine64-pinebook.dtb" "$BLOBS/${basename}pinebook.dts"
fi

if [ ! -e "$DEST/uEnv.txt" ]; then
Expand Down
24 changes: 24 additions & 0 deletions simpleimage/flash_boot0_only.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/sh
#
# Simple script to replace boot0.bin in an existing image.
#

set -e

out="$1"
boot0="$2"

if [ -z "$out" ]; then
echo "Usage: $0 /dev/sdX [<boot0.bin>]"
exit 1
fi

if [ -z "$boot0" ]; then
boot0="../blobs/boot0.bin"
fi
boot0_position=8 # KiB
boot0_size=$(wc -c $boot0)

pv "$boot0" | dd conv=notrunc bs=1k seek=$boot0_position count=32 oflag=direct of="$out"

sync
19 changes: 15 additions & 4 deletions u-boot-postprocess/u-boot-postprocess.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,32 @@ BLOBS="../blobs"
UBOOT="../u-boot-pine64"
# https://github.com/longsleep/arm-trusted-firmware-pine64
TRUSTED_FIRMWARE="../arm-trusted-firmware-pine64"
TRUSTED_FIRMWARE_BUILD="release"
# https://github.com/longsleep/sunxi-pack-tools
SUNXI_PACK_TOOLS="../sunxi-pack-tools/bin"

if [ "$1" = "-h" -o "$1" = "--help" ]; then
echo "Usage: $0 [<pine64|pine64pinebook>] [<trusted-firmware-build>]"
exit 1
fi
MODEL="$1"

TRUSTED_FIRMWARE_BUILD="$2"
if [ -z "$TRUSTED_FIRMWARE_BUILD" ]; then
TRUSTED_FIRMWARE_BUILD="release"
fi

BUILD="../build"
mkdir -p $BUILD

echo "ATF build: $TRUSTED_FIRMWARE_BUILD"
cp -avf $TRUSTED_FIRMWARE/build/sun50iw1p1/$TRUSTED_FIRMWARE_BUILD/bl31.bin $BUILD
cp -avf $UBOOT/u-boot-sun50iw1p1.bin $BUILD/u-boot.bin
cp -avf $BLOBS/scp.bin $BUILD
cp -avf $BLOBS/sys_config.fex $BUILD

# build binary device tree
dtc -Odtb -o $BUILD/pine64.dtb $BLOBS/pine64.dts
echo "Device tree model: $MODEL"
dtc -Odtb -o $BUILD/$MODEL.dtb $BLOBS/$MODEL.dts

unix2dos $BUILD/sys_config.fex
$SUNXI_PACK_TOOLS/script $BUILD/sys_config.fex
Expand All @@ -38,10 +50,9 @@ $SUNXI_PACK_TOOLS/merge_uboot $BUILD/u-boot.bin $BUILD/bl31.bin $BUILD/u-boot-me
$SUNXI_PACK_TOOLS/merge_uboot $BUILD/u-boot-merged.bin $BUILD/scp.bin $BUILD/u-boot-merged2.bin scp

# update_fdt.exe u-boot.bin xxx.dtb output_file.bin
$SUNXI_PACK_TOOLS/update_uboot_fdt $BUILD/u-boot-merged2.bin $BUILD/pine64.dtb $BUILD/u-boot-with-dtb.bin
$SUNXI_PACK_TOOLS/update_uboot_fdt $BUILD/u-boot-merged2.bin $BUILD/$MODEL.dtb $BUILD/u-boot-with-dtb.bin

# Add fex file to u-boot so it actually is accepted by boot0.
$SUNXI_PACK_TOOLS/update_uboot $BUILD/u-boot-with-dtb.bin $BUILD/sys_config.bin

echo "Done - created $BUILD/u-boot-with-dtb.bin"

0 comments on commit 15f7980

Please sign in to comment.