86 lines
1.8 KiB
Plaintext
86 lines
1.8 KiB
Plaintext
BOOTSOURCE='https://github.com/rafaello7/u-boot-nanopi-m3'
|
|
BOOTBRANCH='branch:master'
|
|
BOOTDIR='u-boot-s5p6818'
|
|
BOOTSCRIPT='boot-s5p6818.cmd:boot.cmd'
|
|
BOOTENV_FILE='s5p6818-default.txt'
|
|
|
|
UBOOT_TARGET_MAP=";;boot.img"
|
|
|
|
UBOOT_USE_GCC='> 6.3'
|
|
UBOOT_COMPILER='aarch64-linux-gnu-'
|
|
|
|
case $BRANCH in
|
|
default)
|
|
|
|
#BOOTSOURCE='https://github.com/friendlyarm/u-boot'
|
|
#BOOTBRANCH='branch:nanopi2-v2016.01'
|
|
#BOOTPATCHDIR='u-boot-s5p6818-default'
|
|
|
|
KERNELSOURCE='https://github.com/friendlyarm/linux'
|
|
KERNELBRANCH='branch:nanopi2-v4.4.y'
|
|
KERNELDIR='linux-s5p6818'
|
|
|
|
KERNEL_USE_GCC='> 6.0'
|
|
;;
|
|
|
|
dev)
|
|
KERNELSOURCE='https://github.com/rafaello7/linux-nanopi-m3'
|
|
KERNELBRANCH='branch:master'
|
|
KERNELDIR='linux-s5p6818'
|
|
|
|
KERNEL_USE_GCC='> 7.0'
|
|
;;
|
|
|
|
next)
|
|
KERNELSOURCE=$MAINLINE_KERNEL_SOURCE
|
|
KERNELBRANCH='branch:linux-4.14.y'
|
|
KERNELDIR=$MAINLINE_KERNEL_DIR
|
|
|
|
KERNEL_USE_GCC='> 7.0'
|
|
;;
|
|
esac
|
|
|
|
ARCH=arm64
|
|
KERNEL_IMAGE_TYPE=Image
|
|
|
|
KERNEL_USE_GCC='< 5.0'
|
|
|
|
CAN_BUILD_STRETCH=yes
|
|
|
|
HAS_UUID_SUPPORT=yes
|
|
|
|
GOVERNOR=ondemand
|
|
|
|
write_uboot_platform()
|
|
{
|
|
dd if=$1/boot.img of=$2 seek=1 status=noxfer > /dev/null 2>&1
|
|
}
|
|
|
|
uboot_custom_postprocess()
|
|
{
|
|
cp $SRC/packages/blobs/nanopim3/bl1-drone.bin boot.img
|
|
i=0
|
|
merge=""
|
|
while [ $i -lt 512 ]; do
|
|
val="00000000"; \
|
|
[ $i -eq 68 ] && val="00060000" # 0x44 load size
|
|
[ $i -eq 72 ] && val="43bffe00" # 0x48 load address
|
|
[ $i -eq 76 ] && val="43c00000" # 0x4c launch address
|
|
[ $i -eq 504 ] && val="68180300" # 0x1f8 version
|
|
[ $i -eq 508 ] && val="4849534E" # 0x1fc "NSIH"
|
|
# put in little endian
|
|
vallo=${val#????}
|
|
valhi=${val%????}
|
|
merge=$merge"${vallo#??}${vallo%??}${valhi#??}${valhi%??}"
|
|
i=$((i+4))
|
|
done
|
|
echo $merge | xxd -r -p | dd of=boot.img seek=63 status=none
|
|
cat u-boot.bin >> boot.img
|
|
}
|
|
|
|
family_tweaks()
|
|
{
|
|
echo "#Serial console allow root" >> $SDCARD/etc/securetty
|
|
echo "ttySAC0" >> $SDCARD/etc/securetty
|
|
}
|