From 7cccaaca06c3d2c7673a2f34f6b3d7cba8b81a79 Mon Sep 17 00:00:00 2001 From: jbnadal Date: Fri, 31 Mar 2017 12:55:10 +0200 Subject: [PATCH] start uboot and launch Kernel on RPI3 TG-07 #closed. --- bsp/board/domo/scripts/post-build.sh | 2 +- bsp/scripts/git-delete-history.sh | 24 ++++++++++ projects/rpi3_domo/configs/buildroot.config | 52 +++++++++++---------- projects/rpi3_domo/configs/config.txt | 28 ++--------- projects/rpi3_domo/configs/genimage.config | 9 +++- projects/rpi3_domo/post-build.sh | 2 +- projects/rpi3_domo/uboot/boot.cmd | 6 +-- 7 files changed, 67 insertions(+), 56 deletions(-) create mode 100755 bsp/scripts/git-delete-history.sh diff --git a/bsp/board/domo/scripts/post-build.sh b/bsp/board/domo/scripts/post-build.sh index 1bf83235..66f3d575 100755 --- a/bsp/board/domo/scripts/post-build.sh +++ b/bsp/board/domo/scripts/post-build.sh @@ -13,7 +13,7 @@ function error { set -e trap error ERR -echo "==> Raspberry post-build:" +echo "==> Domo post-build:" echo "BR_STAGING: ${BR_STAGING}" echo "BR_PROJECT: " ${BR_PROJECT} diff --git a/bsp/scripts/git-delete-history.sh b/bsp/scripts/git-delete-history.sh new file mode 100755 index 00000000..128a9d9e --- /dev/null +++ b/bsp/scripts/git-delete-history.sh @@ -0,0 +1,24 @@ +#!/bin/bash +set -o errexit + +# Author: David Underhill +# Script to permanently delete files/folders from your git repository. To use +# it, cd to your repository's root and then run the script with a list of paths +# you want to delete, e.g., git-delete-history path1 path2 + +if [ $# -eq 0 ]; then + exit 0 +fi + +# make sure we're at the root of git repo +if [ ! -d .git ]; then + echo "Error: must run this script from the root of a git repository" + exit 1 +fi + +# remove all paths passed as arguments from the history of the repo +files=$@ +git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch $files" HEAD + +# remove the temporary history git-filter-branch otherwise leaves behind for a long time +rm -rf .git/refs/original/ && git reflog expire --all && git gc --aggressive --prune diff --git a/projects/rpi3_domo/configs/buildroot.config b/projects/rpi3_domo/configs/buildroot.config index 97ca3ee5..a13dd478 100644 --- a/projects/rpi3_domo/configs/buildroot.config +++ b/projects/rpi3_domo/configs/buildroot.config @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Buildroot 2017.02-gdb3461f-dirty Configuration +# Buildroot 2017.02-g7907ecd-dirty Configuration # BR2_HAVE_DOT_CONFIG=y BR2_HOST_GCC_AT_LEAST_4_5=y @@ -42,8 +42,8 @@ BR2_arm=y BR2_ARCH="arm" BR2_ENDIAN="LITTLE" BR2_GCC_TARGET_ABI="aapcs-linux" -BR2_GCC_TARGET_CPU="cortex-a7" -BR2_GCC_TARGET_FPU="neon-vfpv4" +BR2_GCC_TARGET_CPU="cortex-a53" +BR2_GCC_TARGET_FPU="fp-armv8" BR2_GCC_TARGET_FLOAT_ABI="hard" BR2_GCC_TARGET_MODE="arm" BR2_BINFMT_SUPPORTS_SHARED=y @@ -52,9 +52,10 @@ BR2_ARM_CPU_HAS_NEON=y BR2_ARM_CPU_HAS_VFPV2=y BR2_ARM_CPU_HAS_VFPV3=y BR2_ARM_CPU_HAS_VFPV4=y +BR2_ARM_CPU_HAS_FP_ARMV8=y BR2_ARM_CPU_HAS_ARM=y BR2_ARM_CPU_HAS_THUMB2=y -BR2_ARM_CPU_ARMV7A=y +BR2_ARM_CPU_ARMV8=y # BR2_arm920t is not set # BR2_arm922t is not set # BR2_arm926t is not set @@ -64,13 +65,13 @@ BR2_ARM_CPU_ARMV7A=y # BR2_arm1176jzf_s is not set # BR2_arm11mpcore is not set # BR2_cortex_a5 is not set -BR2_cortex_a7=y +# BR2_cortex_a7 is not set # BR2_cortex_a8 is not set # BR2_cortex_a9 is not set # BR2_cortex_a12 is not set # BR2_cortex_a15 is not set # BR2_cortex_a17 is not set -# BR2_cortex_a53 is not set +BR2_cortex_a53=y # BR2_cortex_a57 is not set # BR2_cortex_a72 is not set # BR2_cortex_m3 is not set @@ -88,7 +89,9 @@ BR2_ARM_EABIHF=y # BR2_ARM_FPU_VFPV4 is not set # BR2_ARM_FPU_VFPV4D16 is not set # BR2_ARM_FPU_NEON is not set -BR2_ARM_FPU_NEON_VFPV4=y +# BR2_ARM_FPU_NEON_VFPV4 is not set +BR2_ARM_FPU_FP_ARMV8=y +# BR2_ARM_FPU_NEON_FP_ARMV8 is not set BR2_ARM_INSTRUCTIONS_ARM=y # BR2_ARM_INSTRUCTIONS_THUMB2 is not set @@ -141,10 +144,10 @@ BR2_STRIP_EXCLUDE_DIRS="" # BR2_OPTIMIZE_G is not set BR2_OPTIMIZE_S=y # BR2_GOOGLE_BREAKPAD_ENABLE is not set - -# -# Stack Smashing Protection needs a toolchain w/ SSP -# +BR2_SSP_NONE=y +# BR2_SSP_REGULAR is not set +# BR2_SSP_STRONG is not set +# BR2_SSP_ALL is not set # BR2_STATIC_LIBS is not set BR2_SHARED_LIBS=y # BR2_SHARED_STATIC_LIBS is not set @@ -168,6 +171,10 @@ BR2_TOOLCHAIN_EXTERNAL=y # # Toolchain External Options # + +# +# Linaro toolchains available for Cortex-A + EABIhf +# # BR2_TOOLCHAIN_EXTERNAL_LINARO_ARM is not set # @@ -226,7 +233,7 @@ BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_4=y # BR2_TOOLCHAIN_EXTERNAL_CUSTOM_UCLIBC is not set BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y # BR2_TOOLCHAIN_EXTERNAL_CUSTOM_MUSL is not set -# BR2_TOOLCHAIN_EXTERNAL_HAS_SSP is not set +BR2_TOOLCHAIN_EXTERNAL_HAS_SSP=y BR2_TOOLCHAIN_EXTERNAL_INET_RPC=y BR2_TOOLCHAIN_EXTERNAL_CXX=y BR2_TOOLCHAIN_EXTRA_EXTERNAL_LIBS="" @@ -248,6 +255,7 @@ BR2_TOOLCHAIN_HAS_THREADS=y BR2_TOOLCHAIN_HAS_THREADS_DEBUG=y BR2_TOOLCHAIN_HAS_THREADS_NPTL=y BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS=y +BR2_TOOLCHAIN_HAS_SSP=y BR2_TOOLCHAIN_SUPPORTS_PIE=y # BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY is not set BR2_USE_MMU=y @@ -311,6 +319,7 @@ BR2_TARGET_GENERIC_PASSWD_MD5=y BR2_TARGET_GENERIC_PASSWD_METHOD="md5" BR2_INIT_BUSYBOX=y # BR2_INIT_SYSV is not set +# BR2_INIT_SYSTEMD is not set # BR2_INIT_NONE is not set # BR2_ROOTFS_DEVICE_CREATION_STATIC is not set BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y @@ -362,8 +371,8 @@ BR2_LINUX_KERNEL_CUSTOM_GIT=y # BR2_LINUX_KERNEL_CUSTOM_HG is not set # BR2_LINUX_KERNEL_CUSTOM_SVN is not set BR2_LINUX_KERNEL_CUSTOM_REPO_URL="ssh://git@serveur.nadal-fr.com:5023/PI/linux.git" -BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="4_4_43" -BR2_LINUX_KERNEL_VERSION="4_4_43" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="tags/4_4_43" +BR2_LINUX_KERNEL_VERSION="tags/4_4_43" BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL)/patches/linux/rpi/" # BR2_LINUX_KERNEL_USE_DEFCONFIG is not set # BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG is not set @@ -516,7 +525,6 @@ BR2_PACKAGE_GOOGLE_BREAKPAD_ARCH_SUPPORTS=y # BR2_PACKAGE_IOZONE is not set # BR2_PACKAGE_KEXEC is not set # BR2_PACKAGE_KTAP is not set -# BR2_PACKAGE_KVM_UNIT_TESTS is not set # BR2_PACKAGE_LATENCYTOP is not set # BR2_PACKAGE_LMBENCH is not set # BR2_PACKAGE_LTP_TESTSUITE is not set @@ -545,7 +553,6 @@ BR2_PACKAGE_OPROFILE_ARCH_SUPPORTS=y BR2_PACKAGE_TRINITY_ARCH_SUPPORTS=y # BR2_PACKAGE_TRINITY is not set # BR2_PACKAGE_UCLIBC_NG_TEST is not set -# BR2_PACKAGE_VALGRIND is not set # BR2_PACKAGE_WHETSTONE is not set # @@ -879,7 +886,6 @@ BR2_PACKAGE_UBOOT_TOOLS_FWPRINTENV=y # usbutils needs udev /dev management and toolchain w/ threads # # BR2_PACKAGE_W_SCAN is not set -# BR2_PACKAGE_WF111 is not set # BR2_PACKAGE_WIPE is not set # BR2_PACKAGE_XORRISO is not set @@ -1204,7 +1210,10 @@ BR2_PACKAGE_LIBAIO_ARCH_SUPPORTS=y # BR2_PACKAGE_LIBXKBCOMMON is not set # BR2_PACKAGE_MRAA is not set # BR2_PACKAGE_MTDEV is not set -# BR2_PACKAGE_NE10 is not set + +# +# ne10 needs a toolchain w/ neon +# # BR2_PACKAGE_NEARDAL is not set # BR2_PACKAGE_OWFS is not set # BR2_PACKAGE_PCSC_LITE is not set @@ -1495,9 +1504,6 @@ BR2_PACKAGE_LIBURCU_ARCH_SUPPORTS=y # BR2_PACKAGE_MPFR is not set # BR2_PACKAGE_MSGPACK is not set # BR2_PACKAGE_MTDEV2TUIO is not set -BR2_PACKAGE_OPENBLAS_DEFAULT_TARGET="ARMV7" -BR2_PACKAGE_OPENBLAS_ARCH_SUPPORTS=y -# BR2_PACKAGE_OPENBLAS is not set # BR2_PACKAGE_ORC is not set # BR2_PACKAGE_P11_KIT is not set # BR2_PACKAGE_POCO is not set @@ -1944,7 +1950,6 @@ BR2_PACKAGE_SYSTEMD_ARCH_SUPPORTS=y # BR2_PACKAGE_TPM_TOOLS is not set # BR2_PACKAGE_UNSCD is not set # BR2_PACKAGE_UTIL_LINUX is not set -# BR2_PACKAGE_XEN is not set BR2_PACKAGE_XVISOR_ARCH_SUPPORTS=y # BR2_PACKAGE_XVISOR is not set @@ -2005,7 +2010,6 @@ BR2_TARGET_ROOTFS_EXT2_NONE=y # BR2_TARGET_BAREBOX is not set # BR2_TARGET_MXS_BOOTLETS is not set # BR2_TARGET_S500_BOOTLOADER is not set -# BR2_TARGET_TS4800_MBRBOOT is not set BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY=y # BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG is not set @@ -2018,7 +2022,7 @@ BR2_TARGET_UBOOT_LATEST_VERSION=y # BR2_TARGET_UBOOT_CUSTOM_SVN is not set BR2_TARGET_UBOOT_VERSION="2017.01" BR2_TARGET_UBOOT_PATCH="" -BR2_TARGET_UBOOT_NEEDS_DTC=y +# BR2_TARGET_UBOOT_NEEDS_DTC is not set # BR2_TARGET_UBOOT_NEEDS_OPENSSL is not set # diff --git a/projects/rpi3_domo/configs/config.txt b/projects/rpi3_domo/configs/config.txt index 3d70323e..4760682e 100644 --- a/projects/rpi3_domo/configs/config.txt +++ b/projects/rpi3_domo/configs/config.txt @@ -1,26 +1,6 @@ -# Please note that this is only a sample, we recommend you to change it to fit -# your needs. -# You should override this file using a post-build script. -# See http://buildroot.org/manual.html#rootfs-custom -# and http://elinux.org/RPiconfig for a description of config.txt syntax - kernel=u-boot.bin - -# To use an external initramfs file -#initramfs rootfs.cpio.gz - -# Disable overscan assuming the display supports displaying the full resolution -# If the text shown on the screen disappears off the edge, comment this out -disable_overscan=1 - -# How much memory in MB to assign to the GPU on Pi models having -# 256, 512 or 1024 MB total memory -gpu_mem_256=100 -gpu_mem_512=100 -gpu_mem_1024=100 - -# Enable audio (loads snd_bcm2835) -dtparam=audio=on - -# fixes rpi3 ttyAMA0 serial console +enable_uart=1 +device_tree_address=0x100 +device_tree=bcm2837-rpi-3-b.dtb dtoverlay=pi3-miniuart-bt +dtparam=audio=on diff --git a/projects/rpi3_domo/configs/genimage.config b/projects/rpi3_domo/configs/genimage.config index 2d6e5237..32eaadcd 100644 --- a/projects/rpi3_domo/configs/genimage.config +++ b/projects/rpi3_domo/configs/genimage.config @@ -4,11 +4,16 @@ image boot.vfat { "bcm2710-rpi-3-b.dtb", "rpi-firmware/bootcode.bin", "rpi-firmware/cmdline.txt", - "rpi-firmware/config.txt", "rpi-firmware/fixup.dat", "rpi-firmware/start.elf", "rpi-firmware/overlays", - "u-boot.bin" + "u-boot.bin", + "config.txt", + "boot.scr", + "dev.scr", + "update.scr", + "rootfs.cpio.uboot", + "zImage" } } size = 32M diff --git a/projects/rpi3_domo/post-build.sh b/projects/rpi3_domo/post-build.sh index d4be0e81..7ae82ec1 100755 --- a/projects/rpi3_domo/post-build.sh +++ b/projects/rpi3_domo/post-build.sh @@ -10,7 +10,7 @@ function error { set -e trap error ERR -echo "==> POSTBUILD:" +echo "==> ${BR_PROJECT} POSTBUILD:" echo "BR_STAGING: ${BR_STAGING}" echo "BR_PROJECT: " ${BR_PROJECT} diff --git a/projects/rpi3_domo/uboot/boot.cmd b/projects/rpi3_domo/uboot/boot.cmd index f8a3bbaf..ab1e15e2 100644 --- a/projects/rpi3_domo/uboot/boot.cmd +++ b/projects/rpi3_domo/uboot/boot.cmd @@ -1,8 +1,6 @@ mmc dev 0 fatload mmc 0:1 ${kernel_addr_r} zImage -fatload mmc 0:1 ${fdt_addr_r} pi_Domo.dtb +fatload mmc 0:1 ${fdt_addr_r} bcm2710-rpi-3-b.dtb fatload mmc 0:1 ${ramdisk_addr_r} rootfs.cpio.uboot -setenv mmc_freq 'sdhci-bcm2708.emmc_clock_freq=250000000 sdhci-bcm2708.enable_llm=0' -setenv bootargs ${mmc_freq} console=ttyAMA0,115200 +setenv bootargs dwc_otg.lpm_enable=0 8250.nr_uarts=1 console=ttyS0,115200 kgdboc=ttyS0,115200 console=tty1 bootz ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r} -#smsc95xx.macaddr=${ethaddr} \ No newline at end of file